busy-lunch-15701
11/07/2025, 10:58 AMlang=en Cartesia, all working fine.
Environment
• Python
• Mode: Pipeline (problem) / Realtime (no problem)
• TTS: Cartesia Sonic 3
• STT: OpenAI
• LLM: OpenAI / OpenAI Realtime
• Language: ja (some non-English), en (OK)
Scope Matrix
• Pipeline + lang=ja → ❌ Broken
• Realtime + lang=ja → ✅ OK
• Pipeline + lang=en → ✅ OK
• Realtime + lang=en → ✅ OK
Description
In pipeline mode with lang=ja, the transcript renders with a space between every character (e.g., “こ ん に ち は”), and TTS quality degrades after a few turns. Other combinations (realtime or lang=en) do not reproduce.
Root Cause
• Extra space got padded on every chunk in transcription_node()
• Normally, in tts_node() , each sentence were sent into the node as one chunk. After a few turn, each chunk were consist of only one character resulting in the weird speaking voice. Extremely weird in some language like Thai.
• https://github.com/livekit/agents/blob/b80088296e79ac496ad268c64bb80818e3742d66/li[…]lugins/livekit-plugins-cartesia/livekit/plugins/cartesia/tts.py
• So, I guess the root cause is somewhere around SynthesizeStream and ChunkedStreambusy-lunch-15701
11/07/2025, 10:59 AMlively-winter-88668
11/07/2025, 11:28 AMlively-winter-88668
11/07/2025, 2:45 PMbusy-lunch-15701
11/10/2025, 4:36 AMtext modalities
b. tts: cartesia - sonic-3
> You can verify what the llm is sending by overriding the LLM node
Ok, will check this out, and update my finding.
> As you're probably aware, OpenAI Realtime wouldn't use Cartesia which is probably why those are OK.
I used realtime model with the text modality, and I can confirm I'm hearing the Cartesia voices. So I think Cartesia is being used here. Please correct me if I misunderstood.
.
.
I've tried juggling different models around in different combinations, and what I can conclude now is non-realtime LLM + some non-english Cartesia yields the bug.busy-lunch-15701
11/10/2025, 5:11 AMth since Thai needs a combination of characters to produce a word and pronounce correctly, so this bug is kinda critical for language like this. Here is the result.
Setup
• llm_:_ openai - gpt-4o-mini (gpt-4o also yields the bug)
• tts: cartesia - sonic-3 lang=th
1. On the first few turns (first image), the LLM outputs looks ok. Each chunk logs a pronounceable word (not perfect but the Cartesia voice pronounces 99% correct).
2. After the first few turns (second image), thing get worse. Each chunk log character by character results in an alien voice from Cartesia.busy-lunch-15701
11/10/2025, 6:01 AMgemini: gemini-2.0-flash-exp , bug the same.busy-lunch-15701
11/10/2025, 6:03 AMlively-winter-88668
11/10/2025, 9:36 AMtext modality, that makes sense, but feels like Cartesia is a common factor. I can't test this properly as I am only able to speak English, but can you please run https://github.com/livekit-examples/python-agents-examples/blob/main/pipeline-tts/only_greet.py with the Cartesia plugin
tts=cartesia.TTS(
model="sonic-3",
language="ja",
)
and modify the session.say with some appropriate text and let me know if you hear the alien voice? I would like to isolate this to the Cartesia plugin if possible.busy-lunch-15701
11/10/2025, 9:54 AMbusy-lunch-15701
11/10/2025, 9:55 AMbusy-lunch-15701
11/10/2025, 9:56 AMja.lively-winter-88668
11/10/2025, 1:11 PMbusy-lunch-15701
11/11/2025, 4:18 AMbusy-lunch-15701
11/11/2025, 6:52 AMlively-winter-88668
11/11/2025, 7:50 AMbusy-lunch-15701
11/11/2025, 9:19 AM