mfcc
mfcc(
@dcttype 2
@highfrequencybound 11000
@inputsize 1025
@liftering 0
@logtype 'dbamp'
@lowfrequencybound 0
@normalize 'unit_sum'
@numberbands 40
@numbercoefficients 13
@samplerate 44100
@silencethreshold 0.0000
@type 'power'
@warpingformula 'htkmel'
@weighting 'warping'
@mode 0
) -> llll
Generates audio descriptor to compute the mel-frequency cepstrum coefficients of a buffer's spectrum. As there is no standard implementation, the MFCC-FB40 is used by default. See analyze
.
The resulting buffer will be updated with the following keys:
mfcc_bands
mfcc
info
mfcc
is a mirror implementation of the same algorithm in the Essentia library.
For more details on the algorithm, please check the Essentia Algorithms reference.
Arguments
@dcttype
[int]: DCT type. (default:2
).@highfrequencybound
[int/float]: upper bound of the frequency range, in Hz. (default:11000
).@inputsize
[int]: size of input spectrum. (default:1025
).@liftering
[int]: liftering coefficient. Use0
to bypass it. (default:0
).@logtype
[symbol]: logarithmic compression type. (default:'dbamp'
).'natural'
'dbpow'
'dbamp'
'log'
@lowfrequencybound
[float]: lower bound of the frequency range, in Hz. (default:0
).@normalize
[symbol]: spectrum bin weights to use for each mel band. (default:'unit_sum'
).'unit_sum'
'unit_tri'
'unit_max'
@numberbands
[int]: number of mel-bands in the filter. (default:40
).@numbercoefficients
[int]: number of output mel coefficients. (default:13
).@samplerate
[int]: sampling rate of the audio signal, in Hz. (default:44100
).@silencethreshold
[int/float]: silence threshold for computing log-energy bands. (default:0.0000
).@type
[symbol]: use magnitude or power spectrum. (default:'power'
).'magnitude'
'power'
@warpingformula
[symbol]: scale implementation type. (default:'htkmel'
).'slaneymel'
'htkmel'
@weighting
[symbol]: type of weighting function for determining triangle area. (default:'warping'
).'warping'
'linear'
@mode
[int]: analysis mode. (default:0
).0
: global1
: time series2
: time-tagged time series3
: buffer
Output
mfcc descriptor [llll]
Usage
mfcc
is meant to be used with the analyze
function:
$buffer = importaudio('singing.wav'); ## input buffer
$descr = mfcc(); ## generate mfcc audio descriptor
$buffer.inspect('before analysis');
$buffer = $buffer.analyze($descr); ## apply analysis
$buffer.inspect('after analysis')