@unimusic/chromaprint
Version:
Library for generating audio fingerprints by using AcoustID's Chromaprint compiled to WASM
40 lines (39 loc) • 811 B
TypeScript
export declare enum ChromaprintAlgorithm {
Test1 = 0,
Test2 = 1,
Test3 = 2,
Test4 = 3,
Test5 = 4,
Default = 1
}
interface Config {
/**
* @default 120
*/
maxDuration: number;
/**
* @default: 0
*/
chunkDuration: number;
/**
* @default {ChromaprintAlgorithm.Default}
*/
algorithm: ChromaprintAlgorithm;
/**
* @default false
*/
rawOutput: boolean;
/**
* @default false
*/
overlap: boolean;
}
/**
* Generates fingerprint(s) from given file.\
* With default configuration it will yield at most one fingerprint.
*/
export declare function processAudioFile(file: ArrayBuffer, config?: Config): AsyncGenerator<string>;
declare global {
var webkitAudioContext: AudioContext | undefined;
}
export {};