语音识别,离线垂直插槽,自定义的语句怎么设置?急!!!!
执迷丕悟 发布于2015-12 浏览:1353 回复:1
0
收藏

语音识别,离线垂直插槽,自定义的语句怎么设置?急!!!!


有很多词是同音字,或者相近的音,对于普通话不标准帮助很大,,


比如,站立,张丽,张力,掌力。。。。而我只想取‘站立’这个词,,

收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2水寒319回复于2016-01

离线槽设置可以参见如下代码,详细设置请参见官方给出的Demo

  1.    JSONObject slotData = new JSONObject();
  2.    JSONArray name = new JSONArray().put("张三").put("李四");
  3.    JSONArray song = new JSONArray().put("七里香").put("冰雨");
  4.    JSONArray artist = new JSONArray().put("周杰伦").put("刘德华");
  5.    JSONArray app = new JSONArray().put("手机百度").put("百度地图");
  6.    JSONArray usercommand = new JSONArray().put("关灯").put("开门");
  7.    try {
  8.        slotData.put("name", name);
  9.        slotData.put("song", song);
  10.        slotData.put("artist", artist);
  11.        slotData.put("app", app);
  12.        slotData.put("usercommand", usercommand);
  13.    } catch (JSONException e) {

  14.    }
  15.    intent.putExtra("slot-data", slotData.toString());


0
TOP
切换版块