import { StreamingTranscriberParams, AudioData, BeginEvent, TurnEvent } from "../..";
export declare class StreamingTranscriber {
    private apiKey?;
    private token?;
    private params;
    private socket?;
    private listeners;
    private sessionTerminatedResolve?;
    constructor(params: StreamingTranscriberParams);
    private connectionUrl;
    on(event: "open", listener: (event: BeginEvent) => void): void;
    on(event: "turn", listener: (event: TurnEvent) => void): void;
    on(event: "error", listener: (error: Error) => void): void;
    on(event: "close", listener: (code: number, reason: string) => void): void;
    connect(): Promise<BeginEvent>;
    stream(): WritableStream<AudioData>;
    sendAudio(audio: AudioData): void;
    private send;
    close(waitForSessionTermination?: boolean): Promise<void>;
}
