Skip to content

(Polly)<mark>tag changes the pronunciation

0

I tried Polly Text2Speech with following SSML <speak><mark name="B9"/>みごしがたい<mark name="E9"/>問題ばかりだった</speak> (Language = Japanese, Voice = Takumi, Male), the pronunciation add a break between みごしが and たい(note that the break is not in the mark position). But <speak>みごしがたい問題ばかりだった</speak> do not have this break. The document says "Amazon Polly takes no action on the tag, but returns the location of the tag in the SSML metadata." How to work around this issue?

asked a year ago179 views

3 Answers
0

Hey,

Hope you're keeping well.

The <mark> tag in Polly is intended only for metadata tracking and should not affect speech output, but in practice it can introduce pauses if placed inside a word or phrase. For Japanese voices like Takumi, splitting the <mark> so it sits between words rather than mid‑word usually avoids unintended breaks. If you need precise pronunciation while still capturing mark positions, you can send two versions of the SSML—one with <mark> tags for timing metadata, and one clean version for audio generation. If the break persists even with tag repositioning, it’s worth opening a support case with AWS and including your SSML and audio samples so the Polly team can verify the behavior.

Thanks and regards,
Taz

answered a year ago

  • "Send two versions of the SSML—one with <mark> tags and one clean version", this solve the break issue, but the two versions seems not synced, the result mark timing metadata is not correct with long text.

0

The behavior you're experiencing with the <mark> tag affecting pronunciation in Amazon Polly is unexpected, as the <mark> tag should not influence how the text is spoken. According to the documentation, the <mark> tag is only meant to place a custom tag within the text, and Amazon Polly should take no action on the tag itself but simply return its location in the SSML metadata.

The <mark> tag is supported by long-form, neural, and standard TTS formats (though not for generative voices), but it should not alter pronunciation. It's designed purely for marking positions in the text for synchronization or other purposes.

To work around this issue, you could try:

  1. Using a different SSML structure that achieves your desired outcome without the <mark> tags
  2. If you need to mark positions in the text, consider placing the marks between words rather than within words
  3. Try using the <phoneme> tag to explicitly control the pronunciation of "みごしがたい" if you need to ensure it's pronounced without breaks
  4. If you need both the marking functionality and correct pronunciation, you might need to separate these concerns by using different SSML requests

If the issue persists, it may be worth reporting to AWS support as this appears to be unexpected behavior based on the documented functionality of the <mark> tag.
Sources
Placing a custom tag in your text - Amazon Polly

answered a year ago

0

Hey,

Hope you're keeping well.

The <mark> tag in Polly is meant for metadata timing, but when placed inside a word in Japanese it can trigger Polly’s text parser to treat it as a word boundary, causing a pause. The most reliable workaround is to position <mark> tags between words or punctuation rather than mid‑word. If you need exact timing without affecting pronunciation, you can generate audio from a clean SSML string and separately send a marked version for metadata tracking. If the pause still occurs despite careful placement, open an AWS Support case with your SSML and output so the Polly team can confirm if this is a parsing bug.

Thanks and regards,
Taz

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.