SSML or IPA TTS on Chrome

2019-06-28 06:46发布

问题:

o

I'm trying to make an app (for myself only) that will pronounce odd (fantasy) names properly. I found chrome's TTS api and W3C's SpeechSynthesis API however it would appear that Chrome strips all SSML tags before speaking the remaining text:

<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                   http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
         xml:lang="en-US">
  <!-- Phoneme representation is cut short to exaggerate problem -->
  <phoneme alphabet="ipa" ph="t&#x259;mei&#x325;"> tomato </phoneme>
</speak>
  • JSFiddle

How can I get the SSML in that JSFiddle to be pronounced properly in Chrome?

  • Related Chromium Bug about TTS
  • Resolved Chromium Bug about SpeechSynthesis (the fix was to strip SSML tags)

FYI I'm running windows so I can't use the mac-specific pronounication markup.

Thanks in advance!