Questions tagged [pyaudio]
PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library.
0
votes
0answers
14 views
PyAudio: Converting paInt16 byte array into Int16 and then back into a byte array using 'read'
This is my first post so I will try to format it logically. I am creating a live (real-time) audio modulation code in Python primarily using PyAudio.
First, I store small chunks of the audio in ...
0
votes
0answers
14 views
Is there any way to convert audio to text (speech recognition) in python without using any API(Google, google cloud, IBM,…etc)
I have to create a python project to convert audio to text using python , but i don't want to use any available API(Google,IBM..etc).
Is there any functions or methods available in python to do that.
0
votes
0answers
19 views
How to make different types noises generator by using PyAudio?
The main question is how to make simultaneously make to play different frequencies, cutted previously?
In my code i tried to make brown noise (cutted to 1000 Hz) make lists from got values and after ...
0
votes
1answer
33 views
MacOS 12 “can't open file 'pyaudio.py'” issue, has anyone seen and resolved this issue?
After running:
brew install portaudio
pip3 install pyaudio
I get the following error running a python script that calls pyaudio:
(null): can't open file 'pyaudio.py': [Errno 2] No such file or ...
0
votes
1answer
43 views
I get an error when trying to install PyAudio
When I try to install PyAudio in CMD with py -m pip install PyAudio I get this:
Collecting PyAudio
Using cached https://files.pythonhosted.org/packages/ab/42/...
2
votes
1answer
70 views
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 ...
1
vote
1answer
24 views
Streaming webradio using PyAudio
I am fiddling around w/ snowboy and PyAudio. I want to automatically listen to a web radio, listen for a hotword via snowboy, record the succeeding X seconds, pass them via SpeechRecognition to the ...
0
votes
0answers
19 views
RuntimeError: new_Decoder returned -1
I been trying to solve this error, but I couldn't able to figure this out.
My project is about Speech to action. I have connected my earphones to my laptop and running this project.
My system could ...
0
votes
0answers
38 views
How do you record from two USB microphones using PyAudio?
My application requires recording from two microphones at different locations simultaneously, and then doing FFT on the two streams of data to obtain a result. I was not able to find how to do this ...
1
vote
1answer
37 views
Recording and playing audio simultaneously with PyAudio and NumPy
Currently i can record audio and save it as a NumPy array. What i need is after audio has been recorded i want to be able to record again but play this NumPy array at the same time
import pyaudio
...
0
votes
0answers
17 views
PyAudio Print Sound Level From 1 To 100
I am looking to get the sound coming from my microphone printed out as a loudness level from 1 to 100 using PyAudio. Currently my code just prints the raw sound which is just numbers and letters, how ...
-2
votes
0answers
12 views
How can i specify the input or output channels from an audio device?
So i know how to check number of active input /output devices but i need a solution so that i can check the I/O channels and select them myself during recording or play back
0
votes
0answers
10 views
How to get the soundpeak out of each microphone on an array-mic
I am supposed to build a device, which can localize the source of a loud noise. I already know the math behind it, but I have problems writing the code. I got an 16-channel array-microphone(UMA-16 ...
0
votes
0answers
13 views
not getting new samples from microphone, using pyaudio
i am trying to visualise a piece of recording, but every time i run the program i will get the exact same figure, with the same peaks at the same numbers.
i used another script to check if my ...
0
votes
1answer
14 views
Pyaudio in raspberry pi 3 is not working, even the hardware is detected and correct channel and track number is used
Here, i print my device information. Attached a cheap USB audio device.
for i in range(p.get_device_count()):
dev = p.get_device_info_by_index(i)
print((i, dev['name'], dev['maxInputChannels']...
2
votes
1answer
32 views
How to get left output using pyAudio
Suppose I have a song, which plays on both of the speakers on my headphones. I want to write a code using pyAudio, so that I get output on only on speaker. Like those videos demonstrating left-right ...
0
votes
0answers
38 views
Creating low-pass filter with PyAudio and scipy.signal
I've built a python class that has methods to read, record, save, replay, and display an audio file with PyAudio and Matplotlib. I now want to implement a simple low-pass filter. I've managed to put ...
0
votes
0answers
22 views
How to fix this python portaudio binding issue?
I was writing a code for speech to text in python but got stucked up facing this issue "Please build and install the PortAudio Python bindings first."
import speech_recognition as sr;
r=sr....
0
votes
0answers
23 views
Issue with pyaudio
I need to use pyaudio for audio streaming. I have anaconda python as the default python and so used conda to install pyaudio. However, when importing the module and checking for devices using ...
2
votes
2answers
66 views
Python: Inaccurate timing playing audio at a set BPM interval (<1s)
I am trying to make a very simple metronome on a Raspberry Pi that plays a .wav file at a set interval, but the timing is audibly inaccurate.
I really can't figure out why, is python's time module ...
0
votes
0answers
11 views
When recording using Pyaudio, why is the amplitude overly large at the beginning?
I'm trying to record a few seconds of sound from a gear motor for spectrum analysis. I used PyAudio but the problem is, whenever recording is started, upon turning on the motor there is a large ...
0
votes
2answers
63 views
Using one pyaudio stream for both data reading and writing
I have a web-socket client which sends audio binary data in the request and receive them as a response from the web-socket server. I am using pyaudio to read binary audio data from (file/microphone) ...
0
votes
0answers
10 views
Transmit chunk with pyaudio on 32 bit planes in python
I'm trying to transmit a fragment of 1024 bits and 3 subbands, the fragment is divided into 32 bit planes, using a structure to send each plane where I store a bit for the position of the plane and a ...
0
votes
0answers
29 views
Transmit chunk with pyaudio on 32 bit planes
I am trying to transmit a chunk of 1024 bits and 3 sub-bands, the chunk is divided into 32 planes of bits, using a structure to send each plane where I store a bit for the position of the plane and a ...
0
votes
0answers
24 views
Directly gTTS output via PyAudio
I am trying to play recognized text directly to speakers without saving it to disk. I found io library with BytesIO function so I save recognized text from gTTS library to BytesIO and try to play it ...
0
votes
0answers
26 views
How to set volume to audiostream with pyaudio?
I'm building a auralization program for work and I need to do audiostreaming. I have 2 codes, the first is a filter 'oct3_filter' which has 3 inputs : signal, frequency rate, and sound volume. The ...
0
votes
0answers
41 views
How to ignore background noise while recording audio using pyaudio in python?
I am using the following code to record audio in python, it works perfectly. But when I set the microphone input volume to high, the audio thus recorded using this code has a lot of noise. How to get ...
0
votes
1answer
118 views
How to fix Issue With PyAudio in Python
I tried installing Pyaudio in Python but Python says it requires Portaudio binding for the installation.Help me fix this please.My platform is Windows.I am using Python 3.7.2.
I did:
I followed the ...
0
votes
0answers
76 views
I can't install PyAudio module by pip install
Can't install PyAudio, he gives out me an error.
I tried this command: python -m pip install --user PyAudio-0.2.11-cp36-cp36m-win_amd64.whl, but it is not working too.
(venv) C:\Users\danii\Python\...
0
votes
0answers
25 views
PyAudio installation error Python 3 Visual Studio 2019
pip install PyAudio
Throws an error saying:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\VC\\Tools\\MSVC\\14.20.27027\\bin\\HostX86\\x64\\cl.exe' failed with exit ...
0
votes
0answers
30 views
installing pyaudio on mac
I am trying to install pyaudio on my system.
System Specification: macOS Mojava
Version: 10.14.2 (18C54)
Error that I am getting is this:
Collecting pyaudio
Using cached https://files....
4
votes
2answers
161 views
Converting a Python function with a callback to an asyncio awaitable
I want to use the PyAudio library in an async context, but the main entry point for the library only has a callback-based API:
import pyaudio
def callback(in_data, frame_count, time_info, ...
0
votes
1answer
60 views
How to install pyaudio on Ubuntu 18.04 using Anaconda?
I am using Ubuntu 18.04. I have an Anaconda environment set up to use Python3. I have unsuccessfully tried to install pyaudio so that I can record from microphone in my environment.
I tried:
conda ...
0
votes
0answers
390 views
Installing PyAudio on Windows
Installing PyAudio on Windows 10 error
I want to install PyAudio
I have Windows 10, Python 3.7, pip 8.1
I'm installing it in Command Prompt with command pip install PyAudio
But there's an error ...
-1
votes
2answers
57 views
How do I record system audio in Python? (Linux)
I've tinkered with PyAudio and I've only been able to record from the microphone. I want to be able to record what's played through the speakers. Is there a way to do this with PyAudio or should I be ...
0
votes
1answer
258 views
pyAudio failed to install : Windows 10
When I am trying to install pyAudio using pip install pyaudio I get error. It looks like this :
C:\Users\pankajkaun>pip install pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted....
0
votes
0answers
12 views
Pyaudio:Sound plays once, then says I don't and have an output device in the console
I'm building a toy instrument and need to get sound from it on a repeat basis, with as little latency as using Python over c/c++ permits. Unfortunately I can get sound, but then the console tells me ...
0
votes
1answer
35 views
Python3, listen a specific channel of mic array
I'm trying to listen the first (0) channel of a mic array (Respeaker v2.0) with Python 3.7.
At this time, I can listen on the 6 channels :
p = pyaudio.PyAudio()
stream = p.open(
rate=...
1
vote
0answers
40 views
PyAudio wont install
I am trying to develop my own digital assistant in order to add speech recognition I must install pyAudio, but when i try it reply's the code below. if you have any solutions please reply.
thanks in ...
0
votes
0answers
20 views
Audio stuttering issue on raspberry pi recorded audio file
I've used the following code on Raspberry Pi 3B+ Python 3 IDLE to record a sound file and then play it but the recorded audio file is stuttering*. I don't believe that there is an issue with the code. ...
-1
votes
1answer
44 views
Want to play .wav audio file on Raspberrypi Python 3 Shell IDLE
I have installed many libraries and tried many different codes but I'm not able to play the audio file on Raspberry Pi 3B+. If you know any method or have any code. Must recommend me.
3
votes
1answer
76 views
MemoryError when dividing NumPy arrays
I'm trying to calculate the impulse response of a signal. Here is the code:
def impulse_response(self):
# Inverse filter:
T = self.recorded_data.shape[0] / self.samplerate
t = np.arange(0,...
0
votes
0answers
22 views
Converging two codes, one to record and one that shows the sound spectrum. Pyaudio and Matplotlib. Also Error -9988
Code for Recording
This my code for Recording through the mic
import pyaudio
import wave
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
CHUNK = 1024
RECORD_SECONDS = 10
name = input("What is ...
0
votes
0answers
30 views
Error recording audio using pyaudio - IOError: [Errno -9997]
I got a strange error. I make the script below, for recording audio by mic:
import pyaudio
import wave
import sys
CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 16000
RECORD_SECONDS = int(...
0
votes
0answers
25 views
Play Audio file on Raspberry Pi 3B+ in Python 3 IDLE
Installed pyglet, pygame and other libraries to run the audio file recorded using the pyAudio code. No error occurs and the code runs successfully but no sound is heard in the output speaker/headsets/...
1
vote
0answers
20 views
PyAudio send different frequency
I want to send different frequency waves using PyAudio (I want to start with low and high for BFSK and maybe something more complex latter).
How I can do this? ( I know how to read which frequency is ...
0
votes
0answers
21 views
Audio recorded on raspberry pi has higher pace and lot of breakage
I am trying to record voice using python. For this, I have used Uberi speech_recognition.
Using the code shown below, when I run it on my mac, I can observe that the audio is quite clear and at a ...
0
votes
0answers
34 views
trying to convert mp3 to wav
I am trying to convert mp3 file to wav format using pyaudio but getting an error
My code
from pydub import AudioSegment
sound = AudioSegment.from_mp3("v1.mp3")
sound.export("a.wav", format="wav")
...
0
votes
0answers
36 views
Detect music start and end within audio file
I have some podcast files (.mp3 mainly) that I would like to remove the music parts from.
The majority of the podcast is two people talking, no background music or noise. They have ad breaks that ...
0
votes
0answers
37 views
Python: PyAudio Continious output of 50 Hz Sine Wave
i am using the following code to generate a sine wave sound in Python:
import pyaudio
import numpy as np
p = pyaudio.PyAudio()
volume = 0.5 # range [0.0, 1.0]
fs = 44100 # sampling ...