简体中文
将以下文件放入工程的libs下
路径 | 文件名 |
---|---|
SDK\libs | speech-release.aar、speech_baidu-release.aar |
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<meta-data android:name="com.baidu.speech.APP_ID" android:value="${百度语音申请的appid}"/>
<meta-data android:name="com.baidu.speech.API_KEY" android:value="${百度语音申请的apikey}"/>
<meta-data android:name="com.baidu.speech.SECRET_KEY" android:value="${百度语音申请的secretkey}"/>
<service android:name="com.baidu.speech.VoiceRecognitionService" android:exported="false" />
dcloud_properties.xml文件在assets/data目录下
<feature name="Speech" value="io.dcloud.feature.speech.SpeechFeatureImpl">
<module name="baidu" value="io.dcloud.feature.speech.BaiduSpeechEngine"/>
</feature>
将以下文件放入工程的libs下
路径 | 文件名 |
---|---|
SDK\libs | speech-release.aar、speech_ifly-release.aar |
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<meta-data
android:name="IFLY_APPKEY"
android:value="${讯飞语音申请的appid}" />
dcloud_properties.xml文件在assets/data目录下
<feature name="Speech" value="io.dcloud.feature.speech.SpeechFeatureImpl">
<module name="iFly" value="io.dcloud.feature.speech.IflySpeechEngine"/>
</feature>