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
11
votes
4 answers

Errors installing PyAudio "Failed Building Wheel for PyAudio"

I have been having trouble finding a fix for getting PyAudio installed on my machine. I have tried a few different solutions and i do have the prerequisite library "portaudio" installed using homebrew. I have also looked for solutions to the gcc…
G-Slice
  • 141
  • 1
  • 3
  • 7
11
votes
9 answers

ImportError No module named pyaudio

I am writing a program in Python on RaspberryPi, But I am getting an error ImportError No module named pyaudio After that I tried git clone http://people.csail.mit.edu/hubert/git/pyaudio.git but again get another fatal: destination path 'pyaudio'…
Fahadkalis
  • 2,971
  • 8
  • 23
  • 40
11
votes
2 answers

how to convert wav to mp3 in live using python?

I have code like what is shown below to get audio from microphone: import pyaudio p = pyaudio.PyAudio() CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 1024*10 RECORD_SECONDS = 10 stream = p.open(format=FORMAT, …
open source guy
  • 2,727
  • 8
  • 38
  • 61
11
votes
2 answers

How to handle in_data in Pyaudio callback mode?

I'm doing a project on Signal Processing in python. So far I've had a little succes with the nonblocking mode, but it gave a considerable amount of delay and clipping to the output. I want to implement a simple real-time audio filter using Pyaudio…
function_store
  • 373
  • 1
  • 2
  • 12
11
votes
1 answer

Python PyAudio installation problems (with PortAudio)

I'm trying to write a program to record information from my computers microphone an save it to a file. PyAudio seems like one of the better packages for doing this, and they even have a binary for Windows 7 (Python 2.7). I downloaded the executable…
scaevity
  • 3,991
  • 13
  • 39
  • 54
10
votes
2 answers

Getting IOError: [Errno Input overflowed] -9981 when setting PyAudio Stream input and output to True

I'm trying to run the following code (an example from the PyAudio documentation) on my Mac (OS 10.7.2): import pyaudio import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 p = pyaudio.PyAudio() stream =…
jhnnycrvr
  • 767
  • 2
  • 7
  • 13
10
votes
3 answers

How to play an audiofile with pyaudio?

I do not understand the example material for pyaudio. It seems they had written an entire small program and it threw me off. How do I just play a single audio file? Format is not an issue, I just want to know the bare minimum code I need to play…
JShoe
  • 3,186
  • 9
  • 38
  • 61
10
votes
2 answers

Cannot install pyaudio in google colab

While I'm trying to run pip install PyAudio, I'm seeing the following error: Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz Building wheels for…
Abdun Noor Polok
  • 101
  • 1
  • 1
  • 3
10
votes
1 answer

python : how to change audio volume?

I used winsound.Beep(frequency, duration) because I wanted to play sounds with a specified frequency. Now, I need to change the volume of these sounds. How can I do this? I tried to get help from pyaudio but...
maral
  • 103
  • 1
  • 1
  • 7
10
votes
3 answers

List all audio devices with Python's pyaudio (portaudio binding)

I tried import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): print p.get_device_info_by_index(i) but I don't get the full list of all devices : for example I don't get ASIO devices in this list. This is strange, because…
Basj
  • 41,386
  • 99
  • 383
  • 673
10
votes
3 answers

How do I install PyAudio in virtualenv on Mac OS X 10.7

I have tried easy_install pyaudio and it doesn't work. I get the following: Searching for pyaudio Reading http://pypi.python.org/simple/pyaudio/ Reading http://people.csail.mit.edu/hubert/pyaudio/ Best match: pyaudio 0.2.7 Downloading…
gazzwi86
  • 1,019
  • 1
  • 15
  • 35
9
votes
1 answer

Flask send pyaudio to browser

I'm sending my servers microphone's audio to the browser (mostly like this post but with some modified options). All works fine, until you head over to a mobile or safari, where it doesn't work at all. I've tried using something like howler to take…
destinychoice
  • 45
  • 3
  • 15
9
votes
1 answer

Audio Recording in Python

I want to record short audio clips from a USB microphone in Python. I have tried pyaudio, which seemed to fail communicating with ALSA, and alsaaudio, the code example of which produces an unreadable files. So my question: What is the easiest way to…
jsj
  • 9,019
  • 17
  • 58
  • 103
9
votes
0 answers

ALSA lib pcm.c:8306:(snd_pcm_recover) underrun occurred

I'm trying to code a voice chat using socket and pyaudio in python. I wrote it and it works but it raises errors which are these ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown…
Miad Abdi
  • 831
  • 10
  • 17
9
votes
2 answers

How to convert pyaudio frames into wav format without writing to a file?

I want to implement simple speech-to-text tool using pyaudio and IBM Bluemix service. Currently i need to record audio, save it to disk and then load again in order to send it to Bluemix. RATE=44100 RECORD_SECONDS = 10 CHUNKSIZE = 1024 # initialize…
Arthur Grigorev
  • 113
  • 1
  • 4
1 2
3
91 92