Here we consider a first example for the generation of simple spectral fingerprints
of an
audio file series as data base for a first audio recognition test.
The purpose of this example is to experience, whether we can identify
a music track by a very simple "spectral fingerprint"
of a short track
section of about 30 seconds duration, taken from an arbitrary time
interval of the track.
In the file fingerprint.m spectral fingerprints are computed for a series of tracks.
For an unknown track section the analogous fingerprint has to be computed and compared with the data base.
We test the following type of a spectral fingerprint:
The bandwidth is partitioned into a series of subbands. For each subband
we compute the so-called "spectral flatness",
i.e. the quotient of the geometric and the arithmetic mean of all amplitudes in the subband.
The vector of these values
in the interval [0,1] is considered as
the spectral fingerprint.
For recognition of a piece we compare its analogous fingerprint. The orthogonal projections of the test
fingerprint
into the data base fingerprint directions are computed. As "identification" per channel is chosen that track,
where we find the largest component.
This is done in fingerprint_test.m
For more details please read the text and comments in the m-files. The m-files are
m-file for the generation of a series of spectral fingerprints from a list of music tracks
m-file for the recognition test
The output of the first m-file is the data base for the test. Matlab (on my dual core notebook) needs only about 170 s
computation time for 20 tracks of about 3-4 minutes duration.
(FFT for about 350 million samples in the 2 channels, i.e. for
more than 104 million complex operations!
A naively programmed DFT without the FFT algorithm would need more than 100 years of computation
time at the same speed!)
The output of the second m-file is displayed in the Command Window of Matlab and shows the computed track no. per channel and
the components of the test fingerprint into the corresponding fingerprint directions of the displayed track no.
You can check the test success or mismatch by comparing the track list provided below.
You can also display or print out the generated correlations per test and compare them with your perceptive impressions of the tracks in test.
For new Matlab users:
You can open the m-files in the Matlab editor by double-clicking, and run them by
" Evaluate current cell",
a menu point found in the top line of the Matlab window clicking "cell".
Test Examples and generated fingerprints
The fingerprint data base of 20 music tracks computed as above
The corresponding track list of the music examples I used
To experience how it works, you can download segments
of the used examples with the filenames
test_trackN.wav
(each about 30 s, 5 MB) from the folder