das.models.kapre.backend

Kapre backend functions

Some backend functions that mainly use numpy.
Functions with Keras’ backend is in backend_keras.py.

Notes

  • Don’t forget to use keras.ops.float()! Otherwise numpy uses float64.

  • Some functions are copied-and-pasted from librosa (to reduce dependency), but

    later I realised it’d be better to just use it.

  • TODO: remove copied code and use librosa.

Functions

eps()

filterbank_log(sr, n_freq[, n_bins, ...])

[np] Approximate a constant-Q filter bank for a fixed-window STFT.

filterbank_mel(sr, n_freq[, n_mels, fmin, ...])

[np]

get_stft_kernels(n_dft)

[np] Return dft kernels for real/imagnary parts assuming

mel(sr, n_dft[, n_mels, fmin, fmax, htk, norm])

[np] create a filterbank matrix to combine stft bins into mel-frequency bins use Slaney (said Librosa)