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

I want to use pyaudio to record wav more than hours

I use pyaudio with python2.7.13 to record wav ,but my pragram dead when I record more than 1 hour , how can I do if I want to record for more than 1 hour with py2.7. Thanks for your replay!
z.fx
  • 3
  • 2
0
votes
2 answers

I have trouble with PyAudio does not detect input device

I made this thread in Raspberry PI Stack Exchange and my problem was solved. Until last week I tried to run my Python application again (both in Raspbian and Ubuntu 16.04) this error appeared again. OSError: [Errrno -9996] Invalid input device (no…
notalentgeek
  • 4,939
  • 11
  • 34
  • 53
0
votes
0 answers

Listen to stream of audio for certain frequency; Python

I was wondering, what is the best way to have a python program listen to a stream of audio and wait for a certain frequency, for example, 60 Hz, and then record that stream? [EDIT] I'm referring to basically just having the program listen for a…
0
votes
4 answers

pyaudio OSError: [Errno - 9999] Unanticipated host error

I'm trying to use the microphone of my webcam logitech to listen with sr.Microphone(sample_rate=32000) as source: ... This error occurs : File "/home/pi/project2/interface.py", line 226, in listen with sr.Microphone(sample_rate = 32000) as…
Maxime M.
  • 25
  • 1
  • 4
0
votes
1 answer

PyAudio Record until exit

I don't have enough knowledge about Pyaudio and I couldn't find it on the net. I want the script run until I stop it and when I stop, it must save recording. The sample code from Pyaudio records for a fixed time.
Ilkin
  • 386
  • 3
  • 17
0
votes
1 answer

Can't edit my np.fromstring

I created a sound this way : import numpy as np from scipy.io.wavfile import write data=np.random.uniform(-1,-1,44100) scaled=np.int8(data/np.max(np.abs(data))*127) write('test8.wav',44100,scaled) and I want to convert amplitudes using…
0
votes
2 answers

Recording audio with pyaudio on a button click and stop recording on another buttonclick

I am a beatboxer and recently i have been working on a project in python which involves looping audio. My objective is that when a button is pressed the audio from mic should start getting recorded and when i click another button the audio should…
Rithik Jain
  • 1
  • 1
  • 2
0
votes
1 answer

PyAudio - Latency variations on Windows 10

I'm using PyAudio with an example from PyAudio's website : import time import pyaudio WIDTH = 2 CHANNELS = 1 RATE = 16000 p = pyaudio.PyAudio() def callback(in_data, frame_count, time_info, status): return (in_data,…
kecalace
  • 117
  • 1
  • 16
0
votes
0 answers

Having trouble transferring audio data from iOS to another device which uses PyAudio to play it

I am using novocaine to get mic audio data and PyAudio on another computer to play the audio. I am using WAMP to send over the data, so far data sends just fine. But I am having trouble trying to get the data received from the mic on iOS device to…
zyeek
  • 1,277
  • 12
  • 27
0
votes
1 answer

Function that plays audio file in pyAudio without the need of importing again sources?

I need to make a function that when called a certains song must be played. Here is the code: import pyaudio import wave chunk = 1024 p = pyaudio.PyAudio() beat = wave.open(r"D:/Escritorio/beat.wav","rb") stream = p.open(format =…
Garmekain
  • 664
  • 5
  • 18
0
votes
0 answers

TypeError: integer argument expected, got float (creating an audio virtualization)

i found a piece of code online that virtualises audio input into a graph in real time. i have installed the newest versions of pyaudio and matplotlib https://gist.github.com/livibetter/4118062 (the on labeled sound-spectrum.py) when i run the…
toni
  • 57
  • 1
  • 1
  • 3
0
votes
0 answers

Generating audio on Raspberry Pi using PyAudio, results in audio with stutter

I need to use python to generate sound on my raspberry pi, I just need to generate a sine wave of specific frequencies. I have attempted to do this using PyAudio and the following code (which I found here…
ElanaLS
  • 21
  • 1
  • 5
0
votes
1 answer

Analyzing Audio Level In Real Time using Python

Im trying to get my Raspberry do stuff, based on the audio level of a played song (sound output). The song shouldn't neccessarily be a local mp3 file on the Raspberry. Let me explain it like this: If (audio level above threshold): do…
Slowmo
  • 3
  • 3
0
votes
1 answer

Pyaudio recording wav file with soundcard gives an empty recording

I've been trying to work on a project to detect time shift between two streaming audio signals. I worked with python3, Pyaudio and I'm using a Motux828 sound card with a Neumann KU-100 microphone which takes a stereo input. So when i check my…
0
votes
0 answers

Python pyaudio recording big wav file

I am trying to record a long microphone session with pyaudio. However, I get a Memory error after some time. I managed to split it using threading, and record 3 minutes and then process it to a file, but that didn't solve the problem. I also tried…
J-Star
  • 96
  • 3
  • 8