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
7 answers

ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform

I am trying to install pyaudio in python 3.8 and when i execute pip3 install PyAudio-0.2.11-cp38-cp38-win_amd64.whl it shows an error that ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
Shivam sharma
  • 97
  • 1
  • 1
  • 3
5
votes
4 answers

Can't pip install pyAudio in conda environment (MAC)

I am using a conda enviroment on mac and I want to install pyAudio. I tried to follow the suggestion in many threads to run brew install portaudio r pip install --global-option='build_ext' --global-option='-I/usr/local/include'…
Cranjis
  • 1,590
  • 8
  • 31
  • 64
5
votes
1 answer

PyAudio -- How to capture microphone and system sounds in a single stream?

i'm trying to build an app with pyaudio that records speaker and microphone sound but i just don't know how to record them both.I tried enabling stereo mixer but it didn't work out because i could only listen the sound from the speakers. This code…
Gabriel
  • 146
  • 1
  • 2
  • 10
5
votes
0 answers

Raspbian - ALSA error while using pyaudio

I got error starting like below Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Expression…
Mishra
  • 51
  • 1
5
votes
1 answer

Recording or Playing Audio with Python not working on Mac: No Errors & No Sound

I'm trying to work with Audio on Python 3.7 on Mac(Catalina) only with the built-in Microphone and Speakers. My Problem is that with any code I tried, when recording I receive nothing and when playing sound nothing comes out. I tried the answers…
vincirist
  • 103
  • 1
  • 6
5
votes
0 answers

How to get the current selected audio device in python?

I'm using python to get the current selected audio device in windows. I'm using pyaudio now and open to use other libs. What I have achieved: with pyaudio's get_device_info_by_index I can list all audio devices. with pyaudio's…
vego
  • 889
  • 1
  • 8
  • 20
5
votes
4 answers

Entering a sequence of notes and have them played

My son and I are trying to write a program that will allow a user to input a sequence of musical notes, and save them into a list to be played back. We've come up with the following: import math #import needed modules import pyaudio #sudo…
Jim421616
  • 1,434
  • 3
  • 22
  • 47
5
votes
0 answers

pyaudio: no sound recorded

I have some problem using pyaudio. I am working on ubuntu 18.04 using python 3.6.7, pyaudio version 0.2.11 and have the following dependencies: libportaudiocpp0 portaudio19-dev libportaudio2-dev Basically I am running this: python import…
p.deman
  • 584
  • 2
  • 10
  • 24
5
votes
1 answer

FFT of data received from PyAudio gives wrong frequency

My main task is to recognize a human humming from a microphone in real time. As the first step to recognizing signals in general, I have made a 5 seconds recording of a 440 Hz signal generated from an app on my phone and tried to detect the same…
5
votes
1 answer

pyaudio bytes data to librosa floating point time series

when audio is recording using pyaudio with paInt16, it gives me 16 bits integer represented as two bytes. With some studying, I concluded that it must be # between -32768 to 32767. I saved audio as wav file and load it back with librosa.core.load. I…
Brandon Lee
  • 695
  • 1
  • 10
  • 22
5
votes
3 answers

How mute microphone by python

I need to mute/unmute microphone on Windows 8 by python2.7. I find pyaudio and pymedia for interaction with sound devices, but can't find particular methods/realisations.
user227257
  • 51
  • 1
  • 3
5
votes
0 answers

How to create a white noise signal in Python, and filter the noise signal with bandpass filter?

I'm doing a project about speech processing. I wonder how to create a white noise signal in Python, and filter the noise signal with bandpass filter? import pyaudio import numpy as np import scipy.signal as signal CHUNK = 64 #the block size Q =…
Roger
  • 91
  • 2
  • 4
5
votes
4 answers

Remove/control clicking sound using PyAudio as an oscillator

When this runs, there is a clicking sound between pitches. I don't mind the clicking sound too much - it's pleasantly rhythmic. That said... I'd like to be able to get rid of this clicking sound when I don't want it. Better yet, it would be nice…
Danny Meyer
  • 321
  • 6
  • 11
5
votes
1 answer

IOError Input overflowed: Record audio with Tkinter interface

I'm trying to do a simple GUI application that has only one button: Record. You press the button and the recording begins. When you release the button the recording is stopped and the recording is saved. However, I get the following error when I…
Pichi Wuana
  • 732
  • 2
  • 9
  • 35
5
votes
1 answer

Python PyAudio + mic input - specific frequency filter?

I'm currently working on a radio astronomy project where I need to monitor the amplitude of an audio signal over time. I've used the simplified Python code suggested by user1405612 here Detect tap with pyaudio from live mic which takes the mic input…
JamesH
  • 85
  • 2
  • 8