在Android中完成“文字转语音"后立即播放音频文件 [英] Play an audio file as soon as Text To Speech is completed in Android

查看:324
本文介绍了在Android中完成“文字转语音"后立即播放音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个Android应用程序,在该程序中,一旦文本到语音转换完成,就必须播放音频文件.该怎么做?

I'm trying to develop an Android app where as soon as the text to speech is completed an audio file has to be played. How to do this?

推荐答案

我找到了解决方案,即在方法onUtteranceCompletedListener()中我们可以知道语音是否停止,然后可以编写代码播放音频文件

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

这篇关于在Android中完成“文字转语音"后立即播放音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆