Android TTS fails to speak large amount of text

后端 未结 5 1395
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 05:01

I am trying to speak out large amount of text using Android Text To Speech. I using default Google speech engine. Below is my code.

 public class Talk extend         


        
5条回答
  •  不知归路
    2021-01-02 05:08

    It is worse than the 4000 characters limit in practice on Android. There are some TTS engines that limit the input length a lot more. For example Nuance.tts and vocalizer.tts engines won't speak any string longer than about 512 characters (from my tests some time ago). Today I hit a limit of below 300 characters in es.codefactory.eloquencetts package, which simply crashes if the string I send to it is more than 256-300 characters. I divide the contents into sentences, and guard for sentences longer than the above limit, further sub-dividing them in my app code.

    Greg

提交回复
热议问题