calcSBPCA - Calculation of auditory model subband PCA histogram features
calcSBPCA is a (compiled) Matlab script that converts audio and video (MP4) files into the SBPCA Auditory Model features described in:
Subband Autocorrelation Features for Video Soundtrack Classification.
Contents
Example Usage
The Matlab script can be run from the Matlab prompt, or using the included Unix shell wrapper, run_calcSBPCA.sh. It takes one obligatory input, the name of a file listing pairs of audio file and feature file, separated by a tab. The second argument is an optional configuration file which specifies parameters in a simple "name value" format, A third argument allows parameters to be specified directly on the command line as strings of "name value" pairs, separated by newlines.
fp = fopen('example.list','w'); fprintf(fp, 'yt.wav\tyt-sbpca.txt\n'); fclose(fp); delete('yt-sbpca.txt'); % no config file (empty string), but specify text output calcSBPCA example.list '' 'output_format txt' % Read it back in F = acFtrFileRead('yt-sbpca.txt'); % Plot the four histograms for i = 1:4; subplot(4,1,i); plot(F.ftrs(:,i)); end
Params: output_format: 'txt' funcname: 'calcSBPCA' win_time: 0.0250 hop_time: 0.0100 pool_win: 2 pool_hop: 2 sr: 8000 sbpca_dims: 4000 sbpca_codebook: 'conf/CB-sbpca-4x60x1000.mat' pca_mapping: 'conf/pca_sr8k_bpo6_sb24_k10.mat' force: 0 verbose: 1 version: 0.1100 date: 20130804 03-Feb-2014 14:07:54: SBPCA feature extraction 03-Feb-2014 14:07:54 file 1 yt... ....acFtrFileWrite: wrote yt-sbpca.txt (10 frames) wrote yt-sbpca.txt 20.0 sec, 10 segs (10 valid) 03-Feb-2014 14:07:58: Wrote 1 files to 03-Feb-2014 14:07:58: Total audio=20.0 s, calc time=3.3 s (6.1x real time)

Installation
This package has been compiled using the Matlab compiler. You will also need to download and install the Matlab Compiler Runtime (MCR) Installer. Please see the table below:
Architecture | Compiled package | MCR Installer |
---|---|---|
64 bit Linux | calcSBPCA_GLNXA64.zip | Linux 64 bit MCR Installer |
64 bit MacOS | calcSBPCA_MACI64.zip | MACI64 MCR Installer |
You'll still need to download the source package below to get the parameter files.
The original Matlab code used to build this compiled target is available at http://labrosa.ee.columbia.edu/projects/calcSBPCA/
All sources and the parameter files are in the package calcSBPCA-v0.11.zip.
To run the Matlab source, you'll also need the audioread package which provides the ability to read most soundfile types. (This functionality is compiled in to the precompiled binary).
There is also a Python port of this code available at: <https://github.com/dpwe/calc_sbpca/blob/master/python/audftrs.py audftrs.py >.
Feel free to contact me with any problems.
Changelog
% 2013-08-04 v0.11 Fixes to config_set for multiple items on one % line; added force flag to config. % % 2013-05-29 v0.1 Initial release, based on genNewBaseline code. %
Acknowledgment
Supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior National Busi- ness Center contract number D11PC20070. The U.S. Gov- ernment is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright an- notation thereon. Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/NBC, or the U.S. Government.
$Header: /u/drspeech/data/RATS/code/calcSBPCA/RCS/demo_calcSBPCA.m,v 1.2 2012/08/03 16:50:51 dpwe Exp dpwe $