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
5
votes
1 answer

Getting volume levels from PyAudio for use in Arduino

I want to sent volume data from my laptop's audio input (just the built-in microphone in my Macbook) to Arduino with as little lag as possible. I see that it isn't hard to capture the audio input using PyAudio, but most of the examples for that…
John
  • 1,405
  • 2
  • 14
  • 21
5
votes
2 answers

Multichannel PyAudio with ASIO Support

I'm attempting to interface to a PreSonus AudioBox 1818VSL with PyAudio on Win7, but am having some trouble recording more than 2 channels (stereo) at a time. The PreSonus driver creates many stereo input audio devices (ex. stereo channels 1&2, 3&4,…
Fitzy
  • 83
  • 1
  • 1
  • 5
5
votes
2 answers

Recording 24-bit audio with pyaudio

I need to record 24-bit audio (because it's the archival standard for audio digitization). However, the wave library seems to only go up to 16-bit. It looks like pyaudio can work with 24-bit audio but every example I've found shows pyaudio using the…
loneraver
  • 1,282
  • 2
  • 15
  • 22
5
votes
1 answer

Time between callback calls?

I have a lab project that uses mainly PyAudio and to further understand its way of working I made some measurements, in this case time between callbacks (using callback mode). I timed it, and got an interesting result (@256 chunk size, 44.1k fs):…
function_store
  • 373
  • 1
  • 2
  • 12
5
votes
0 answers

PyAudio alsa error messages

I am receiving error messages every time I play a sound with PyAudio and am having trouble supressing them. ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave …
servvs
  • 100
  • 1
  • 9
4
votes
0 answers

Crash while using Pyaudio to record audio on Mac M1

After struggling for a long time, I have finally managed to install the Pyaudio library on my MacBook M1. It can play audio files smoothly, but it crashes when I try to record audio. The error message is libc++abi: terminating [1] 14101 abort python…
Henrik
  • 41
  • 1
4
votes
1 answer

"Python.h" file not found on MACOSX, how to fix this?

`pip3 install PyAudio==0.2.12 Defaulting to user installation because normal site-packages is not writeable Collecting PyAudio==0.2.12 Using cached PyAudio-0.2.12.tar.gz (42 kB) Installing build dependencies ... done Getting requirements to build…
4
votes
0 answers

pyaudio: unable to open slave [ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave]

I had an xkcd979 moment - this post is the exact same problem I had, but it has no replies! So, here it is: I'm working with pyaudio on a clean, new Pi Zero 2, and it's erroring with the following: Python 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC…
4
votes
2 answers

PyAudio OSError: [Errno -9986] Internal PortAudio error

I'm trying to run PyAudio on OSX on a MacBook Air but I keep getting the error: ||PaMacCore (AUHAL)|| Error on line 1316: err='-66748', msg=Unknown Error Traceback (most recent call last): File "main.py", line 15, in stream =…
Carl
  • 169
  • 1
  • 9
4
votes
2 answers

Can't Install PyAudio in Python 3.8

I have an issue with PyAudio I Have installed PyAudio in Python 3.6 and Python 3.8 via Python unofficial libraries. C:\Users\Baali>pip install --user PyAudio Successfully installed PyAudio-0.2.11 But when I tried to import PyAudio it says: import…
4
votes
1 answer

Starting a subprocess via python multiprocessing hangs

I'm using pyAudio to listen to the audio device and do some "stuff" in the background while the main program continues to run. I started out with a second script, but would like to consolidate into a single script for supportability. When I moved…
Nite
  • 61
  • 5
4
votes
5 answers

ERROR: Command errored out with exit status 1 while installing pyaudio

After doing pip install pyaudio, It started collecting the package but suddenly it displayed this error. Hope the following explains what's going on: Collecting pyaudio Using cached PyAudio-0.2.11.tar.gz (37 kB) Installing collected packages:…
mayank choudhary
  • 63
  • 1
  • 4
  • 12
4
votes
1 answer

Detecting Activity with mouse, keyboard and voice on windows

We have a module on Python (through win32) to detect user mouse and keyboard activity by GetLastInputInfo and GetTickCount. How can we register Voice activity in GetLastInputInfo? Or maybe can we add a synthesized input to update GetLastInputInfo…
Led
  • 662
  • 1
  • 19
  • 41
4
votes
0 answers

PyAudio How do I find the volume of a certain range of sound frequencies

I am trying to make a program in python which will take in sound frequencies with pyaudio and show ranges of frequencies as bars going up and down using turtle. I want it to look something like this: I followed this tutorial for getting and…
Ethan Posner
  • 343
  • 1
  • 2
  • 14
4
votes
0 answers

OSError: No Default Input Device Available using CoLAB

Unable to use the SpeechRecognition lib in CoLAB. Code: import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: print("Speak Anything: ") audio = r.listen(source) try: text =…