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

Why does not program cost 1 sec when it plays 44100 samples with 44100 sample rate by using PyAudio?

import pyaudio import numpy as np import time RATE=44100 pa = pyaudio.PyAudio() stream = pa.open(format=pyaudio.paFloat32, channels=1, rate=RATE, …
Roger
  • 91
  • 2
  • 4
0
votes
2 answers

PyAudio - How mix wave file into a continuous stream

I want to write a very basic application that passes audio from microphone to speakers. This is very simple with pyaudio as described on https://people.csail.mit.edu/hubert/pyaudio/ . def passthrough(): WIDTH = 2 CHANNELS = 1 RATE =…
Jayjay
  • 1
  • 2
0
votes
0 answers

Real-Time audio processing in Python

I'm trying to write a program for analyzing chunks of audio recorded by my computer. I would like to be able to seperate the audio into chunks that are about 5 seconds long (220500 samples or so) and if there isn't 5 seconds worth of samples…
CJF
  • 51
  • 1
  • 3
0
votes
1 answer

Using PyAudio for 384000Hz in a thread

I am trying to record chunks of ultrasonic sound using the m500-384 microphone on a raspberry pi 3. I can record just the audio fine if that is the only process run, but the problem comes in when I try to record the audio in a separate thread while…
David
  • 1
0
votes
1 answer

What does it mean to say to take mean/average of those first 3 frame

I am very very newbie in speech processing. I am actually trying to do Noise Reduction. I am using Spectral Subtraction Method. While doing it, in many theory papers and algorithms, it says to take the frames of the audio signal. For that, I took…
Sagaryal
  • 415
  • 4
  • 15
0
votes
1 answer

How to trim wav files inside of Python

I am using pyaudio and pocketsphinx to listen to the microphone on my computer and translate what I am saying. What I was wanting to know is if it would be possible to have the program listen as it has been and after is hears the sentence, further…
0
votes
0 answers

Playing live audio from a website using PyAudio

I want to build a small application capable of playing audio streams from internet radio services. I already found this code that saves the code as a mp3-File, but I'd like to instantly play the sound. import requests stream_url =…
0
votes
1 answer

How do I use an external microphone for PyAudio instead of the in-built microphone?

The pyAudio.PyAudio().open() function takes an argument known as "input_device_index", in which, if I gave a certain index number that represents my desired microphone, it would use it. Furthermore, another argument known as "Input" must be "True"…
ropelearner
  • 1
  • 1
  • 5
0
votes
1 answer

Sound generated not being saved to a file, as it should

I generate a sound wave on frequency 440hz as expected in pyaudio, but even though I am using the same sample array to save a wav file, it does not save the same sound and I can´t figure out why Here is the code: import wave import numpy as…
Badjano
  • 418
  • 7
  • 23
0
votes
2 answers

Is it possible that mutliproccessing causes stream lag?

I have a server that receives audio stream data from a client and then sends it to all other connected clients (via sockets). Since the data stream makes the code stuck on a loop , I decided that I should create processes for each stream (client…
Alex Walker
  • 91
  • 2
  • 9
0
votes
1 answer

How do I get PyAudio to compile?

I installed PyAudio and imported it in my program but, when I complied it I received this error: Traceback (most recent call last): File "C:/Users/Documents/Python/MicForAudio.py", line 3, in import pyaudio File…
0
votes
1 answer

IOError: [Errno 1] Operation not permitted: '/dev/uinput'

I seem to have some problems let python read key event, I wrote this piece of code for recording while i have space down and stop when i've release it.. import pyaudio import wave import keyboard CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS =…
Smo
  • 137
  • 1
  • 9
0
votes
0 answers

Python speech recognition for Raspberry Pi 3 B parallel access

I am making voice recognition robot using raspberry pi, So I use usb sound card for microphone input. So I set the default sound input output on raspberry pi by changing /etc/asound.conf file to: pcm.!default { type hw card…
0
votes
1 answer

exception_on_overflow parameter not working? PyAudio

I am trying to record some audio using pyaudio but whenever it goes through the recording loop a second time I get this error OSError: [Errno Input overflowed] -9981 I did some searching and found that in order to solve this problem you simply need…
sharpchain
  • 355
  • 2
  • 7
  • 15
0
votes
2 answers

Is it possible to install pyaudio on a webfaction server without using sudo?

I am trying to install PyAudio inside my webfaction server. It gives me the following error. I got the same error while installing it locally but I read the solution and the sudo command solves it. The problem is webfaction does not allow the…
indexOutOfBounds
  • 541
  • 7
  • 27