Audio
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.
.read_audio(url, sampling_rate)
⇒Promise.<Float32Array>
~audio
:Float32Array
.getMelFilters(sr, n_fft, n_mels)
⇒Array.<Array<number>>
utils/audio.read_audio(url, sampling_rate) ⇒ <code> Promise. < Float32Array > </code>
Helper function to read audio from a path/URL.
Kind: static method of utils/audio
Returns: Promise.<Float32Array>
- The decoded audio as a Float32Array
.
url
string
| URL
The path/URL to load the audio from.
sampling_rate
number
The sampling rate to use when decoding the audio.
read_audio~audio : <code> Float32Array </code>
Kind: inner property of read_audio
utils/audio.getMelFilters(sr, n_fft, n_mels) ⇒ <code> Array. < Array < number > > </code>
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.
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.
Last updated