/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ export type VoiceProviderCapability = 'tts' | 'tts-stream' | 'stt' | 'realtime' | 'voice-list'; export type VoiceProviderState = 'healthy' | 'degraded' | 'disabled' | 'unconfigured'; export type VoiceAudioFormat = 'wav' | 'mp3' | 'ogg' | 'webm' | 'pcm16' | 'flac'; export interface VoiceProviderStatus { readonly id: string; readonly label: string; readonly state: VoiceProviderState; readonly capabilities: readonly VoiceProviderCapability[]; readonly configured: boolean; readonly detail?: string | undefined; readonly metadata: Record; } export interface VoiceDescriptor { readonly id: string; readonly label: string; readonly locale?: string | undefined; readonly gender?: string | undefined; readonly metadata: Record; } export interface VoiceAudioArtifact { readonly mimeType: string; readonly format: VoiceAudioFormat | string; readonly dataBase64?: string | undefined; readonly uri?: string | undefined; readonly sampleRateHz?: number | undefined; readonly durationMs?: number | undefined; readonly metadata: Record; } export interface VoiceSynthesisRequest { readonly text: string; readonly voiceId?: string | undefined; readonly modelId?: string | undefined; readonly format?: VoiceAudioFormat | string | undefined; readonly speed?: number | undefined; readonly signal?: AbortSignal | undefined; readonly metadata?: Record | undefined; } export interface VoiceSynthesisResult { readonly providerId: string; readonly audio: VoiceAudioArtifact; readonly metadata: Record; } export interface VoiceAudioChunk { readonly data: Uint8Array; readonly sequence: number; readonly mimeType?: string | undefined; readonly format?: VoiceAudioFormat | string | undefined; readonly final?: boolean | undefined; readonly metadata?: Record | undefined; } export interface VoiceSynthesisStreamResult { readonly providerId: string; readonly mimeType: string; readonly format: VoiceAudioFormat | string; readonly chunks: AsyncIterable; readonly metadata: Record; } export interface VoiceTranscriptionRequest { readonly audio: VoiceAudioArtifact; readonly language?: string | undefined; readonly modelId?: string | undefined; readonly prompt?: string | undefined; readonly metadata?: Record | undefined; } export interface VoiceTranscriptionResult { readonly providerId: string; readonly text: string; readonly language?: string | undefined; readonly segments?: readonly { readonly text: string; readonly startMs?: number | undefined; readonly endMs?: number | undefined; readonly confidence?: number | undefined; }[]; readonly metadata: Record; } export interface VoiceRealtimeSessionRequest { readonly modelId?: string | undefined; readonly voiceId?: string | undefined; readonly inputFormat?: VoiceAudioFormat | string | undefined; readonly outputFormat?: VoiceAudioFormat | string | undefined; readonly instructions?: string | undefined; readonly metadata?: Record | undefined; } export interface VoiceRealtimeSession { readonly providerId: string; readonly sessionId: string; readonly transport: 'websocket' | 'webrtc' | 'sse' | 'http' | 'custom'; readonly url?: string | undefined; readonly expiresAt?: number | undefined; readonly headers?: Record | undefined; readonly metadata: Record; } export interface VoiceProvider { readonly id: string; readonly label: string; readonly capabilities: readonly VoiceProviderCapability[]; /** * Billing dimension: 'metered' (cloud APIs, usage flows through cost * attribution) or 'none' (local engines, honest absence of a billing * dimension, never a fake $0.00). Undefined reads as 'metered', the safe * default for every cloud provider. */ readonly billing?: 'metered' | 'none' | undefined; status?(): Promise | VoiceProviderStatus; listVoices?(): Promise | readonly VoiceDescriptor[]; synthesize?(request: VoiceSynthesisRequest): Promise; synthesizeStream?(request: VoiceSynthesisRequest): Promise | VoiceSynthesisStreamResult; transcribe?(request: VoiceTranscriptionRequest): Promise; openRealtimeSession?(request: VoiceRealtimeSessionRequest): Promise; /** * Clear any tripped engine-failure state (circuit breaker) so the next call * retries the engine. The managed install flow calls this after replacing an * engine/model, giving users a recovery act that genuinely works. */ resetEngineFailureState?(): void; } //# sourceMappingURL=types.d.ts.map