Incorrect Python input device PyAudio Portaudio

I want to do something like this: Get an audio sample as a floating point number from a pyaudio stream

I am new to Python and installed PyCharm with all the necessary packages. PyAudio creates some problems that I cannot solve. I have 64-bit Win7 and Python 3.4.2 for 32-bit. I tried installing Portaudio with MinGW / MSYS as described here: http://www.portaudio.com/docs/v19-doxydocs/compile_windows_mingw.html

I have no experience with MinGW, so maybe I did something wrong there. I also get the impression that the tutorial from portaudio is written for those who already know what it is doing. Unfortunately, not my business. Maybe someone can give me one or more hints.

Finally, I tried this: Installing Python PyAudio for Windows problems when importing PortAudio V19

There is a link on this page: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

I installed PyAudio-0.2.8.win32-py34.exe and can PyCharm at least recognize the installed Portaudio.

But now I get this error message if I try to run my code:

File "C:\Python34\lib\site-packages\pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno Invalid input device (no default output device)] -9996

I tried a:

pa = pyaudio.PyAudio()
print(pa.get_device_count())

and get "19".

Hope someone can give me good advice on how to solve this problem. Thanks in advance and best regards. David

+4
source share

All Articles