Text for speech in android

I am new to android and I am trying to develop an application where, as soon as the text to speech is completed, an audio file should be played. Can anyone let me know how to do this. I checked some resources on the developer blog but failed.

Please help me with a sample code.

Any help would be appreciated. Thank you very much.

+4
source share
2 answers

I found a solution and is in the onUtteranceCompletedListener() method, we can know if speech is stopped or not, and then we can write code to play the audio file

+1
source

If I'm not mistaken, do you want to use text to speech to read text and store speech sound on the phone in the meantime? And later play the sound?

Did you tag AudioRecordTest ? You can record audio and then play it back later. It’s worth a try, but I don’t think you can get good quality from the microphone. Hope this helps :)

By the way, as far as I know, android only supports microphone recording for a phone without a root , which you can check here . Let me know if you can record the sound source from the Android system.
+1
source

All Articles