mel_to_stft
mel_to_stft(
M,sr?,n_fft?,power?,kwargs?):any[]
Defined in: packages/pleco-xa/src/scripts/xa-inverse.js:24
Approximate STFT magnitude from a Mel power spectrogram.
NOTE: an exact inverse solves a non-negative least squares problem (nnls(mel_basis, M)); this implementation uses the filterbank TRANSPOSE as a pseudo-inverse — a rough approximation. Spectral shape (per-frame peak location, cosine similarity vs |stft|) survives; absolute magnitudes do not.
Parameters
Section titled “Parameters”any[]
Mel spectrogram [n_mels x n_frames]
number = 22050
Sample rate
n_fft?
Section titled “n_fft?”number = 2048
FFT size
power?
Section titled “power?”number = 2.0
Power for the spectrogram (2.0 for power, 1.0 for magnitude)
kwargs?
Section titled “kwargs?”any = {}
Additional arguments for mel_filterbank
Returns
Section titled “Returns”any[]
Approximate STFT magnitude [n_freq x n_frames]