python-sounddevice: PortAudioError: Error opening Stream: Invalid number of channels [PaErrorCode -9998]
i 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)
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 19 (9 by maintainers)
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?