/** * Pipeline voice mode: composes a streaming `SttProvider`, a text * `ModelProvider`, and a streaming `TtsProvider` into a `VoiceSession`. * Use this for ElevenLabs / Cartesia / Deepgram and any future * single-modality vendor combo. * * For monolithic realtime models (OpenAI Realtime), use * `OpenAIRealtimeVoiceProvider` directly — that path is lower-latency and * includes server-side VAD. * * Conversation flow: * user speech → STT → final transcript → LLM → text chunks → TTS → * audio bytes back to caller. Tool calls relay through the existing * `tool_call` / `submitToolResult` contract on `VoiceSession`. * * Barge-in: when the STT emits `speech_started` while we're speaking, * the in-flight TTS stream is aborted and the LLM call cancelled. The * caller should also stop playback in their UI. * * Cost: rolled up across STT seconds, LLM tokens, TTS characters into a * single `usage` object on `response_done`. `costBudget` observes the * total — same `cost_limit` event semantics as realtime mode. */ import type { ModelProvider } from './model.js'; import type { SttProvider } from './voice-stt.js'; import type { TtsProvider } from './voice-tts.js'; import type { VoiceConnectOptions, VoiceProvider, VoiceSession } from './voice.js'; export interface PipelineVoiceProviderOptions { /** STT provider (e.g. Deepgram). Default model + format come from the provider. */ stt: SttProvider; /** TTS provider (e.g. ElevenLabs). */ tts: TtsProvider; /** LLM provider. Reuses any existing `ModelProvider` — Anthropic, OpenAI, Gemini, gateways. */ llm: ModelProvider; /** Model id to forward in `ModelRequest`. */ model: string; /** Provider name override for telemetry. Default `pipeline:+`. */ name?: string; } export declare class PipelineVoiceProvider implements VoiceProvider { readonly name: string; private readonly stt; private readonly tts; private readonly llm; private readonly model; constructor(options: PipelineVoiceProviderOptions); connect(options?: VoiceConnectOptions): Promise; } //# sourceMappingURL=voice-pipeline.d.ts.map