sounddevice.PortAudioError: Error opening InputStream: Device unavailable [PaErrorCode -9985]
See original GitHub issueWhen trying to record, I use the line
myrecording = sd.rec(duration * fs, samplerate=fs, channels=2,dtype='float64')
This leads to
> Traceback (most recent call last):
File "sd_test.py", line 7, in <module>
myrecording = sd.rec(duration * fs, samplerate=fs, channels=2,dtype='float64')
File "C:\Users\gwerner004\AppData\Local\Programs\Python\Python36\lib\site-packages\sounddevice.py", line 224, in rec
ctx.input_dtype, callback, blocking, **kwargs)
File "C:\Users\gwerner004\AppData\Local\Programs\Python\Python36\lib\site-packages\sounddevice.py", line 2417, in start_stream
**kwargs)
File "C:\Users\gwerner004\AppData\Local\Programs\Python\Python36\lib\site-packages\sounddevice.py", line 1301, in __init__
**_remove_self(locals()))
File "C:\Users\gwerner004\AppData\Local\Programs\Python\Python36\lib\site-packages\sounddevice.py", line 780, in __init__
'Error opening {0}'.format(self.__class__.__name__))
File "C:\Users\gwerner004\AppData\Local\Programs\Python\Python36\lib\site-packages\sounddevice.py", line 2572, in _check
raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening InputStream: Device unavailable [PaErrorCode -9985]
When I do python -m sounddevice
I get this line:
> 1 Microphone (Plantronics C320), MME (2 in, 0 out)
Why would this device not be available for recording?
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Error opening OutputStream: Invalid number of channels ...
sounddevice.play is interpreting this as a single sample with 4999 channels! Try transposing the array, so play sees the array as 4999 samples ......
Read more >python-sounddevice, version 0.3.7 - Read the Docs
Pa_GetDeviceInfo(device) if not info: raise PortAudioError('Error querying ... prime_output_buffers_using_stream_callback=None): """Open an input stream.
Read more >spatialaudio - Bountysource
PortAudioError : Error opening InputStream: Internal PortAudio error ... PortAudioError: Error opening InputStream: Device unavailable [PaErrorCode -9985].
Read more >Pyaudio Does Not Work And Breaks Sound On Ubuntu
... pygame PortAudioError: Error opening InputStream: Device unavailable [PaErrorCode 9985] 0 fix the problem and tried uninstalling/installing sounddevice ...
Read more >Trouble using pyaudio and sounddevice on raspberry pi
Hello, I am having some touble using pyaudio and sounddevice to ... Error opening OutputStream: Invalid sample rate [PaErrorCode -9997].
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I resolved this by enabling
"Let apps access your microphone"
in Windows 10/11. a setting inPrivacy & Security > Microphone
Uninstalling sounddevice from
pip
and reinstalling usingconda
worked for me