Questions tagged [pyaudio]

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library.

pyaudio
Filter by
Sorted by
Tagged with
-1 votes
0 answers
20 views

Can't install PyAudio on Kubuntu [duplicate]

I'm trying to install PyAudio on my system, but I encountered an error during the installation process. Here's the error message I received when I try pip install PyAudio : Collecting pyaudio Using ...
Clément NOGUES's user avatar
1 vote
1 answer
57 views

List all actual microphones python

How can I list every actual microphones currently available in python? Currently i am doing this: import pyaudio p = pyaudio.PyAudio() print("Available audio input devices:") for i in ...
Nitaki's user avatar
  • 31
-2 votes
0 answers
21 views

PyAudio can't open device when started from systemd [closed]

I tried to launch my voice assistant with the start of the rassbery pi 4 using systemd but its faliur Apr 12 19:44:24 raspberrypi python3[38693]: Traceback (most recent call last): Apr 12 19:44:24 ...
Marokass Marokas's user avatar
0 votes
0 answers
15 views

Speech recognition adjust for ambient noise

i am trying to adjust for ambient noise but i keep on getting this error I have found out what is causing it but i cant find the audio source! audio = recognizer.listen(sr.Microphone) File "...
brotherman's user avatar
1 vote
1 answer
57 views

How can i install pyaudio on MacOS

When running the command: "pip3 install pyaudio", I get this error: "Collecting pyaudio Using cached PyAudio-0.2.14.tar.gz (47 kB) Installing build dependencies ... done Getting ...
Benny Mestel's user avatar
-1 votes
0 answers
27 views

When working with pyaudio, the following OSError occurred: [Errno -9988] Stream closed

When working with pyaudio, the following OSError occurred: [Errno -9988] Stream closed, please help me figure it out. Here's all my code. q = queue.Queue() model = vosk.Model('model_small') device = ...
user588106's user avatar
0 votes
0 answers
18 views

Pyaudio installed with Conda but not found on Import

I have installed pyaudio with conda, but my jupyter notebook can't find the module pyaudio on import. I have trying uninstalling and reinstalling with no success. Here is a few relevant information: ...
Andrea Marino's user avatar
0 votes
0 answers
51 views

LiveKit: Stream audio and video using python sdk

I am able to stream video but not audio using python sdk . Here is my code to connect to a room and play video (unfortunately no audio). What should I do to also include audio from my video.mp4 I dont ...
Sid Anand's user avatar
  • 197
2 votes
0 answers
19 views

AttributeError: module 'speech_recognition' has no attribute 'Microphone'

I am new to python stt, so I started with this speech_recognition library import speech_recognition as sr recognizer = sr.Recognizer() with sr.Microphone() as source: print("Listening...&...
Tribunal Loral's user avatar
0 votes
0 answers
43 views

python sounddevice: asynchronous playback with complicated callback

I'm using the python sounddevice module to provide "audio feedback" for a digital sensor. The idea is I have a sensor with one-dimensional time-series data being read in at 40 Hz. I have a ...
oweydd's user avatar
  • 111
0 votes
0 answers
22 views

Read from audio output in PyAudio through loopbacks

I'm writing a program that records from my speaker output using pyaudio. I am on a Raspberry Pi. I built the program while using the audio jack to play audio through some speakers, but recently have ...
MillerTime's user avatar
0 votes
0 answers
20 views

How to imporve audio sound quality from 2 input devices using Pyaudio?

The sound recorded using 2 input devices (1 is Microphone, 2 is Stereo Mix) has: Echo sound for sound from Stereo Mix Continous noises for sound from Microphone. Those problems are not seem just from ...
xjqian's user avatar
  • 1
0 votes
0 answers
9 views

PyAudio Signal is 0

I'm trying to run a bog-standard PyAudio script to get audio from my microphone and having issues. The code picks up the microphone device, but when I try to access the data via stream.read I get a ...
The_Chicken_Lord's user avatar
0 votes
0 answers
76 views

Syncing audio/video in pyav decoding

I am making a simple video player with pyav, and using the container.decode(video=0, audio=0) method to decode both audio and video frames, then syncing them using PIL and pyaudio. Here is the summary ...
Akascape's user avatar
  • 312
0 votes
0 answers
55 views

Streaming audio from a PyAudio stream to be played on a webpage in Javascript

I'm trying to take an audio stream from my computer using PyAudio (specifically the pyaudiowpatch fork), stream that audio data over a websocket (using the websockets library, and play it on a web ...
Nick's user avatar
  • 95
0 votes
0 answers
32 views

Processing loopback audio and playback in real time

I'm trying to capture real time audio via loopback, in order to apply filters and play it back in real time. The idea is to filter in real time any audio being played on computer: audio files, web ...
Tommy's user avatar
  • 1
0 votes
0 answers
33 views

Is there a way of starting a pyaudio stream from a separate process when using multiprocessing?

I'm trying to creating an interactive real-time audio application where the user should be able to control a few key audio processing parameters through a GUI. At present I'm using pyaudio for real-...
Molem7b5's user avatar
0 votes
0 answers
59 views

python pyaudio problem (Traceback (most recent call last))

import pyaudio import socket import select import sys FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 CHUNK = 1024 audio = pyaudio.PyAudio() stream = audio.open(format=FORMAT, channels=2, rate=...
Gürkan's user avatar
0 votes
0 answers
47 views

how to stream WebAudio API from javascript to python backend

I would like to use the microphone from webbrowser and send the audio chunks in realtime to a python backend via websockets. The audio data (float32arrays) are sent, but seem to be different than the ...
neo_cacher's user avatar
1 vote
0 answers
72 views

PyAudio stream delays in callbacks (frames dropped)

I am trying to use PyAudio in Python for real-time audio processing. I use some standard code for non-blocking streaming using a callback function. However, I notice that there is a delay between the ...
Stefanos's user avatar
0 votes
0 answers
70 views

how to write python code to capture voice in android device

I wrote some code to capture voice from mic using pyaudio and speech_recognition. When I tried to execute it in my smartphone, it said pyaudio not supported. The code I wrote listens and records the ...
oussama hassairi's user avatar
0 votes
0 answers
32 views

Error importing pyaudio on M1 mac: Could not import the PyAudio C module 'pyaudio._portaudio'

I am able to successfully install portaudio and pyaudio but when I do the following I get an error: import pyaudio The error is: >>> import pyaudio Could not import the PyAudio C module '...
Sneha's user avatar
  • 140
0 votes
1 answer
348 views

ModuleNotFoundError: No module named 'distutils' how to solve this in MacOS

Was trying to make python use speech recognition File "/Users/hridayjain/PycharmProjects/Jarvis/main.py", line 18, in <module> text=takeCommand() ^^^^^^^^^^^^^ File &...
Hriday Jain's user avatar
0 votes
0 answers
32 views

Record system or output device audio using Python Pyaudio

The output device is typically used for audio playback but in this case I want to record/read/capture the system audio (or other output device) for use in transcription. I've heard this is called &...
Tomas Lawton's user avatar
0 votes
1 answer
40 views

No output with speech_recognition python module

I am running the python module speech-recognition on mac The system itself works (like no error appears) but there is no result output. I am speaking and there is no text. import speech_recognition as ...
Saud Alzahri's user avatar
0 votes
0 answers
39 views

Unable to import PyAudio package

seeing this error on executing the program: Could not import the PyAudio C module 'pyaudio._portaudio'. Traceback (most recent call last): File "/Users/anandsingh/Desktop/openAI_API/Web_apps/...
Anand Singh's user avatar
2 votes
1 answer
93 views

Why I can't download PyAudio in mac m2 using pip3

Why I can't download PyAudio in mac I have already installed homebrew but I can't use brew command line in my mac terminal and also why I can't install PyAudio. Every time this error came out ...
Raghav Coder PY's user avatar
0 votes
1 answer
67 views

i installed pyaudio and portaudio but i get error

in this code for convert speech to text in python import speech_recognition as sr # ساخت یک شیء از کلاس Recognizer recognizer = sr.Recognizer() # ضبط صدا از میکروفون with sr.Microphone() as source: ...
amir graphici's user avatar
0 votes
0 answers
61 views

Is it possible to direct audio output to input (mic) using Python

I'm looking for a software solution (preferably in Python, such as using PyAudio or other libraries) that does the following on a Windows machine: redirect audio from output (speakers) to input (...
fittaoee's user avatar
  • 147
0 votes
0 answers
91 views

For pyaudio recording on streamlit, how to use session state as a trigger to control the recoding

How to use streamlit session state as a trigger to control real-time audio recoding? The speaker_array is unable to be accumulated with all the audio data. And the output.wav is 0kb. I think there may ...
xjqian's user avatar
  • 1
0 votes
0 answers
26 views

pyAudio input seems lagging when using after some "idle" time

I'm prototyping some small project of mine and encountered a small problem, I need help to fix it. The project is a little "walkie-talkie" raspberry pi project. I'm using a raspberry pi zero,...
Martin Pagels's user avatar
1 vote
1 answer
100 views

Real time speech recognition from PC audio [closed]

I'm trying to make real time speech recognition software that will show text on screen (with tkinter). I already found a way to get an audio from PC output using Virtual Cable Audio, pyaudio and ...
youwish's user avatar
  • 43
0 votes
0 answers
81 views

Raspberry Pi 4B & ReSpeaker v2.0: PyAudio Errors and ALSA Configuration Issues

OS: Raspberry Pi OS (64 bit) - Debian Bookworm As a forewarning, I am a novice when it comes to IoT projects like this. My purpose is to implement my own custom python script which considers direction ...
Cole Sheyka's user avatar
0 votes
0 answers
61 views

Can't find a proper audio output on Raspberry Pi 4B, whith an external sound card

I am having issues with playing sound trhough headphones connected to a jack port, on an raspberry Pi expansion board. I'm using the "ReSpeaker 2-Mics Pi HAT", dual-microphone expansion ...
Wkacp's user avatar
  • 1
0 votes
0 answers
119 views

Quality problems in aiortc communication

With this code i am trying to implement an aiortc ip call voice channel between a browser user (client) and a python (pyqt5) user (server). index.html <!doctype html> <html> <head&...
Chris P's user avatar
  • 2,239
1 vote
0 answers
30 views

The generated sound is 'chopped'

I have code where when you press on midi controller a button (which is mapped to a frequency) the triangle wave is generated for the whole time when is the button pressed. The weird part is that with ...
Mr.novak's user avatar
0 votes
0 answers
18 views

How get 48000 frames per second in PyAudio?

I created stream CHUNK=48000 RATE=48000 p = pa.PyAudio() stream = p.open( rate=RATE, channels=CHANNELS, format=FORMAT, input=True, frames_per_buffer=CHUNK ) And I take data from ...
Антон Нурапкин's user avatar
0 votes
0 answers
23 views

Flask and pyaudio entegras

I have a problem with flask_socketio. This problem was not happening to me in local with socket. The following code is a function on the side that receives the sound. When the get_soundfunction is ...
Emirhan  Erdem's user avatar
1 vote
1 answer
85 views

extracting numpy array from pyaudio results in noise and distortion

My goal is to record the audio output from my computer, process it in real time and then react to it in real time. I am using PyAudio with a patch that allows loopback devices. I can record the audio ...
FerdyG's user avatar
  • 21
0 votes
1 answer
60 views

ModuleNotFound: No module name pyaudio

I am not able to install pyaudio in raspberry pi.. Tried the command sudo apt install python3-pyaudio it says python3-pyaudio is already installed.. but when i try to import pyaudio. ModuleNotFound ...
NINJA's user avatar
  • 111
0 votes
0 answers
38 views

My speech recognition script is not transcribing anything?

I have downloaded all the required packages and also has installed the DeepSpeech model and there is no error in my code. import deepspeech import numpy as np import pyaudio import wave # Set the ...
Anjani Kumar's user avatar
0 votes
0 answers
33 views

Python - treat file as a sliding window with continuously incrementing pointer?

I'm playing around with a middleware solution for streaming audio from my computer to a Sonos Play:1 speaker that has no Bluetooth, but can read files from a network location. The basic structure I ...
Jim Libstaff's user avatar
0 votes
1 answer
45 views

PyAudio Multichannel Not Recognized from Focusrite 18i20

I'm pretty new to code so I'm trying to understand a lot, so sorry if I'm unaware. I am running a script which listens to the inputs of a multichannel (8 channel) Focusrite 18i20 interface (3rd gen). ...
Strigi's user avatar
  • 1
0 votes
1 answer
34 views

Is there any solution how to play a sound without declaring the duration of it?

I have a code which basically generates a wave(sine, triangle,...) but only for certain duration. Also I have midi implementation and when I press a button the sound starts to generate(and play). Is ...
Tom hala's user avatar
1 vote
0 answers
65 views

Listen mic and return audio frame in python

Is someone can explain me how to create a custom class audio which listen our pc microphone and return an audio frame ? I made the same things for webcam here : class CustomVideoTrack(VideoStreamTrack)...
Ismael Hadj's user avatar
0 votes
0 answers
150 views

How to transcribe raw audio data with picovoice leopard and pyaudio

I'm trying to find a way to transcribe raw audio data with picovoice leopard model. in the official picovoice docs there is a few lines of code explaining how to do so, but I could not get it done. ...
Almogbb's user avatar
  • 49
0 votes
0 answers
18 views

Depending on PyAudio

Im trying to build a python package using setup.cfg, pyproject.toml the build module and a setuptools build backend (this is ridiculous). This Package depends on PyAudio which can not be install via ...
Pizza98's user avatar
0 votes
0 answers
55 views

Can't use pyaudio in SpeechRecognition

I have been trying to use SpeechRecognition module. Here is my code import speech_recognition as sr def real_time_speech_recognition(): recognizer = sr.Recognizer() with sr.Microphone() as ...
Nuntea7's user avatar
  • 11
0 votes
2 answers
103 views

Can't install PyAudio on macOS, getting "library not loaded" error. Portaudio is installed

I tried installing PyAudio on macOS Sonoma, with multiple Python versions. I have portaudio installed with brew, and tried rebooting. When I try to install PyAudio it fails to build wheel with an ...
Octopus's user avatar
  • 11
0 votes
0 answers
48 views

Pyaudio Stream Crashing on Raspberry Pi4

I am running a pyaudio stream as part of a voice assistant application I am writing. The pyaudio stream is continuous and writes data to a buffer that other components in the app can read from to ...
Greer Viau's user avatar

1
2 3 4 5
29