| 455 | } |
| 456 | |
| 457 | VARP 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 | |
| 464 | VARP 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; |
no test coverage detected