-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run example given on README [sounddevice.PortAudioError] #116
Comments
Hi @ankurdhuriya, I don't have an apple device to verify it, but I suspect this may be related to issue #99. You can view the available devices with |
I think I may have a temporary solution to this. Diart provides a from torchaudio.io import StreamReader
from diart import OnlineSpeakerDiarization
from diart.sources import TorchStreamAudioSource
from diart.inference import RealTimeInference
from diart.sinks import RTTMWriter
pipeline = OnlineSpeakerDiarization()
streamer = StreamReader("0:0", format="avfoundation")
mic = TorchStreamAudioSource(
uri="live_recording",
sample_rate=pipeline.config.sample_rate,
streamer=streamer,
stream_index=0,
)
inference = RealTimeInference(pipeline, mic, do_plot=True)
inference.attach_observers(RTTMWriter(mic.uri, "/output/file.rttm"))
prediction = inference() This should automatically grab the Mac's default microphone. |
Implemented in #182. Will appear in next release (v0.8). Feel free to reopen if needed |
portaudio==19.7.0
sounddevice==0.4.5
Platform, Operating System, and Programming Language
Platform : Apple M2
OS : macOS Ventura 13.1
Programming Language : Python 3.8.15
The text was updated successfully, but these errors were encountered: