/** * Mel spectrogram with a (y, options) API. * Thin wrapper over the validated scripts/xa-mel.js implementation. * @param {Float32Array|Array|null} y - time series (or null when S given) * @param {Object} options - { sr, S, n_fft, hop_length, win_length, window, * center, pad_mode, power, n_mels, fmin, fmax, norm, htk } * @returns {Array} [n_mels][n_frames] */ export function melspectrogram(y?: Float32Array | any[] | null, options?: any): Array; /** * Mel-frequency cepstral coefficients. * @param {Float32Array|Array|null} y - time series (or null when S given) * @param {Object} [options] * @param {number} [options.sr=22050] - sample rate (forwarded to melspectrogram) * @param {Array|null} [options.S=null] - precomputed LOG-power mel spectrogram * (pass power_to_db(melspectrogram(...))) * @param {number} [options.n_mfcc=20] - number of coefficients * @param {number} [options.dct_type=2] - only type 2 is implemented * @param {string|null} [options.norm='ortho'] - DCT normalization: 'ortho' or null * @param {number} [options.lifter=0] - cepstral liftering parameter * @param {string|number|null} [options.mel_norm='slaney'] - mel filterbank * normalization forwarded to melspectrogram as `norm` * Remaining options forward to melspectrogram (sr, n_fft, hop_length, n_mels, ...). * @returns {Array} [n_mfcc][n_frames] */ export function mfcc(y?: Float32Array | any[] | null, options?: { sr?: number; S?: any[] | null; n_mfcc?: number; dct_type?: number; norm?: string | null; lifter?: number; mel_norm?: string | number | null; }): Array; export { dctBasis, mfccFromLogMel } from "./dct.js";