sounddevice.PortAudioError: Error opening OutputStream: Device unavailable [PaErrorCode -9985]
See original GitHub issueI connected a USB headset to listen to a sound made by sounddevice
as part of #198, and I got the following error:
Traceback (most recent call last):
File "foo.py", line 45, in <module>
play(sample_rate)
File "foo.py", line 39, in play
sounddevice.play(array_2, samplerate=hz)
File "C:\Program Files\Python37\lib\site-packages\sounddevice.py", line 154, in play
**kwargs)
File "C:\Program Files\Python37\lib\site-packages\sounddevice.py", line 2417, in start_stream
**kwargs)
File "C:\Program Files\Python37\lib\site-packages\sounddevice.py", line 1374, in __init__
**_remove_self(locals()))
File "C:\Program Files\Python37\lib\site-packages\sounddevice.py", line 780, in __init__
'Error opening {0}'.format(self.__class__.__name__))
File "C:\Program Files\Python37\lib\site-packages\sounddevice.py", line 2572, in _check
raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening OutputStream: Device unavailable [PaErrorCode -9985]
The headset otherwise works, Windows 7 plays audio through it just fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 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 device {0}'.format(device)) assert info.structVersion == 2 name_bytes ...
Read more >spatialaudio - Bountysource
Created 7 months ago in spatialaudio/python-sounddevice with 5 comments. ... Error opening InputStream: Device unavailable [PaErrorCode -9985].
Read more >Audio Crashing on Ubuntu - Coding - PsychoPy Discourse
... instance when trying to launch experiment sounddevice.PortAudioError: Error opening OutputStream: Device unavailable [PaErrorCode -9985] ...
Read more >python-sounddevice - Read the Docs
To record audio data from your sound device into a NumPy array, ... PortAudioError: Error opening InputStream: Invalid number of channels␣.
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
Headset model: Logitech USB Headset H390.
Hardware IDs:
When troubleshooting another issue with @mgeier , we came to the conclusion that this bug only happens when ASIO is included in the PortAudio DLL, and is probably related to the initialization action that PortAudio does to ASIO.