Skip to main content
Keep your Pipecat bot where it runs and route its speech to text and text to speech through SLNG. You can also point the language model at the SLNG LLM Router. Your transport, VAD, turn-taking, prompts, tools, and pipeline order stay as they are. The SLNG Pipecat services stream STT and TTS over WebSocket. Use them for interactive agents that need low latency and mid-utterance interruption. There are two ways to do it. Set up the layers in the dashboard and copy the migration prompt for your coding agent, or make the edits yourself.

Prerequisites

  • A running Pipecat bot with Python 3.11 or later.
  • pipecat-ai>=1.3.0 in your project.
  • An SLNG API key. See Create your API key.
  • A BYOK LLM key registered in your org, so the router has a model to route to. See Bring your own key.
  • For the assisted path, a coding agent that supports skills.
The pipecat-slng package is tested with Pipecat v1.3.0.

Set up your API key

Set SLNG_API_KEY in your environment. The examples below read it without putting the key in your source code.

Set up in the dashboard

Improving an agent is à la carte. Turn on speech to text, the language model, text to speech, or any mix of the three. Choose the models, voice, language, and routing region you want. The dashboard builds a migration prompt from your choices.
1

Choose Pipecat

Open the Improve my agent flow and choose Pipecat. The flow keeps your existing bot in your own codebase and generates the changes for the layers you select.
Improve my agent flow with Pipecat highlighted

Choose Pipecat in the Improve my agent flow.

2

Set up Listen

Turn on speech to text and choose the model and language. Leave it off to keep your current speech to text service.
Listen section with the Include STT toggle on

Turn on Listen and pick a speech to text model.

3

Set up Think

Turn on the language model and choose the model. The Context Router option is available in your selected region.
Think section with the language model turned on and a model chosen

Think turned on with a language model selected.

4

Set up Speak

Turn on text to speech and choose the model and voice. Leave it off to keep your current text to speech service.
Speak section with the Include TTS toggle highlighted

Use the Include TTS toggle to turn text to speech on or off.

5

Copy the prompt

Click Integrate in the top right, then Copy prompt in the modal. The dashboard generates a prompt for the platform and layers you selected. Hand it to your coding agent. It installs the pipecat-migration skill and applies the changes to your bot.
The Integrate button in the top right of the project

Click Integrate in the top right.

The shared Integrate modal with a Copy prompt button

Copy the generated prompt.

The screenshots show the shared dashboard controls. The prompt content is generated for the platform you selected.
Your model IDs, voice, language, and routing region come from what you picked.

Choose a model route

Model IDs use the provider/model:variant format. Prefix a model with slng/ to use an SLNG-hosted model. A model without the prefix is an external route proxied through SLNG. See which models are available for the model catalog.
If you use your own provider account, pass its key as provider_key and use an external route without the slng/ prefix. Do not combine provider_key with an SLNG-hosted model.

Route requests by region

Pass a regional gateway host as base_url to pin requests to a sovereign hub, for example eu.api.slng.ai or us.api.slng.ai. The examples use eu.api.slng.ai for Europe. See using regions in services for more about regional routing.

Edit the code yourself

If you would rather not use a coding agent, make the same edits directly. The removed lines below depend on your current providers, so match them to your code.
1

Install the plugin

Use your project’s package manager.
2

Point STT and TTS at SLNG

Import the SLNG services and swap only the two constructors that feed Pipeline([...]). Pass the API key through the environment, never as a literal.
Keep the model, voice, language, and routing region you selected in the dashboard. base_url="eu.api.slng.ai" is an example for the Europe region. Use the regional host when your dashboard prompt gives you a different value.
3

Point the LLM at the SLNG Context Router

Use Pipecat’s OpenAI-compatible service against the router. Pass stable agent and session identifiers in the headers, not random values per request.
pipecat-slng provides STT and TTS services. The router uses Pipecat’s OpenAILLMService.
4

Verify

Run one spoken turn through your bot’s transport and confirm that the pipeline completes speech to text, the LLM, and text to speech. Keep the existing pipeline order:

Next steps