Skip to content

fix(azure): emit <bookmark> instead of W3C <mark> — Azure silently synthesises no audio for <mark> - #3

Merged
willwade merged 1 commit into
masterfrom
fix/azure-mark-bookmark
Aug 18, 2026
Merged

fix(azure): emit <bookmark> instead of W3C <mark> — Azure silently synthesises no audio for <mark>#3
willwade merged 1 commit into
masterfrom
fix/azure-mark-bookmark

Conversation

@willwade

Copy link
Copy Markdown
Contributor

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 a Bookmark synthesis 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.

  • New test: test_microsoft_azure_mark_emits_bookmark (emits <bookmark mark="b1"/>, never <mark)
  • cargo test --all, cargo test --test ffi_test, cargo clippy -- -D warnings all green locally (test-data submodule initialised)

…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.
@willwade
willwade merged commit 848ce9a into master Aug 18, 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