Summary
kotonia's character chat receives each LLM reply as a JSON intermediate representation (IR). Narration and dialogue are split into "blocks", and every dialogue block carries a speaker and an acting direction (delivery). In voice mode, VoxCPM2 reads these blocks aloud.
Reading them aloud caused two problems.
- The volume changed with every synthesis call. Even with the same voice, consecutive lines differed by 4–15 dB.
- The voice itself changed a little with every call too. Zero-shot speech synthesis re-rolls timbre and pace on each call.
For volume, we level the audio on the playback side and let the LLM choose how loud each block should be. The voice problem turned out to be a question of where to split before synthesizing. We changed the split three times, and rejected all three by ear. In the end we went back to the block boundaries the LLM had been writing all along.
Volume: level it, then let the LLM choose the loudness
VoxCPM2 accepts acting directions. You might expect "whispering" to make it quieter. It barely does. In our measurements, "whispering" lowered the level by only 1–6 dB, and "shouting" did not raise it at all. Meanwhile, unrelated variation was 4–15 dB from line to line, and up to 14 dB between voices.
So loudness is not left to the model's output. The playback side decides it.
- Add
volume(whisper/soft/normal/loud) to IR dialogue blocks, and have the LLM write it - In the browser, WebAudio measures the first second of each block and levels it to -18 dBFS
- Then offset it:
whisper-8 dB /soft-4 dB /loud+3 dB - After the first second the gain is fixed, so the inflection inside a block is not flattened
- A shared limiter sits at the end
In testing (three fictional characters × five turns), all 36 blocks had a volume, and the IR was valid in all 15 turns.
The two clips below read the same lines in the same voice. A fictional ship captain shouts in a storm, drops his voice after it, and finally raises it again when he spots an island (the voice is the English version of Eve, the site's official character). The first clip is the raw synthesis, with only its overall level matched to the second.
Before leveling
After leveling, with volume offsets
The LLM saves "loud" for the peaks
After half a day in production, we counted volume on about 1,000 voice-mode dialogue blocks.
| volume | share |
|---|---|
| soft | 43.0% |
| normal | 36.8% |
| whisper | 13.4% |
| loud | 5.2% |
| not written | 1.7% |
loud is only 5%. And in 22 of the 29 turns where loud appears, the same turn also has soft or whisper. In turns with two or more dialogue blocks, 48% change loudness partway through. The model stays restrained most of the time and gets loud only where the emotion peaks. In use, this was the best part: the LLM's acting now comes through directly in the volume.
Voice: where to split
Leveling fixes volume, but timbre and pace still change with every call. We changed how we split three times to reduce this.
We measured voice similarity against the reference audio with a speaker-verification model (ECAPA). We also had Gemini listen and judge, with the versions unlabeled and the order shuffled.
Rejected 1: synthesize each line as a continuation of the previous audio
VoxCPM2 can continue from previous audio and its text. We expected that chaining would make neighbouring lines smoother.
Neighbours did get smoother. But each step drifted further from the original voice. Similarity to the reference fell from 0.73 to 0.59. It happened even with text that had no emotional swings.
Each sentence synthesized separately
Each sentence chained as a continuation of the previous one
Chinese showed the same tendency.
Each sentence synthesized separately (Chinese)
Each sentence chained as a continuation (Chinese)
Continuation had one more trap. We put acting directions in parentheses at the start of the text. When that text is passed as a continuation, the parentheses land mid-sentence and get read aloud. Gemini flagged it in 6 out of 6 cases.
The surprise was that separate synthesis was not as bad as we expected. What sounded wrong was less "the voice changes at a seam" and more "it drifts gradually, then the difference shows all at once".
Rejected 2: synthesize a speaker's consecutive blocks in one call
If the voice changes at seams, have fewer seams. We shipped a version that bundled consecutive blocks with the same speaker and loudness into one call.
Right after shipping it, listening, we noticed it sounded like the chained version. Measuring showed the same drift happening inside a single long call. Past nine seconds from the start, similarity dropped from 0.75 to 0.69–0.71. Reading five sentences in one call made it 1.11× faster.
First sentence, then the rest in one call
Compared with the first clip (one sentence at a time), the second half is faster and the voice is slightly different.
Rejected 3: cut at an estimated eight seconds
If long calls fall apart, cap the length. We estimated spoken seconds from character count and split any block over eight seconds at a sentence boundary.
This also failed as soon as we listened. Now the voice changed in the middle of a block. A voice change inside one line is much more obviously wrong than one at a block boundary.
Resolution: one block = one synthesis call
Here the shape of the problem became clear. Calls must not be long, so we have to split somewhere. The question was where.
The place to split was already there: the IR block boundaries. The LLM starts a new block where there is a pause or where the tone shifts. If the voice changes slightly there, it is where the delivery changes anyway, so it does not stand out.
So we settled on this:
- Synthesize each dialogue block in one call. No bundling, no mid-block cuts
- Do not cut long blocks; ask the LLM to write short ones instead. The voice-mode IR instructions now say "keep each block to one or two sentences, and start a new block at a natural pause or where the tone shifts"
- Blocks with an empty
deliveryorvolumeinherit the same speaker's previous values
In testing (three fictional characters × five turns), the median estimated length of a block went from 4.5 to 2.7 seconds, and the maximum from 9.3 to 4.9 seconds. The amount spoken per turn barely changed (63 → 64 characters), and the IR was valid in all 15 turns.
We also compared production: the seven days before the change versus half a day after. Seconds are estimated from character count (7 characters per second for Japanese and Chinese, 15 for English).
| Language | Median seconds per block | Blocks over nine seconds |
|---|---|---|
| English | 9.2 → 6.5 s | 52% → 21% |
| Japanese | 10.4 → 4.9 s | 64% → 14% |
| Chinese | 6.4 → 4.1 s | 29% → 8% |
Dialogue blocks per turn rose from 1.50 to 2.59.
What did not work
Before settling on the split, we also tried the prompt. The idea: ask the model to "write an acting direction only when the delivery changes", so blocks with the same direction could be bundled.
It did not work. The share of blocks whose direction changed only fell from 76% to 58%. Rephrasing it as "write only about the voice" made the model write a different direction on every block, back to 100%. The LLM wants to note nuance on every block. So we stopped asking through the prompt and solved it structurally, by splitting at block boundaries.
What remains
- Long blocks still appear. After the change, English had seven dialogue blocks over 600 characters (two sessions). "Write short blocks" is an instruction, and it is not always followed
- The seam in the first line. The first block of a reply starts playing before generation finishes, so it is cut once mid-block
- The numbers are small. Testing used three fictional characters × five turns. Production after the change is 30 sessions and about 400 turns, and the English sessions after the change were mostly from different people than before
- Japanese is mainly read by Irodori-TTS. The voice changes you heard here are mostly about VoxCPM2 in English and Chinese. Volume leveling applies to every engine
- Not yet verified for the avatar video's audio
Numbers and ears
This time we rejected, by ear, two versions that looked fine in the numbers. Neither the bundled version nor the eight-second cut looked bad in the pre-release measurements. We confirmed the bundled version's drift in numbers only after hearing it.
The other way round, the final design was decided not by a number but by a listening impression: a voice change in the middle of a block sounds badly wrong. Instruments are good at measuring how much something drifts. The ear was faster at telling where a drift becomes noticeable.
