Can C# SAPI speak SSML string?

ぃ、小莉子 提交于 2019-12-05 18:49:54

What TTS engine/voice are you using? The Microsoft TTS engines definitely support SSML using the code that you're using; however, other voices/engines may not support SSML.

Error 0x80045003 is SPERR_UNSUPPORTED_FORMAT (The caller has specified an unsupported format), which leads me to believe that you need to use a different TTS engine (that supports SSML).

stromms

Use this flag instead

tts.Speak(ssmlString, SpeechLib.SpeechVoiceSpeakFlags.SVSFIsXML);

Tested using

  • SpeechLib 5.4
  • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Speech.dll
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!