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
6
votes
2 answers

PyAudio (PortAudio issue) Python

I installed pyaudio with anaconda python. Using conda install pyaudio on windows. It said it installed and it also installed PortAudio with it. However, when I create my file and run it now I get the following issue. I have no idea what is going…
KevinM1990112qwq
  • 715
  • 2
  • 10
  • 23
6
votes
3 answers

PyAudio cannot find any output devices

When I run: import pyaudio pa = pyaudio.PyAudio() pa.get_default_output_device_info() I get: IOError: No Default Output Device Available When I say: pa.get_device_count() It returns 0L. And of course if I list devices for i in range(0,…
Null Salad
  • 765
  • 2
  • 16
  • 31
6
votes
0 answers

Bytes into Numpy Int16 array

How can I convert an audio sample that came out of pyaudio, which is a bytes object, into a numpy array of signed-int16 samples?
ArekBulski
  • 4,520
  • 4
  • 39
  • 61
6
votes
1 answer

PyAudio cannot use microphone on Ubuntu 14.04 with 'unable to open slave'

I have tried several days to use microphone on my ubuntu 14.04 with PyAudio. Actually I want to use 'Speech Recognition' package in the github. I find it uses pyaudio internal, and It is nightmare on ubuntu 14.04. It shows the following error…
James Fu
  • 444
  • 1
  • 8
  • 21
6
votes
6 answers

Having trouble installing PyAudio for Python3 on Mint

I was following the instructions here and I'm having trouble getting the installation to work. Basically, the first part works fine. I downloaded portaudio, followed the instructions, and it all seemed to work. However, when I triedpython3…
user3047641
  • 149
  • 1
  • 2
  • 12
6
votes
0 answers

Capturing system audio with PyAudio

I'm trying to capture the system output audio on Windows, Mac and Linux using PyAudio but am having mixed results. Right now I am doing this: self.p = pyaudio.PyAudio() self.inStream =…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
6
votes
4 answers

PyAudio 'utf8' error when listing devices

When using PyAudio (Portaudio binding) with ASIO+DirectSound support, this code : import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): print p.get_device_info_by_index(i) ... produces this error : UnicodeDecodeError:…
Basj
  • 41,386
  • 99
  • 383
  • 673
6
votes
1 answer

alternatives to pyaudio for audio processing in python?

what other options are there for recording audio and processing the raw signal integers in python besides pyaudio? pyaudio is great, but I have found it too unstable for reliable use, especially on non-linux platforms. I don't really care too much…
lollercoaster
  • 15,969
  • 35
  • 115
  • 173
6
votes
10 answers

Pyaudio, portaudio and mac 10.7.5

I'm having trouble installing pyaudio correctly. I have a virtualenv set up for the project. I first tried to install portaudio: sudo port install portaudio which returns: ---> Cleaning portaudio ---> Scanning binaries for linking errors:…
Leo Mizuhara
  • 365
  • 2
  • 3
  • 15
6
votes
1 answer

Python, Error audio Recording in 16000Hz using Pyaudio

I use Python 2.7.3, Mac OS 10.8.2 and Xcode 4.5.1 I am trying to record sound using PyAudio following the instructions in http://people.csail.mit.edu/hubert/pyaudio/ and using the program """PyAudio example: Record a few seconds of audio and save…
VeilEclipse
  • 2,766
  • 9
  • 35
  • 53
5
votes
1 answer

PyAudio - first few chunks of recording are zero

I've been having some issues when trying to synchronously playback and record audio to/from a device, in this case, my laptop speakers and microphone. The problem I've tried to implement this using the Python modules: "sounddevice" and "pyaudio";…
Mistergrave
  • 151
  • 3
  • 9
5
votes
2 answers

PyAudio Over Network crashes

Hello I am facing an issue with PyAudio I can not solve. When I use it over the network (after a while) it crashes. The error I get is Exception in thread Thread-1: Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 552,…
james
  • 51
  • 2
5
votes
1 answer

Python RPI : How do i dynamically adjust the volume of my wav file currently playing

Currently using Raspberry Pi 3, pyaudio , ReSpeaker 2-Mics Pi HAT How do I adjust the volume of the .wav file playing using python in RPI? ( the output is through respeaker 3.5mm audio jack connected by an earpiece) I need the RPI to play and adjust…
JustASimpleGuy
  • 171
  • 1
  • 1
  • 11
5
votes
1 answer

PyAudio throws ´unable to open slave` error

Hi every time i execute pyauido.PyAudio() i get the following error. I try to display the audio recorded by my mic using these instructions: https://swharden.com/wp/2016-07-19-realtime-audio-visualization-in-python/ and use my USB-Mic and the…
Schotti100
  • 93
  • 1
  • 9
5
votes
2 answers

Is there a way using python to input a mp3/audio file to a microphone input?

My main purpose is to change the pitch of the my voice and then input it to a voice room/voice call say like a zoom call or a hangouts meeting without playing it back to me. I found 2 questions on a similar topic: 1. Playing mp3 file through…
Sanskar Jethi
  • 544
  • 5
  • 17