marxtseng / google-assistant-with-snowboy

0 stars 3 forks source link

OSError: [Errno -9985] Device unavailable #1

Open elhanafi5480 opened 5 years ago

elhanafi5480 commented 5 years ago

hey , thank you for your shared subject.

i get an error that the device unavailable (microphone) that's occur when a specific program uses the microphone and another stream order to microphone . did u try that code before

elhanafi5480 commented 5 years ago

INFO:root:Connecting to embeddedassistant.googleapis.com INFO:root:Using device model picosmart-picosmart-56m6ij and device id afad99ac-efe0-11e9-80a4-b827eb819c5b Listening... , Press Ctrl+C to exit Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736 Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904 Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171 Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2840 Traceback (most recent call last): File "demo.py", line 469, in main() File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(args, *kwargs) File "demo.py", line 466, in main listening() File "demo.py", line 458, in listening detector.start(detected_callback=detectedCallback, sleep_time=0.01) File "/home/pi/google-assistant-with-snowboy/raspberrypi/snowboydecoder.py", line 176, in start stream_callback=audio_callback) File "/home/pi/env/lib/python3.5/site-packages/pyaudio.py", line 750, in open stream = Stream(self, args, kwargs) File "/home/pi/env/lib/python3.5/site-packages/pyaudio.py", line 441, in init self._stream = pa.open(arguments) OSError: [Errno -9985] Device unavailable

Mallinanga commented 4 years ago

Same here