-
Notifications
You must be signed in to change notification settings - Fork 1
Raspberry Pi Audio Recording with Python
In this tutorial you learn how to do basic audio recording with our I2S microphones and Python.
The first step is to go through this guide and make sure that I2S is running on your Raspberry Pi and the I2S microphone is connected.
For the required Pip packages ATLAS, pyaudio and the ALSA development package are required:
sudo apt-get install libatlas-base-dev libportaudio2 libasound-dev
For communication between our microphone and Python we use the python-pyaudio library. It can be installed using the following command:
sudo apt-get install python-pyaudio
You can find the example in this GitHub repo at application_examples/raspberrypi/audio_processing/basic_audio_recording.py
. To run the example, please clone the repository locally on your Raspberry Pi.
Before running the example please open it and read the comments to understand what it does. You can run the example by typing
python3 basic_audio_recording.py
on your Raspberry Pi.