Cochleagram Representation of Sound
Syntax
ratemap = makeRateMap_c(x,fs,lowcf,highcf,numchans,frameshift,ti,compression)
x - input signal
fs - sampling frequency in Hz (8000)
lowcf - centre frequency of lowest filter in Hz (50)
highcf - centre frequency of highest filter in Hz (3500)
numchans - number of channels in filterbank (32)
frameshift - interval between successive frames in ms (10)
ti - temporal integration in ms (8)
compression - type of compression ['cuberoot','log','none'] ('cuberoot')
ratemap - stored in a two-dimensional matrix (the number of channels by the number of frames)
Description
A Matlab MEX function implemented in C which transforms time domain signals into the "ratemap" spectral features - a map of auditory nerve firing rate, or a cochleagram (
Brown and Cooke, 1994). The "ratemap" representation is effectively an auditory spectrogram and commonly employed in auditory scene analysis studies. This implementation employs the same technique used in
gammatone_c to save computation cost. Tested on a Linux PC (Pentium4 2.0G Hz), it takes 0.29 secs to compute a 64-channel ratemap for a signal with a duration of 3.7654 secs and a sampling rate of 20K.
Example
This exmaple demonstrates that how to use the MEX-function "makeRateMap_c" to convert waveforms to the "ratemap" representation which is shown in the figure below:
The signal used here is a mixture of female speech `lay white with j 2 now' and male speech `lay green with e 7 soon'. The signal-to-noise ratio is 0 dB.
>> % Only if this is your first time running "mex"
>> mex -setup
>> % Compile the C source code, only need to be done once
>> mex makeRateMap_c.c
>> demo_ratemap;
Files used in this exmaple can be found here:
demo_ratemap.m and
t29_lwwj2n_m17_lgwe7s.wav.
Source code
- ratemap code (including the source code and a "wav2ratemap" function)
Reference
- Brown, G.J. and Cooke, M.P. (1994) Computational auditory scene analysis. Computer Speech and Language, 8: 297-336.