Text to speech pattern in Android

后端 未结 2 1967
情深已故
情深已故 2020-12-22 06:16

I\'m trying to use TextToSpeech in my app.

I wrote it as a bound service. Problem appears when I need to read text before activity stops. It says just half of text

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 06:37

    Instead of just bind service, start your service using startService() and then bind. After reading the text in onUtteranceCompleted() call stopSelf().

提交回复
热议问题