#
utils/audio

Helper module for audio processing.

These functions and classes are only used internally, meaning an end-user shouldn’t need to access anything here.

- utils/audio
  - `.read_audio(url, sampling_rate)` ⇒ `Promise.<Float32Array>`
  - `.getMelFilters(sr, n_fft, n_mels)` ⇒ `Array.<Array<number>>`

##
`utils/audio.read_audio(url, sampling_rate)` ⇒ `Promise.<Float32Array>`

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.

##
`utils/audio.getMelFilters(sr, n_fft, n_mels)` ⇒ `Array.<Array<number>>`

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 `stft`).
n_mels | `number` | Number of mel filters to generate.