MCPcopy Create free account
hub / github.com/alibaba/MNN / mel_spectrogram

Function mel_spectrogram

tools/audio/source/audio.cpp:457–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457VARP mel_spectrogram(VARP waveform, const MelscaleParams *mel_params, const SpectrogramParams *spec_params) {
458 auto banks = melscale_fbanks(mel_params);
459 auto specgram = spectrogram(waveform, spec_params);
460 auto mel_specgram = _MatMul(specgram, banks, false, true);
461 return mel_specgram;
462}
463
464VARP fbank(VARP waveform, int sampling_rate, int n_mels, int n_fft, int hop_length, float dither, float preemphasis) {
465 int wav_len = waveform->getInfo()->size;

Callers 3

fbankFunction · 0.70
whisper_fbankFunction · 0.70
audio_test.cppFile · 0.50

Calls 3

melscale_fbanksFunction · 0.70
spectrogramFunction · 0.70
_MatMulFunction · 0.50

Tested by

no test coverage detected