Does Android TTS support Speech Synthesis Markup Language?

前端 未结 3 955
别跟我提以往
别跟我提以往 2020-12-09 11:55

Passing the following SSML (Speech Synthesis Markup Language) document to the com.svox.pico TextToSpeech engine resulted in a reading of the XML body but no control from the

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 12:21

    I've been experimenting with SSML and it seems that the TTS engine wraps its input automaticly with the root element, so if you leave it out, then it works fine and you don't get a parser error.

    Example:

    String text = "Testing .";
    mTts.speak(text, TextToSpeech.QUEUE_ADD, null);
    

提交回复
热议问题