Docs

Speko Gateway for Pipecat

Add Speko Gateway's native STT and TTS services to a Pipecat cascade while keeping the rest of the pipeline unchanged.

Replace only the voice services

Gateway implements native Pipecat STT and TTS services. Turn aggregation, tools, transports, observers, and the LLM remain normal Pipecat components. See the complete sidecar and Pipecat Cloud setup in the public Gateway guide.

from pipecat.services.openai.llm import OpenAILLMService
from speko_gateway.pipecat import SpekoSTTService, SpekoTTSService

stt = SpekoSTTService(language="en")
llm = OpenAILLMService(model="gpt-4.1-mini")  # any Pipecat LLM service
tts = SpekoTTSService(language="en")

pipeline = Pipeline([
    transport.input(),
    stt,
    user_aggregator,
    llm,
    tts,
    transport.output(),
    assistant_aggregator,
])

Configure managed or BYOK credentials

SPEKO_LOCAL_AUTH_TOKEN=replace-with-a-random-local-token
SPEKO_API_KEY=sk_live_...

# Or keep a provider credential local to Gateway:
SPEKO_DEEPGRAM_BYOK_API_KEY=...

Pipeline behavior

STTNative streaming SpekoSTTService with utterance commits, final transcripts, usage, and cancellation.
LLMKeep any Pipecat LLM service, or use Router through a Gateway integration when managed LLM routing is desired.
TTSNative streaming SpekoTTSService with sentence synthesis, first-audio timing, and barge-in cancellation.