import { Logger } from './logger'; /** * Represents transcription data received from the LiveKit room */ export interface TranscriptionData { /** Type of message (ai or human) */ message_type: 'ai' | 'human'; /** Content of the message */ content: string; } /** * Configuration for the transcription manager */ export interface TranscriptionManagerConfig { /** Logger instance */ logger?: Logger; /** Whether to enable debug mode */ isDebug?: boolean; /** Callback for transcription updates */ onTranscriptionUpdate?: (data: TranscriptionData) => void; } /** * Manages transcription data parsing, validation, and callbacks */ export declare class TranscriptionManager { private logger; private isDebug; private onTranscriptionUpdate; /** * Creates a new transcription manager * @param config Configuration options */ constructor(config?: TranscriptionManagerConfig); /** * Sets the callback for transcription updates * @param callback The callback function */ setTranscriptionCallback(callback: (data: TranscriptionData) => void): void; /** * Handles binary data received from the LiveKit room * @param payload The binary data payload * @throws AvatarStreamError if data handling fails */ handleDataReceived(payload: Uint8Array): void; /** * Parses transcription data from a JSON string * @param jsonString The JSON string to parse * @returns The parsed data, or null if parsing failed * @private */ private parseTranscriptionData; /** * Validates that data is a valid TranscriptionData object * @param data The data to validate * @returns Type guard for TranscriptionData * @private */ private isValidTranscriptionData; }