Add SLNG hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.
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.
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.
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.
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 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.
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.
Click Integrate in the top right.
Copy the generated prompt.
The screenshots show the shared dashboard controls. The prompt content is
generated for the platform you selected.
Example prompt
Your model IDs, voice, language, and routing region come from what you
picked.
# Migrate this Pipecat bot to SLNG hosted STT/TTS and the SLNG Context RouterUse the SLNG `pipecat-migration` skill to replace speech to text and textto speech with `SlngSTTService` and `SlngTTSService` from `pipecat-slng`.Replace the LLM with Pipecat's `OpenAILLMService` pointed at the SLNG LLMRouter using `bedrock-mantle/nvidia.nemotron-nano-3-30b:latest`.## Install the skill```bashnpx skills add slng-ai/skills pipecat-migration```## Selected stack- STT: `slng/deepgram/nova:3-en`- TTS: `slng/deepgram/aura:2-en`- Voice: `aura-2-thalia-en`- Language: English (`en`)- Region: Europe, via the `eu.api.slng.ai` base URL- LLM: SLNG Context Router, model `bedrock-mantle/nvidia.nemotron-nano-3-30b:latest` at `https://au.context-router.slng.ai/v1`## Instructions for the coding agent1. Discover the entrypoint, package manager, environment loading, and current STT, TTS, and LLM wiring before editing. Do not assume file names.2. Establish a rollback point with a clean git tree.3. Validate `SLNG_API_KEY` without printing it.4. Install `pipecat-slng` and import-probe `from pipecat_slng import SlngSTTService, SlngTTSService`.5. Replace only the STT and TTS constructors that feed `Pipeline([...])`. Keep the transport, VAD, context aggregators, and pipeline order intact.6. Point `OpenAILLMService` at the SLNG Context Router endpoint.7. Never inline API keys. Use stable agent and session identifiers in request headers, then verify one spoken turn from STT through the LLM to TTS.
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.
model="slng/deepgram/nova:3-en" # SLNG-hosted Deepgram Nova 3model="deepgram/nova:3" # External Deepgram route
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.
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.
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.
uv add pipecat-slng
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.
from pipecat.services.openai import OpenAILLMServicellm = OpenAILLMService( api_key=os.environ["SLNG_API_KEY"], base_url="https://au.context-router.slng.ai/v1", # swap au for your region settings=OpenAILLMService.Settings( model="bedrock-mantle/nvidia.nemotron-nano-3-30b:latest", ), default_headers={ "X-Slng-Agent-Id": agent_id, "X-Slng-Session-Id": session_id, },)
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: