PortAudioError: Error opening Stream: Invalid number of channels [PaErrorCode -9998]
See original GitHub issuei set Headphones as the input device and received that error
How can i set my headphones as device to record and then play the data from it to my mic?
I ran that on Windows 10, using PortAudio V19.6.0-devel
code:
with sd.Stream(device = (3,1),
samplerate=args.samplerate, blocksize=args.blocksize,
dtype=args.dtype, latency=args.latency, channels=2,
callback=callback)
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
[Pyaudio] Error: invalid number of channels -9998
I'd like to run this code that I got from this site and measure the loudness of a sound input from a mic....
Read more >Error opening OutputStream: Invalid number of channels ...
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 - Read the Docs
PortAudioError : Error opening InputStream: Invalid number of channels␣. ˓→[PaErrorCode -9998]. Please remember to provide the full command ...
Read more >Contributing — python-sounddevice, version 0.4.1
PortAudioError : Error opening InputStream: Invalid number of channels [PaErrorCode -9998] ```. Please remember to provide the full command invocation and ...
Read more >[Portaudio] Invalid number of channels...(?)
outputParameters.channelCount = 1; /* mono output */ The Pa_OpenStream fails with error code -9998, which means : "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
I am on ubuntu 18.04 and encountered the same exception.
I encountered this issue trying to record audio from a usb microphone: https://www.amazon.com/Newest-YOUMI-Microphone-Laptop-desktop/dp/B01MQ2AA0X/ref=sr_1_2?dchild=1&keywords=raspberry+pi+usb+microphone&qid=1603452930&sr=8-2.
Recording with alsa works fine, but using sounddevice raises
sounddevice works fine with my default speakers, but not the usb microphone, any clues on how to remedy this?
Odd indeed …