语音离线识别命令词是怎么加的?
jwd_jh 发布于2015-12 浏览:2091 回复:1
0
收藏

private String buildTestSlotData() {

        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(Constant.EXTRA_OFFLINE_SLOT_NAME, name);

            slotData.put(Constant.EXTRA_OFFLINE_SLOT_SONG, song);

            slotData.put(Constant.EXTRA_OFFLINE_SLOT_ARTIST, artist);

            slotData.put(Constant.EXTRA_OFFLINE_SLOT_APP, app);

            slotData.put(Constant.EXTRA_OFFLINE_SLOT_USERCOMMAND, usercommand);

        } catch (JSONException e) {


        }

        return slotData.toString();

    }

recognizerIntent.putExtra(Constant.EXTRA_OFFLINE_SLOT_DATA, buildTestSlotData());

我按照demo的这种方式添加进去之后没有反应,这个应该怎么加?

收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2执迷丕悟回复于2015-12

我也遇到这个问题,加扣一起研究1639004472,,,其他不讨论这块的人员,请勿扰谢谢,,

0
TOP
切换版块