fix(azure): emit <bookmark> instead of W3C <mark> — Azure silently synthesises no audio for <mark> - #3
Merged
Merged
Conversation
…nthesises no audio for <mark> Azure's Speech service does not support the SSML <mark> element: an utterance containing one completes normally but synthesises zero audio, with no error from the service (verified live against the Azure-family Edge endpoint). Azure's documented equivalent is <bookmark mark="…"/>, delivered as a Bookmark synthesis event. The MicrosoftAzure formatter now maps [mark: "x"] to <bookmark mark="x"/>. Other platforms are unchanged.
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.
Found while fixing silent zero-audio failures in AACTools/rust-tts-wrapper#23/#24 (which turn SpeechMarkdown output into engine requests).
The bug: the Azure formatter maps
[mark: "x"]to W3C SSML<mark name="x"/>. Azure's Speech service does not support<mark>— an utterance containing one completes normally (turn.end/ HTTP 200) but synthesises zero audio, with no error anywhere. Live-verified against the Azure-family Edge endpoint; Azure's SSML docs confirm<mark>is not in the supported element list.The fix: Azure's documented equivalent is
<bookmark mark="…"/>(delivered as aBookmarksynthesis event, same positioning role). The MicrosoftAzure formatter now emits that for[mark: "x"]; all other platforms keep the W3C<mark>(Alexa/Google accept it — base formatters unchanged).Consumer-side context: rust-tts-wrapper already routes Edge to the MicrosoftAzure platform and strips position elements the free Edge endpoint rejects, so both
[mark]→<bookmark>(Azure, kept) and the Edge strip compose correctly end-to-end.test_microsoft_azure_mark_emits_bookmark(emits<bookmark mark="b1"/>, never<mark)cargo test --all,cargo test --test ffi_test,cargo clippy -- -D warningsall green locally (test-data submodule initialised)