/** * Detect BPM from audio. * * Input contract (explicit — no silent guessing): * - An AudioBuffer (channel 0 and its sampleRate are read), or * - A Float32Array of raw mono PCM, in which case `options.sampleRate` * (a positive number) is REQUIRED. * Anything else throws a TypeError with a clear diagnostic. A genuine * detection failure on valid audio (no steady pulse found) resolves to * { bpm: null, confidence: 0, error } rather than a fabricated tempo. * * @param {AudioBuffer|Float32Array} input - Audio to analyze * @param {Object} [options] - Detection options (sampleRate required for Float32Array) * @returns {Promise} BPM result */ export function detectBPM(input: AudioBuffer | Float32Array, options?: any): Promise;