Questions tagged [pyaudio]

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library.

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio streams on a variety of platforms (e.g. GNU/Linux, Microsoft Windows and Mac OS X).

Sources:

  1. http://pypi.python.org/pypi/PyAudio/
  2. http://people.csail.mit.edu/hubert/pyaudio/
1375 questions
92
votes
14 answers

when installing pyaudio, pip cannot find portaudio.h in /usr/local/include

I'm using mac osx 10.10 As the PyAudio Homepage said, I install the PyAudio using brew install portaudio pip install pyaudio the installation of portaudio seems successful, I can find headers and libs in /usr/local/include and /usr/local/lib but…
Xun Jian
  • 931
  • 1
  • 6
  • 7
90
votes
18 answers

I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?

I have a Windows 10 PC and I want to install pyaudio to use it with my chatbot, powered by chatterbot. I tried 2 different ways to install pyaudio. The first way is doing this on the command prompt: python -m pip install PyAudio This is the…
Waaberi Ibrahim
  • 917
  • 1
  • 7
  • 5
65
votes
10 answers

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

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…
Dananjaya
  • 2,135
  • 8
  • 22
  • 27
48
votes
8 answers

PyAudio working, but spits out error messages each time

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…
eoinoc
  • 3,155
  • 3
  • 24
  • 39
46
votes
11 answers

How to install pyaudio on mac using Python 3?

I first tried: pip install pyaudio but I was told that -bash: pip: command not found Then I tried: pip3 install pyaudio Then I got: src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found #include "portaudio.h" ^ 1…
JasonShao
  • 563
  • 1
  • 4
  • 5
40
votes
1 answer

What are chunks, samples and frames when using pyaudio

After going through the documentation of pyaudio and reading some other articles on the web, I am confused if my understanding is correct. This is the code for audio recording found on pyaudio's site: import pyaudio import wave CHUNK = 1024 FORMAT…
shiva
  • 2,535
  • 2
  • 18
  • 32
40
votes
10 answers

PyAudio Input overflowed

I'm trying to make real-time plotting sound in python. I need to get chunks from my microphone. Using PyAudio, try to use import pyaudio import wave import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS =…
libbkmz
  • 641
  • 1
  • 7
  • 17
35
votes
2 answers

Detect tap with pyaudio from live mic

How would I use pyaudio to detect a sudden tapping noise from a live microphone?
a sandwhich
  • 4,352
  • 12
  • 41
  • 62
34
votes
16 answers

Cannot install pyaudio, gcc error

Trying to install pyaudio with instructions per here: $ git clone http://people.csail.mit.edu/hubert/git/pyaudio.git $ cd pyaudio $ sudo python setup.py install running install running build running build_py running build_ext building '_portaudio'…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
33
votes
10 answers

How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory"

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…
KevinM1990112qwq
  • 715
  • 2
  • 10
  • 23
29
votes
8 answers

How to select a specific input device with PyAudio

When recording audio via PyAudio, how do you specify the exact input device to use? My computer has two microphones, one built-in and one via USB, and I want to record using the USB mic. The Stream class has an input_device_index for selecting the…
Cerin
  • 60,957
  • 96
  • 316
  • 522
28
votes
6 answers

PyAudio IOError: No Default Input Device Available

I'm using PyAudio under the Enthought Python Distribution (Python 2.6.6) in Ubuntu 10.10 x64. >>> import pyaudio >>> pa = pyaudio.PyAudio() >>> pa.get_default_input_device_info() Traceback (most recent call last): File "", line 1, in…
Gus
  • 4,375
  • 5
  • 31
  • 50
25
votes
6 answers

Python pocketsphinx RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly

I am trying to make a Python app that can record audio and translate it into english text using PyAudio, SpeechRecognition and PocketSphinx. I'm running on a Mac OS X El Capitan, version 10.11.2. Following a tutorial like this one and others, I've…
25
votes
5 answers

Record speakers output with PyAudio

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…
Openclosed
  • 251
  • 1
  • 3
  • 3
21
votes
3 answers

PyAudio.write SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

When I was trying to play a wave file with PyAudio-0.2.11 in a python-3.10.1 virtualenv(created with python-3.9.0 venv and upgraded), I received an exception and nothing is played, others just go well. Exception in thread…
gynamics
  • 311
  • 1
  • 2
  • 4
1
2 3
91 92