import { PvModel } from '@picovoice/web-utils';
import { CheetahError } from './cheetah_errors';
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
}
/**
 * CheetahModel types
 */
export type CheetahModel = PvModel;
export type CheetahOptions = {
    /** @defaultValue 'best' */
    device?: string;
    /** @defaultValue 1.0 */
    endpointDurationSec?: number;
    /** @defaultValue false */
    enableAutomaticPunctuation?: boolean;
    /** @defaultValue false */
    enableTextNormalization?: boolean;
    /** @defaultValue undefined */
    processErrorCallback?: (error: CheetahError) => void;
};
export type CheetahWord = {
    word: string;
    startSeconds: number;
    endSeconds: number;
    confidence: number;
};
export type CheetahTranscript = {
    transcript: string;
    words?: CheetahWord[];
    isEndpoint?: boolean;
    isFlushed?: boolean;
};
export type CheetahWorkerInitRequest = {
    command: 'init';
    accessKey: string;
    modelPath: string;
    options: CheetahOptions;
    wasmSimd: string;
    wasmSimdLib: string;
    wasmPThread: string;
    wasmPThreadLib: string;
    sdk: string;
};
export type CheetahWorkerProcessRequest = {
    command: 'process';
    inputFrame: Int16Array;
};
export type CheetahWorkerProcessAnnotatedRequest = {
    command: 'process_annotated';
    inputFrame: Int16Array;
};
export type CheetahWorkerFlushRequest = {
    command: 'flush';
};
export type CheetahWorkerFlushAnnotatedRequest = {
    command: 'flush_annotated';
};
export type CheetahWorkerReleaseRequest = {
    command: 'release';
};
export type CheetahWorkerRequest = CheetahWorkerInitRequest | CheetahWorkerProcessRequest | CheetahWorkerProcessAnnotatedRequest | CheetahWorkerFlushRequest | CheetahWorkerFlushAnnotatedRequest | CheetahWorkerReleaseRequest;
export type CheetahWorkerFailureResponse = {
    command: 'failed' | 'error';
    status: PvStatus;
    shortMessage: string;
    messageStack: string[];
};
export type CheetahWorkerInitResponse = CheetahWorkerFailureResponse | {
    command: 'ok';
    frameLength: number;
    sampleRate: number;
    version: string;
};
export type CheetahWorkerProcessResponse = CheetahWorkerFailureResponse | {
    command: 'ok';
    cheetahTranscript: CheetahTranscript;
};
export type CheetahWorkerFlushResponse = CheetahWorkerFailureResponse | {
    command: 'ok';
    cheetahTranscript: CheetahTranscript;
};
export type CheetahWorkerReleaseResponse = CheetahWorkerFailureResponse | {
    command: 'ok';
};
export type CheetahWorkerResponse = CheetahWorkerInitResponse | CheetahWorkerProcessResponse | CheetahWorkerFlushResponse | CheetahWorkerReleaseResponse;
//# sourceMappingURL=types.d.ts.map