14 lines
537 B
TypeScript
14 lines
537 B
TypeScript
import * as ort from "onnxruntime-web";
|
|
export type ModelFetcher = () => Promise<ArrayBuffer>;
|
|
export interface SpeechProbabilities {
|
|
notSpeech: number;
|
|
isSpeech: number;
|
|
}
|
|
export type OrtConfigurer = (ortInstance: typeof ort) => any;
|
|
export type OrtModule = typeof ort;
|
|
export type ModelFactory = (ortInstance: typeof ort, modelFetcher: ModelFetcher) => Promise<Model>;
|
|
export interface Model {
|
|
reset_state: () => void;
|
|
process: (arr: Float32Array) => Promise<SpeechProbabilities>;
|
|
}
|
|
//# sourceMappingURL=common.d.ts.map
|