pyaudio

ModuleNotFoundError: No module named 'pyaudio' (Windows)

我的未来我决定 提交于 2019-11-26 18:39:12
问题 I've installed the module pyaudio using pip . However, when I try to import it, Python says the module is not found: C:\Users\hp>pip install pyaudio Requirement already satisfied: pyaudio in c:\users\hp\appdata\local\programs\python\python37\lib\site-packages (0.2.11) >>> import pyaudio Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'pyaudio' Why can't Python find the installed module? 回答1: It happens quite often that someone

Pyaudio installation error - 'command 'gcc' failed with exit status 1'

梦想的初衷 提交于 2019-11-26 18:06:55
问题 I'm running Ubuntu 11.04, Python 2.7.1 and wanted to install Pyaudio. So I ran, $ sudo easy_install pyaudio in the terminal and the process exited with following error messages, Searching for pyaudio Reading http://pypi.python.org/simple/pyaudio/ Reading http://people.csail.mit.edu/hubert/pyaudio/ Best match: pyaudio 0.2.4 Downloading http://people.csail.mit.edu/hubert/pyaudio/packages/pyaudio-0.2.4.tar.gz Processing pyaudio-0.2.4.tar.gz Running PyAudio-0.2.4/setup.py -q bdist_egg --dist-dir

Record speakers output with PyAudio

走远了吗. 提交于 2019-11-26 17:46:53
问题 I'm trying to record the output from my computer speakers with PyAudio. I tried to modify the code example given in the PyAudio documentation, but it doesn't work. Technically, there's no error. I obtain the file output.wav and I can open it, but there's no sound. On Audacity, I can only see a straight line. What's going wrong? import pyaudio import wave CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "output.wav" p = pyaudio.PyAudio()

Python package installation issues: PyAudio, PortAudio

删除回忆录丶 提交于 2019-11-26 17:07:30
问题 I am having issues installing PyAudio and portaudio. When I do python -m pip install pyaudio I get this error: src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2 ---------------------------------------- Command ""C:\Users\This PC\AppData\Local\Programs\Python\Python37

How can the terminal output of executables run by Python functions be silenced in a general way?

巧了我就是萌 提交于 2019-11-26 11:38:13
问题 I want to suppress all of the terminal output produced by a function that runs executables. I have attempted to suppress the output of a Python function by using a context manager that temporarily redefines stdout and stderr each time the function is called. This suppresses terminal output produced by print calls in the function, but it doesn\'t seem to work when the function calls executables that produce terminal output. So, how could the output of executables called by Python functions be

PyAudio working, but spits out error messages each time

廉价感情. 提交于 2019-11-26 02:01:59
I'm using PyAudio to record input from the microphone. Since the audio is recording fine for me, should I try to simply suppress its error messages? Or would there be a way of resolving them? ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES