Skip to content

(expressive mode): add fish audio#6528

Open
cshape wants to merge 2 commits into
livekit:tina/refactor-expressive-modefrom
cshape:cale/fish-speech-steering
Open

(expressive mode): add fish audio#6528
cshape wants to merge 2 commits into
livekit:tina/refactor-expressive-modefrom
cshape:cale/fish-speech-steering

Conversation

@cshape

@cshape cshape commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

adds fish audio (s2 models) to expressive mode, same shape as inworld/xai/cartesia:

  • emotion tags (discrete vocabulary: regretful, hopeful, happy, excited, curious, surprised, sad, empathetic, sarcastic) -> [very EMOTION]
  • breaks -> [break] / [long-break] by duration
  • emphasis, the only wrapping prosody -> prefix form: are you [emphasis] sure
  • sounds: [laughing], [chuckling], [clear throat], governed by the laughing / reflex_sounds steering fields; disabled sounds are dropped from the advertised vocabulary and examples like the other providers
  • disfluent few-shot examples render only while disfluencies is enabled, so examples never contradict the delivery guidelines

no _MAX_INPUT_LEN entry on purpose: fish's markers are sentence-scoped (every sentence carries its own emotion tag), so we stick with normal per-sentence synthesis instead of batching longer expressive chunks β€” no steering is lost and time-to-first-audio stays low.

verified live through the inference gateway (fishaudio/s2.1-pro + gemma-4-31b-it) and with offline sweeps across several llms checking tag placement, conversion, transcript stripping, and steering filters.

Registers Fish Audio (s2 family) across the expr pipeline so inference
fishaudio/* voices work in expressive mode:

- llm_instructions: sounds-filtered builder β€” discrete emotion vocabulary
  (regretful, hopeful, ... sarcastic), sounds (laughing, clear throat),
  breaks, and an emphasis-only wrapping prosody
- convert_markup: expr lowers to Fish's native brackets β€” [very EMOTION]
  (intensified so the emotion lands harder), [SOUND], [break]/[long-break]
  by duration, and [emphasis] word
- steering: laughing/reflex_sounds govern the two sounds; disabled labels
  vanish from the advertised vocabulary and examples
- transcript: expr, hallucinated native XML, and Fish's own bracket form
  are all stripped; brackets=True since Fish's native dialect IS brackets
- chunking: no _MAX_INPUT_LEN entry on purpose β€” Fish's markers are
  sentence-scoped, so per-sentence emission loses no steering and keeps
  time-to-first-audio low
@cshape
cshape requested a review from a team as a code owner July 23, 2026 18:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

gemma keeps labels english on its own, but a weaker llm could write
label="嬉しい", which lowers to a bracket fish doesn't recognize β€”
make it explicit like the pre-refactor prompts did.
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