/** * 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. * @param {Array} M - Mel spectrogram [n_mels x n_frames] * @param {number} sr - Sample rate * @param {number} n_fft - FFT size * @param {number} power - Power for the spectrogram (2.0 for power, 1.0 for magnitude) * @param {Object} kwargs - Additional arguments for mel_filterbank * @returns {Array} Approximate STFT magnitude [n_freq x n_frames] */ export function mel_to_stft(M: any[], sr?: number, n_fft?: number, power?: number, kwargs?: any): any[]; /** * Invert a mel power spectrogram to audio using Griffin-Lim * @param {Array} M - Mel spectrogram [n_mels x n_frames] * @param {number} sr - Sample rate * @param {number} n_fft - FFT size * @param {number} hop_length - Hop length * @param {number} win_length - Window length * @param {string} window - Window type * @param {boolean} center - Center the frames * @param {string} pad_mode - Padding mode * @param {number} power - Power for spectrogram (2.0 for power, 1.0 for magnitude) * @param {number} n_iter - Number of Griffin-Lim iterations * @param {number|null} length - Output length * @param {*} dtype - Data type (unused in JS) * @param {Object} kwargs - Additional mel_filterbank arguments * @returns {Float32Array} Reconstructed audio */ export function mel_to_audio(M: any[], sr?: number, n_fft?: number, hop_length?: number, win_length?: number, window?: string, center?: boolean, pad_mode?: string, power?: number, n_iter?: number, length?: number | null, dtype?: any, kwargs?: any): Float32Array; /** * Invert Mel-frequency cepstral coefficients to approximate a Mel power spectrogram * @param {Array} mfcc - MFCC matrix [n_mfcc x n_frames] * @param {number} n_mels - Number of Mel filters * @param {number} dct_type - DCT type (2 or 3) * @param {string|null} norm - DCT normalization * @param {number} ref - Reference value for dB conversion * @param {number} lifter - Liftering coefficient (0 to disable) * @returns {Array} Mel power spectrogram [n_mels x n_frames] */ export function mfcc_to_mel(mfcc: any[], n_mels?: number, dct_type?: number, norm?: string | null, ref?: number, lifter?: number): any[]; /** * Convert Mel-frequency cepstral coefficients to a time-domain audio signal * @param {Array} mfcc - MFCC matrix [n_mfcc x n_frames] * @param {number} n_mels - Number of Mel filters * @param {number} dct_type - DCT type * @param {string|null} norm - DCT normalization * @param {number} ref - Reference value for dB conversion * @param {number} lifter - Liftering coefficient * @param {Object} kwargs - Additional arguments for mel_to_audio * @returns {Float32Array} Reconstructed audio */ export function mfcc_to_audio(mfcc: any[], n_mels?: number, dct_type?: number, norm?: string | null, ref?: number, lifter?: number, kwargs?: any): Float32Array;