import { EagleModel, EagleProfile, EagleProfilerEnrollResult, EagleProfilerOptions } from './types';
export declare class EagleProfilerWorker {
    private readonly _worker;
    private readonly _minEnrollSamples;
    private readonly _sampleRate;
    private readonly _version;
    private static _wasmSimd;
    private static _wasmSimdLib;
    private static _wasmPThread;
    private static _wasmPThreadLib;
    private static _sdk;
    private constructor();
    /**
     * The minimum length of the input pcm required by `.enroll()`.
     */
    get minEnrollSamples(): number;
    /**
     * Audio sample rate required by Eagle.
     */
    get sampleRate(): number;
    /**
     * Version of Eagle.
     */
    get version(): string;
    /**
     * Set base64 wasm file with SIMD feature.
     * @param wasmSimd Base64'd wasm SIMD file to use to initialize wasm.
     */
    static setWasmSimd(wasmSimd: string): void;
    /**
     * Set base64 wasm file with SIMD feature in text format.
     * @param wasmSimdLib Base64'd wasm SIMD file in text format.
     */
    static setWasmSimdLib(wasmSimdLib: string): void;
    /**
     * Set base64 wasm file with SIMD and pthread feature.
     * @param wasmPThread Base64'd wasm file to use to initialize wasm.
     */
    static setWasmPThread(wasmPThread: string): void;
    /**
     * Set base64 SIMD and thread wasm file in text format.
     * @param wasmPThreadLib Base64'd wasm file in text format.
     */
    static setWasmPThreadLib(wasmPThreadLib: string): void;
    static setSdk(sdk: string): void;
    /**
     * Creates an instance of profiler component of the Eagle Speaker Recognition Engine.
     *
     * @param accessKey AccessKey obtained from Picovoice Console (https://console.picovoice.ai/).
     * @param model Eagle model options.
     * @param model.base64 The model in base64 string to initialize Eagle.
     * @param model.publicPath The model path relative to the public directory.
     * @param model.customWritePath Custom path to save the model in storage.
     * Set to a different name to use multiple models across `eagle` instances.
     * @param model.forceWrite Flag to overwrite the model in storage even if it exists.
     * @param model.version Version of the model file. Increment to update the model file in storage.
     * @param options Optional configuration arguments.
     * @param options.device String representation of the device (e.g., CPU or GPU) to use. If set to `best`, the most
     * suitable device is selected automatically. If set to `gpu`, the engine uses the first available GPU device. To select a specific
     * GPU device, set this argument to `gpu:${GPU_INDEX}`, where `${GPU_INDEX}` is the index of the target GPU. If set to
     * `cpu`, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this
     * argument to `cpu:${NUM_THREADS}`, where `${NUM_THREADS}` is the desired number of threads.
     *
     * @return An instance of the Eagle Profiler.
     */
    static create(accessKey: string, model: EagleModel, options?: EagleProfilerOptions): Promise<EagleProfilerWorker>;
    /**
     * Enrolls a speaker. This function should be called multiple times with different utterances of the same speaker
     * until `percentage` reaches `100.0`, at which point a speaker voice profile can be exported using `.export()`.
     * Any further enrollment can be used to improve the speaker profile. The minimum length of the input pcm to
     * `.enroll()` can be obtained by calling `.minEnrollSamples`.
     * The audio data used for enrollment should satisfy the following requirements:
     *    - only one speaker should be present in the audio
     *    - the speaker should be speaking in a normal voice
     *    - the audio should contain no speech from other speakers and no other sounds (e.g. music)
     *    - it should be captured in a quiet environment with no background noise
     * @param pcm Audio data for enrollment. The audio needs to have a sample rate equal to `.sampleRate` and be
     * 16-bit linearly-encoded. EagleProfiler operates on single-channel audio.
     *
     * @return The percentage of completeness of the speaker enrollment process along with the feedback code
     * corresponding to the last enrollment attempt:
     *    - `AUDIO_OK`: The audio is good for enrollment.
     *    - `AUDIO_TOO_SHORT`: Audio length is insufficient for enrollment,
     *       i.e. it is shorter than`.min_enroll_samples`.
     *    - `UNKNOWN_SPEAKER`: There is another speaker in the audio that is different from the speaker
     *       being enrolled. Too much background noise may cause this error as well.
     *    - `NO_VOICE_FOUND`: The audio does not contain any voice, i.e. it is silent or
     *       has a low signal-to-noise ratio.
     *    - `QUALITY_ISSUE`: The audio quality is too low for enrollment due to a bad microphone
     *       or recording environment.
     */
    enroll(pcm: Int16Array): Promise<EagleProfilerEnrollResult>;
    /**
     * Exports the speaker profile of the current session.
     * Will throw error if the profile is not ready.
     *
     * @return An EagleProfile object.
     */
    export(): Promise<EagleProfile>;
    /**
     * Resets the internal state of Eagle Profiler.
     * It should be called before starting a new enrollment session.
     */
    reset(): Promise<void>;
    /**
     * Releases resources acquired by Eagle Profiler
     */
    release(): Promise<void>;
    /**
     * Terminates the active worker. Stops all requests being handled by worker.
     */
    terminate(): void;
}
//# sourceMappingURL=eagle_profiler_worker.d.ts.map