[GH-ISSUE #1144] TTS: route quoted dialogue to character voice and prose to narrator voice automatically #565

Closed
opened 2026-10-20 17:30:15 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @etherious1804 on GitHub (May 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1144

Problem

When narratorVoiceEnabled is configured with single-voice mode and no <speaker> tags in the model output, the entire reply currently plays in the character's voice. The configured narrator voice is unused — there's no path that distinguishes "this paragraph is action prose" from "this is what the character actually says."

The result: users who set up a separate narrator voice (intending a novel-style narrator-reads-the-action, character-speaks-the-dialogue split) hear a single voice reading every word, including action prose like "She steps closer, fingertips tracing his jaw." The narrator voice is configured but never selected.

Roleplay convention is already well-established: "..." is speech, surrounding prose is narration. We can act on this convention without requiring model-side structured tags.

Proposed feature

When narratorVoiceEnabled === true AND voiceMode === "single" AND there are no <speaker> tags in the text:

  • Walk the reply, treating each quoted span ("...", ""..."", «...», 「...」, 『...』) as dialogue routed to the character voice.
  • Everything outside the quotes routes to the configured narrator voice.
  • Action-only chunks (no quotes at all in a streaming sentence) correctly stay on the narrator voice instead of falling back to character voice.

Applies to both on-demand speaker-icon playback and the streaming-TTS path.

Sentence-chunker dependency

The streaming-TTS sentence chunker needs to become quote-aware: a multi-sentence quoted block like "Hello. How are you. I am fine." must emit as one chunk (at the closing quote), otherwise mid-quote sentence ends fragment the dialogue into pieces with unbalanced quotes that the splitter can't classify. Pieces with unbalanced quotes currently fall through to all-narrator routing — the visible symptom being that the whole reply plays in the narrator voice when streaming a dialogue-heavy reply.

UX edge cases

  • No quotes at all in the reply — entire reply uses narrator voice (this is the deliberate change; previously a fallback re-routed all-narrator output back to character voice).
  • Mixed quote styles — handle all five common pairs (ASCII, smart, guillemet, Japanese corner/double-corner).
  • narratorVoiceEnabled off — no behavior change; single-voice mode continues to play everything in the character voice.
  • Game/VN mode with [Speaker]: lines — untouched; that path uses extractDialogueUtterances instead.
Originally created by @etherious1804 on GitHub (May 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1144 ### Problem When `narratorVoiceEnabled` is configured with single-voice mode and no `<speaker>` tags in the model output, the entire reply currently plays in the character's voice. The configured narrator voice is unused — there's no path that distinguishes "this paragraph is action prose" from "this is what the character actually says." The result: users who set up a separate narrator voice (intending a novel-style narrator-reads-the-action, character-speaks-the-dialogue split) hear a single voice reading every word, including action prose like *"She steps closer, fingertips tracing his jaw."* The narrator voice is configured but never selected. Roleplay convention is already well-established: `"..."` is speech, surrounding prose is narration. We can act on this convention without requiring model-side structured tags. ### Proposed feature When `narratorVoiceEnabled === true` AND `voiceMode === "single"` AND there are no `<speaker>` tags in the text: - Walk the reply, treating each quoted span (`"..."`, `""...""`, `«...»`, `「...」`, `『...』`) as dialogue routed to the character voice. - Everything outside the quotes routes to the configured narrator voice. - Action-only chunks (no quotes at all in a streaming sentence) correctly stay on the narrator voice instead of falling back to character voice. Applies to both on-demand speaker-icon playback and the streaming-TTS path. ### Sentence-chunker dependency The streaming-TTS sentence chunker needs to become quote-aware: a multi-sentence quoted block like `"Hello. How are you. I am fine."` must emit as one chunk (at the closing quote), otherwise mid-quote sentence ends fragment the dialogue into pieces with unbalanced quotes that the splitter can't classify. Pieces with unbalanced quotes currently fall through to all-narrator routing — the visible symptom being that the whole reply plays in the narrator voice when streaming a dialogue-heavy reply. ### UX edge cases - **No quotes at all in the reply** — entire reply uses narrator voice (this is the deliberate change; previously a fallback re-routed all-narrator output back to character voice). - **Mixed quote styles** — handle all five common pairs (ASCII, smart, guillemet, Japanese corner/double-corner). - **`narratorVoiceEnabled` off** — no behavior change; single-voice mode continues to play everything in the character voice. - **Game/VN mode with `[Speaker]:` lines** — untouched; that path uses `extractDialogueUtterances` instead.
Author
Owner

@cha1latte commented on GitHub (May 25, 2026):

Triage note: labeling this as normal-scope because quoted-dialogue narration routing extends the existing TTS narrator setting rather than adding a separate workflow.

The least risky next step is to keep the implementation bounded to quote-aware splitting and existing narrator/character voice modes.

<!-- gh-comment-id:4536671907 --> @cha1latte commented on GitHub (May 25, 2026): Triage note: labeling this as `normal-scope` because quoted-dialogue narration routing extends the existing TTS narrator setting rather than adding a separate workflow. The least risky next step is to keep the implementation bounded to quote-aware splitting and existing narrator/character voice modes.
Author
Owner

@cha1latte commented on GitHub (May 26, 2026):

fixed in #1255

<!-- gh-comment-id:4546153712 --> @cha1latte commented on GitHub (May 26, 2026): fixed in #1255
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#565
No description provided.