UNPKG

ten-vad-lib

Version:

A JavaScript library for Ten VAD (Voice Activity Detection) based on WebAssembly

25 lines (24 loc) 659 B
import { TenVADModule } from './types'; declare global { interface Window { createVADModule: (options: any) => Promise<TenVADModule>; } } export declare class VADModuleLoader { private static instance; private module; private loadingPromise; private constructor(); static getInstance(): VADModuleLoader; loadModule(options?: { wasmPath?: string; jsPath?: string; }): Promise<TenVADModule>; private loadModuleInternal; private getDefaultWasmPath; private getDefaultJsPath; private loadScript; private addHelperFunctions; getModule(): TenVADModule | null; reset(): void; }