Android的TTS音量控制 [英] Android TTS volume control

查看:2711
本文介绍了Android的TTS音量控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法发送请求到TTS引擎时控制TTS引擎的音量?可我能使用AudioManager这里?

Is there any way to control volume of TTS engine when sending request to TTS engine? Can I able to use AudioManager here?

感谢你。

推荐答案

是的,你的问题问,你能使用的 AudioManager 的TTS声音。

Yes, as your question asks, you are able to use AudioManager for TTS audio.

如果你想在你的code设置音量,你要使用 getStreamVolume() setStreamVolume()的方法。

If you want to set volume in your code, you'll want to use the getStreamVolume() and setStreamVolume() methods.

如果你想给在该卷的用户控件(这可能取决于如何/当你的程序设置音量),这个问题指出,你必须叫 setVolumeControlStream()的OnCreate()

If you want to give the user control over the volume (this may depend on how/when your program sets volume), this question points out that you have to call setVolumeControlStream() during OnCreate().

编辑:并没有,你无法控制TTS引擎的的方法(即在线()法)。

And no, you cannot control volume within the TTS engine's methods (i.e. the Speak() method).

这篇关于Android的TTS音量控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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