Helper module for audio processing.
These functions and classes are only used internally, meaning an end-user shouldn’t need to access anything here.
.read_audio(url, sampling_rate) ⇒ Promise.<Float32Array>~audio : Float32Array.getMelFilters(sr, n_fft, n_mels) ⇒ Array.<Array<number>>Helper function to read audio from a path/URL.
Kind: static method of utils/audio
Returns: Promise.<Float32Array> - The decoded audio as a Float32Array.
| Param | Type | Description |
|---|---|---|
| url | string | URL | The path/URL to load the audio from. |
| sampling_rate | number | The sampling rate to use when decoding the audio. |
Kind: inner property of read_audio
Creates a frequency bin conversion matrix used to obtain a mel spectrogram.
Kind: static method of utils/audio
Returns: Array.<Array<number>> - Projection matrix to go from a spectrogram to a mel spectrogram.
| Param | Type | Description |
|---|---|---|
| sr | number | Sample rate of the audio waveform. |
| n_fft | number | Number of frequencies used to compute the spectrogram (should be the same as in |
| n_mels | number | Number of mel filters to generate. |