Questions tagged [pyaudio]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 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
22 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
25 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
22 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
44 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
38 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
  • 39
0 votes
0 answers
16 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
31 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
0 votes
2 answers
48 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
19 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
0 votes
0 answers
26 views

Import PyAudio not working on M3 Pro Mac OS Sonoma (Could not import the PyAudio C module 'pyaudio._portaudio'.)

So I'm running into this error which many other people seem to run into on previous macbook such as the M1... I've tried everything they suggest to fix it, which is to brew install portaudio from --...
skidjoe's user avatar
  • 533
0 votes
0 answers
38 views

Issue with Higher Sampling Rates than 16 kHz in PyAudio on Raspberry Pi

I’m encountering an issue while using PyAudio on my Raspberry Pi 4 in conjunction with the ReSpeaker Mic Array v2.0. I’m trying to record audio with a sampling rate higher than 16 kHz, but I’m facing ...
waveexplorer's user avatar
-2 votes
0 answers
29 views

pip install pyaudio, can't install [duplicate]

Collecting pyaudio Using cached PyAudio-0.2.13.tar.gz (46 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × ...
pntd's user avatar
  • 7
1 vote
0 answers
96 views

i am trying to use pyaudio in pycharm and getting this " AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

I want to use "pyaudio" module but it is not importing. I am getting this -------- """ (venv) PS C:\Users\hp\Downloads> pip install pyaudio Collecting pyaudio Using cached ...
Yash's user avatar
  • 11
1 vote
0 answers
510 views

Note:AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

pip install pyaudio Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File &...
mohammed_051's user avatar
0 votes
0 answers
148 views

.whl file for pyaudio in python 3.12

I have been working on an ai assistant project for which I needed the pyaudio tool, but to install pyaudio certain .whl files are available online for previous python versions but not for the latest ...
suhani's user avatar
  • 1
0 votes
0 answers
38 views

pyaudio playing sound in a systemd unit is veeery low, unless I log in with ssh

I run a Python script in a systemd unit on Raspbian bullseye (Raspberry Pi zero W + Adafruit voice bonnet). My problem is that when I push the button to play a file, it will play some reeeeally low ...
16ar's user avatar
  • 107
0 votes
1 answer
26 views

How to properly include PyAudio as a dependency for a new Python package, so that the documentation compiles on ReadTheDocs?

I am currently developing a toolbox as a Python package. I have written the documentation using sphinx, and I am in the process of uploading the documentation to ReadTheDocs. My package has a bunch of ...
Paidon's user avatar
  • 71
0 votes
1 answer
42 views

Is it possible to add a mock microphone and speaker to gitlab CI pipeline?

I am using pytest to test some functions in a GitLab pipeline. However, some of these functions require a microphone or speakers to run, so the tests run correctly locally but not on the pipeline, ...
Zeusbeer's user avatar
0 votes
0 answers
43 views

pydub.playback.play isn't playing audio on windows

I am using Windows 11 Pro with Python v3.10.11, pyaudio==0.2.13 and pydub==0.25.1 for the playback. When I try to play the audio it rarely makes a sound and no exception occurs, so in theory it should ...
DerSchinken's user avatar
1 vote
0 answers
43 views

Sending audio stream usign asyncio

I'm trying to stream microphone data to an asynchronous server. The client code is below. My first attempt was without using await asyncio.sleep(0), but the code was getting blocked. I imagine it was ...
p.magalhaes's user avatar
  • 7,757
0 votes
0 answers
27 views

pyaudio not recording sound in Tkinter

I'm trying to build a really simple UI using Tkinter with a start/stop button to record sound. When user clicks start, it starts to record sound from microphone (follow the basic pyaudio example) and ...
tomography's user avatar
0 votes
0 answers
54 views

Voice Recognition programm instantly exits code instead of listening for input

Hello i honestly dont know if this is very much a stupid question or not but i am currently learning more python and as such am following some instructions on creating a little Voice Recognition ...
MaxinesHideout's user avatar
1 vote
1 answer
105 views

Audio from microphone (JS) through websocket to FastAPI python backend speaker

So, I'm trying to set up a thing to stream live audio from a mic collected on the webpage to speakers connected to the machine hosting the webpage. For this, I'm using JavaScript's MediaRecorder like ...
user3475234's user avatar
  • 1,533
0 votes
0 answers
68 views

Getting requirements to build whell . . . error, when trying install pyaudio

I trying to install pyaudio by this command: pip install pyaudio and Getting requirements to build wheel ... error I'm using laptop, win 10enter code here C:\Users\Kiet Tran\OneDrive\Documents\python&...
kiet's user avatar
  • 1
0 votes
0 answers
24 views

PyAudio on MacOS with minconda virtual environment runtime issue with import

So I have this namespace error on a symbol not found in flat namespace. I've read other posts about this mentioning that it has to do with the underlying library and how those files are complied in C++...
Nikhilesh Belulkar's user avatar
0 votes
0 answers
29 views

How to play and record 2 channels with pyaudio using callback functions in python?

Has anyone had any luck playing audio and recording two channels simultaneously with pyaudio using callback functions? I have been messing around with this all day and I cant seem to figure it out. ...
gtzack's user avatar
  • 1
0 votes
2 answers
79 views

Windows exec built by nuitka fails by not finding a file

I have a python (11) application running under Windows 10 in a virtual environment. It works fine. However, when I build an executable with nuitka it fails. Here is the relevant code: import ...
fredm73's user avatar
  • 347
0 votes
0 answers
47 views

Microphone isn't detecting in colab voice to text python script.. gives error OSError: No Default Input Device Available

I tried to code a microphone voice to text converting script using python in google colab.. But it isn't detecting the mic.. and gives this error.. No Default Input Device Available This is my code !...
madhawavish's user avatar
0 votes
0 answers
51 views

Can't receive audio in python program on Jetson Nano

I hope someone can help! I'm working on a larger program that worked fine on a windows PC, but I am migrating it bit by bit onto a Jetson Nano. As a test, I have run the following python program; #...
Josh Dennis's user avatar
0 votes
0 answers
14 views

pyaudio - mic settings don't match

Hi allenter image description here I have a new mic for my pc, this mic can take an audio sample in many formats (I added pic below). when I use "pyaudio.get_default_input_device_info()" , I ...
barH's user avatar
  • 1
0 votes
0 answers
14 views

cannot use the pyaudio

When I finish installing pyaudio and calling it, import pyaudio p = pyaudio.PyAudio() before use before use the pyaudio after use after use microphone was destroyed the terminal will get stuck, and ...
hawking steven's user avatar
0 votes
0 answers
39 views

How can I trim silence at the start and end of a recording(wav) in python?

I am trying to remove the silence at the start and end of this recording, so that I just have the voice in between, no need to remove any silence in between, just the start and end portions of the ...
Ijaz Ahmed's user avatar
0 votes
0 answers
107 views

Python/pyaudio running on wsl2 not detecting usb mic after it's been atached to the linux subsystem with usbipd

I'm trying to use pyaudio with vosk to write a speech to text program, which is running on a wsl. I've attached the usb port with the mic to the wsl using usbipd, which I can see has worked as the Q9-...
Finno's user avatar
  • 127
0 votes
0 answers
42 views

Solve Unanticipated Host Error Python pyaudio

When I attempt to use the pyaudio library to record an audio file I get an error. The error message is: lProject\test.py", line 11, in stream = p.open( ^^^^^^^ File "C:\Users\lenny\AppData\...
LenBen12345's user avatar
0 votes
0 answers
39 views

How to record the sound of a headset with blueooth or USB in python and windows

I want to record the audio from the headphones, but from the microphone and what I hear, also, if I only listen to music, for example from YouTube, I want to record it. The headset is connected with ...
TomaateTip's user avatar
1 vote
0 answers
101 views

Pyaudio won't work with SpeechRecognition on Arch Linux

When i try to get audio with the SpeechRecognition library I get this error. I use pipewire so I don't understand why it gives a ton of ALSA errors. ALSA lib pcm.c:2675:(snd_pcm_open_noupdate) Unknown ...
Lucky_Star's user avatar
0 votes
0 answers
45 views

OSError: [Errno -9996] Invalid input device (no default output device) in docker

I have scheduled a task in Apache airflow that records audio and saves the recording locally. The input device is my laptop's microphone. Apache airflow is installed on docker and I'm using Windows OS....
Chhandosee Bhattacharya's user avatar
0 votes
2 answers
28 views

Method for playing a sound file in pyaudio at Ubuntu? [duplicate]

I attempted to play a.wav file with pyaudio. It works fine in Windows, but not in Ubuntu when another device is using sound. and got this error: IOError: [Errorno Invalid output device (no default ...
user avatar
0 votes
1 answer
49 views

Is there a way to get audio from an opencv webcam capture? [duplicate]

I am trying to do some audio processing in python, but I need both the video and audio as I wish to output both when I am done. I have looked up other examples, but they all use video files instead of ...
Bengemon825's user avatar
0 votes
0 answers
72 views

Service Host: Capability Access Manager interfering with Audio Processing script

I have a DSP script written in Python that applies a couple of different bi-quad filters to an incoming audio stream and then analyses the output before feeding it through to the output. The script is ...
Max Wilson's user avatar
1 vote
0 answers
113 views

Python synchronous pyaudio data in asynchronous code

Here is my use-case: I am streaming some audio from a microphone using Pyaudio. I receive chunks of audio data every x milliseconds. I am opening a websockets connection if some condition is met. ...
HGLR's user avatar
  • 266
-1 votes
1 answer
153 views

Not able to install pyaudio or portaudio packages. It is showing error

I am using google colab. But for some reason I am having problems with vscode. It is showing this error msg for pip install portaudio: ERROR: Could not find a version that satisfies the requirement ...
user108077's user avatar
3 votes
1 answer
138 views

Reduce amount of silence needed for Python's SpeechRecognition to stop capturing audio

I'm using Python's SpeechRecognition to geenerate captions for a livestream. I noticed that when I listen to mic input, recognizer would need a couple of seconds of silence in order to stop capturing ...
Collert's user avatar
  • 33
1 vote
0 answers
130 views

"Could not import the PyAudio C module 'pyaudio._portaudio'." due to "symbol not found in flat namespace '_PaMacCore_SetupChannelMap'"(Mac M1 Chip)

I tried to pip install pyaudio on my Macbook pro M1 Chip version. I was be able to install both portaudio and pyaudio successfully and then when I import pyaudio, I met an import error as below (test)...
Yuquan Deng's user avatar
0 votes
2 answers
155 views

Voice detection and recording with PyAudio

I am using OpenSesame (an experiment builder using Python) to collect participants' voice response to specific stimuli using PyAudio. What I want to achieve is the following : Start recording sound ...
user1969717's user avatar
0 votes
0 answers
214 views

Pytorch fails to load pyannote-audio model with error hubconf.py file not found

I am trying to load pre-trained model for pyannote-audio for speaker change detection using below torch and pyannote-audio versions. torch == 1.12.1+cu102 pyannote.audio== 1.1.2 I have tried with ...
Rahul Anand's user avatar
0 votes
0 answers
95 views

Unable to acquire sound with PyAudio, but arecord works

I am working on a imx8MP board running Yocto Linux and I wrote a python script that acquires sound from a microphone using PyAudio. I checked that I can acquire using the arecord tool: ./arecord -L ...
firion's user avatar
  • 324
0 votes
3 answers
134 views

How to pip install pyaudio

D:\sanghoclaptrinh\python\Baymax>pip install pyaudio D:\sanghoclaptrinh\python\Baymax>pip install pyaudio Requirement already satisfied: pyaudio in c:\users\ho sang\appdata\local\packages\...
Sang Hồ's user avatar
1 vote
0 answers
41 views

How can i access the microphone in an apk made with kivymd

I am currently programming an app in python with kivymd that uses the SpeechRecognition library. The app should start the speech recognition after a button is pressed and everything works fine when i ...
TS46's user avatar
  • 25

1
2 3 4 5
28