语音识别,离线垂直插槽,自定义的语句怎么设置?急!!!!
有很多词是同音字,或者相近的音,对于普通话不标准帮助很大,,
比如,站立,张丽,张力,掌力。。。。而我只想取‘站立’这个词,,
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块
离线槽设置可以参见如下代码,详细设置请参见官方给出的Demo
JSONObject slotData = new JSONObject();
JSONArray name = new JSONArray().put("张三").put("李四");
JSONArray song = new JSONArray().put("七里香").put("冰雨");
JSONArray artist = new JSONArray().put("周杰伦").put("刘德华");
JSONArray app = new JSONArray().put("手机百度").put("百度地图");
JSONArray usercommand = new JSONArray().put("关灯").put("开门");
try {
slotData.put("name", name);
slotData.put("song", song);
slotData.put("artist", artist);
slotData.put("app", app);
slotData.put("usercommand", usercommand);
} catch (JSONException e) {
}
intent.putExtra("slot-data", slotData.toString());