import { type AudioFrame, type FrameProcessor, type NoiseCancellationOptions, type Participant, ParticipantKind, type RemoteParticipant, type Room, TrackPublishOptions } from '@livekit/rtc-node';
import { type AgentSession } from '../agent_session.js';
import type { AudioOutput, TextOutput } from '../io.js';
import type { TextInputCallback } from '../remote_session.js';
export declare const DEFAULT_TEXT_INPUT_CALLBACK: TextInputCallback;
export declare const DEFAULT_PARTICIPANT_KINDS: ParticipantKind[];
export interface RoomInputOptions {
    audioSampleRate: number;
    audioNumChannels: number;
    /** If not given, default to True. */
    textEnabled: boolean;
    /** If not given, default to True. */
    audioEnabled: boolean;
    /** If not given, default to False. */
    videoEnabled: boolean;
    /** The participant to link to. If not provided, link to the first participant.
      Can be overridden by the `participant` argument of RoomIO constructor or `set_participant`.
    */
    participantIdentity?: string;
    noiseCancellation?: NoiseCancellationOptions | FrameProcessor<AudioFrame>;
    textInputCallback?: TextInputCallback;
    /** Participant kinds accepted for auto subscription. If not provided,
      accept `DEFAULT_PARTICIPANT_KINDS`
    */
    participantKinds?: ParticipantKind[];
    /** Close the AgentSession if the linked participant disconnects with reasons in
      CLIENT_INITIATED, ROOM_DELETED, or USER_REJECTED.
    */
    closeOnDisconnect: boolean;
    /** Delete the room when the AgentSession is closed. Default to false. */
    deleteRoomOnClose: boolean;
}
export interface RoomOutputOptions {
    /** If not given, default to True. */
    transcriptionEnabled: boolean;
    /** If not given, default to True. */
    audioEnabled: boolean;
    audioSampleRate: number;
    audioNumChannels: number;
    /** False to disable transcription synchronization with audio output.
      Otherwise, transcription is emitted as quickly as available.
    */
    syncTranscription: boolean;
    /** The name of the audio track to publish. If not provided, default to "roomio_audio".
     */
    audioPublishOptions: TrackPublishOptions;
    /** Maximum queue size in milliseconds for the audio output buffer.
      When TTS generates audio faster than real-time, a larger queue prevents
      early frames from being discarded by the ring buffer.
      Defaults to 200ms, matching Python. Set a larger value if a bursty TTS
      provider needs a larger prebuffer.
    */
    queueSizeMs?: number;
    /** Send the transcription as a JSON dict for each chunk on the `lk.transcription`
      datastream topic, including `start_time`/`end_time` timestamps if the chunk is a
      TimedString. Each JSON object is suffixed with a newline so clients can parse the
      stream line-by-line.
    */
    jsonFormat: boolean;
}
export declare class RoomIO {
    private agentSession;
    private room;
    private inputOptions;
    private outputOptions;
    private audioInput?;
    private participantAudioOutput?;
    private externalAudioOutput?;
    private userTranscriptOutput?;
    private agentTranscriptOutput?;
    private transcriptionSynchronizer?;
    private participantIdentity;
    private textStreamHandlerRegistered;
    private participantAvailableFuture;
    private roomConnectedFuture;
    private userTranscriptStream;
    private userTranscriptWriter;
    private forwardUserTranscriptTask?;
    private initTask?;
    private deleteRoomTask?;
    private jobContext?;
    private logger;
    constructor({ agentSession, room, participant, inputOptions, outputOptions, }: {
        agentSession: AgentSession;
        room: Room;
        participant?: RemoteParticipant | string | null;
        inputOptions?: Partial<RoomInputOptions>;
        outputOptions?: Partial<RoomOutputOptions>;
    });
    private init;
    private onConnectionStateChanged;
    private onParticipantConnected;
    private onParticipantDisconnected;
    private onUserInputTranscribed;
    private onConversationItemAdded;
    private onAgentSessionClose;
    private onAgentStateChanged;
    private onUserTextInput;
    private forwardUserTranscript;
    private createTranscriptionOutput;
    private updateTranscriptionOutput;
    get audioOutput(): AudioOutput | undefined;
    get transcriptionOutput(): TextOutput | undefined;
    get isParticipantAvailable(): boolean;
    get rtcRoom(): Room;
    get linkedParticipant(): RemoteParticipant | undefined;
    get localParticipant(): Participant | undefined;
    /** Switch to a different participant */
    setParticipant(participantIdentity: string | null): void;
    unsetParticipant(): void;
    start(): void;
    close(): Promise<void>;
}
//# sourceMappingURL=room_io.d.ts.map