This is a basic Python script to create a simple 4-band (fundamental, 1st, 2nd and 3rd order formants of vocal range) adaptive bandpass filter by automatically detecting the fundamental frequency (F0) of the voice and adjusting the filter parameters with it.
Python Dependencies:
pyaudio- For real-time audio input/outputnumpy- For numerical operationsscipy- For biquad filter design and applicationlibrosa- Fundamental frequency estimation (usingpyin).matplotlib- For plotting the realtime values of gain and F0soundfile- For writing audio output to a WAV filejson- Saved caliberation data configuration file
Demo Screengrab
Initialization and Caliberation Phase:
After Caliberation:

