Pause in TTS android

后端 未结 2 1411
谎友^
谎友^ 2021-01-02 19:53

I\'m developing an app which would read out the text in the document and I want to add a pause and resume functionality but I can\'t find any pause() method in TTS. Is there

2条回答
  •  梦毁少年i
    2021-01-02 20:25

    the TextToSpeech class has the ability to add a setOnUtteranceCompletedListener (or for api level 15+ setOnUtteranceProgressListener) which will let you attach a listener for when the TTS utterence is completed and then you can start your second utterence, or your pause, or whatever you need..

提交回复
热议问题