export declare type RhinoInference = {
    /** Rhino has concluded the inference (isUnderstood is now set) */
    isFinalized: boolean;
    /** The intent was understood (it matched an expression in the context) */
    isUnderstood?: boolean;
    /** The name of the intent */
    intent?: string;
    /** Map of the slot variables and values extracted from the utterance */
    slots?: Record<string, string>;
};
export interface RhinoEngine {
    /** Release all resources acquired by Rhino */
    release(): void;
    /** Process a single frame of 16-bit 16kHz PCM audio */
    process(frame: Int16Array): Promise<RhinoInference>;
    /** The version of the Rhino engine */
    readonly version: string;
    /** The sampling rate of audio expected by the Rhino engine */
    readonly sampleRate: number;
    /** The frame length of audio expected by the Rhino engine */
    readonly frameLength: number;
    /** The source of the Rhino context (YAML format) */
    readonly contextInfo: string;
}
export declare type RhinoContext = {
    /** Base64 representation of a trained Rhino context (`.rhn` file) */
    base64: string;
    /** Value in range [0,1] that trades off miss rate for false alarm */
    sensitivity?: number;
};
export declare type WorkerRequestProcess = {
    command: 'process';
    inputFrame: Int16Array;
};
export declare type WorkerRequestVoid = {
    command: 'reset' | 'pause' | 'resume' | 'release';
};
export declare type RhinoArgs = {
    accessKey: string;
    context: RhinoContext;
    requireEndpoint?: boolean;
    start: boolean;
};
export declare type RhinoWorkerRequestInit = {
    command: 'init';
    rhinoArgs: RhinoArgs;
};
export declare type RhinoWorkerRequestInfo = {
    command: 'info';
};
export declare type RhinoWorkerResponseReady = {
    command: 'rhn-ready';
};
export declare type RhinoWorkerResponseError = {
    command: 'rhn-error';
    error: Error | string;
};
export declare type RhinoWorkerResponseInitError = {
    command: 'rhn-error-init';
    error: Error | string;
};
export declare type RhinoWorkerResponseInference = {
    command: 'rhn-inference';
    inference: RhinoInference;
};
export declare type RhinoWorkerResponseInfo = {
    command: 'rhn-info';
    info: string;
};
export declare type RhinoWorkerRequestFileOperation = {
    command: 'file-save-succeeded' | 'file-save-failed' | 'file-load-succeeded' | 'file-load-failed' | 'file-exists-succeeded' | 'file-exists-failed' | 'file-delete-succeeded' | 'file-delete-failed';
    message?: string;
    content?: string;
};
export declare type RhinoWorkerRequest = WorkerRequestVoid | WorkerRequestProcess | RhinoWorkerRequestInit | RhinoWorkerRequestInfo | RhinoWorkerRequestFileOperation;
export interface RhinoWorker extends Omit<Worker, 'postMessage'> {
    postMessage(command: RhinoWorkerRequest): void;
}
export declare type RhinoWorkerResponseFileOperation = {
    command: 'file-save' | 'file-load' | 'file-exists' | 'file-delete';
    path: string;
    content?: string;
};
export declare type RhinoWorkerResponse = RhinoWorkerResponseReady | RhinoWorkerResponseInference | RhinoWorkerResponseError | RhinoWorkerResponseInitError | RhinoWorkerResponseInfo | RhinoWorkerResponseFileOperation;
//# sourceMappingURL=rhino_types.d.ts.map