[6.2.0]BadCase增加语音转写

This commit is contained in:
xuxinchao
2023-11-06 20:52:53 +08:00
parent 0962d69dff
commit c851a8b7a9
13 changed files with 460 additions and 19 deletions

View File

@@ -44,14 +44,7 @@ class IFlyTekTts : IMogoTTS, InitListener {
override fun init(context: Context) {
this.context = context
// 应用程序入口处调用避免手机内存过小杀死后台进程后通过历史intent进入Activity造成SpeechUtility对象为null
// 如在Application中调用初始化需要在Mainifest中注册该Applicaiton
// 注意此接口在非主进程调用会返回null对象如需在非主进程使用语音功能请增加参数SpeechConstant.FORCE_LOGIN+"=true"
// 参数间使用半角“,”分隔。
// 设置你申请的应用appid,请勿在'='与appid之间添加空格及空转义符
// 注意: appid 必须和下载的SDK保持一致否则会出现10407错误
SpeechUtility.createUtility(context, "appid=0c498b42")
SpeechUtils.init(context)
ttsEngine = SpeechSynthesizer.createSynthesizer(context, this)
updateTtsParam()
voicerEntries = context.resources?.getStringArray(R.array.voicer_cloud_values)