import type GatewayService from '@/services/GatewayService';
import type FramePlayer from '@/utils/framePlayer';
import type { TTSPlaybackState } from './TTSPlaybackState';
import type { AudioDebugger } from './AudioDebugger';
import type { WebRTCLipSync } from './WebRTCLipSync';
import { QtAudio } from '../core/audio';
import type { CharacterInfo, Status, AskParams, AskStreamResponse, AskResponse, ChatMessage, StreamAudioPlayInfo, Result } from '@/types/index';
import type { IResultData } from '@/api/interface';
export interface ChatOrchestratorDeps {
    getGatewayService: () => GatewayService | null;
    getFramePlayer: () => FramePlayer | null;
    getCore: () => any | null;
    getCharacterData: () => CharacterInfo | null;
    getConfig: () => {
        options?: {
            fps?: number;
        };
        mode: string;
        a2fEnabled?: boolean;
    };
    getRecorder: () => any | null;
    getStatus: () => Status;
    setStatus: (status: Status) => void;
    getAudio: () => QtAudio;
    emit: (event: string, data?: any) => void;
    ttsState: TTSPlaybackState;
    audioDebugger: AudioDebugger;
    webrtcLipSync: WebRTCLipSync;
    stop: () => Promise<boolean>;
    finalizeTTSPlayback: () => void;
    playIdleAnimation: () => void;
    flushPendingASRIfReady: (reason: string) => void;
    getVoiceInteractionState: () => 'closed' | 'sleeping' | 'active';
}
export declare class ChatOrchestrator {
    private deps;
    private exeSequence;
    private fetchSequence;
    private probeTimeout;
    private callbackTimeout;
    private mutilAudios;
    private openRecorderTimeout;
    private webrtcTTSStartTime;
    constructor(deps: ChatOrchestratorDeps);
    speak(text: string, callback?: Function): Promise<StreamAudioPlayInfo>;
    askCommand(params: AskParams, callback: (msgs: IResultData<string[]>) => void): Promise<void>;
    askStream(params: AskParams, callback: (msgs: Result<ChatMessage[]>) => void, options?: {
        skipStop?: boolean;
    }): Promise<Result<AskStreamResponse>>;
    private askStreamWithSeparateTTS;
    private askStreamWithIntegratedTTS;
    private checkAllTasksCompleted;
    ask(params: AskParams, callback: (result: Result<ChatMessage>) => void): Promise<Result<AskResponse>>;
    speakByAudioShapes(uris: string[], shapes: Array<number[][]>): Promise<boolean>;
    speakByAudioStreamShapes(audios: ArrayBuffer[], shapes: number[][], rate?: number): Promise<boolean>;
    speakByAudio(uri: string, shapes: number[][]): Promise<boolean>;
    private probeTimePlay;
    private createAudio;
    private setRecorderStatus;
    private play;
    private buildMessageCallback;
    muteAllAudio(isMute: boolean): void;
    stopPlayback(): void;
    destroy(): void;
}
//# sourceMappingURL=ChatOrchestrator.d.ts.map