7. Python for Sound Signal Processing¶
Python is not that as much in use for signal processing and control theory as for example Matlab. Fortunately that last couple of years the available packages for sound and signal processing are getting better. This is also true for Linux used for sound and signal processing. The different sound systems used in Linux (ALSA, Pulseaudio, Jack, …) are not quite easy to use and not at all portable between different versions of and distributions of Linux. But things are getting better.
In this chapter some examples are given for sound and signal processing using:
- PyAudio
A Python package for audio (sound) processing. It uses the Portaudio library (a free, cross-platform, open-source, audio I/O library.
Before using PyAudio you thus should install the development library for portaudio.
Then you can install PyAudio using pip (or maybe conda).
- Soundfile
A library to read and write many formats of sound files. Soundfile` is the Python interface for the C library libsndfile. A disadvantage is that soundfile does not support mp3 files. For that you are advised to install sox, the swiss army knife of audio processing.
- Signal
A Python library for (audio) Signal Processing
- Control
A Python libray for control theory.