Skip to content

feat: Gemini 3.8 TTS dialect + corpus enforcement (0.5.0) - #7

Merged
willwade merged 4 commits into
masterfrom
feat/gemini-dialect
Sep 24, 2026
Merged

willwade merged 4 commits into
masterfrom
feat/gemini-dialect

Conversation

@willwade

Copy link
Copy Markdown
Contributor

Platform::Gemini + GeminiFormatter (angle-bracket vocal bursts, two-step pauses, CAPS emphasis, plain-text backchannels, SFX dropped), gemini_capabilities(), corpus enforcement via 11 .gemini.ssml fixture sets (submodule bumped), parser vocabulary extended with the documented Gemini burst set. Version 0.5.0.

New audio-tag dialect for gemini-3.8-flash-tts / -flash-lite-tts,
mirroring the ElevenLabsV3 no-SSML architecture:

- [laugh]/[sigh]/[gasp]... -> <laugh>/<sigh>/<gasp> angle-bracket vocal
  bursts (aliases normalized to documented spellings, e.g. [cheering]
  -> <cheer>, [whew] -> <phew>, [ahem] -> <throat-clearing>)
- breaks -> <short pause>/<long pause> (two steps; sub-beat -> ellipsis)
- emphasis (moderate+strong) -> CAPS, Gemini's documented mechanism
- backchannels [mhm]/[oh]/[wow]... -> plain text (transcript-as-speech)
- sound effects [applause]/[boo] dropped (prompting guide: avoid SFX)
- (text)[whisper] -> <whispers> prefix tag
- rate/pitch/volume/style dropped inline: turn-level speech_metadata.style
  is the documented channel (engine concern)
- IPA/say-as -> the word itself (native normalization)
- gemini_capabilities() documents the dialect and its limits
…back; single whisper prefix

Loop-1 reviewer findings:
- modifier_caps_text treated emphasis:"reduced" as CAPS — a semantic
  inversion (reduced is *less* emphasis, CAPS is Gemini's strongest
  form). Reduced now passes through unchanged.
- expressive_mapping's wildcard returned PlainText while two comments
  claimed 'best-effort vocal burst pass-through'. Comments now state
  the actual policy (unknown tags degrade to plain text); dead let
  binding removed.
- section_prefix could emit <whispers> twice when both spellings were
  present; now guarded to at most one prefix.
[chuckle]/[chuckles], [snicker], [snort], [sob], [shriek], [shout],
[growl], [grunt], [hiss], [grr], [breath], [exhales], [argh] — all on
Google's documented Gemini 3.8 burst list — now parse as Expressive
nodes; the gemini dialect maps them to their documented <angle-bracket>
forms. Output-neutral on every other platform (Expressive renders
verbatim [tag], identical to the previous literal fallthrough).

Review loop 4 flagged [chuckle] as unmapped; this fixes it at the
parser level so the whole documented burst set is first-class.
- integration runner gains a .gemini.ssml arm (11 fixture sets now
  byte-enforced against Platform::Gemini)
- tests/test-data submodule bumped ee7460e -> 22663dc (gemini fixtures;
  lands on master when PR #6 in speechmarkdown-test-files merges)
- cargo fmt (includes some pre-existing drift)
@willwade
willwade merged commit 41aaa5d into master Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant