export declare type OctopusMetadata = {
    /** Int32 memory address that points to the metadata loction */
    metadataAddress: number;
    /** Length in bytes of the metadata */
    metadataLength: number;
};
export declare type OctopusMatch = {
    /** Start of the matched audio in seconds. (Float32) */
    startSec: number;
    /** End of the matched audio in seconds. (Float32) */
    endSec: number;
    /** Probability (confidence) that this matches the search phrase. (Float32 in [0,1]) */
    probability: number;
};
export declare type OctopusWorkerRequestInit = {
    command: 'init';
    accessKey: string;
};
export declare type OctopusWorkerRequestIndex = {
    command: 'index';
    input: Int16Array;
};
export declare type OctopusWorkerRequestSearch = {
    command: 'search';
    metadata: OctopusMetadata;
    searchPhrase: string;
};
export declare type OctopusWorkerRequestVoid = {
    command: 'release';
};
export declare type OctopusWorkerRequest = OctopusWorkerRequestInit | OctopusWorkerRequestIndex | OctopusWorkerRequestSearch | OctopusWorkerRequestVoid;
export declare type OctopusWorkerResponseReady = {
    command: 'octopus-ready';
};
export declare type OctopusWorkerResponseFailed = {
    command: 'octopus-failed';
    message: string;
};
export declare type OctopusWorkerResponseIndex = {
    command: 'octopus-index';
    metadata: OctopusMetadata;
};
export declare type OctopusWorkerResponseSearch = {
    command: 'octopus-search';
    matches: OctopusMatch[];
};
export declare type OctopusWorkerResponseError = {
    command: 'octopus-error';
    message: string;
};
export declare type OctopusWorkerResponse = OctopusWorkerResponseReady | OctopusWorkerResponseFailed | OctopusWorkerResponseIndex | OctopusWorkerResponseSearch | OctopusWorkerResponseError;
export interface OctopusEngine {
    /** Release all resources acquired by Octopus */
    release(): Promise<void>;
    /** Process frames of 16-bit 16kHz PCM audio */
    index(pcm: Int16Array): Promise<OctopusMetadata>;
    /** Seaches index for instances of a search phrase */
    search(octopusMetadata: OctopusMetadata, searchPhrase: string): Promise<OctopusMatch[]>;
    /** The version of the Octopus engine */
    readonly version: string;
    /** The sampling rate of audio expected by the Octopus engine */
    readonly sampleRate: number;
}
export interface OctopusWorker extends Omit<Worker, 'postMessage'> {
    postMessage(command: OctopusWorkerRequest): void;
}
//# sourceMappingURL=octopus_types.d.ts.map