Basic use of PyAudio module, blocking/non-blocking recording/playing of audio

pyaudio library: audio processing pyaudio documentation, most variables and interface definitions are still in the C version of PortAudio documentation. The PyAudio object is only responsible for playing audio, and is not responsible for reading binary data from the file, so the reading must be done outside, and what is given to it is binary […]

Build a simple CLI-based voice assistant using PyAudio, speech recognition, pyttsx3, and SerpApi

Dmitry Zub 1. Introduction As you can see from the title, this is a demo project that shows a very basic voice assistant script that can answer your questions in the terminal based on Google search results. You can find the full code in the GitHub repository: dimitryzub/serpapi-demo-projects/speech-recognition/cli-based/ Subsequent blog posts will cover: Web-based using […]

[Solved] Use pyaudio to record sound card sound and related problems

Use pyaudio to record sound card sound and solve related problems Table of Contents Use pyaudio to record the sound of the sound card and solve related problems 1 Implementation code 1.1 Recorder class: 1.2 Call method 2 Question 1: Select the device to achieve internal/external recording (resolve error: OSError: [Errno -9999] Unanticipated host error) […]

[Solved] macOS installation pyaudio error: src/_portaudiomodule.c:29:10: fatal error: ‘portaudio.h’ file not found

Installation error On macOS 10.14, trying to install pip install pyaduio gives an error: Collecting pyaudio Downloading PyAudio-0.2.11.tar.gz (37 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status ‘done’ Using legacy ‘setup.py install’ for pyaudio, since package ‘wheel’ is not installed. Installing collected packages: pyaudio Running setup.py install for pyaudio: started Running setup.py […]