important-ram-81230
03/04/2026, 1:51 PMtall-airline-16756
03/04/2026, 1:51 PMtall-airline-16756
03/04/2026, 1:52 PMimportant-ram-81230
03/04/2026, 1:57 PMtall-airline-16756
03/04/2026, 1:57 PMimportant-ram-81230
03/04/2026, 2:02 PMtall-airline-16756
03/04/2026, 2:02 PMlivekit-client or @livekit/rtc-node) cannot set agentName. Agent dispatch is controlled by the agent process/server, not by participants connecting from client code.
What you can do
• Set agentName in the agent server (Node) using ServerOptions from @livekit/agents. This makes the agent an explicitly-named agent that will only join when dispatched to that name.
Example (Node.js agent):
import { ServerOptions } from '@livekit/agents';
const opts = new ServerOptions({
agentName: 'my-test-agent',
// other options...
});
// run your agent with these options
cli.runApp(opts);
If you want the agent to join calls by default (without naming/explicit dispatch)
• Use automatic dispatch in the agent builder or agent server configuration and ensure the agent is Deployed. Automatic dispatch causes the agent to join new rooms without needing an agentName from the client.
If you want help with either option, tell me:
• Do you prefer automatic dispatch (agent joins new rooms by default) or explicit dispatch (agent only joins when named)?
• If explicit, do you need the code to dispatch an agent to an existing room or guidance on configuring the agent server?
I can walk you through the next steps for your preferred approach.
Sources: Agent dispatch | LiveKit Documentation | Server options | LiveKit Documentation | Agent session | LiveKit Documentationimportant-ram-81230
03/04/2026, 2:05 PMtall-airline-16756
03/04/2026, 2:05 PMagent_name set (@FlashCall Server.rtc_session(agent_name="Andr3s")) and you can’t remove it from the UI.
Quick clarification so I give the right steps:
• Are you editing this agent from the LiveKit Cloud console (Agent Builder) visual editor, or from a local agent server config (your Node agent code)?
• Do you want the agent to use automatic dispatch (join new rooms by default) or explicit dispatch (only join when named)?
What’s happening
• The agent_name you’re seeing is an explicit agent identifier. When an agent has an agent_name configured, it is treated as an explicitly named agent and won’t be auto-dispatched unless a dispatch rule or call explicitly targets that name. That setting can come from the agent’s server configuration or from a rule that binds the agent to sessions.
• The console may prevent deleting or changing the name if the agent was deployed with that name in the agent server options or in code (for example using ServerOptions.agentName), because the running agent process is the canonical source of that value.
How to remove or change it
• If the name was set in the visual Agent Builder and is editable there:
◦ Open the Agent Builder for that agent, switch to the deployment/config section, and remove or clear the Agent Name field, then Deploy agent again.
• If the name was set in your agent server code (Node/`@livekit/agents`):
◦ Update the ServerOptions (or wherever agentName is defined) to remove or change the value, then restart/redeploy the agent so the new config takes effect. Example:
const opts = new ServerOptions({
// remove agentName or set to undefined to allow automatic dispatch
// agentName: undefined,
});
• After restarting the agent without agentName, the agent will no longer be an explicitly-named agent.
• If the name is enforced by a dispatch rule or routing config:
◦ Edit or remove the dispatch rule that targets Andr3s so the agent is not required by name. Dispatch rules may live in your project settings or in any external system that calls the AgentDispatchService.
If you want automatic dispatch (agent joins any new room by default)
• Ensure the agent has no agentName configured and is set to Automatic dispatch in the builder, then Deploy agent. Automatic dispatch only targets newly created rooms — it won’t retroactively join existing rooms.
Next steps I can take for you
• Walk you step-by-step in the console: tell me whether you see the Agent Builder or the agent server was deployed from code.
• If it’s from code, paste the small snippet where ServerOptions or agentName is set and I’ll point to the exact change.
• If it’s in the console but the field is locked, tell me the agent’s dashboard status and I’ll guide you where to redeploy or how to clear the name.
Which environment is this from — the Cloud console visual editor or your agent server code?important-ram-81230
03/05/2026, 2:36 AMtall-airline-16756
03/05/2026, 2:36 AM<speak>
Please call our <phoneme alphabet="ipa" ph="ˈeɪpiˌaɪ">API</phoneme> support.
</speak>
• This prevents the TTS from spelling “API” and pronounces it as “ay-pee-eye.”
• Use <say-as> for common formats so they’re read naturally (dates, times, numbers, acronyms).
◦ Example:
<speak>
Your flight is on <say-as interpret-as="date">2026-03-10</say-as>.
</speak>
• Use a lexicon for broader, reusable pronunciation rules.
◦ Lexicons let you define word → pronunciation mappings you can reuse across TTS requests rather than embedding phonemes in every string.
Where to apply the SSML
• Wrap the spoken text you pass to Cartesia’s TTS with the SSML markup before sending it to the TTS plugin in your agent.
• Ensure the TTS request indicates SSML input (some integrations require a flag or content type to parse SSML).
Extra tips
• Test IPA phonetics in small snippets to confirm the pronunciation — different TTS voices can have slight variations.
• For many acronyms, try <say-as interpret-as="characters"> or phoneme alternatives depending on desired outcome.
• If you have a list of words you want consistently pronounced, a lexicon is cleaner than repeating phonemes.
If you want, I can:
• Help convert a few example words you’re seeing spelled out into SSML phonemes or say-as tags. Paste the words or sample sentence and I’ll provide the SSML.
• Show how to include SSML in your agent’s TTS call (if you tell me whether you’re sending TTS from the visual agent builder or from code). Sources: Cartesia TTS plugin guide | LiveKit Documentation | Agent speech and audio | LiveKit Documentationimportant-ram-81230
03/05/2026, 2:37 AMtall-airline-16756
03/05/2026, 2:38 AMfrom livekit.plugins import elevenlabs
tts = elevenlabs.TTS(
voice_id="EXAVITQu4vr4xnSDxMaL",
enable_ssml_parsing=True # required for ElevenLabs
)
• Amazon Polly example:
from livekit.plugins import aws
tts = aws.TTS(
voice="Ruth",
text_type="ssml" # tells Polly to treat text as SSML
)
(Other providers usually parse SSML automatically when SSML tags are present.)
3) Send SSML directly with session.say()
• Wrap the text in a <speak> tag and include <phoneme> / <say-as> where needed:
await session.say(
text='<speak>Please call our <phoneme alphabet="ipa" ph="eɪ pi aɪ">API</phoneme> team.</speak>',
allow_interruptions=True
)
This prevents “API” from being spelled out.
4) Helper to automatically replace words with SSML phonemes
• Useful if you have many words to normalize consistently:
import re
pronunciation_map = {
"LiveKit": '<phoneme alphabet="ipa" ph="laɪv kɪt">LiveKit</phoneme>',
"API": '<phoneme alphabet="ipa" ph="eɪ pi aɪ">API</phoneme>',
}
def apply_ssml_pronunciations(text: str) -> str:
for word, replacement in pronunciation_map.items():
text = re.sub(rf'\b{re.escape(word)}\b', replacement, text, flags=re.IGNORECASE)
return f'<speak>{text}</speak>'
# Usage:
raw = "Welcome to LiveKit. Please contact API support."
ssml = apply_ssml_pronunciations(raw)
await session.say(text=ssml)
5) Optional: override tts_node to inject SSML automatically (advanced)
• If you want every outgoing TTS chunk processed automatically, override tts_node to transform text before it reaches the TTS plugin:
class MyAgent(Agent):
async def tts_node(self, text_stream, model_settings):
async def apply_ssml(input_stream):
async for chunk in input_stream:
chunk = chunk.replace("API", '<phoneme alphabet="ipa" ph="eɪ pi aɪ">API</phoneme>')
yield f'<speak>{chunk}</speak>'
async for frame in await super().tts_node(apply_ssml(text_stream), model_settings):
yield frame
• Note: ensure your provider is OK with receiving SSML-wrapped chunks and that you don’t accidentally double-wrap already-SSML text.
6) Testing and tips
• Test short phrases first to confirm pronunciation.
• For repeated/large lists, prefer lexicons (if provider supports) to keep your text clean.
• If a word still sounds wrong, tweak its IPA in the phoneme tag—voices interpret IPA slightly differently.
• Use <say-as> for dates, numbers, or acronyms if that gives better results for your use case.
If you want, tell me:
• Which TTS plugin you’re using (Cartesia, ElevenLabs, Polly, etc.), and
• A couple of specific words or lines that are being spelled out.
I’ll convert those exact examples into ready-to-use SSML for your agent and show the minimal code change needed.
Sources: ElevenLabs TTS plugin guide | LiveKit Documentation | Amazon Polly TTS plugin guide | LiveKit Documentation | Google Cloud TTS integration guide | LiveKit Documentation | Azure Speech TTS plugin guide | LiveKit Documentation | Speechify TTS plugin guide | LiveKit Documentationimportant-ram-81230
03/05/2026, 2:39 AMtall-airline-16756
03/05/2026, 2:39 AMtts_node to automatically inject SSML for every TTS output. I’ll give both; pick the one you prefer.
A) Minimal approach — preprocess before speaking
• Use a small helper that converts occurrences of STRATIS into an SSML phoneme and then call session.say() with the SSML-wrapped text.
Example:
import re
pronunciation_map = {
"STRATIS": '<phoneme alphabet="arpabet" ph="S T R AE T IH S">STRATIS</phoneme>',
}
def apply_ssml_pronunciations(text: str) -> str:
for word, replacement in pronunciation_map.items():
text = re.sub(rf'\b{re.escape(word)}\b', replacement, text, flags=re.IGNORECASE)
return f'<speak>{text}</speak>'
# Usage in your agent/session code:
raw_text = "Welcome to STRATIS. This is a demo."
ssml_text = apply_ssml_pronunciations(raw_text)
await session.say(text=ssml_text, allow_interruptions=True)
Notes:
• I used ARPABET for the phoneme: S T R AE T IH S approximates “strat-iss.” If you want a slightly different vowel/timing, we can tweak the ARPABET sequence.
• This is the simplest change and works well if you control the strings that get spoken.
B) Automatic approach — override tts_node (recommended if many outputs should be fixed)
• Override the agent’s tts_node so every text chunk is processed and SSML is injected automatically.
Example pattern:
from typing import AsyncIterable
from livekit.agents import Agent
from livekit import rtc
class MyAgent(Agent):
async def tts_node(self, text_stream: AsyncIterable[str], model_settings) -> AsyncIterable[rtc.AudioFrame]:
# Collect full text (or process chunk-by-chunk if you prefer streaming)
full_text = ""
async for chunk in text_stream:
full_text += chunk
# Inject SSML phoneme
corrected = full_text.replace(
"STRATIS",
'<phoneme alphabet="arpabet" ph="S T R AE T IH S">STRATIS</phoneme>'
)
ssml = f'<speak>{corrected}</speak>'
# Delegate to the default tts_node implementation with the SSML text
async for frame in await Agent.default.tts_node(self, [ssml], model_settings):
yield frame
Notes:
• This example buffers the full text; if you need strict streaming, we can adapt to process chunks while preserving SSML correctness.
• Ensure the Inference TTS configuration uses your Cartesia model:
tts = inference.TTS(model="cartesia/sonic-3", voice="86e30c1d-714b-4074-a1f2-1cb6b552fb49")
Testing and tweaks
• Deploy and test a short phrase like "Welcome to STRATIS" and listen. If it’s off, I can tweak the ARPABET phonemes (or switch to IPA) to better match "strat-iss".
• If you have other words needing fixes, add them to the pronunciation_map and the same logic will handle them.
Which option do you prefer — preprocess per utterance (A) or automatic tts_node override (B)? If you paste a few more words (or how you want them pronounced), I’ll provide the exact phoneme entries and a ready-to-drop-in snippet.
Sources: Cartesia TTS plugin guide | LiveKit Documentation | Agent speech and audio | LiveKit Documentationimportant-ram-81230
03/05/2026, 3:30 AMtall-airline-16756
03/05/2026, 3:31 AMpronunciation_dict_id to Cartesia and want to know how to do that from your Python agent.
Short answer
• LiveKit’s Cartesia TTS integration does not document a pronunciation_dict_id parameter. The supported way to control pronunciation via LiveKit is SSML (phoneme tags) or provider-specific options that are exposed by the plugin/inference wrapper.
• If Cartesia itself supports a pronunciation_dict_id on their API, it is not currently exposed in the LiveKit Cartesia plugin or the documented Inference TTS options.
To help you further, I need a couple quick details so I can give the exact next step:
1) Which TTS constructor are you using in your agent right now?
• Example A (Inference):
tts = inference.TTS(model="cartesia/sonic-3", voice="86e30c1d-714b-4074-a1f2-1cb6b552fb49")
• Example B (plugin):
tts = cartesia.TTS(...) Please paste the exact code snippet you’re using.
2) Have you tried passing extra_kwargs or any other custom fields to the TTS constructor? If so, paste that snippet and any error or response you received.
What I can do next (pick one)
• Option A — Confirm & test a pass-through: I’ll show how to try sending pronunciation_dict_id via extra_kwargs in inference.TTS so you can test if the field is accepted (this is speculative — may be ignored if not supported).
• Option B — Provide the robust SSML solution: I’ll give a ready-to-drop-in helper or a tts_node override to reliably make "STRATIS" speak as “strat-iss” using <phoneme> (works today with Cartesia via LiveKit).
• Option C — Validate against Cartesia API: If you have a Cartesia doc or API link that explicitly shows pronunciation_dict_id, share it and I’ll map exactly how (and whether) LiveKit can pass it through or what change is needed.
If you want to try Option A immediately, here’s the test snippet you can paste into your agent (speculative — may or may not be accepted by the integration):
from livekit.agents import inference
tts = inference.TTS(
model="cartesia/sonic-3",
voice="86e30c1d-714b-4074-a1f2-1cb6b552fb49",
extra_kwargs={
"pronunciation_dict_id": "your-dict-id"
}
)
If this returns an error or the field is ignored, fallback to SSML is the supported path. Tell me which option you want to try and paste your current TTS construction code so I can give the exact next steps.
Sources: Cartesia TTS plugin guide | LiveKit Documentation | Cartesia TTS | LiveKit Documentation | MiniMax TTS plugin guide | LiveKit Documentationimportant-ram-81230
03/05/2026, 2:55 PMtall-airline-16756
03/05/2026, 2:56 PMfrom livekit.agents import BackgroundAudioPlayer, AudioConfig, BuiltinAudioClip
# Configure thinking sounds (you can use built-in clips or point to files)
background_audio = BackgroundAudioPlayer(
thinking_sound=[
AudioConfig(source=BuiltinAudioClip.KEYBOARD_TYPING, volume=0.6, loop=True),
# You can add multiple clips; player will choose/play based on config
],
# optional: ambient_sound=[ AudioConfig(...) ] for continuous background noise
)
# Start playback once the agent session/room is ready
await background_audio.start(room=ctx.room, agent_session=session)
# ... later, when done:
await background_audio.aclose()
Notes and tips
• Built-in options: BuiltinAudioClip.KEYBOARD_TYPING, KEYBOARD_TYPING2, OFFICE_AMBIENCE, etc.
• You can use custom audio files (mp3/wav) by setting AudioConfig(source="path_or_url_to_file").
• Use volume, loop, and probability (if available) to tune how often and how loud thinking sounds play.
• The BackgroundAudioPlayer targets “thinking” periods automatically (e.g., while waiting for model/tool responses). If you need precise control, start/stop the player around specific code sections (before inference start / after inference end).
• Node.js: only ambient sound is supported currently; the Python SDK supports thinking_sound specifically.
If you’d like, tell me:
• Do you want built-in typing/ambient sounds or to use a custom audio file?
• Should the thinking sound play only during LLM inference/tool calls, or whenever there’s >X seconds of silence?
I can give the exact snippet tailored to your preferred audio source and when you want it to play.
Sources: Agent speech and audio | LiveKit Documentationimportant-ram-81230
03/05/2026, 6:18 PMtall-airline-16756
03/05/2026, 6:18 PM