delightful-painting-21962
11/24/2025, 10:33 AMtall-airline-16756
11/24/2025, 10:33 AMtall-airline-16756
11/24/2025, 10:33 AMconst session = new voice.AgentSession({
tts: new elevenlabs.TTS({
voice_id: "ODq5zmih8GrVes37Dizd",
model: "eleven_multilingual_v2"
}),
// ...other config
});
Would you like me to check the rest of the session config for any other issues?
Sources: ElevenLabs TTS plugin guide | LiveKit Docsdelightful-painting-21962
11/24/2025, 10:35 AMtall-airline-16756
11/24/2025, 10:35 AMpnpm build (exit code 2). To diagnose it I need the build output — the specific error lines from the pnpm build run (or the Docker build log around where the failure happens).
Please share:
• The full error log from the failing pnpm build step (copy/paste the stderr lines).
• Your package.json (the scripts section) and tsconfig.json if using TypeScript.
• Your Dockerfile (or the exact commands you run) and confirm you run pnpm install before pnpm build.
• Any recent changes you made before the failure.
Once I have those I’ll pinpoint the cause (missing build script, TypeScript errors, missing deps, wrong WORKDIR, etc.) and give exact fixes. Would you like instructions for extracting the Docker build logs if needed?
Sources: Builds and Dockerfiles | LiveKit Docsdelightful-painting-21962
11/24/2025, 10:37 AMtall-airline-16756
11/24/2025, 10:37 AMvoice and model properties are written outside an object literal. The compiler expects commas/curly braces.
Fix by passing an object to tts (wrap properties in {}) — for example:
const session = new voice.AgentSession({
tts: new elevenlabs.TTS({
voice: { id: "ODq5zmih8GrVes37Dizd" },
model: "eleven_multilingual_v2",
}),
// ...other config
});
If you previously used voice: { id: ... } and model: ... at the same indentation level without the surrounding {} for the elevenlabs.TTS call, that produces the TS1005 errors you posted.
After making this change, run pnpm build again. If you still get errors, paste the updated TypeScript error output and the surrounding lines (~10 lines) from src/agent.ts and I’ll pinpoint the next fix.delightful-painting-21962
11/24/2025, 10:39 AMtall-airline-16756
11/24/2025, 10:39 AMVoice type requires more than id. You can fix it two ways.
Option 1 — pass the voice as a string ID:
tts: new elevenlabs.TTS({
voice: "ODq5zmih8GrVes37Dizd",
model: "eleven_multilingual_v2",
}),
Option 2 — provide the full Voice object including name and `category`:
tts: new elevenlabs.TTS({
voice: {
id: "ODq5zmih8GrVes37Dizd",
name: "Voice Name",
category: "premade" // or "cloned", etc.
},
model: "eleven_multilingual_v2",
}),
Apply one of these, run pnpm build again, and paste any new errors (or ~10 lines around them) if it still fails. Would you like me to suggest a likely `name`/`category` for that voice ID?
Sources: ElevenLabs TTS plugin guide | LiveKit Docs | ElevenLabs TTS | LiveKit Docsdelightful-painting-21962
11/24/2025, 10:57 AMtall-airline-16756
11/24/2025, 10:57 AMtts: new elevenlabs.TTS({
voice: {
id: "ODq5zmih8GrVes37Dizd",
name: "Voice Name",
category: "premade"
},
model: "eleven_multilingual_v2",
voice_settings: {
speed: 1.25 // 1.0 = normal, >1 faster, <1 slower
},
enable_ssml_parsing: true
})
• Speed: set via voice_settings.speed.
• Text normalization & pronunciation: send SSML in your text (e.g. <say-as> and <phoneme>). Example:
await session.say('<speak>Call me at <say-as interpret-as="telephone">123-456-7890</say-as>.</speak>');
// phoneme example:
await session.say('<speak>The word <phoneme alphabet="ipa" ph="fɪziʃ">physics</phoneme>.</speak>');
• Use SSML for dictionary-like overrides (phonemes) and number/date normalization.
Option B — LiveKit Inference TTS (managed modelOptions)
tts: new inference.TTS({
model: "elevenlabs/eleven_multilingual_v2",
voice: "ODq5zmih8GrVes37Dizd",
language: "en",
modelOptions: {
speed: 1.25,
apply_text_normalization: true
}
})
• Speed: modelOptions.speed.
• Text normalization: apply_text_normalization: true.
• No explicit dict field — use SSML (`<phoneme>`/`<say-as>`) in the text for pronunciation control.
Which one are you using (plugin or inference)? I can give a copy-paste-ready snippet for your project and an SSML example tailored to your text if you want.
Sources: ElevenLabs TTS plugin guide | LiveKit Docsdelightful-painting-21962
11/24/2025, 12:54 PMtall-airline-16756
11/24/2025, 12:55 PMmodelOptions (Node) or extra_kwargs (Python) and set apply_text_normalization: true.
• Speed in Inference: not supported. Use the ElevenLabs plugin to set voice_settings.speed.
Node.js example for text normalization with Inference:
tts: new inference.TTS({
model: "elevenlabs/eleven_multilingual_v2",
voice: "ODq5zmih8GrVes37Dizd",
modelOptions: {
apply_text_normalization: true
}
})
If you need speed control, switch to the plugin and use:
tts: new elevenlabs.TTS({
voice: { id: "ODq5zmih8GrVes37Dizd", name: "Voice Name", category: "premade" },
model: "eleven_multilingual_v2",
voice_settings: { speed: 1.25 },
enable_ssml_parsing: true
})
Which setup are you using (Inference or plugin)? I can provide the exact snippet for your project.
Sources: ElevenLabs TTS | LiveKit Docs | ElevenLabs TTS plugin guide | LiveKit Docsdelightful-painting-21962
11/24/2025, 12:56 PMtall-airline-16756
11/24/2025, 12:56 PMtts: new elevenlabs.TTS({
voice: {
id: "ODq5zmih8GrVes37Dizd",
name: "Voice Name",
category: "premade"
},
model: "eleven_multilingual_v2",
voice_settings: {
speed: 1.25
},
enable_ssml_parsing: true
})
• voice_settings.speed controls playback speed (1.0 = normal).
• enable_ssml_parsing: true lets the TTS interpret SSML for normalization and pronunciation.
2) Use SSML for text normalization and custom pronunciations
• Numbers, dates, telephone, etc.: use <say-as>
• Custom pronunciation: use <phoneme> with IPA or another supported alphabet
Examples:
await session.say('<speak>Call <say-as interpret-as="telephone">123-456-7890</say-as>.</speak>');
await session.say('<speak>The word <phoneme alphabet="ipa" ph="fɪziʃ">physics</phoneme> is tricky.</speak>');
3) Tips
• Keep enable_ssml_parsing true when sending SSML.
• For many normalization cases (<say-as>), SSML is enough; ElevenLabs plugin will apply it.
• If you want a programmatic “dictionary,” translate entries into phoneme-wrapped replacements before sending text (replace terms with SSML phoneme tags).
If you want, tell me one sample phrase and the pronunciation you want changed and I’ll give the exact SSML string to use.