Skip to content

fix(cloud): Edge SSML dialect — strip <bookmark>, route SpeechMarkdown to the Azure platform - #24

Merged
willwade merged 1 commit into
mainfrom
fix/edge-bookmark-strip
Aug 18, 2026
Merged

fix(cloud): Edge SSML dialect — strip <bookmark>, route SpeechMarkdown to the Azure platform#24
willwade merged 1 commit into
mainfrom
fix/edge-bookmark-strip

Conversation

@willwade

Copy link
Copy Markdown
Contributor

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 a strip_bookmark flag: true on the Edge WS path, false on the Azure REST path.

Edge was using the wrong SpeechMarkdown dialect. preprocess_speech_markdown mapped every engine except azure/google to Platform::AmazonAlexa — including Edge, which is the same Microsoft Speech platform as Azure (just a constrained endpoint). Edge now maps to Platform::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).

…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).
@willwade
willwade merged commit 7eb4cf2 into main Aug 18, 2026
9 checks passed
@willwade willwade mentioned this pull request Aug 18, 2026
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).
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