import Emittery from 'emittery';
import ThreeJSApp from './core/render';
import Loading from './components/loading';
import type { IHuman, HumanConfig, Status, Voice2Text, Result, AskParams, AskResponse, AskStreamResponse, ChatMessage, StreamAudioPlayInfo, PlayActionOptions, CharacterModel, PermissionResult, AngleViewConfig, VoiceConfig } from '@/types/index';
import { IResultData } from '@/api/interface';
import FramePlayer from '@/utils/framePlayer';
import { CameraConfig, FaceRecognitionConfig, SmileDetectionConfig } from '@/types/camera';
import type { CameraSDK } from './camera';
declare class Human extends Emittery implements IHuman {
    name: string;
    core: ThreeJSApp | null;
    private config;
    loading?: Loading;
    private audio;
    private container;
    recorder: any | null;
    private recorderMessageHandler;
    private voiceToTextManager;
    private status;
    private chatOrchestrator;
    private onAnyEvent;
    private characterData;
    private isNotRender;
    private mode;
    private gatewayService;
    framePlayer: FramePlayer | null;
    camera: CameraSDK | null;
    get sessionId(): string;
    enableProactiveTTSPlayback(enable?: boolean): void;
    private _proactiveAudioCtx;
    private voiceInteractionConfig;
    private voiceInteractionState;
    private voiceInteractionExitTimer;
    private exitPromptFired;
    private secondExitTimer;
    private exitTimerTurnId;
    private voiceInteractionConversationId;
    private voiceInteractionProcessing;
    private voiceInteractionLastText;
    private voiceInteractionLastTextTime;
    private voiceInteractionTTSMode;
    private voiceInteractionWebRTCDisabled;
    private ttsState;
    private eventBusHandlers;
    private eventBusModule;
    private _destroyed;
    private updateTokenWarnedOnce;
    private static readonly IDLE_LOOP_MODE;
    private static readonly BARGE_IN_MIN_TEXT_LENGTH;
    private static readonly BARGE_IN_COOLDOWN_MS;
    private static readonly INTERRUPT_INTENT_WORDS;
    private static readonly GREETING_ONLY_WORDS;
    private static readonly CHAR_HOMOPHONES;
    private static generateNameVariants;
    private static normalizeASRText;
    private isDoubleWakeWord;
    private speakDirect;
    private lastBargeInTime;
    private bargeInInProgress;
    private voiceInteractionAskId;
    private isAudioDataDiscarding;
    private audioDiscardingTimer;
    private static readonly AUDIO_DISCARDING_TIMEOUT_MS;
    private isFirstUserInput;
    private static readonly CONTINUATION_WINDOW_MS;
    private static readonly MIN_VALID_TEXT_LENGTH;
    private static readonly NOISE_WORDS;
    private asrTextBuffer;
    private asrSilenceTimer;
    private pendingASRFinal;
    private static readonly ASR_SILENCE_TIMEOUT_MS;
    private static readonly DUPLICATE_TEXT_WINDOW_MS;
    private pendingMergeText;
    private textMergeTimer;
    private textMergeStartTime;
    private static readonly TEXT_MERGE_DELAY_MS;
    private static readonly TEXT_MERGE_MAX_DELAY_MS;
    private ttsPlaySafetyTimer;
    private static readonly DEFAULT_TTS_PLAY_SAFETY_TIMEOUT_MS;
    private framePlayerPlayEndHandler;
    private audioDebugger;
    private webrtcLipSync;
    constructor(config: HumanConfig);
    private mergeConfig;
    private setupContainer;
    private initFramePlayer;
    private clearTTSPlaySafetyTimer;
    private replaceFramePlayerPlayEndHandler;
    private initGatewayService;
    private setupGatewayEventForwarding;
    private refreshGatewayToken;
    setCharacterData(characterId: string): Promise<boolean>;
    setCharacter(characterId: string, configuration?: Partial<HumanConfig>): Promise<boolean>;
    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>>;
    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>;
    startVoice2Text(callback?: (data: Voice2Text) => void): Promise<IResultData<PermissionResult>>;
    stopVoice2Text(callback?: (data: Voice2Text) => void): Promise<Result<null>>;
    sendToolAction(tool: string, action: string, data: object): void;
    stop(): Promise<boolean>;
    private stopPlayback;
    getStatus(): Status;
    private initStorage;
    muteAudio(isMute?: boolean): void;
    muteAction(isMute?: boolean): void;
    private dealVoice2Text;
    enableAudio(): Promise<void>;
    enableAudioDebug(enabled?: boolean): void;
    getDebugAudioInfo(): {
        sampleRate: number;
        totalSize: number;
        chunks: number;
    };
    downloadDebugAudio(filename?: string): void;
    playDebugAudio(sampleRateOverride?: number): Promise<void>;
    playDebugAudio2(sampleRateOverride?: number, streamMode?: boolean): Promise<void>;
    private playIdleAnimation;
    private finalizeTTSPlayback;
    destroy(): Promise<void>;
    refreshAuthToken(token: string): Promise<void>;
    updateToken(token: string): void;
    setAngleView({ camera }: AngleViewConfig): void;
    playAction(code: string, opts?: PlayActionOptions): Promise<void>;
    getModelInfo(): import("@/types/index").ModelInfo | null;
    openVoiceInteraction(config: VoiceConfig): Promise<boolean>;
    closeVoiceInteraction(): Promise<boolean>;
    wakeVoiceInteraction(): void;
    sleepVoiceInteraction(): void;
    private createVoiceInteractionWebRTC;
    private handleVoiceInteractionASR;
    private flushPendingASRIfReady;
    private processCompleteASRText;
    private flushMergedText;
    private sendTextToProcess;
    private checkKeywords;
    private containsInterruptIntent;
    private triggerBargeIn;
    private isNoiseText;
    private handleVoiceInteractionWakeup;
    private handleVoiceInteractionSleep;
    private handleVoiceInteractionInterrupt;
    private handleVoiceInteractionAsk;
    private resetVoiceInteractionExitTimer;
    offlineRender(files: CharacterModel[]): Promise<boolean>;
    startRender(): Promise<boolean>;
    stopRender(): Promise<boolean>;
    closeRecorder(): Promise<boolean>;
    openRecorder(): Promise<Result<PermissionResult>>;
    openCamera(config: CameraConfig): Promise<boolean>;
    startFaceRecognition(config?: FaceRecognitionConfig): Promise<boolean>;
    stopFaceRecognition(): Promise<boolean>;
    startBodyDetect(): Promise<boolean>;
    stopBodyDetect(): Promise<boolean>;
    startSmileDetection(config?: SmileDetectionConfig): Promise<boolean>;
    stopSmileDetection(): boolean;
    closeCamera(): void;
}
export default Human;
//# sourceMappingURL=human.d.ts.map