Internal soundgen function
getMelSpec(
s,
samplingRate = NULL,
windowLength = 40,
overlap = 50,
step = NULL,
dynamicRange = 80,
maxFreq = NULL,
specPars = list(),
plot = FALSE
)
input sound (path to a .wav file or numeric vector)
if one or both inputs are numeric vectors, specify sampling rate, Hz. A vector of length 2 means the two inputs have different sampling rates, in which case spectrograms are compared only up to the lower Nyquist frequency
length of FFT window, ms
overlap between successive FFT frames, %
you can override overlap
by specifying FFT step, ms (NB:
because digital audio is sampled at discrete time intervals of
1/samplingRate, the actual step and thus the time stamps of STFT frames
may be slightly different, eg 24.98866 instead of 25.0 ms)
parts of the spectra quieter than -dynamicRange
dB
are not compared
parts of the spectra above maxFreq
Hz are not compared
a list of parameters passed to melfcc
if TRUE, plots the spectrum
Takes a .wav file or a waveform as numeric vector + samplingRate and returns
mel-transformed spectrum (auditory spectrum). Calls
melfcc
. See compareSounds
.