import { AvatarController } from './AvatarController';
export declare class NetworkLayer {
    private wsClient;
    private dataController;
    private currentReqId;
    private hasSentEnd;
    private readonly audioBytesPerSecond;
    private audioMetrics;
    constructor(dataController: AvatarController);
    /**
     * 连接服务
     */
    connect(characterId: string): Promise<void>;
    /**
     * 发送音频数据到服务器
     */
    sendAudioData(audioData: ArrayBuffer, isLast: boolean): void;
    /**
     * 断开连接
     */
    disconnect(): void;
    /**
     * 获取当前请求ID
     */
    getCurrentReqId(): string | null;
    /**
     * 重置请求ID（用于打断后清理）
     */
    resetReqId(): void;
    /**
     * 设置 WebSocket 事件监听器
     */
    private setupWebSocketListeners;
    /**
     * 处理接收到的消息
     */
    private handleMessage;
    /**
     * 处理动画消息
     */
    private handleAnimationMessage;
    /**
     * 处理错误消息
     */
    private handleErrorMessage;
    /**
     * 创建音频指标
     */
    private createAudioMetrics;
    /**
     * 重置音频指标
     */
    private resetAudioMetrics;
    /**
     * 上报音频指标
     */
    private reportAudioMetrics;
}
//# sourceMappingURL=NetworkLayer.d.ts.map