This project aims to develop audio analyzer for analyzing audio transport path quality using criteria such as:
- First-order frequency response
- Harmonic distortion properties (THD)
- (DC offset)
Measurement results dashboard panel screenshots (from the Android app https://github.com/KlemenDEV/AudioPathAnalyzerApp):
Bode diagram display:
It is written for Linux ALSA audio subsystem, so ALSA-dev is required for building:
apt install libasound2-dev
Allowed options:
-h, --help Prints usage
-f, --calibration arg File containing calibration data or where to store it in
-c, --docalibration Run calibration and store it in -calibration <file>
-v, --verifycalibration Only verify if calibration file is valid for the given parameters
--frequency_low arg (=20) Sweep start frequency
--frequency_high arg (=20000) Sweep end frequency
-s, --steps arg (=200) Sweep frequency steps
-n, --nosmooth Disable frequency response smoothing
Frequency response is determined by:
- Sweeping across the range of sound card using logarithmic scale
- Sampling recorded input into a buffer
- Windowing the samples and removing DC offset
- FFT-ing the data
- Detecting peaks
- Correlating peaks to the harmonics of the measured frequency
- Interpolating FFT bins using parabolic interpolation
- Obtaining 0-th harmonic frequency and its amplitude
- Calculating THD as additional data
Some tests of this concept can be found in the matlab folder.
To clone the submodules too, use:
git clone --recursive https://github.com/KlemenDEV/AudioPathAnalyzer.git