Forum Discussion
Using SSML for Text-to-Speech
Hello Matthew,
Happy to help!
Some of the tags in your script can only be used with Neural voices such as the "<amazon:domain name="news"/>" newscaster tag. I also saw some tags in your script that weren't in the correct format. After removing the unsupported tags, and correcting the ones with incorrect format, I found that this version of your script will now work using standard voices:
<speak>
Hello! <break time="500ms"/> This is an example of an SSML-enhanced text. <p>Paragraphs are separated by a natural pause in speech.</p> For phonetic pronunciation, use <phoneme alphabet="ipa" ph="tɛkst">text</phoneme>. This sentence is followed by a natural pause in speech. This is an **important** point. <prosody volume="+3dB">Highlight this part.</prosody> This is the 1st <say-as interpret-as="ordinal">first</say-as> example of using say-as. The <sub alias="World Wide Web Consortium">W3C</sub> is how you pronounce the abbreviation. <mark name="example_tag"/> <amazon:effect name="drc">This section has dynamic range compression for easier listening. </amazon:effect>This is a secret. <prosody volume="-5dB">Shh! It's a secret.</prosody>
</speak>
Note that the script above has the newscaster tag removed since it wasn't compatible when using standard voices.
You can check out this article for a full list of standard and neural voices, and here's a list of supported SSML tags as well as how to properly use them for your reference.
Hope this helps!