代码如下:
var main = plus.android.runtimeMainActivity();
var speechUtility = plus.android.importClass('com.iflytek.cloud.SpeechUtility'); //导入科大讯飞语音包
console.log(speechUtility)
SpeechUtility.createUtility(main, "appid=讯飞appid");
var SynthesizerPlayer = plus.android.importClass('com.iflytek.cloud.SpeechSynthesizer');
var play = SynthesizerPlayer.createSynthesizer(main, null);
play.startSpeaking("早安", null);
引入了mui.js和plus.js,现在一直提示speechUtility未定义,appid是在讯飞开发者中心申请的
距离您98米
你在安卓8.1版本,播报正确吗?没有混乱?
2018-11-30 17:00