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 any way that I can pause..?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
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..
There is a way to pause. Just call
TextToSpeech.playSilence()
see the code below from here.It speaks some actual text along with some silence.
}