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

Pyaudio & Threading leads to RuntimeError: Set changed size during iteration

i've got a problem with recording Audio over Pyaudio on a Raspberry Pi. The purpose of my code is to record small audio snippets, 10s long, every 10s to 20s. To do this, I'm starting an own Thread for the recorder: # Create collect beat…
lightwaver
  • 31
  • 1
  • 6
0
votes
1 answer

PyAudio. How to record while playing sound

I used PyAudio for recording and sounding. Both can work respectively, but I couldn't record while sounding. It always first sound and record or record and sound. I tried thread but did not work.
Jow Chieh
  • 1
  • 1
0
votes
0 answers

Kivy Won't Update Label While Reading from Microphone Using PyAudio

I am trying to update a Label in Kivy to say when the program is recording audio. I am having a problem where the PyAudio part takes over the thread and the text sent just before the record to the label doesn't update. Update: the text…
Matt Stein
  • 11
  • 3
0
votes
3 answers

Python/Tkinter Audio Player

I'm developing a media player. Right now it's a simple window with a button to load .wav files. The problem is I would like to implement a pause button now. But, when playing a audio file the GUI isn't accessible again (no buttons can be pushed)…
0
votes
1 answer

Compile PyAudio without Jack, without PulseAudio, etc

I want to compile PyAudio with as few layers as possible. I only want to use PortAudio (needed for PyAudio) which uses ALSA, but not Jack, not PulseAudio, not anything else. I would like to have PyAudio <--> PortAudio <--> ALSA and nothing…
Basj
  • 41,386
  • 99
  • 383
  • 673
0
votes
1 answer

Input Overflow with PyAudio

I have searched and tried all the basic fixes for this but cannot get this basic recording script to work. I have tried changing the chunk size an sample rate with no luck. #!/usr/bin/python import pyaudio, wave, time, sys from datetime import…
ss32
  • 67
  • 2
  • 7
0
votes
2 answers

PyAudio compilation on Raspbian

When trying to install pyaudio with pip install pyaudio on Raspbian, I get: Collecting pyaudio Could not find any downloads that satisfy the requirement pyaudio Some externally hosted files were ignored as access to them may be unreliable (use…
Basj
  • 41,386
  • 99
  • 383
  • 673
0
votes
2 answers

Python adaptfilt 2.0 FloatingPointError: invalid value encountered in multiply

I am trying to use the "echo cancel" example in python 3.4 from the library adaptfilt 2.0 which looks like this: import numpy as np import adaptfilt as adf # Get u(n) - this is available on github or pypi in the examples folder u =…
Josef
  • 147
  • 2
  • 12
0
votes
1 answer

Packing generated audio data from float to str

The task is to generate audio data and let the pyaudio play them. In steps: 1. Generate the sound data 2. Convert them to strings so the 3. pyaudio stream could play them Number one is clear and all works with e.g. this code: for x in…
Victor Pira
  • 1,132
  • 1
  • 10
  • 28
0
votes
1 answer

Ignore background noise?

I am making a voice recognition software for my computer but I have some problems: 1) Is there a way to ignore background noise? I want the program to end when there is x amount of time without noise but background noise could keep it awake…
Queue21
  • 21
  • 6
0
votes
2 answers

Python SpeechRecognition running but not hearing through the mic

So I'm trying to use python SpeechRecognition 1.1.3 but it is not recognizing me through my mic. I've installed pyAudio and everything seems to be working smoothly when I run the example code provided by SpeechRecognition: # NOTE: this requires…
RocketTwitch
  • 285
  • 5
  • 17
0
votes
2 answers

Pyaudio: no method 'get_device_count'

I'm using the Python Speech Recognition library to recognize speech input from the microphone. This works fine with my default microphone. This is the code I'm using. According to what I understood of the documentation Creates a new Microphone…
Diego
  • 916
  • 1
  • 13
  • 36
0
votes
1 answer

Playing 2-channel sound with Python PyAudio

I have a problem with pyaudio. I am able to play sound with non-blocking stream only when I set up channel number to 1. When I set it to 2, I can't hear any sound and script exits immadiately. Even if data is mono, shouldn't it play properly? Here…
bkotowski
  • 11
  • 3
0
votes
1 answer

Python, How to record 24-bit audio with pyaudio?

I need to record 24-bit audio using python, and I try pyaudio to do that. However, it seems that pyaudio doesn't support 24-bit recording. I set the format to 24-bit(pyaudio.paInt24), it record and save as a 24-bit file. However, it's not a true…
0
votes
1 answer

Tkinter Multiprocessing and audio input from pyaudio

I'm writing a program that is continuously taking input from a microphone using pyaudio and every 5 seconds does some calculations after which it updates some matplotlib plot in a tkinter widget. I got so far: import threading from array import…
severila
  • 29
  • 3