-
Creator 版本: 2.4.6
-
目标平台:Android
-
重现方式:
毕现
pttSpeechToText
此接口用于将指定的语音文件翻译成文字。可以指定语言进行识别,也可以将语音中识别到的信息翻译成指定的语言返回。
函数原型
TencentGME.fn.pttStartRecordingWithStreamingRecognition = function(fileID: string, [speechLanguage: string, translateLanguage: string]) {...}
示例代码
var fileID = '*****';
tencentGME.tencentGMEInst.pttStartRecordingWithStreamingRecognition(fileID);
******已将示例代码改成 tencentGME.tencentGMEInst.pttSpeechToText(fileID);
******官方文档是否有误?api是pttSpeechToText,示例代码是pttStartRecordingWithStreamingRecognition。。。但是改为pttSpeechToText使用报错3000,文档无此错误码!
******官方文档链接:接口文档 · GitBook
-
首个报错:
eventType:5005
result:{“file_id”:"/data/user/0/org.cocos2d.demo/files/record_path.mp3",“result”:3000,“text”:""} -
之前哪个版本是正常的:毕现
-
手机型号:华为Mate 20
-
手机浏览器:
-
编辑器操作系统:
-
重现概率:100%