///
import { Readable } from "stream";
import IOIHistogram from "./IOIHistogram";
import BeatAgent from "./BeatAgent";
import { Smp, Hz, Seconds } from "../global";
declare interface BeatTrackingConfig {
/** Size of fft frame to use. */
windowSize?: Smp;
/** Interval between FFT frames. */
hopSize?: Smp;
/** @deprecated */
sampleRate?: Hz;
peakFindingDecayRate?: number;
/** (measured in hops) */
peakFindingWindow?: number;
peakFindingMeanWndMultiplier?: number;
/** Threshold over which (normalised) spectral flux could be regarded as a peak. */
peakThreshold?: 0.35;
}
declare interface BeatTrackingAnalysis {
/** Best estimate of beats per minute. */
bpm: number;
/** List of estimated beat times. */
beats: Seconds[];
/** List of peak times. */
onsets: {
time: Seconds;
intensity: number;
}[];
/** Agents used */
agents: BeatAgent[];
/** @deprecated */
spectralFlux?: number[] | null;
/** @deprecated */
ioiHistogram?: IOIHistogram;
/** @deprecated */
hopSize?: number;
/** Parameters used to make the analysis. */
config: BeatTrackingConfig;
}
/** Perform beat tracking on a given AudioBuffer or AudioBuffer object-stream. */
declare function doBeatTracking(audio: Readable | AudioBuffer, { windowSize, hopSize, sampleRate, peakFindingDecayRate, peakFindingWindow, peakFindingMeanWndMultiplier, peakThreshold, }?: BeatTrackingConfig,
/** Deprecated. */
returnExtras?: boolean): Promise;
export { doBeatTracking, BeatTrackingAnalysis, BeatTrackingConfig };