/**
 * PvSpeaker class for playing audio.
 */
declare class PvSpeaker {
    private static _pvSpeaker;
    private readonly _handle;
    private readonly _sampleRate;
    private readonly _bitsPerSample;
    private readonly _bufferSizeSecs;
    private readonly _version;
    /**
     * PvSpeaker constructor.
     *
     * @param sampleRate The sample rate of the audio to be played.
     * @param bitsPerSample The number of bits per sample.
     * @param options Optional configuration arguments.
     * @param options.bufferSizeSecs The size in seconds of the internal buffer used to buffer PCM data
     * - i.e. internal circular buffer will be of size `sampleRate` * `bufferSizeSecs`.
     * @param options.deviceIndex The audio device index to use to play audio. A value of (-1) will use the machine's default audio device.
     */
    constructor(sampleRate: number, bitsPerSample: number, options?: {
        bufferSizeSecs?: number;
        deviceIndex?: number;
    });
    /**
     * @returns {number} The sample rate matching the value passed to the constructor.
     */
    get sampleRate(): number;
    /**
     * @returns {number} The bits per sample matching the value passed to the constructor.
     */
    get bitsPerSample(): number;
    /**
     * @returns {number} The buffer size in seconds matching the value passed to the constructor.
     */
    get bufferSizeSecs(): number;
    /**
     * @returns {number} The current version of PvSpeaker library.
     */
    get version(): string;
    /**
     * @returns {boolean} Whether the speaker has started and is available to receive pcm frames or not.
     */
    get isStarted(): boolean;
    /**
     * Starts the audio output device.
     */
    start(): void;
    /**
     * Stops the audio output device.
     */
    stop(): void;
    /**
     * Synchronous call to write PCM data to the internal circular buffer for audio playback.
     * Only writes as much PCM data as the internal circular buffer can currently fit, and
     * returns the length of the PCM data that was successfully written.
     *
     * @param {ArrayBuffer} pcm PCM data to be played.
     * @returns {number} Length of the PCM data that was successfully written.
     */
    write(pcm: ArrayBuffer): number;
    /**
     * Synchronous call to write PCM data to the internal circular buffer for audio playback.
     * This call blocks the thread until all PCM data has been successfully written and played.
     *
     * @param {ArrayBuffer} pcm PCM data to be played.
     * @returns {number} The length of the PCM data that was successfully written.
     */
    flush(pcm?: ArrayBuffer): number;
    /**
     * Writes PCM data passed to PvSpeaker to a specified WAV file.
     *
     * @param {string} outputPath Path to the output WAV file where the PCM data will be written.
     */
    writeToFile(outputPath: string): void;
    /**
     * Gets the audio device that the given PvSpeaker instance is using.
     *
     * @returns {string} Name of the selected audio device.
     */
    getSelectedDevice(): string;
    /**
     * Destructor. Releases resources acquired by PvSpeaker.
     */
    release(): void;
    /**
     * Helper function to get the list of available audio devices.
     *
     * @returns {Array<string>} An array of the available device names.
     */
    static getAvailableDevices(): string[];
    private static _getLibraryPath;
}
export default PvSpeaker;
//# sourceMappingURL=pv_speaker.d.ts.map