import { PvModel } from '@picovoice/web-utils'; export declare enum PvStatus { SUCCESS = 10000, OUT_OF_MEMORY = 10001, IO_ERROR = 10002, INVALID_ARGUMENT = 10003, STOP_ITERATION = 10004, KEY_ERROR = 10005, INVALID_STATE = 10006, RUNTIME_ERROR = 10007, ACTIVATION_ERROR = 10008, ACTIVATION_LIMIT_REACHED = 10009, ACTIVATION_THROTTLED = 10010, ACTIVATION_REFUSED = 10011 } /** * EagleModel types */ export type EagleModel = PvModel; export type EagleProfile = { /** Buffer containing the speaker profile. */ bytes: Uint8Array; }; export type EagleOptions = { /** @defaultValue `best` */ device?: string; /** @defaultValue `0.3` */ voiceThreshold?: number; }; export type EagleProfilerOptions = { /** @defaultValue `best` */ device?: string; /** @defaultValue `1` */ minEnrollmentChunks?: number; /** @defaultValue `0.3` */ voiceThreshold?: number; }; export type EagleProfilerWorkerInitRequest = { command: 'init'; accessKey: string; modelPath: string; options: EagleProfilerOptions; wasmSimd: string; wasmSimdLib: string; wasmPThread: string; wasmPThreadLib: string; sdk: string; }; export type EagleProfilerWorkerEnrollRequest = { command: 'enroll'; inputFrame: Int16Array; }; export type EagleProfilerWorkerFlushRequest = { command: 'flush'; }; export type EagleProfilerWorkerExportRequest = { command: 'export'; }; export type EagleProfilerWorkerResetRequest = { command: 'reset'; }; export type EagleProfilerWorkerReleaseRequest = { command: 'release'; }; export type EagleProfilerWorkerRequest = EagleProfilerWorkerInitRequest | EagleProfilerWorkerEnrollRequest | EagleProfilerWorkerFlushRequest | EagleProfilerWorkerExportRequest | EagleProfilerWorkerResetRequest | EagleProfilerWorkerReleaseRequest; export type EagleProfilerWorkerFailureResponse = { command: 'failed' | 'error'; status: PvStatus; shortMessage: string; messageStack: string[]; }; export type EagleProfilerWorkerInitResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; frameLength: number; sampleRate: number; version: string; }; export type EagleProfilerWorkerEnrollResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; result: number; }; export type EagleProfilerWorkerFlushResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; result: number; }; export type EagleProfilerWorkerExportResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; profile: EagleProfile; }; export type EagleProfilerWorkerResetResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; }; export type EagleProfilerWorkerReleaseResponse = EagleProfilerWorkerFailureResponse | { command: 'ok'; }; export type EagleProfilerWorkerResponse = EagleProfilerWorkerInitResponse | EagleProfilerWorkerEnrollResponse | EagleProfilerWorkerFlushResponse | EagleProfilerWorkerExportResponse | EagleProfilerWorkerResetResponse | EagleProfilerWorkerReleaseResponse; export type EagleWorkerInitRequest = { command: 'init'; accessKey: string; modelPath: string; options: EagleOptions; wasmSimd: string; wasmSimdLib: string; wasmPThread: string; wasmPThreadLib: string; sdk: string; }; export type EagleWorkerProcessRequest = { command: 'process'; inputFrame: Int16Array; speakerProfiles: EagleProfile[]; }; export type EagleWorkerResetRequest = { command: 'reset'; }; export type EagleWorkerReleaseRequest = { command: 'release'; }; export type EagleWorkerRequest = EagleWorkerInitRequest | EagleWorkerProcessRequest | EagleWorkerResetRequest | EagleWorkerReleaseRequest; export type EagleWorkerFailureResponse = { command: 'failed' | 'error'; status: PvStatus; shortMessage: string; messageStack: string[]; }; export type EagleWorkerInitResponse = EagleWorkerFailureResponse | { command: 'ok'; minProcessSamples: number; sampleRate: number; version: string; }; export type EagleWorkerProcessResponse = EagleWorkerFailureResponse | { command: 'ok'; scores: number[]; }; export type EagleWorkerResetResponse = EagleWorkerFailureResponse | { command: 'ok'; }; export type EagleWorkerReleaseResponse = EagleWorkerFailureResponse | { command: 'ok'; }; export type EagleWorkerResponse = EagleWorkerInitResponse | EagleWorkerProcessResponse | EagleWorkerResetResponse | EagleWorkerReleaseResponse; //# sourceMappingURL=types.d.ts.map