Frameworks and extras
VoiceGateway’s engine core is framework-neutral. A bareimport voicegateway
imports neither LiveKit Agents nor
Pipecat. The record model, pricing (via
voice-prices), the storage sinks, and the cost/latency tracker have no
framework dependency. The two seams that touch a framework, attach() and
guard(), detect the framework of the object you hand them (by module string,
without eagerly importing either) and lazily import only the one they need.
That means you install exactly the framework you run, and nothing else.
Install the extra you use
livekit
extra, so a single line pulls the runtime plus the plugin you name:
pip install "pipecat-ai[openai,deepgram,cartesia]") alongside
voicegateway[pipecat]. VoiceGateway wraps and observes the native Pipecat
services you already configure; it does not re-home their keys.
The core stays pure
Because the core imports no framework, you canimport voicegateway in a
process that has neither installed (a CLI, a collector, a test rig) and it works.
attach() and guard() only reach for a framework when you call them with a
target of that framework. If the matching extra is missing they raise a clear,
actionable error:
The two seams work the same on both
The public surface is identical across frameworks. You pass a LiveKitAgentSession or a Pipecat PipelineTask to attach(), and a native LiveKit
plugin or a native Pipecat service to guard(). VoiceGateway routes to the right
implementation for you.
Deprecated: the LLM / STT / TTS factories
The oldervoicegateway.LLM("openai/gpt-4o") / STT(...) / TTS(...)
factories still work but emit a DeprecationWarning. Their observability role is
now the single-meter attach(), and their control role (fallback, limits) moves
to guard(). See the migration guide to move
off them.