初始化框架,完成扫描回调,语音接口
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
package chaoran.business.application;
|
||||
|
||||
/*
|
||||
**********************************************
|
||||
* DATE PERSON REASON
|
||||
* 2021-02-08 FXY Created
|
||||
**********************************************
|
||||
*/
|
||||
|
||||
|
||||
import android.app.Application;
|
||||
import chaoran.business.R;
|
||||
import com.iflytek.cloud.SpeechConstant;
|
||||
import com.iflytek.cloud.SpeechUtility;
|
||||
|
||||
public class InitApplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
//讯飞离线语音配置
|
||||
StringBuffer param = new StringBuffer();
|
||||
param.append("appid=" + getString(R.string.app_id));
|
||||
param.append(",");
|
||||
// 设置使用v5+
|
||||
param.append(SpeechConstant.ENGINE_MODE + "=" + SpeechConstant.MODE_MSC);
|
||||
SpeechUtility.createUtility(this, param.toString());
|
||||
super.onCreate();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user