-
Notifications
You must be signed in to change notification settings - Fork 1
Raspberry Pi Audio Processing with Python
In this tutorial you learn how to do basic audio processing 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, PortAudio 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-sounddevice library. It can be installed using the following command:
python3 -m pip install --user sounddevice
To be able to write our audio segments to wav files we need to install SciPy:
python3 -m pip install --user scipy
You can find the example in this GitHub repo at application_examples/raspberrypi/audio_processing/basic_audio_processing.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_processing.py
on your Raspberry Pi.