fix(cloud): Edge SSML dialect — strip <bookmark>, route SpeechMarkdown to the Azure platform - #24
Merged
Merged
Conversation
…n to the Azure platform Follow-up to #23. Azure documents its own <bookmark mark=…> position element, but live testing shows the free Edge endpoint synthesises zero audio for it (same silent failure class as <mark>), so the Edge WS path now strips both; the Azure REST path keeps <bookmark> since Azure accepts it. Also: SpeechMarkdown preprocessing mapped every engine except azure/google to the AmazonAlexa platform — including Edge, which speaks the Azure dialect (same Speech platform). Edge now maps to MicrosoftAzure, so SpeechMarkdown output for Edge gets a complete envelope and Azure-family elements instead of Alexa ones. Verified live against Edge: plain text, emphasis, and [mark:] Speech- Markdown all synthesise (examples/edge-speechmarkdown.rs).
Merged
willwade
added a commit
that referenced
this pull request
Aug 18, 2026
…, keep text Live testing of SpeechMarkdown #[style] sections through Edge (which #24 routed to the Azure platform, so they now emit <mstts:express-as style=…>) showed the free Edge endpoint synthesises zero audio for express-as just like <bookmark>. The zero-audio Err from #23 surfaced it loudly instead of silently. In Edge mode the strip now drops the express-as wrapper tags and keeps the spoken content. Azure keeps express-as (documented, accepted).
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.
Follow-up to #23, prompted by the question of whether SpeechMarkdown contributes to the zero-audio failures.
<bookmark>also zero-audios on Edge (live-verified). Azure proper documents<bookmark mark="…"/>as its replacement for the unsupported W3C<mark>, and the REST path keeps it for Azure. But the free Edge endpoint synthesises zero audio for<bookmark>too — same silent failure class.strip_unsupported_marks()now takes astrip_bookmarkflag: true on the Edge WS path, false on the Azure REST path.Edge was using the wrong SpeechMarkdown dialect.
preprocess_speech_markdownmapped every engine except azure/google toPlatform::AmazonAlexa— including Edge, which is the same Microsoft Speech platform as Azure (just a constrained endpoint). Edge now maps toPlatform::MicrosoftAzure, so SpeechMarkdown output for Edge gets the complete<speak version/xmlns/xml:lang>envelope and Azure-family elements instead of Alexa ones.A dedicated Edge platform in speechmarkdown-rust isn't needed: Edge speaks the Azure dialect, and the wrapper strips the couple of elements the free endpoint lacks. A speechmarkdown-rust fix is still worthwhile for Azure itself (
[mark:"x"]should emit<bookmark mark="x"/>there — tracked separately in that repo).Verified live against Edge via
cargo run --example edge-speechmarkdown: plain text,(x)[emphasis:"strong"], and(x)[mark:"m1"]all synthesise audio (the mark case previously produced a silent zero-audio turn).