import apiProto from './protos/api';
export type TTSParams = apiProto.playht.v1.ITtsParams;
export declare const Quality: typeof apiProto.playht.v1.Quality;
export declare const Format: typeof apiProto.playht.v1.Format;
export interface ClientOptions {
    /**
     * PlayHT API user, required.
     * See https://docs.play.ht/reference/api-authentication
     */
    userId: string;
    /**
     * PlayHT API key, required.
     * See https://docs.play.ht/reference/api-authentication
     */
    apiKey: string;
    /**
     * An optional custom address (host:port) to send requests to.
     *
     * If you're using PlayHT On-Prem (https://docs.play.ht/reference/on-prem), then you should set
     * customAddr to be the address of your PlayHT On-Prem appliance (e.g. my-company-000001.on-prem.play.ht:11045).
     * Keep in mind that your PlayHT On-Prem appliance can only be used with the PlayHT2.0-Turbo voice engine for streaming.
     */
    customAddr?: string;
    /**
     * If true, the client may choose to, under high load scenarios, fallback from a custom address
     * (configured with "customAddr" above) to the standard PlayHT address.
     */
    fallbackEnabled?: boolean;
    /**
     * If present and true, remove SSML-style tags (anything between and including `<` and `>`) from the text of the request
     */
    removeSsmlTags?: boolean;
}
/** PlayHT Streaming TTS Client. */
export declare class Client {
    private rpc?;
    private premiumRpc?;
    private customRpc?;
    private lease;
    private leaseTimer?;
    private leasePromise?;
    private readonly apiUrl;
    private readonly apiHeaders;
    private readonly options;
    constructor(options: ClientOptions);
    private getLease;
    private refreshLease;
    /** Create a new TTS stream. */
    tts(isPremium: boolean, params: TTSParams): Promise<ReadableStream<Uint8Array>>;
    /** Close the client and release resources. */
    close(): void;
}
