/** * Structured error emitted on {@link import('./media-channel').ChannelEvents.error$} and {@link import('./asr-handle').AsrHandle.error$}. * * Scripts can subscribe to these observables to detect ASR/TTS/SIP failures at runtime * without relying on server-side logs. */ export interface MediaError { /** Which subsystem produced the error. */ source: 'asr' | 'tts' | 'sip' | 'channel' | 'llm'; /** Lifecycle phase where the error happened. */ phase?: 'create' | 'start' | 'stream' | 'playback' | 'finalize' | 'destroy'; /** Public SDK operation that produced the error, e.g. `createAsr`, `audio.say`, or `audio.play`. */ operation?: string; /** Whether the runtime can keep the session alive after this error. */ recoverable?: boolean; /** ASR handle id when the error belongs to a specific recognizer instance. */ handleId?: string; /** Mixer queue index when the error belongs to an audio operation. */ queue?: number; /** Queue item alias when the error belongs to a specific playback item. */ alias?: string; /** Human-readable description (same string that appears in server logs). */ message: string; /** HTTP status code, gRPC status, or WebSocket close code when available. */ code?: number | string; /** Vendor/engine identifier, e.g. `"yandex"`, `"elevenlabs"`, `"azure"`. */ vendor?: string; /** Arbitrary provider-specific payload for advanced diagnostics. */ details?: unknown; /** Original provider/runtime error when available in-process. */ cause?: unknown; } //# sourceMappingURL=errors.d.ts.map