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

converting an automated voice recording into text using python

Use case: I have put my phone on speaker, dialled customer care ,recorded automated voice message on my laptop , now I want convert that into text. What I did until now ? I tried with speech recognition library in python import speech_recognition…
pankaj mishra
  • 2,555
  • 2
  • 17
  • 31
0
votes
0 answers

Python: How to get raw audio file using pyaudio for use in pocketsphinx?

I was trying to get audio data in raw format using pyaudio, to then use in pocketsphinx for my project. However, when I use the raw file generated the output by this program the output contains random noise. I want the raw file to be usable in…
shreyansh
  • 108
  • 2
  • 11
0
votes
0 answers

Executing python script that uses PyAudio in a webpage

I have a python script which uses pyaudio to record audio using microphone and the code converts speech to text.It works perfectly fine on terminal. Here is a section of the python code : stream = p.open(format=FORMAT, …
0
votes
0 answers

Pip install PyAudio fails with error code 1

Hi I Just Tried to install PyAudio on my new Linux Mint 18 Installation. I had first installed python-pip from the repositories, then installed setuptools python package. When i tried to install PyAudio it returns that module setuptools dosent…
0
votes
0 answers

Use external microphone for pyaudio

I am writing a code in python which does speech recognition using the pyaudio module. When I first ran the code I got an error saying "no default input device detected" . So I got a USB sound card and a microphone but it still gives me the same…
RishiC
  • 768
  • 1
  • 10
  • 34
0
votes
0 answers

pyAudio what is the in_data in callbacks?

I'm trying to get the frequencies from the array generated from pyAudio's callback(). def callback(in_data, frame_count, time_info, flag): audio_data = np.fromstring(in_data, dtype=np.float32) freq_data = np.fft.fft(audio_data) freq…
kckaiwei
  • 416
  • 7
  • 18
0
votes
1 answer

How to shift a wave of a wav file by 180 degrees

Is there a way to shift the phase of a wav file in python? I am trying to achieve active noise reduction. What I plan to do is to record the ambient noise and then shift its phase by 180 degrees out of phase. I will then record another wav file with…
Markus
  • 59
  • 6
0
votes
0 answers

How to handle data from two microphone?

I'm trying to make simple beamforming system with two USB microphone, and succeeded connecting both with a computer. Here is my code. import numpy as np from scipy.io import wavfile import time import pyaudio import matplotlib.pyplot as plt import…
0
votes
0 answers

Defining a dynamic threshold for active noise reduction

Is there any way to define a dynamic threshold for filtering noise in python? I am trying to achieve active noise reduction using python. What I want to achieve is that everything that is below the threshold will be filtered (this will be the ones…
Markus
  • 59
  • 6
0
votes
0 answers

Encountered an error trying Active Noise Reduction with Pyaudio

I got this code from here. When I try to run it on Python (I am using Python 3.6) it encounters this error: runfile('C:/Users/vsecadesang/Desktop/5th year/2nd sem/SIGNLAB/PROJECT/SIGNLABPROJ.py', wdir='C:/Users/vsecadesang/Desktop/5th year/2nd…
Markus
  • 59
  • 6
0
votes
1 answer

Numpy RFFT/IRFFT volume

I'm doing an rfft and irfft from a wave file: samplerate, data = wavfile.read(location) input = data.T[0] # first track of audio fftData = np.fft.rfft(input[sample:], length) output = np.fft.irfft(fftData).astype(data.dtype) So it reads from a file…
bnc
  • 57
  • 2
  • 14
0
votes
1 answer

Sound generated in pyAudio doesn't work in Pygame

I followed the code from this previous question: Generating sine wave sound in Python, with the added line var = stream.write(volume*samples). I tried to use this variable in pygame sound = pygame.mixer.Sound(var) but I get the error TypeError:…
Delly
  • 123
  • 1
  • 10
0
votes
1 answer

Issues getting PyAudio to work alongside Google Assistant

I am trying to set up a Raspberry Pi 3 with the Google Assistant SDK triggered by Snowboy for custom hotwords. I can get the sample assistant provided in pushtotalk.py to work, and I can get Snowboy to work, but I can't seem to get them to run in…
0
votes
1 answer

Can't install PyAudio on GAE Flexible Environment(Python)

So I am having quite a few issues getting this flask backend up. It is pretty standard stuff apart from some logic that recognizes audio delivered from the frontend. To do this, I incorporate PyDejaVu. One of the dependencies(PyAudio) is not…
0
votes
0 answers

Can't run Pocketsphinx script at boot

I am making a smart mirror with a voice interface on the Raspberry Pi. There are two separate scripts, one for voice control and one for a GUI. I am trying to launch both of them when the RPi boots up. The problem is that only the GUI script boots…
Alexander
  • 23
  • 5