Delta Lab | Twitter | LinkedIn
- Omar Trejo
- August, 2016
The first time I worked on this project it was to downsample WAV files and to provide cross-correlation analysis. The second time I worked on these was to add support for HDF5 file format.
The documentation for each script is within itself. Here I'll only explain the general procedure to use them.
Put the two audio files in the the "audio" directory which is located in the root directory for these scripts. Let's assume one is called "test_audio_original.wav" and the other one is called "test_audio_delayed.wav".
Downsample both audio files to the desired sample rate. Keep in mind that the desired sample rate should be at most the same than the lowest of the sample rates for the two files.
$ python downsample.py ./audio/test_original.wav 8192
$ python downsample.py ./audio/test_delayed.wav 8192
For each command you will see some output showing the information of it's original audio file as well as the downsampled version.
The results will be stored as:
./results/test_original_downsampled_to_8192.wav
./results/test_delayed_downsampled_to_8192.wav
These two files have the same sample rate and are usable for correlation analysis. Two graphs will be created for each of those two files showing the signal before and after downsampling.
Perform the correlation analysis on the two file that resulted from the last step. You can do so by doing:
$ python analysis.py ./results/test_original_downsampled_to_8192.wav ./results/test_delayed_downsampled_to_8192.wav
The command should be a single continuous line (it's been split in the example to facilitate reading it.
This command will create a graph that shows the correlation analysis (it will be stored in the "results" directory and will print the correlation data to the terminal.
"We are the people we have been waiting for."