Repository navigation
ElevenLabs: translate SSML input into the model-matched dialect - #39
Merged
Merged
Conversation
ElevenLabs parses no SSML, so SSML input (the tts_speak_ssml path and SpeechMarkdown that expands to <speak>-wrapped markup) was stripped to plain text — every break, whisper and style lost. Now it round-trips through SpeechMarkdown into the model-matched dialect: breaks become pause tiers, prosody becomes tempo tags, amazon:effect whispered becomes [whispers], mstts:express-as styles pass through as audio tags (speechmarkdown-rust 0.4.16). Parse failures fall back to stripping. Verified end-to-end with the offline mock server: the request body for SSML input on the default eleven_v3 model contains the audio-tag dialect and no raw XML.
…ck tests Review caught an estimated-boundary regression: with SSML input on the default eleven_v3 model (which lacks /with-timestamps), the estimator was tokenizing the translated dialect — boundary words like "[long" and "pause]". Boundary search text for translated ElevenLabs SSML is now the plain spoken text, restoring pre-translation semantics; pinned by a degraded-path integration test asserting exactly the plain words. Also: malformed-SSML → strip fallback and <voice>-dropped behavior pinned in unit tests; README FFI table corrected (ElevenLabs translates SSML via SpeechMarkdown rather than bypassing it); cbindgen header + vendored Swift copy synced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last ElevenLabs TODO item.
tts_speak_ssml(and any<speak>-wrapped input) on ElevenLabs was stripped to plain text — every break, whisper and style lost. Now it round-trips SSML → SpeechMarkdown → dialect (speechmarkdown-rust 0.4.16, which addsamazon:effectwhisper +mstts:express-astranslations — AACTools/speechmarkdown-rust#6, v0.4.16 published):<break time="2s"/>→<break time="2s"/>(pre-v3) /[long pause](v3)<prosody rate="slow">→[drawn out](v3)<amazon:effect name="whispered">→[whispers]<mstts:express-as style="cheerful">→[cheerful]Test plan
elevenlabs_ssml_to_dialectacross both dialects + plain-text passthrough