react-native-wakeword
Version:
Voice/Wake-word detection library for React Native
51 lines (50 loc) • 2.24 kB
TypeScript
export class SpeakerVerificationRNBridgeInstance {
constructor(engineId: any);
engineId: any;
/**
* Create the native speaker verifier engine.
*
* modelPathOrName:
* - absolute path OR "speaker_model.dm" in the iOS app bundle
* - OR require('./assets/speaker_model.dm')
*
* enrollmentJsonPathOrName:
* - absolute path OR "enrollment.json" in the iOS app bundle
* - OR require('./assets/enrollment.json')
*
* options (optional):
* { decisionThreshold, frameSize, tailSeconds, maxTailSeconds, cmn, expectedLayoutBDT, logLevel }
*/
create(modelPathOrName: any, enrollmentJsonPathOrName: any, options?: {}): Promise<any>;
/**
* Verify WAV by streaming in native.
*
* wavPathOrName:
* - absolute path OR "test.wav" in bundle
* - OR require('./assets/test.wav')
*
* resetState:
* - if true, clears internal streaming state before verification
*/
verifyWavStreaming(wavPathOrName: any, resetState?: boolean): Promise<any>;
destroy(): Promise<any>;
}
export function createSpeakerVerificationInstance(engineId: any): Promise<SpeakerVerificationRNBridgeInstance>;
export class SpeakerVerificationMicController {
constructor(controllerId: any);
controllerId: any;
create(configJson: any): Promise<any>;
beginOnboarding(enrollmentId: any, targetEmbeddingCount: any, reset?: boolean): Promise<any>;
getNextEmbeddingFromMic(): Promise<any>;
finalizeOnboardingNow(): Promise<any>;
setEnrollmentJson(enrollmentJson: any): Promise<any>;
startVerifyFromMic(resetState?: boolean): Promise<any>;
startEndlessVerifyFromMic(hopSeconds?: number, stopOnMatch?: boolean, resetState?: boolean): Promise<any>;
stop(): Promise<any>;
destroy(): Promise<any>;
}
export function createSpeakerVerificationMicController(controllerId: any): Promise<SpeakerVerificationMicController>;
export function onSpeakerVerificationOnboardingProgress(cb: any): () => void;
export function onSpeakerVerificationOnboardingDone(cb: any): () => void;
export function onSpeakerVerificationVerifyResult(cb: any): () => void;
export function onSpeakerVerificationError(cb: any): () => void;