/* tslint:disable */ /* eslint-disable */ /** * Result of one-shot fingerprint: raw u32 array and base64 compressed string. */ export class FingerprintFromSamplesResult { private constructor(); free(): void; [Symbol.dispose](): void; compressed: string; raw: Uint32Array; } /** * Create a new fingerprinter. Uses the default preset (compatible with AcoustID). */ export class Fingerprinter { free(): void; [Symbol.dispose](): void; /** * Feed interleaved i16 samples (e.g. from decodeAudioData → getChannelData → convert to i16). * Pass an Int16Array from JS. */ consume(samples: Int16Array): void; /** * Call when all samples have been fed. */ finish(): void; /** * Compressed fingerprint as base64 (AcoustID/fpcalc format). Only valid after finish(). */ getCompressedFingerprint(): string; /** * Raw fingerprint (u32 array). Only valid after finish(). */ getFingerprint(): Uint32Array; constructor(); /** * Start fingerprinting. Call with your audio's sample rate (e.g. 44100) and channel count (1 or 2). */ start(sample_rate: number, channels: number): void; } /** * Result of matching two fingerprints. */ export class MatchFingerprintsResult { private constructor(); free(): void; [Symbol.dispose](): void; segments: MatchSegment[]; } /** * A matched segment between two fingerprints. */ export class MatchSegment { private constructor(); free(): void; [Symbol.dispose](): void; readonly duration: number; readonly end1: number; readonly end2: number; readonly score: number; readonly start1: number; readonly start2: number; } /** * One-shot: compute fingerprint from interleaved i16 samples. */ export function fingerprintFromSamples(sample_rate: number, channels: number, samples: Int16Array): FingerprintFromSamplesResult; /** * Match two raw fingerprints (u32 arrays). Returns segments of similar audio. */ export function matchFingerprints(raw1: Uint32Array, raw2: Uint32Array): MatchFingerprintsResult;