---
title: "Speko Gateway for Pipecat"
description: "Add Speko Gateway's native STT and TTS services to a Pipecat cascade while keeping the rest of the pipeline unchanged."
canonical: "https://speko.ai/docs/pipecat"
last-updated: "2026-08-24"
---

> ## Speko page index
> The complete index of every page on this site is at: https://speko.ai/llms.txt
> Read it before exploring further. It lists the exact Markdown URL for every canonical HTML page.

# Speko Gateway for Pipecat

Docs

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](https://github.com/SpekoAI/gateway/blob/main/docs/PIPECAT.md).

```python
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

```text
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

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