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 route the language model through the SLNG
Context 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 make the change. Copy the prompt the dashboard builds for
your coding agent, or make the edits yourself.
A running Pipecat bot with Python 3.11 or later,
on pipecat-ai>=1.12.0 and pipecat-slng 0.7.
A project created under Improve my agent > Pipecat, and an API key from
its Project Vault. Set up a project for your own code
walks through it, including which of the four configurations to pick.
The project’s region code, such as eu-north. The key works in that region
only.
Starting fresh, or want a known-good reference? The
Pipecat templates
are complete bots for each LLM option below, with a smoke.py that runs one
spoken turn without a microphone.
The project builds a migration prompt from your Listen, Think, and Speak choices.
1
Copy the prompt
Click Integrate in the top right, then Copy prompt in the modal. 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 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 ContextRouter using `bedrock-mantle/nvidia.nemotron-nano-3-30b:latest`.## Install the skill```bashnpx skills add slng-ai/skills pipecat-migration```## Selected stack- STT: `soniox/speech-ai:rt-v5`- TTS: `slng/fish/tts:s2.1-pro`- Voice: `1258154bb41540c7b9dc0d10cd6704bf`- Language: English (`en`)- Region: Germany, via `world_part="eu-west"`- LLM: SLNG Context Router, model `bedrock-mantle/nvidia.nemotron-nano-3-30b:latest` at `https://eu-west.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, and the slng/ prefix selects
an SLNG-hosted model. Models differ by region, so check
models by region before you pick one. For model
identifiers, BYOK with provider_key, and region routing, see the
Pipecat plugin reference.
Import the SLNG services and swap only the two constructors that feed
Pipeline([...]). world_part pins the region, and the two external_*
IDs tie each call’s speech usage to your agent and call.
+ import os- from pipecat.services.deepgram.stt import DeepgramSTTService- from pipecat.services.cartesia.tts import CartesiaTTSService+ from pipecat_slng import SlngSTTService, SlngTTSService- stt = DeepgramSTTService(- api_key=os.environ["DEEPGRAM_API_KEY"],- settings=DeepgramSTTService.Settings(model="nova-3"),- )- tts = CartesiaTTSService(- api_key=os.environ["CARTESIA_API_KEY"],- settings=CartesiaTTSService.Settings(voice="<your voice>"),- )+ stt = SlngSTTService(+ api_key=os.environ["SLNG_API_KEY"],+ world_part=REGION, # the project's region, such as "eu-north"+ model="soniox/speech-ai:rt-v5",+ language=Language.EN,+ external_agent_id=AGENT_ID,+ external_session_id=session_id,+ )+ tts = SlngTTSService(+ api_key=os.environ["SLNG_API_KEY"],+ world_part=REGION,+ model="slng/fish/tts:s2.1-pro",+ voice="9a9cf47702da476aa4629e2506d4a857", # Fish Audio reference_id+ language=Language.EN,+ external_agent_id=AGENT_ID,+ external_session_id=session_id,+ )
Each service takes its own world_part. Keep both on the project’s region.
4
Set up the LLM
Pick the tab for your option. Both router options send the agent and session
IDs in default_headers. Pipecat passes settings.extra to the OpenAI
client’s create(), so the router’s own body fields go inside
extra_body, with this call’s template variables. The next step builds
INSTRUCTIONS and variables.
Your LLM
Context Router
Context Router, inline BYOK
Keep Pipecat’s OpenAI service on your own key. The LLM step skips the
Context Router.
from pipecat.services.openai.llm import OpenAILLMServicellm = OpenAILLMService( api_key=os.environ["OPENAI_API_KEY"], settings=OpenAILLMService.Settings( model="gpt-5.6-luna", system_instruction="You are the front desk of Wayne Enterprises.", ),)
The router answers with the model chosen in the project’s Think
section. slng/auto selects it.
from pipecat.services.openai.llm import OpenAILLMServicellm = OpenAILLMService( api_key=os.environ["SLNG_API_KEY"], base_url=f"https://{REGION}.context-router.slng.ai/v1", default_headers={ "X-Slng-Agent-Id": AGENT_ID, # cache scope "X-Slng-Session-Id": session_id, # one per call }, settings=OpenAILLMService.Settings( model="slng/auto", system_instruction=INSTRUCTIONS, extra={"extra_body": {"template_variables": variables}}, # this call's values ),)
Every request carries your model and provider key in slng_config.
Nothing to set in Think. The model is named once, in slng_config:
the request asks for slng/auto, and the router picks from the config
it carries.
from pipecat.services.openai.llm import OpenAILLMServiceMODEL = "gpt-5.6-luna"def router_config() -> dict: """Return the router config each request carries: one model, on your OpenAI key.""" endpoint = { "provider": "openai-compat", "url": "https://api.openai.com/v1", "api_key": os.environ["OPENAI_API_KEY"], # your provider key } entry = { "model": MODEL, # the only place the model is named "weight": 100, "endpoint": endpoint, # Request settings for this model. Drop it for a model without reasoning. "kwargs": {"reasoning_effort": "none"}, } return {"tiers": {"1": [entry]}}llm = OpenAILLMService( api_key=os.environ["SLNG_API_KEY"], base_url=f"https://{REGION}.context-router.slng.ai/v1", default_headers={ "X-Slng-Agent-Id": AGENT_ID, # cache scope "X-Slng-Session-Id": session_id, # one per call }, settings=OpenAILLMService.Settings( model="slng/auto", # picks from slng_config below system_instruction=INSTRUCTIONS, extra={ "extra_body": { "slng_config": router_config(), "template_variables": variables, # this call's values } }, ),)
pipecat-slng provides STT and TTS services. The router uses Pipecat’s
OpenAILLMService.
5
Fill per-call values with template variables
Write values that change per call, such as the caller’s name, as {{name}}
placeholders in the prompt. Send their values in the request body as
template_variables, and the router fills them in before the model sees the
prompt. The cached answer keeps the placeholders, so callers with different
names can share it. Building the string yourself puts each caller’s name into
the prompt, so no answer can be shared.
INSTRUCTIONS = ( "You are the front desk of {{company_name}}, speaking with {{caller_name}}. " "Keep replies short: they are spoken aloud.")def call_variables(caller_name: str) -> dict[str, str]: """Return this call's values for the placeholders in INSTRUCTIONS.""" return {"company_name": "Wayne Enterprises", "caller_name": caller_name}
Send values that are spoken or echoed: names, a company, an appointment
time.
Keep steering values in the prompt itself. A value that changes what the
answer says, such as the reply language, is not a template variable.
Give every placeholder a value. A {{name}} with no value returns
422 missing_template_variables.
Only the router fills them. With the Your LLM option, write the values
into the prompt yourself.
For the syntax, limits, and more examples, see
Per-call values.
6
Build it once per call
Build the services inside bot(), which the Pipecat runner calls once per
call, so each call gets its own session ID and template variables. Keep your
existing pipeline order.
bot.py
import uuidfrom pipecat.pipeline.pipeline import Pipelinefrom pipecat.runner.types import RunnerArgumentsasync def bot(runner_args: RunnerArguments) -> None: session_id = str(uuid.uuid4()) # one per call; your call or room ID works too variables = call_variables("Bruce") # the caller's name, from your CRM or dispatch stt, llm, tts = ... # the constructors from the steps above pipeline = Pipeline([ transport.input(), stt, context_aggregator.user(), llm, tts, transport.output(), context_aggregator.assistant(), ]) ...
7
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. With the
templates, uv run python smoke.py speech_router runs one turn with no
transport, and uv run python speech_router.py -t webrtc serves a page at
http://localhost:7860 to talk to.
Integration guide for the
Context Router’s caching, smart routing, and response headers.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SLNG: the execution layer for voice - SLNG Documentation","colors":{"primary":"#fbe566","light":"#fbe566","dark":"#000000"},"logo":{"light":"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026auto=format\u0026n=7nMVrKvzTWYOIRbj\u0026q=85\u0026s=eaa03df4481524b3edce26325e7106a6","dark":"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026auto=format\u0026n=7nMVrKvzTWYOIRbj\u0026q=85\u0026s=eaa03df4481524b3edce26325e7106a6"},"favicon":{"light":"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026auto=format\u0026n=7nMVrKvzTWYOIRbj\u0026q=85\u0026s=eaa03df4481524b3edce26325e7106a6","dark":"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026auto=format\u0026n=7nMVrKvzTWYOIRbj\u0026q=85\u0026s=eaa03df4481524b3edce26325e7106a6"},"background":{"color":{"light":"#ffffff"}},"navbar":{"links":[{"href":"mailto:support@slng.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.slng.ai"}},"footer":{"socials":{"x":"https://x.com/slng_ai","github":"https://github.com/slng-ai","linkedin":"https://linkedin.com/company/slng-ai","discord":"https://discord.gg/kxZactmWj"},"links":[{"header":"Company","items":[{"label":"Team","href":"/team"}]}]},"fonts":{"heading":{"family":"Geist Mono"}},"icons":{"library":"lucide"},"integrations":{"gtm":{"tagId":"GTM-W2STKL7Z"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"slng-new-docs","hasAudioNarration":false,"actualSubdomain":"slng-new-docs","customDomains":["docs.slng.ai"],"gitSource":{"type":"github","owner":"slng-ai","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad773c56e89f16d0373f26f","collectionId":"3e12ce44-97d1-4c8d-8302-6faacc32eba8","liveDeploymentHistoryId":"6ad773c56e89f16d0373f26f","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ad773c56e89f16d0373f26f","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":158},{"language":"default","tag":"Agents","count":66},{"language":"default","tag":"Guides","count":52},{"language":"default","tag":"Third party","count":27},{"language":"default","tag":"Text to speech","count":27},{"language":"default","tag":"Agent Builder","count":25},{"language":"default","tag":"Models","count":24},{"language":"default","tag":"Speech to text","count":19},{"language":"default","tag":"Tools","count":14},{"language":"default","tag":"SLNG hosted","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"@keyframes lp-marquee-scroll{0%{transform:translateX(0)}to{transform:translateX(-50%)}}@keyframes hosting-banner-arrow-bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}:root{--color-brand:#FBE566;--color-brand-10:rgba(251, 229, 102, 0.1);--color-brand-15:rgba(251, 229, 102, 0.15);--color-text-dark:#15120D;--color-text-light:#FBFAF7;--surface:#ffffff;--surface-border:#e2e8f0;--surface-border-hover:#cbd5e1;--surface-shadow:rgba(0, 0, 0, 0.06);--surface-hover:var(--color-brand-10);--text-primary:var(--color-text-dark);--text-body:#374151;--text-strong:#1f2937;--text-secondary:#6b7280;--text-muted:#9ca3af;--pill-bg:#f3f4f6;--pill-text:#374151;--badge-stt-bg:#e8e0ff;--badge-stt-text:#6b4fbb;--badge-tts-bg:#dbeafe;--badge-tts-text:#2563eb}.dark{--surface:#1a1a1a;--surface-border:#2d2d2d;--surface-border-hover:#444444;--surface-shadow:rgba(0, 0, 0, 0.3);--surface-hover:var(--color-brand-15);--text-primary:var(--color-text-light);--text-body:#d1d5db;--text-strong:#d1d5db;--text-secondary:#9ca3af;--text-muted:#6b7280;--pill-bg:#374151;--pill-text:#d1d5db;--badge-stt-bg:rgba(107, 79, 187, 0.25);--badge-stt-text:#c4b5fd;--badge-tts-bg:rgba(37, 99, 235, 0.25);--badge-tts-text:#93c5fd}.hosting-slng{display:inline-block;padding:.05rem .4rem;border-radius:4px;background:var(--color-brand);color:var(--color-text-dark);font-size:.8em;font-weight:600}.model-card__flag,.region-flag{display:inline-block;width:1em;height:1em;flex-shrink:0;border-radius:50%;background-position:center;background-size:cover}.region-flag{margin-right:.3rem;vertical-align:-.15em}.region-item{white-space:nowrap}.model-card__flag{width:1.15rem;height:1.15rem}:root:not(.dark) li[role=tab][aria-selected=true]{background-color:var(--color-brand);border-radius:.375rem .375rem 0 0;margin-bottom:-1px;padding:0 .5rem;border-bottom:1px solid var(--color-brand)}:root:not(.dark) li[role=tab][aria-selected=true] [data-component-part=tab-button]{color:var(--color-text-dark)!important;border-color:transparent!important}:root:not(.dark) li[role=tab][aria-selected=true] [data-component-part=tab-button] svg{background-color:var(--color-text-dark)!important}:root:not(.dark) li[role=tab]:not([aria-selected=true]) [data-component-part=tab-button]:hover{border-color:var(--color-brand)!important}#navigation-items a:hover,#navigation-items a[class*=bg-primary]{color:var(--color-text-dark);background-color:var(--color-brand)}#navigation-items a:hover svg,#navigation-items a[class*=bg-primary] svg{background-color:var(--color-text-dark)!important}#navigation-items button:has(>img),.sidebar-group-header:has(>img){align-items:center!important}.eyebrow{display:inline-flex;align-items:center;width:fit-content;height:auto!important;padding:.125rem .5rem;margin-bottom:.5rem;border-radius:.375rem;background-color:var(--color-brand);color:var(--color-text-dark);text-transform:uppercase;letter-spacing:.05em}.dark .eyebrow{color:#000}.toc-item a[class*=text-primary]{background-color:transparent;color:var(--color-text-dark);text-decoration:underline;text-decoration-color:var(--color-brand);text-decoration-thickness:2px;text-underline-offset:3px}.dark .toc-item a[class*=text-primary]{color:var(--color-text-light);text-decoration-color:var(--color-brand)}[data-component-part=field-info-pill]{word-break:normal;overflow-wrap:break-word}.dark .group:hover [data-component-part=card-cta] button,:root:not(.dark) .group:hover [data-component-part=card-cta] button{color:inherit!important;text-decoration:underline;text-decoration-color:var(--color-brand);text-decoration-thickness:2px;text-underline-offset:3px}:root:not(.dark) [data-component-part=field-name][class*=text-primary],:root:not(.dark) [role=menuitem][class*=text-primary],:root:not(.dark) button[aria-haspopup=menu][class*=text-primary],:root:not(.dark) button[role=tab][aria-selected=true][class*=text-primary]{color:var(--color-text-dark)}:root:not(.dark) [role=menuitem][class*=text-primary][class*=font-medium]{text-decoration:underline;text-decoration-color:var(--color-brand);text-decoration-thickness:2px;text-underline-offset:3px}:root:not(.dark) [role=menuitem][class*=text-primary]:hover,:root:not(.dark) button[role=tab] [class*=peer\\/title]:hover{color:var(--color-text-dark)!important}:root:not(.dark) button[aria-haspopup=menu] [class*=hover\\:text-primary]:hover{color:var(--color-text-dark)!important;background-color:var(--color-brand-10)}.dark button[aria-haspopup=menu] [class*=hover\\:text-primary]:hover{color:var(--color-brand)!important}:root:not(.dark) [data-component-part=code-block-root] .line-highlight{background:rgba(251,229,102,.35)!important}.audio-player{display:flex;flex-direction:column;gap:.5rem;padding:.9rem 1rem;border-radius:12px;border:1px solid var(--surface-border);background:var(--surface)}.audio-player.compact{padding:0;border:0;background:0 0;gap:0}.audio-player .meta{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.audio-player .titles{display:flex;flex-direction:column;gap:.15rem}.audio-player .title{font-weight:600;color:var(--text-primary)}.audio-player .description{color:var(--text-secondary);font-size:.9rem}.audio-player .download{font-size:.85rem;color:var(--text-primary);text-decoration:none;font-weight:600;white-space:nowrap}.audio-player .download:hover{text-decoration:underline;text-decoration-color:var(--color-brand);text-underline-offset:3px;text-decoration-thickness:2px}.audio-player .audio-control{width:100%}.audio-player .controls{display:flex;align-items:center;gap:.6rem}.audio-player .play-button{width:36px;height:36px;border-radius:999px;border:0;background:var(--color-brand);color:var(--color-text-dark);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;padding:0}.audio-player .play-button:hover{filter:brightness(.95)}.audio-player .play-button:focus-visible,.audio-player .scrubber:focus-visible{outline:2px solid var(--color-brand);outline-offset:2px}.audio-player .time{font-size:.8rem;font-variant-numeric:tabular-nums;color:var(--text-secondary);min-width:2.75rem;text-align:center;flex-shrink:0}.audio-player .scrubber{-webkit-appearance:none;appearance:none;flex:1;height:6px;border-radius:999px;cursor:pointer;background:linear-gradient(to right,var(--color-brand) var(--progress, 0%),var(--surface-border) var(--progress, 0%))}.audio-player .scrubber::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:var(--text-primary);border:2px solid var(--surface);cursor:pointer}.audio-player .scrubber::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--text-primary);border:2px solid var(--surface);cursor:pointer}.audio-player .compact-button{width:32px;height:32px;border-radius:999px;border:1px solid var(--surface-border);background:var(--surface);color:var(--text-primary);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.audio-player .compact-button:hover{background:var(--surface-hover)}.audio-player .compact-icon{font-size:12px;line-height:1}@media (max-width:640px){.audio-player .meta{flex-direction:column;align-items:flex-start}}:has(>.model-card){row-gap:.75rem!important}.model-card{display:flex;flex-direction:column;gap:.75rem;padding:1rem 1.25rem;border:1px solid var(--surface-border);border-radius:12px;background:var(--surface);transition:border-color .15s,box-shadow .15s}.model-card:hover{border-color:var(--surface-border-hover);box-shadow:0 2px 8px var(--surface-shadow)}.model-card__footer,.model-card__header,.model-card__meta,.model-card__region,.model-card__regions{display:flex;align-items:center}.model-card__header{gap:.75rem}.model-card__logo{display:flex;width:36px;height:36px;min-width:36px;align-items:center;justify-content:center;border-radius:8px;font-size:.75rem;font-weight:700;line-height:1}.model-card__logo--provider,.model-card__pill{background:var(--pill-bg);color:var(--pill-text)}.model-card__logo-img{width:100%;height:100%;border-radius:6px;object-fit:contain}.model-card__logo--image{box-sizing:border-box;padding:4px;background:var(--surface)}.model-card__identity{min-width:0;flex:1}.model-card__name{overflow:hidden;margin:0;color:var(--text-primary);font-size:1rem;font-weight:600;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.model-card__name-button{display:inline-flex;align-items:center;gap:.3rem;max-width:100%;min-width:0;padding:0;border:0;background:0 0;font:inherit;color:inherit;cursor:pointer;text-align:left}.model-card__name-text{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.model-card__copy-icon{display:inline-flex;flex-shrink:0;color:var(--text-muted);opacity:0;transition:opacity .12s}.model-card__copy-icon--copied,.model-card__name-button:focus-visible .model-card__copy-icon,.model-card__name-button:hover .model-card__copy-icon{opacity:1}.model-card__copy-icon--copied{color:var(--text-primary)}.model-card__provider{color:var(--text-secondary);font-size:.8rem}.model-card__meta{flex-wrap:wrap;gap:.35rem;margin-top:.2rem}.model-card__badge,.model-card__hosting{padding:.15rem .5rem;border-radius:4px;font-size:.7rem;font-weight:600;letter-spacing:.03em;white-space:nowrap}.model-card__badge{text-transform:uppercase}.model-card__badge--stt{background:var(--badge-stt-bg);color:var(--badge-stt-text)}.model-card__badge--tts{background:var(--badge-tts-bg);color:var(--badge-tts-text)}.model-card__hosting{background:var(--color-brand);color:var(--color-text-dark)}.model-card__description{display:-webkit-box;overflow:hidden;margin:0;color:var(--text-body);font-size:.9rem;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2}.model-card__metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--surface-border);border-radius:8px}.model-card__metric{min-width:0;padding:.55rem .65rem;border-right:1px solid var(--surface-border)}.model-card__metric:last-child{border-right:0}.model-card__detail-label,.model-card__metric-label{display:block;margin-bottom:.15rem;color:var(--text-secondary);font-size:.65rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase}.model-card__metric strong{display:block;overflow:hidden;color:var(--text-strong);font-size:.8rem;text-overflow:ellipsis;white-space:nowrap}.model-card__detail-row{color:var(--text-body);font-size:.8rem}.model-card__pills{display:flex;flex-wrap:wrap;gap:.375rem}.model-card__pill{overflow:hidden;padding:.2rem .5rem;border-radius:6px;font-size:.75rem;text-overflow:ellipsis;white-space:nowrap}.model-card__footer{justify-content:space-between;padding-top:.1rem}.model-card__footer,.model-card__regions{flex-wrap:wrap;gap:.5rem}.model-card__region{gap:.25rem;color:var(--text-secondary);font-size:.72rem;font-weight:600}.model-card__region--more{opacity:.75;cursor:help}.model-card__cta{color:var(--text-primary);font-size:.8rem;font-weight:600;text-decoration:none;border-bottom:0!important}.model-card__cta:hover{text-decoration:underline;text-decoration-color:var(--color-brand);text-decoration-thickness:2px;text-underline-offset:3px}@media (max-width:640px){.model-card__metrics{grid-template-columns:1fr}.model-card__metric{border-right:0;border-bottom:1px solid var(--surface-border)}.model-card__metric:last-child{border-bottom:0}}@font-face{font-family:\"Saans\";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/Saans-Regular.woff2) format(\"woff2\")}@font-face{font-family:\"Saans\";font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/Saans-SemiBold.woff2) format(\"woff2\")}@font-face{font-family:\"Saans\";font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/Saans-Heavy.woff2) format(\"woff2\")}.lp-root{font-family:\"Saans\",var(--font-sans, ui-sans-serif, system-ui, sans-serif);color:var(--color-text-dark)}.dark .lp-root{color:var(--color-text-light)}.lp-root a{text-decoration:none}.lp-wrap{max-width:1080px;margin:0 auto;padding-left:1.5rem;padding-right:1.5rem}.lp-section{padding-top:4rem;padding-bottom:4rem}.lp-section--tight{padding-top:2.5rem;padding-bottom:2.5rem}.lp-section__eyebrow{font-family:\"Geist Mono\",ui-monospace,monospace;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:#8a7a2f;margin-bottom:.5rem}.dark .lp-section__eyebrow{color:#c8b85a}.lp-section__title{font-size:1.7rem;font-weight:600;letter-spacing:-.02em;margin:0 0 .5rem;line-height:1.15}.lp-section__intro{font-size:1rem;color:#5c5648;max-width:48ch;margin:0;line-height:1.55}.dark .lp-section__intro{color:#b9b3a4}.lp-hero{position:relative;text-align:center;padding:5.5rem 1.5rem 4rem;overflow:hidden}.lp-hero::before{content:\"\";position:absolute;inset:0;background-image:radial-gradient(rgba(21,18,13,.06) 1px,transparent 1px);background-size:22px 22px;-webkit-mask-image:radial-gradient(ellipse 70% 65% at 50% 35%,#000 30%,transparent 75%);mask-image:radial-gradient(ellipse 70% 65% at 50% 35%,#000 30%,transparent 75%);pointer-events:none}.dark .lp-hero::before{background-image:radial-gradient(rgba(251,250,247,.07) 1px,transparent 1px)}.lp-hero__inner{position:relative;max-width:760px;margin:0 auto}.lp-hero__eyebrow{display:inline-flex;align-items:center;gap:.5rem;font-family:\"Geist Mono\",ui-monospace,monospace;text-transform:uppercase;letter-spacing:.1em;font-size:.72rem;color:var(--color-text-dark);background-color:var(--color-brand);padding:.25rem .7rem;border-radius:999px;margin-bottom:1.5rem}.lp-hero__title{font-size:3.1rem;line-height:1.04;font-weight:800;letter-spacing:-.03em;margin:0 0 1.1rem}.lp-hero__title .lp-mark{background:linear-gradient(transparent 62%,var(--color-brand) 62%);padding:0 .1em}.lp-hero__sub{font-size:1.18rem;line-height:1.55;color:#5c5648;max-width:38rem;margin:0 auto 2rem}.dark .lp-hero__sub{color:#b9b3a4}.lp-cta-row{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.lp-btn{display:inline-flex;align-items:center;gap:.45rem;font-weight:600;font-size:.95rem;padding:.7rem 1.35rem;border-radius:10px;transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease}.lp-btn:hover{transform:translateY(-1px)}.lp-btn--ghost,.lp-btn--primary{color:var(--color-text-dark)!important}.lp-btn--primary{background-color:var(--color-brand);box-shadow:0 1px 2px rgba(21,18,13,.12)}.lp-btn--primary:hover{box-shadow:0 6px 18px rgba(251,229,102,.5)}.lp-btn--ghost{background-color:transparent;border:1px solid rgba(21,18,13,.18)}.dark .lp-btn--ghost{color:var(--color-text-light)!important;border-color:rgba(251,250,247,.22)}.lp-btn--ghost:hover{border-color:rgba(21,18,13,.4)}.dark .lp-btn--ghost:hover{border-color:rgba(251,250,247,.45)}.lp-stats{border-top:1px solid rgba(21,18,13,.08);border-bottom:1px solid rgba(21,18,13,.08);background:rgba(251,229,102,.05)}.dark .lp-stats{border-color:rgba(251,250,247,.1);background:rgba(251,229,102,.04)}.lp-stats__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;padding:2.25rem 0}.lp-stat__num{font-family:\"Geist Mono\",ui-monospace,monospace;font-size:2rem;font-weight:600;letter-spacing:-.02em;line-height:1}.lp-stat__num small{font-size:1.1rem;font-weight:600}.lp-stat__label{margin-top:.5rem;font-size:.85rem;color:#5c5648;line-height:1.4}.dark .lp-cmd__cap,.dark .lp-stat__label{color:#b9b3a4}.lp-cmd{display:inline-flex;align-items:center;gap:.5rem;font-family:\"Geist Mono\",ui-monospace,monospace;font-size:.9rem;background:#211d15;color:#fbfaf7;border:1px solid rgba(251,250,247,.15);padding:.6rem 1rem;border-radius:10px;margin-top:1.25rem}.lp-cmd__prompt{color:var(--color-brand);user-select:none}.lp-cmd__cap{font-size:.85rem;color:#5c5648;margin-top:.7rem}.lp-split{display:grid;grid-template-columns:1fr 1.15fr;gap:2.5rem;align-items:center}.lp-grid-3,.lp-grid-4{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.75rem}.lp-grid-4{grid-template-columns:repeat(4,1fr)}.lp-tile{display:block;padding:1.4rem;border-radius:14px;border:1px solid rgba(21,18,13,.1);background:#fff;color:inherit!important;height:100%;transition:border-color .15s,box-shadow .15s,transform .15s}.dark .lp-tile{background:#1a1712;border-color:rgba(251,250,247,.1)}.lp-tile:hover{border-color:var(--color-brand);box-shadow:0 6px 22px rgba(21,18,13,.08);transform:translateY(-2px)}.lp-tile__icon{width:38px;height:38px;border-radius:10px;background:var(--color-brand);color:var(--color-text-dark);display:inline-flex;align-items:center;justify-content:center;margin-bottom:.9rem}.lp-tile__title{font-weight:600;font-size:1.05rem;margin:0 0 .35rem}.lp-tile__desc{font-size:.9rem;color:#5c5648;margin:0;line-height:1.5}.dark .lp-tile__desc{color:#b9b3a4}.lp-tile__step{font-family:\"Geist Mono\",ui-monospace,monospace;font-size:.75rem;color:#8a7a2f;margin-bottom:.6rem}.dark .lp-tile__step{color:#c8b85a}.lp-grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-top:1.75rem}.lp-integrations{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem;margin-top:1.75rem}.lp-integration{flex:0 0 calc(25% - .75rem);display:flex;align-items:center;gap:.85rem;min-height:76px;padding:1rem 1.1rem;border:1px solid rgba(21,18,13,.1);border-radius:14px;background:#fff;color:inherit!important;transition:border-color .15s,box-shadow .15s,transform .15s}.dark .lp-integration{background:#1a1712;border-color:rgba(251,250,247,.1)}.lp-integration:hover{border-color:var(--color-brand);box-shadow:0 6px 22px rgba(21,18,13,.08);transform:translateY(-2px)}.lp-integration:focus-visible{outline:3px solid var(--color-brand);outline-offset:2px}.lp-integration__mark{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;flex:0 0 42px;overflow:hidden;border:1px solid rgba(21,18,13,.08);border-radius:10px;background:#fff}.lp-integration__logo{display:block;width:34px;height:34px;object-fit:contain}.lp-integration__name{font-size:1rem;font-weight:600}.lp-trust{font-family:\"Geist Mono\",ui-monospace,monospace;font-size:.8rem;color:#8a7a2f;margin-top:1.5rem}.dark .lp-trust{color:#c8b85a}.lp-trust a{color:inherit;border-bottom:1px solid currentColor}.lp-logos{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2.25rem;margin-top:1.75rem}.lp-logos a{display:inline-flex;align-items:center;border-bottom:none!important;box-shadow:none!important}.lp-logos img{height:26px;width:auto;opacity:.7;filter:grayscale(1);transition:opacity .15s,filter .15s}.lp-logos img:hover{opacity:1;filter:grayscale(0)}.dark .lp-logos img{opacity:.85}.lp-cta-band{background:#15120d;color:var(--color-text-light);border-radius:18px;padding:3rem 2rem;text-align:center}.lp-cta-band h2{font-size:1.9rem;font-weight:600;letter-spacing:-.02em;margin:0 0 .6rem;color:var(--color-text-light)}.lp-cta-band p,.lp-cta-band__lead{color:#b9b3a4;margin:0 auto 1.75rem;max-width:40rem}.lp-cta-band__lead{margin-bottom:.35rem}.lp-cta-band__price{color:#b9b3a4;max-width:40rem;margin:0 auto 1.75rem;font-size:.95rem}.lp-nowrap{white-space:nowrap}.lp-cta-band .lp-btn--ghost{color:var(--color-text-light)!important;border-color:rgba(251,250,247,.25)}.lp-cta-band .lp-btn--ghost:hover{border-color:rgba(251,250,247,.5)}.lp-cta-band .lp-cmd{margin-top:0;margin-bottom:1.5rem}@media (max-width:900px){.lp-split{grid-template-columns:1fr}.lp-stats__grid{grid-template-columns:repeat(2,1fr);gap:1.75rem 1rem}.lp-grid-3{grid-template-columns:1fr}.lp-grid-4{grid-template-columns:repeat(2,1fr)}.lp-grid-2{grid-template-columns:1fr}.lp-integration{flex-basis:calc(50% - .5rem)}.lp-hero__title{font-size:2.3rem}.lp-hero{padding-top:3.5rem}}@media (max-width:640px){.lp-integration{flex-basis:100%}.lp-grid-4{grid-template-columns:1fr}}.lp-hero__art{margin:2.75rem auto 0;max-width:480px}.lp-figure img,.lp-hero__art img{width:100%;height:auto;display:block}.lp-figure{border-radius:16px;overflow:hidden;border:1px solid rgba(21,18,13,.1);background:#f3f1ed;line-height:0}.dark .lp-figure{border-color:rgba(251,250,247,.12)}.lp-regions-map .regions-map{margin:0}.lp-hero__grid{max-width:1080px;display:grid;grid-template-columns:1.1fr .9fr;gap:3rem;align-items:center;text-align:left}.lp-hero__grid .lp-hero__sub{margin-left:0;margin-right:0}.lp-hero__grid .lp-cta-row{justify-content:flex-start}.lp-hero--split .lp-hero__art{margin:0 auto;max-width:460px}.lp-hero__getstarted{margin-top:2.75rem}.lp-stat__num{white-space:nowrap}.lp-marquee{margin-top:1.75rem;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}.lp-marquee__track{display:flex;width:max-content;animation:lp-marquee-scroll 42s linear infinite;will-change:transform}.lp-marquee:hover .lp-marquee__track{animation-play-state:paused}.lp-marquee__group{display:flex;align-items:center;gap:3rem;padding-right:3rem;flex-shrink:0}.lp-marquee__group img{height:22px;width:auto;opacity:.8;transition:opacity .15s}.lp-marquee:hover .lp-marquee__group img{opacity:1}:root:not(.dark) .lp-marquee__group img{filter:invert(1)}@media (prefers-reduced-motion:reduce){.lp-marquee__track{animation:none}.lp-marquee{-webkit-mask-image:none;mask-image:none}.lp-marquee__track{flex-wrap:wrap;justify-content:center;row-gap:1.5rem}}@media (max-width:900px){.lp-hero__grid{grid-template-columns:1fr;text-align:center;gap:2rem}.lp-hero__grid .lp-hero__sub{margin-left:auto;margin-right:auto}.lp-hero__grid .lp-cta-row{justify-content:center}.lp-hero--split .lp-hero__art{max-width:360px}}.lp-split--reverse{grid-template-columns:1.15fr 1fr}.lp-split--reverse>:first-child{order:2}.lp-split--reverse>:last-child{order:1}@media (max-width:900px){.lp-split--reverse>*{order:0}}.hosting-banner{display:flex;align-items:flex-start;gap:.7rem;padding:.85rem 1rem;border-radius:12px;line-height:1.45;margin-bottom:1rem}.hosting-banner--slng{background-color:var(--color-brand);color:var(--color-text-dark)}.hosting-banner--thirdparty{background-color:#1a3a3a;color:#e8f0f0}.dark .hosting-banner--thirdparty{background-color:#162e2e}.hosting-banner__icon{flex-shrink:0;margin-top:.1rem;opacity:.85}.hosting-banner__body{display:flex;flex-direction:column;gap:.2rem;min-width:0}.hosting-banner__eyebrow{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.72}.hosting-banner__headline{display:inline-flex;align-items:center;gap:.35rem;font-size:1rem;font-weight:700}.hosting-banner__arrow{flex-shrink:0;animation:hosting-banner-arrow-bounce 1.6s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.hosting-banner__arrow{animation:none}}.hosting-banner__sub{font-size:.85rem;opacity:.88}.hosting-banner__foot{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .6rem;margin-top:.3rem}.hosting-banner__avail{font-size:.7rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.7}.hosting-banner__chips{display:inline-flex;flex-wrap:wrap;gap:.35rem}.hosting-banner__chip{display:inline-flex;align-items:center;gap:.35rem;padding:.1rem .55rem .1rem .35rem;border-radius:999px;background-color:rgba(0,0,0,.07);border:1px solid rgba(0,0,0,.14);font-family:inherit;font-size:.8rem;font-weight:600;color:inherit;white-space:nowrap;transition:background-color .12s ease,border-color .12s ease}button.hosting-banner__chip{cursor:pointer}button.hosting-banner__chip:hover{background-color:rgba(0,0,0,.12);border-color:rgba(0,0,0,.28)}.hosting-banner--thirdparty .hosting-banner__chip{background-color:rgba(255,255,255,.1);border-color:rgba(255,255,255,.22)}.hosting-banner--thirdparty button.hosting-banner__chip:hover{background-color:rgba(255,255,255,.17);border-color:rgba(255,255,255,.38)}.hosting-banner--thirdparty .hosting-banner__chip.is-active,.hosting-banner__chip.is-active{border-color:#059669;box-shadow:inset 0 0 0 1px #059669;background-color:rgba(5,150,105,.16)}.hosting-banner__chip.is-active .hosting-banner__chip-name{color:#047857}.hosting-banner--thirdparty .hosting-banner__chip-variant.is-active,.hosting-banner--thirdparty .hosting-banner__chip.is-active .hosting-banner__chip-name{color:#6ee7b7}.hosting-banner__chip-flag{display:inline-block;width:.95rem;height:.95rem;background-size:cover;background-position:center;border-radius:50%;flex-shrink:0}.hosting-banner__chip-variants{display:inline-flex;align-items:center;padding-left:.4rem;margin-left:.1rem;border-left:1px solid currentColor;font-weight:500}.hosting-banner__chip-variant{font-family:inherit;font-size:inherit;font-weight:500;color:inherit;background:0 0;border:0;padding:0 .2rem;border-radius:4px;cursor:pointer;opacity:.7;transition:opacity .12s ease,background-color .12s ease}.hosting-banner__chip-variant:not(:first-child)::before{content:\"·\";display:inline-block;padding-right:.3rem;opacity:.6;cursor:default}.hosting-banner__chip-variant:hover{opacity:1;text-decoration:underline;text-underline-offset:2px}.hosting-banner__chip-variant.is-active{opacity:1;font-weight:700;color:#047857}.hosting-banner__request{font-size:.8rem}.hosting-banner a{background-image:none;border-bottom:0;text-underline-offset:2px}.dark .hosting-banner--slng a,.hosting-banner--slng a{color:var(--color-text-dark);font-weight:600;text-decoration:underline;text-decoration-color:var(--color-text-dark);-webkit-text-decoration-color:var(--color-text-dark)}.dark .hosting-banner--thirdparty a,.hosting-banner--thirdparty a{color:#a3d4d4;font-weight:600;text-decoration:underline;text-decoration-color:#a3d4d4;-webkit-text-decoration-color:#a3d4d4}.region-picker-badge{display:inline-flex;align-items:center;gap:.3rem;margin-right:.4rem;padding:.15rem .5rem;border:1.5px solid rgba(5,150,105,.4);background-color:rgba(5,150,105,.12);border-radius:.5rem;line-height:1.25rem;white-space:nowrap;flex-shrink:0;cursor:pointer}.region-picker-flag{display:inline-block;width:1rem;height:1rem;background-size:cover;background-position:center;border-radius:50%;flex-shrink:0}.region-picker-code{font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:.875rem;line-height:1.25rem;font-weight:600;color:#059669}.dark .region-picker-chevron,.dark .region-picker-code{color:#34d399}.region-picker-chevron{display:inline-flex;align-items:center;color:#059669;opacity:.75;flex-shrink:0}.region-picker-chevron svg{display:block}@media (max-width:640px){.hosting-banner__foot{align-items:flex-start}}"}],"page":{"pagePath":"guides/integrate/pipecat","slug":"/guides/integrate/pipecat","pageMetadata":{"title":"Pipecat integration guide","sidebarTitle":"Pipecat","icon":"/images/providers/pipecat.svg","description":"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.","href":"/guides/integrate/pipecat"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Columns,Frame,Heading,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Keep your Pipecat bot where it runs and route its speech to text and text to\nspeech through SLNG. You can also route the language model through the SLNG\nContext Router. Your transport, VAD, turn-taking, prompts, tools, and pipeline\norder stay as they are.`}),`\n`,_jsx(_components.p,{children:`The SLNG Pipecat services stream STT and TTS over WebSocket. Use them for\ninteractive agents that need low latency and mid-utterance interruption.`}),`\n`,_jsx(_components.p,{children:`There are two ways to make the change. Copy the prompt the dashboard builds for\nyour coding agent, or make the edits yourself.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A running `,_jsx(_components.a,{href:`https://docs.pipecat.ai/`,children:`Pipecat`}),` bot with Python 3.11 or later,\non `,_jsx(_components.code,{children:`pipecat-ai>=1.12.0`}),` and `,_jsx(_components.a,{href:`https://pypi.org/project/pipecat-slng/`,children:_jsx(_components.code,{children:`pipecat-slng`})}),` 0.7.`]}),`\n`,_jsxs(_components.li,{children:[`A project created under `,_jsx(_components.strong,{children:`Improve my agent`}),` > `,_jsx(_components.strong,{children:`Pipecat`}),`, and an API key from\nits `,_jsx(_components.strong,{children:`Project Vault`}),`. `,_jsx(_components.a,{href:`/guides/get-started/create-a-project/your-own-code`,children:`Set up a project for your own code`}),`\nwalks through it, including which of the four configurations to pick.`]}),`\n`,_jsxs(_components.li,{children:[`The project’s region code, such as `,_jsx(_components.code,{children:`eu-north`}),`. The key works in that region\nonly.`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Starting fresh, or want a known-good reference? The\n`,_jsx(_components.a,{href:`https://github.com/slng-ai/slng-templates/tree/main/pipecat`,children:`Pipecat templates`}),`\nare complete bots for each LLM option below, with a `,_jsx(_components.code,{children:`smoke.py`}),` that runs one\nspoken turn without a microphone.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`choose-your-llm-option`,children:`Choose your LLM option`}),`\n`,_jsx(_components.p,{children:`Speech runs the same way in every option. Only the language model changes:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`The LLM`}),_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Template`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Your LLM`}),_jsxs(_components.td,{children:[`Pipecat’s `,_jsx(_components.code,{children:`OpenAILLMService`}),` on your provider key, with no router`]}),_jsx(_components.td,{children:`Any SLNG key`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/slng-ai/slng-templates/blob/main/pipecat/speech.py`,children:_jsx(_components.code,{children:`speech.py`})})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Context Router, project model`}),_jsxs(_components.td,{children:[`The model chosen in the project’s `,_jsx(_components.strong,{children:`Think`}),` section`]}),_jsx(_components.td,{children:`Project key`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/slng-ai/slng-templates/blob/main/pipecat/speech_router.py`,children:_jsx(_components.code,{children:`speech_router.py`})})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Context Router, inline BYOK`}),_jsxs(_components.td,{children:[`Your model and provider key, sent in `,_jsx(_components.code,{children:`slng_config`})]}),_jsx(_components.td,{children:`Project key`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/slng-ai/slng-templates/blob/main/pipecat/speech_router_byok.py`,children:_jsx(_components.code,{children:`speech_router_byok.py`})})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`use-a-coding-agent`,children:`Use a coding agent`}),`\n`,_jsx(_components.p,{children:`The project builds a migration prompt from your Listen, Think, and Speak choices.`}),`\n`,_jsx(Steps,{children:_jsxs(Step,{title:`Copy the prompt`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Integrate`}),` in the top right, then `,_jsx(_components.strong,{children:`Copy prompt`}),` in the modal. Hand\nit to your coding agent. It installs the\n`,_jsxs(_components.a,{href:`/guides/integrate/skills`,children:[_jsx(_components.code,{children:`pipecat-migration`}),` skill`]}),` and applies the\nchanges to your bot.`]}),_jsxs(Columns,{cols:2,children:[_jsx(Frame,{caption:`Click Integrate in the top right.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=38d4eebb62662fecd739dd9f668a9a15`,alt:`The Integrate button in the top right of the project`,\"data-og-width\":`2560`,width:`2560`,\"data-og-height\":`1600`,height:`1600`,\"data-path\":`heroshots/livekit-integrate.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=280\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=fe302be703a8f6ce88062597baeebd64 280w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=560\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=519b1568739a8fb894250228ab638d49 560w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=840\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=1bbee3bae58d3206dd33f19ae84b33bf 840w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=1100\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=f04ffd1098b6e5a54fb2111e69f049b5 1100w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=1650\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=a432c122de243e887cd3ad57e66bfdf3 1650w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate.png?w=2500\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=eb94b29d111b5cd7111a4fae56263480 2500w`})}),_jsx(Frame,{caption:`Copy the generated prompt.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=9d41a0d84735492232d483c987f6064e`,alt:`The shared Integrate modal with a Copy prompt button`,\"data-og-width\":`2560`,width:`2560`,\"data-og-height\":`1600`,height:`1600`,\"data-path\":`heroshots/livekit-integrate-prompt.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=280\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=6a1dafbd2e9cd4f281025bae929a166b 280w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=560\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=5cbfc005575ed39c4653cea1cb3dca04 560w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=840\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=818e041b56be5e71ab97ff4b109e5d36 840w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=1100\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=75d4ed343fd4f3c925d1217590b2fc8f 1100w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=1650\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=7965ab4710be6dd2b0ef44de24762af2 1650w, https://mintcdn.com/slng-new-docs/_MURdOw87SJsfVag/heroshots/livekit-integrate-prompt.png?w=2500\u0026fit=max\u0026auto=format\u0026n=_MURdOw87SJsfVag\u0026q=85\u0026s=916409a73f2ad12a24f4929f73beaf3b 2500w`})})]}),_jsx(_components.p,{children:`The screenshots show the shared dashboard controls. The prompt content is\ngenerated for the platform you selected.`}),_jsxs(Accordion,{title:`Example prompt`,id:`example-prompt`,children:[_jsx(_components.p,{children:`Your model IDs, voice, language, and region come from what you picked.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`35`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Migrate this Pipecat bot to SLNG-hosted STT/TTS and the SLNG Context Router`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use the SLNG `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`pipecat-migration`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` skill to replace speech to text and text`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`to speech with `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`SlngSTTService`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` and `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`SlngTTSService`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` from `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`pipecat-slng`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Replace the LLM with Pipecat's `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`OpenAILLMService`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pointed at the SLNG Context`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Router using `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`bedrock-mantle/nvidia.nemotron-nano-3-30b:latest`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Install the skill`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```bash\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npx`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` skills`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` slng-ai/skills`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pipecat-migration`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Selected stack`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` STT: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`soniox/speech-ai:rt-v5`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TTS: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`slng/fish/tts:s2.1-pro`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Voice: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`1258154bb41540c7b9dc0d10cd6704bf`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Language: English (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`en`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Region: Germany, via `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:'`world_part=\"eu-west\"`'})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LLM: SLNG Context Router, model `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`bedrock-mantle/nvidia.nemotron-nano-3-30b:latest`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` at `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`https://eu-west.context-router.slng.ai/v1`\"})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Instructions for the coding agent`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`1.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Discover the entrypoint, package manager, environment loading, and`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` current STT, TTS, and LLM wiring before editing. Do not assume file`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`2.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Establish a rollback point with a clean git tree.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`3.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Validate `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`SLNG_API_KEY`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` without printing it.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`4.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Install `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`pipecat-slng`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` and import-probe`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\" `from pipecat_slng import SlngSTTService, SlngTTSService`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`5.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Replace only the STT and TTS constructors that feed `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`Pipeline([...])`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Keep the transport, VAD, context aggregators, and pipeline order`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` intact.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`6.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Point `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`OpenAILLMService`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` at the SLNG Context Router endpoint.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`7.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Never inline API keys. Use stable agent and session identifiers in`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request headers, then verify one spoken turn from STT through the LLM`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` to TTS.`})}),`\n`]})})})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`model-routes-and-regions`,children:`Model routes and regions`}),`\n`,_jsxs(_components.p,{children:[`Model IDs use the `,_jsx(_components.code,{children:`provider/model:variant`}),` format, and the `,_jsx(_components.code,{children:`slng/`}),` prefix selects\nan SLNG-hosted model. Models differ by region, so check\n`,_jsx(_components.a,{href:`/models/catalog/by-region`,children:`models by region`}),` before you pick one. For model\nidentifiers, BYOK with `,_jsx(_components.code,{children:`provider_key`}),`, and region routing, see the\n`,_jsx(_components.a,{href:`/integrations/plugins/pipecat#model-identifiers`,children:`Pipecat plugin`}),` reference.`]}),`\n`,_jsx(Heading,{level:`2`,id:`edit-the-code-yourself`,children:`Edit the code yourself`}),`\n`,_jsx(_components.p,{children:`The removed lines below depend on your current providers, so match them to your\ncode.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Install the plugin`,children:[_jsx(_components.p,{children:`Use your project’s package manager.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pipecat-ai[openai,runner,silero,webrtc]~=1.12.0\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pipecat-slng>=0.7.0,\u003c0.8\"`})]}),`\n`]})})})]}),_jsxs(Step,{title:`Set the environment`,children:[_jsxs(_components.p,{children:[`Set the project key and region, and a stable agent ID. `,_jsx(_components.code,{children:`OPENAI_API_KEY`}),` is\nfor the `,_jsx(_components.strong,{children:`Your LLM`}),` and `,_jsx(_components.strong,{children:`inline BYOK`}),` options.`]}),_jsx(CodeBlock,{filename:`.env`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SLNG_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`slng_...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SLNG_REGION`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`eu-north`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SLNG_AGENT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`wayne-concierge-v1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OPENAI_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sk-...`})]}),`\n`]})})})]}),_jsxs(Step,{title:`Point STT and TTS at SLNG`,children:[_jsxs(_components.p,{children:[`Import the SLNG services and swap only the two constructors that feed\n`,_jsx(_components.code,{children:`Pipeline([...])`}),`. `,_jsx(_components.code,{children:`world_part`}),` pins the region, and the two `,_jsx(_components.code,{children:`external_*`}),`\nIDs tie each call’s speech usage to your agent and call.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ import os`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- from pipecat.services.deepgram.stt import DeepgramSTTService`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- from pipecat.services.cartesia.tts import CartesiaTTSService`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ from pipecat_slng import SlngSTTService, SlngTTSService`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- stt = DeepgramSTTService(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- api_key=os.environ[\"DEEPGRAM_API_KEY\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- settings=DeepgramSTTService.Settings(model=\"nova-3\"),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- tts = CartesiaTTSService(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- api_key=os.environ[\"CARTESIA_API_KEY\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- settings=CartesiaTTSService.Settings(voice=\"\u003cyour voice>\"),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-dark\":`#CE9178`},children:`- )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ stt = SlngSTTService(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ api_key=os.environ[\"SLNG_API_KEY\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ world_part=REGION, # the project's region, such as \"eu-north\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ model=\"soniox/speech-ai:rt-v5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ language=Language.EN,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ external_agent_id=AGENT_ID,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ external_session_id=session_id,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ tts = SlngTTSService(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ api_key=os.environ[\"SLNG_API_KEY\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ world_part=REGION,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ model=\"slng/fish/tts:s2.1-pro\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ voice=\"9a9cf47702da476aa4629e2506d4a857\", # Fish Audio reference_id`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ language=Language.EN,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ external_agent_id=AGENT_ID,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ external_session_id=session_id,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#B5CEA8`},children:`+ )`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Each service takes its own `,_jsx(_components.code,{children:`world_part`}),`. Keep both on the project’s region.`]})]}),_jsxs(Step,{title:`Set up the LLM`,children:[_jsxs(_components.p,{children:[`Pick the tab for your option. Both router options send the agent and session\nIDs in `,_jsx(_components.code,{children:`default_headers`}),`. Pipecat passes `,_jsx(_components.code,{children:`settings.extra`}),` to the OpenAI\nclient’s `,_jsx(_components.code,{children:`create()`}),`, so the router’s own body fields go inside\n`,_jsx(_components.code,{children:`extra_body`}),`, with this call’s template variables. The next step builds\n`,_jsx(_components.code,{children:`INSTRUCTIONS`}),` and `,_jsx(_components.code,{children:`variables`}),`.`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Your LLM`,icon:`plug`,id:`your-llm`,children:[_jsx(_components.p,{children:`Keep Pipecat’s OpenAI service on your own key. The LLM step skips the\nContext Router.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.services.openai.llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPENAI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OpenAILLMService.Settings(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-5.6-luna\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` system_instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You are the front desk of Wayne Enterprises.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Context Router`,icon:`route`,id:`context-router`,children:[_jsxs(_components.p,{children:[`The router answers with the model chosen in the project’s `,_jsx(_components.strong,{children:`Think`}),`\nsection. `,_jsx(_components.code,{children:`slng/auto`}),` selects it.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.services.openai.llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SLNG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`REGION`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.context-router.slng.ai/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Slng-Agent-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`AGENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# cache scope`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Slng-Session-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: session_id, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# one per call`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OpenAILLMService.Settings(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"slng/auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` system_instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`INSTRUCTIONS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` extra`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extra_body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"template_variables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: variables}}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# this call's values`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Context Router, inline BYOK`,icon:`key`,id:`context-router%2C-inline-byok`,children:[_jsxs(_components.p,{children:[`Every request carries your model and provider key in `,_jsx(_components.code,{children:`slng_config`}),`.\nNothing to set in `,_jsx(_components.strong,{children:`Think`}),`. The model is named once, in `,_jsx(_components.code,{children:`slng_config`}),`:\nthe request asks for `,_jsx(_components.code,{children:`slng/auto`}),`, and the router picks from the config\nit carries.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`40`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`40`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.services.openai.llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gpt-5.6-luna\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` router_config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Return the router config each request carries: one model, on your OpenAI key.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` endpoint `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai-compat\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.openai.com/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPENAI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# your provider key`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` entry `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`MODEL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# the only place the model is named`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"endpoint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: endpoint,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Request settings for this model. Drop it for a model without reasoning.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"kwargs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reasoning_effort\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"none\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tiers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [entry]}}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAILLMService(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SLNG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`REGION`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.context-router.slng.ai/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Slng-Agent-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`AGENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# cache scope`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Slng-Session-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: session_id, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# one per call`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OpenAILLMService.Settings(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"slng/auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# picks from slng_config below`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` system_instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`INSTRUCTIONS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` extra`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"extra_body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"slng_config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: router_config(),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"template_variables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: variables, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# this call's values`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]})]}),_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`pipecat-slng`}),` provides STT and TTS services. The router uses Pipecat’s\n`,_jsx(_components.code,{children:`OpenAILLMService`}),`.`]})})]}),_jsxs(Step,{title:`Fill per-call values with template variables`,children:[_jsxs(_components.p,{children:[`Write values that change per call, such as the caller’s name, as `,_jsx(_components.code,{children:`{{name}}`}),`\nplaceholders in the prompt. Send their values in the request body as\n`,_jsx(_components.code,{children:`template_variables`}),`, and the router fills them in before the model sees the\nprompt. The cached answer keeps the placeholders, so callers with different\nnames can share it. Building the string yourself puts each caller’s name into\nthe prompt, so no answer can be shared.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`INSTRUCTIONS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"You are the front desk of `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`company_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`, speaking with `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`caller_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`. \"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Keep replies short: they are spoken aloud.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` call_variables`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`caller_name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> dict[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Return this call's values for the placeholders in INSTRUCTIONS.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"company_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Wayne Enterprises\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"caller_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: caller_name}`})]}),`\n`]})})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send values that are spoken or echoed:`}),` names, a company, an appointment\ntime.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep steering values in the prompt itself.`}),` A value that changes what the\nanswer says, such as the reply language, is not a template variable.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Give every placeholder a value.`}),` A `,_jsx(_components.code,{children:`{{name}}`}),` with no value returns\n`,_jsx(_components.code,{children:`422 missing_template_variables`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only the router fills them.`}),` With the `,_jsx(_components.strong,{children:`Your LLM`}),` option, write the values\ninto the prompt yourself.`]}),`\n`]}),_jsxs(_components.p,{children:[`For the syntax, limits, and more examples, see\n`,_jsx(_components.a,{href:`/guides/execution-layer/llm/integration-guide#per-call-values-template_variables`,children:`Per-call values`}),`.`]})]}),_jsxs(Step,{title:`Build it once per call`,children:[_jsxs(_components.p,{children:[`Build the services inside `,_jsx(_components.code,{children:`bot()`}),`, which the Pipecat runner calls once per\ncall, so each call gets its own session ID and template variables. Keep your\nexisting pipeline order.`]}),_jsx(CodeBlock,{filename:`bot.py`,numberOfLines:`20`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.pipeline.pipeline `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pipeline`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.runner.types `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RunnerArguments`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` bot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`runner_args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: RunnerArguments) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid.uuid4()) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# one per call; your call or room ID works too`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` variables `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` call_variables(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bruce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# the caller's name, from your CRM or dispatch`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stt, llm, tts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # the constructors from the steps above`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipeline `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pipeline([`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` transport.input(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stt,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` context_aggregator.user(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` llm,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tts,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` transport.output(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` context_aggregator.assistant(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ])`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`]})})})]}),_jsx(Step,{title:`Verify`,children:_jsxs(_components.p,{children:[`Run one spoken turn through your bot’s transport and confirm that the\npipeline completes speech to text, the LLM, and text to speech. With the\ntemplates, `,_jsx(_components.code,{children:`uv run python smoke.py speech_router`}),` runs one turn with no\ntransport, and `,_jsx(_components.code,{children:`uv run python speech_router.py -t webrtc`}),` serves a page at\n`,_jsx(_components.code,{children:`http://localhost:7860`}),` to talk to.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/guides/models/which-models-are-available`,children:`Which models are available`}),` for\nother speech models and voices you can route through SLNG.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/guides/execution-layer/llm/integration-guide`,children:`Integration guide`}),` for the\nContext Router’s caching, smart routing, and response headers.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Pipecat integration guide","sidebarTitle":"Pipecat","icon":"/images/providers/pipecat.svg","description":"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.","href":"/guides/integrate/pipecat"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Choose your LLM option","slug":"choose-your-llm-option","depth":2,"children":[]},{"title":"Use a coding agent","slug":"use-a-coding-agent","depth":2,"children":[]},{"title":"Model routes and regions","slug":"model-routes-and-regions","depth":2,"children":[]},{"title":"Edit the code yourself","slug":"edit-the-code-yourself","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/slng-new-docs/79891e058276ac73/region-picker-flag.js"],"subdomain":"slng-new-docs","siteName":"SLNG: the execution layer for voice - SLNG Documentation","title":"Pipecat integration guide - SLNG: the execution layer for voice - SLNG Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T09:26:39.013Z","originalFileLocation":"guides/integrate/pipecat.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SLNG: the execution layer for voice - SLNG Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026amp;auto=format\u0026amp;n=7nMVrKvzTWYOIRbj\u0026amp;q=85\u0026amp;s=eaa03df4481524b3edce26325e7106a6\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Pipecat integration guide - SLNG: the execution layer for voice - SLNG Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SLNG: the execution layer for voice - SLNG Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.slng.ai/guides/integrate/pipecat\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://slng-new-docs.mintlify.app/_mintlify/api/og/v2?division=Integrate\u0026amp;title=Pipecat+integration+guide\u0026amp;description=Add+SLNG-hosted+speech+to+text+and+text+to+speech%2C+and+the+SLNG+Context+Router%2C+to+a+Pipecat+pipeline.\u0026amp;theme=058cea2715ea6a0fe652dddf\u0026amp;signature=08a433e33ce923c78b340216a2dbdaad781df1635f1bf8b3af74ea0c02135c5e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Pipecat integration guide - SLNG: the execution layer for voice - SLNG Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://slng-new-docs.mintlify.app/_mintlify/api/og/v2?division=Integrate\u0026amp;title=Pipecat+integration+guide\u0026amp;description=Add+SLNG-hosted+speech+to+text+and+text+to+speech%2C+and+the+SLNG+Context+Router%2C+to+a+Pipecat+pipeline.\u0026amp;theme=058cea2715ea6a0fe652dddf\u0026amp;signature=08a433e33ce923c78b340216a2dbdaad781df1635f1bf8b3af74ea0c02135c5e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SLNG: the execution layer for voice - SLNG Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#fbe566\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.slng.ai/guides/integrate/pipecat\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/integrate/pipecat.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.slng.ai/#organization\",\"name\":\"SLNG: the execution layer for voice - SLNG Documentation\",\"url\":\"https://docs.slng.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/slng-new-docs/7nMVrKvzTWYOIRbj/images/icon.svg?fit=max\u0026auto=format\u0026n=7nMVrKvzTWYOIRbj\u0026q=85\u0026s=eaa03df4481524b3edce26325e7106a6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.slng.ai#website\",\"name\":\"SLNG: the execution layer for voice - SLNG Documentation\",\"url\":\"https://docs.slng.ai\",\"publisher\":{\"@id\":\"https://docs.slng.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.slng.ai/guides/integrate/pipecat#webpage\",\"url\":\"https://docs.slng.ai/guides/integrate/pipecat\",\"name\":\"Pipecat integration guide\",\"description\":\"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\",\"dateModified\":\"2026-10-20T09:26:39.013Z\",\"isPartOf\":{\"@id\":\"https://docs.slng.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.slng.ai/guides/integrate/pipecat#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.slng.ai/guides/integrate/pipecat#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrate\",\"item\":\"https://docs.slng.ai/guides/integrate/livekit\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pipecat integration guide\",\"item\":\"https://docs.slng.ai/guides/integrate/pipecat\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.slng.ai/guides/integrate/pipecat#article\",\"headline\":\"Pipecat integration guide\",\"name\":\"Pipecat integration guide\",\"description\":\"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a Pipecat pipeline.\",\"url\":\"https://docs.slng.ai/guides/integrate/pipecat\",\"mainEntityOfPage\":{\"@id\":\"https://docs.slng.ai/guides/integrate/pipecat#webpage\"},\"dateModified\":\"2026-10-20T09:26:39.013Z\",\"publisher\":{\"@id\":\"https://docs.slng.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.slng.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SLNG: the execution layer for voice - SLNG Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SLNG: the execution layer for voice - SLNG Documentation","nav":{"global":null,"tabs":[{"tab":"Concepts","icon":"lightbulb","pages":[{"title":"Concepts","href":"/concepts/whats-slng/overview"}]},{"tab":"Guides","icon":"book-open","pages":[{"group":"Get started","pages":[{"title":"Quickstart","href":"/guides/get-started/quickstart"},{"group":"Create a project","pages":[{"title":"What's a project","href":"/guides/get-started/create-a-project/whats-a-project"},{"title":"Create an agent","href":"/guides/get-started/create-a-project/create-agent"},{"title":"Improve an existing agent","href":"/guides/get-started/create-a-project/improve-agent"},{"title":"Set up a project for your own code","sidebarTitle":"Set up for your own code","href":"/guides/get-started/create-a-project/your-own-code"},{"title":"Use the API directly","href":"/guides/get-started/create-a-project/api-only"}]}]},{"group":"Regions","pages":[{"title":"Region availability","href":"/guides/regions/regions-map"},{"title":"Using regions in the services","href":"/guides/regions/using-regions-in-services"},{"title":"Agent regions","href":"/guides/regions/agent-regions"}]},{"group":"Execution layer","pages":[{"group":"Listen","pages":[{"title":"Noise cancellation","href":"/guides/execution-layer/stt/noise-cancellation"}]},{"group":"Think","pages":[{"title":"Context Router","href":"/guides/execution-layer/llm/context-router"},{"title":"Context Router regions","sidebarTitle":"Regions","href":"/guides/execution-layer/llm/regions"},{"title":"Integration guide","href":"/guides/execution-layer/llm/integration-guide"}]},{"group":"Speak","pages":[{"title":"TTS caching","href":"/guides/execution-layer/tts/tts-caching"},{"title":"Pronunciation dictionaries","href":"/guides/execution-layer/tts/pronunciation-dictionaries"}]}]},{"group":"Agent Builder","pages":[{"group":"Configure an agent","pages":[{"title":"Listen","href":"/guides/agents/configure/listen"},{"title":"Think","href":"/guides/agents/configure/think"},{"title":"Agent behavior","href":"/guides/agents/configure/agent-behavior"},{"title":"Speak","href":"/guides/agents/configure/speak"},{"title":"Reliability","href":"/guides/agents/configure/reliability"}]},{"group":"Tools and inputs","pages":[{"title":"Choose a tool","href":"/guides/agents/tools-and-mcp/overview"},{"title":"Use built-in tools","href":"/guides/agents/tools-and-mcp/built-in-tools"},{"title":"Create a Send SMS tool","href":"/guides/agents/tools-and-mcp/send-sms-tool"},{"title":"Call an external API","href":"/guides/agents/tools-and-mcp/api-request-tool"},{"title":"Write a custom code tool","href":"/guides/agents/tools-and-mcp/code-tool"},{"title":"Connect an MCP server","href":"/guides/agents/tools-and-mcp/connect-with-mcp"},{"title":"Use n8n for tools","href":"/guides/agents/tools-and-mcp/n8n-for-tools"},{"title":"Attach a tool to an agent","href":"/guides/agents/tools-and-mcp/attach-to-an-agent"},{"title":"Run a tool on call events","href":"/guides/agents/tools-and-mcp/run-on-call-events"}]},{"group":"Telephony","pages":[{"title":"Connect a phone number","href":"/guides/agents/telephony/overview"},{"title":"Receive calls on a number","href":"/guides/agents/telephony/inbound"},{"title":"Place calls from an agent","href":"/guides/agents/telephony/outbound"},{"title":"Dispatch outbound calls","href":"/guides/agents/telephony/dispatch-calls"}]},{"group":"Go live","pages":[{"title":"Test your agent","href":"/guides/agents/production/test-agent"},{"title":"Embed in website","href":"/guides/agents/production/embed-in-website"}]},{"group":"Manage an agent","pages":[{"title":"Download configuration","href":"/guides/agents/download-configuration"},{"title":"Debug a call","href":"/guides/agents/debug-a-call"}]}]},{"group":"Models","pages":[{"title":"Which models are available?","href":"/guides/models/which-models-are-available"},{"title":"Catalog API","href":"/guides/models/catalog-api"},{"title":"Your first request","href":"/guides/models/your-first-request"},{"title":"WebSockets vs HTTP","href":"/guides/models/websockets-vs-http"},{"title":"Use the Unified API","sidebarTitle":"Unified API","href":"/guides/models/unified-api"},{"title":"Bring your own key","href":"/guides/models/bring-your-own-key"}]},{"group":"Integrate","pages":[{"title":"LiveKit integration guide","sidebarTitle":"LiveKit","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/livekit.svg","description":"Add SLNG-hosted speech to text and text to speech, and the SLNG Context Router, to a LiveKit agent.","href":"/guides/integrate/livekit"},{"title":"Pipecat integration guide","sidebarTitle":"Pipecat","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/pipecat.svg","href":"/guides/integrate/pipecat"},{"title":"ElevenLabs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/elevenlabs.svg","description":"Route your ElevenLabs agent's language model through the SLNG context router. Speech to text and text to speech stay on ElevenLabs.","href":"/guides/integrate/elevenlabs"},{"title":"Vapi","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/vapi.svg","href":"/guides/integrate/vapi"},{"title":"Deepgram","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/deepgram.svg","href":"/guides/integrate/deepgram"},{"title":"Custom LLM","icon":"code","href":"/guides/integrate/custom"},{"title":"n8n integration guide","sidebarTitle":"n8n","icon":"https://mintlify.s3.us-west-1.amazonaws.com/slng-new-docs/images/providers/n8n.svg","href":"/guides/integrate/n8n"},{"title":"Skills","icon":"sparkles","href":"/guides/integrate/skills"}]},{"title":"Usage and billing","href":"/guides/usage-and-billing"}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/authentication"}]},{"tab":"Models","icon":"cpu","pages":[{"title":"Models","href":"/models/catalog/all-models"}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/unmute"}]},{"tab":"Changelog","icon":"history","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Pipecat integration guide - SLNG: the execution layer for voice - SLNG Documentation","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DXXFP6nH.js","DynamicMarkdown-B54_zNBF.js","zoom-image-lightbox-BG6oD64b.js","lightbox-handle-r17bVUz3.js"]}