VoConXX项目语音接口定义

  1. Json Interface
    1. @公共属性
      1. domain:
    2. @grammer
      1. 1.电话
        1. 1.1 打电话给张三:
          1. domain:"phone"
          2. command:"phone_call_name"
        2. 1.2 拨打移动客服的电话
          1. domain:"phone"
          2. command:"phone_call_name"
      2. 2.查找定位
        1. 2.1 我现在在哪里:
          1. domain:"navi"
          2. command:"navi_locate_me"
        2. 2.2 我要查<POI名称>的位置:
          1. domain:"navi"
          2. command:"navi_search_poi"
      3. 3.导航
        1. 3.1 导航到家:
          1. request: {domain:"navi",command:"navi_home"}
          2. response: {type:"boolean",value:"true"}
        2. 3.2 导航到公司:
          1. request: {domain:"navi",command:"navi_office"}
          2. response: {type:"boolean",value:"true"}
        3. 3.3 到北京北海公园怎么走:
          1. request: {domain:"navi",command:"navi_to_poi"}
          2. response: {type:"boolean",value:"true"}
        4. 3.4 从新华学院导航到科大讯飞:
          1. request: {domain:"navi",command:"navi_a2b",from:"新华学院",to:"科大讯飞"}
          2. response: {type:"boolean",value:"true"}
      4. 4.周边查询
        1. 4.1 查找附近的加油站:
          1. request: {domain:"navi",command:"navi_nearby",category:"加油站"}
          2. response: {type:"boolean",value:"true"}
      5. 5.餐饮查询
        1. 5.1 合肥有海底捞火锅吗:
          1. request: {domain:"navi",command:"navi_search_info_by_location",location:"合肥",info:"海底捞火锅"}
          2. response: {type:"boolean",value:"true"}
        2. 5.2 合肥大学城附近有什么好吃的:
          1. request: {domain:"navi",command:"navi_search_nearby_food",location:"合肥大学城"}
          2. response: {type:"boolean",value:"true"}
      6. 6.音乐
        1. 6.1 来一首飞得更高:
          1. request: {domain:"media",command:"media_play_song",name:"飞得更高"}
          2. response: {type:"boolean",value:"true"}
        2. 6.2 我想听刘德华的歌:
          1. request: {domain:"music",command:"media_play_artist",name:"刘德华"}
          2. response: {type:"boolean",value:"true"}
        3. 6.3 播放张学友的吻别:
          1. request: {domain:"music",command:"media_play_artist_song",artist:"张学友",name:"吻别"}
          2. response: {type:"boolean",value:"true"}
      7. 7.收音机
        1. 7.1. 调频<频率>:
          1. request: {domain:"radio",command:"radio_play",type:"fm",freq:"75.8"}
          2. response: {type:"boolean",value:"true"}
        2. 7.2 听AM<频率>:
          1. request: {domain:"music",command:"radio_play",type:"am",freq:"88.8"}
          2. response: {type:"boolean",value:"true"}
      8. 8.应用
        1. 8.1 关闭radio,setup,sd,usb,蓝牙:
          1. request: {domain:"system",command:"system_close_app",app:"radio"}
          2. response: {type:"boolean",value:"true"}
        2. 8.2 打开radio,setup,sd,usb,蓝牙:
          1. request: {domain:"system",command:"system_open_app",app:"setup"}
          2. response: {type:"boolean",value:"true"}
      9. 9.查看天气
        1. 9.1 合肥的天气:
          1. request: {domain:"info",command:"info_query_weather_by_location",location:"合肥",date:"today"}
          2. response: {type:"boolean",value:"true"}
        2. 9.2 明天的天气:
          1. request: {domain:"info",command:"info_query_weather_by_date",location:<当地>,date:"明天"}
          2. response: {type:"boolean",value:"true"}
      10. 10.查询股票
        1. 10.1 科大讯飞的股票:
          1. request: {domain:"info",command:"info_query_stock",name:"科大讯飞"}
          2. response: {type:"boolean",value:"true"}
        2. 10.2今天有什么新闻:
          1. request: {domain:"info",command:"info_query_news"}
          2. response: {type:"boolean",value:"true"}
    3. @Event
      1. 1.ADB_CHANGED(联系人数据改变)
        1. request: {"data":[{"name":"周星驰","number":"18664876864"},{"name":"刘德华","number":"13510904734"}],"event":"adb_changed"}
      2. 2.MME_CHANGED(媒体数据改变)
        1. request: {"data":[{"artist":"刘德华","name":"忘情水"}],"event":"mme_changed"}
    4. @System Call
      1. 1.Phone
        1. 1.1 phone_is_state_ok(判断电话状态是否正常)
          1. request: {domain:"phone",command:"phone_is_state_ok"}
          2. response: {type:"boolean",value:"true"}
        2. 1.2 phone_call_name(拨打联系人姓名)
          1. request: {"command":"phone_call_name","domain":"phone","contact":{"name":"吴德宏","number":"18664876864"}}
          2. response: {type:"boolean",value:"true"}
      2. 2.Navi
        1. 2.1 navi_locate_me(当前位置定位)
          1. request: {domain:"navi",command:"navi_locate_me"}
          2. response: {type:"boolean",value:"true"}
        2. 2. navi_search_poi(查找POI)
          1. request: {domain:"navi",command:"navi_search_poi",keyword:"<POI>"}
          2. response: {type:"boolean",value:"true"}
        3. 2. navi_home(导航到家)
          1. request: {domain:"navi",command:"navi_home"}
          2. response: {type:"boolean",value:"true"}
        4. 2. navi_office(导航到公司)
          1. request: {domain:"navi",command:"navi_office"}
          2. response: {type:"boolean",value:"true"}
        5. 2. navi_to_poi(从出发地导航到目的地)
          1. request: {domain:"navi",command:"navi_to_poi",to:"北京北海公园"}
          2. response: {type:"boolean",value:"true"}
        6. 2. navi_a2b(从位置A到位置B)
          1. request: {domain:"navi",command:"navi_a2b",from:"新华学院",to:"科大讯飞"}
          2. response: {type:"boolean",value:"true"}
        7. 2. navi_nearby(查找附近的POI)
          1. request: {domain:"navi",command:"navi_nearby",category:"加油站"}
          2. response: {type:"boolean",value:"true"}
        8. 2. navi_search_info_by_location(餐饮-查询商家名称)
          1. request: {domain:"navi",command:"navi_search_info_by_location",location:"合肥",name:"海底捞火锅"}
          2. response: {type:"boolean",value:"true"}
        9. 2. navi_search_nearby_food(位置信息餐饮查询)
          1. request: {domain:"navi",command:"navi_search_nearby_food",location:"合肥大学城"}
          2. response: {type:"boolean",value:"true"}
      3. 3.Media
        1. 3. media_play_song(歌名搜索)
          1. request: {domain:"media",command:"media_play_song",name:"飞得更高"}
          2. response: {type:"boolean",value:"true"}
        2. 3. media_play_artist(歌手搜索)
          1. request: {domain:"media",command:"media_play_artist",artist:"刘德华"}
          2. response: {type:"boolean",value:"true"}
        3. 3. media_play_artist_song(歌名+歌手搜索)
          1. request: {domain:"media",command:"media_play_artist_song",artist:"张学友",name:"吻别"}
          2. response: {type:"boolean",value:"true"}
      4. 4.Radio
        1. 4. radio_play(FM<频率>、AM<频率>)
          1. request: {domain:"radio",command:"radio_play",type:"fm",freq:"75.8"}
          2. response: {type:"boolean",value:"true"}
      5. 5.System
        1. 5. system_close_app(关闭应用)
          1. request: {domain:"system",command:"system_close_app",app:"Radio"}
          2. response: {type:"boolean",value:"true"}
        2. 5. system_open_app(打开应用)
          1. request: {domain:"system",command:"system_open_app",app:"Setup"}
          2. response: {type:"boolean",value:"true"}
      6. 6.Info
        1. 6. info_query_weather(查询地区天气信息)
          1. request: {domain:"info",command:"info_query_weather",location:"合肥",date:"today"}
          2. response: {type:"boolean",value:"true"}
        2. 6. info_query_stock(查询指定股票行情)
          1. request: {domain:"info",command:"info_query_stock",name:"科大讯飞"}
          2. response: {type:"boolean",value:"true"}
        3. 6. info_query_news(播报新闻)
          1. request: {domain:"info",command:"info_query_news"}
          2. response: {type:"boolean",value:"true"}

Json Interface

@公共属性

domain:

  • phone
  • navi
  • media
  • system
  • radio
  • info

@grammer

1.电话

1.1 打电话给张三:

domain:"phone"
command:"phone_call_name"

1.2 拨打移动客服的电话

domain:"phone"
command:"phone_call_name"

2.查找定位

2.1 我现在在哪里:

domain:"navi"
command:"navi_locate_me"

2.2 我要查<POI名称>的位置:

domain:"navi"
command:"navi_search_poi"

3.导航

3.1 导航到家:

request: {domain:"navi",command:"navi_home"}
response: {type:"boolean",value:"true"}

3.2 导航到公司:

request: {domain:"navi",command:"navi_office"}
response: {type:"boolean",value:"true"}

3.3 到北京北海公园怎么走:

request: {domain:"navi",command:"navi_to_poi"}
response: {type:"boolean",value:"true"}

3.4 从新华学院导航到科大讯飞:

request: {domain:"navi",command:"navi_a2b",from:"新华学院",to:"科大讯飞"}
response: {type:"boolean",value:"true"}

4.周边查询

4.1 查找附近的加油站:

request: {domain:"navi",command:"navi_nearby",category:"加油站"}
response: {type:"boolean",value:"true"}

5.餐饮查询

5.1 合肥有海底捞火锅吗:

request: {domain:"navi",command:"navi_search_info_by_location",location:"合肥",info:"海底捞火锅"}
response: {type:"boolean",value:"true"}

5.2 合肥大学城附近有什么好吃的:

request: {domain:"navi",command:"navi_search_nearby_food",location:"合肥大学城"}
response: {type:"boolean",value:"true"}

6.音乐

6.1 来一首飞得更高:

request: {domain:"media",command:"media_play_song",name:"飞得更高"}
response: {type:"boolean",value:"true"}

6.2 我想听刘德华的歌:

request: {domain:"music",command:"media_play_artist",name:"刘德华"}
response: {type:"boolean",value:"true"}

6.3 播放张学友的吻别:

request: {domain:"music",command:"media_play_artist_song",artist:"张学友",name:"吻别"}
response: {type:"boolean",value:"true"}

7.收音机

7.1. 调频<频率>:

request: {domain:"radio",command:"radio_play",type:"fm",freq:"75.8"}
response: {type:"boolean",value:"true"}

7.2 听AM<频率>:

request: {domain:"music",command:"radio_play",type:"am",freq:"88.8"}
response: {type:"boolean",value:"true"}

8.应用

8.1 关闭radio,setup,sd,usb,蓝牙:

request: {domain:"system",command:"system_close_app",app:"radio"}
response: {type:"boolean",value:"true"}

8.2 打开radio,setup,sd,usb,蓝牙:

request: {domain:"system",command:"system_open_app",app:"setup"}
response: {type:"boolean",value:"true"}

9.查看天气

9.1 合肥的天气:

request: {domain:"info",command:"info_query_weather_by_location",location:"合肥",date:"today"}
response: {type:"boolean",value:"true"}

9.2 明天的天气:

request: {domain:"info",command:"info_query_weather_by_date",location:<当地>,date:"明天"}
response: {type:"boolean",value:"true"}

10.查询股票

10.1 科大讯飞的股票:

request: {domain:"info",command:"info_query_stock",name:"科大讯飞"}
response: {type:"boolean",value:"true"}

10.2今天有什么新闻:

request: {domain:"info",command:"info_query_news"}
response: {type:"boolean",value:"true"}

@Event

1.ADB_CHANGED(联系人数据改变)

request: {"data":[{"name":"周星驰","number":"18664876864"},{"name":"刘德华","number":"13510904734"}],"event":"adb_changed"}


2.MME_CHANGED(媒体数据改变)

request: {"data":[{"artist":"刘德华","name":"忘情水"}],"event":"mme_changed"}

@System Call

1.Phone

1.1 phone_is_state_ok(判断电话状态是否正常)

request: {domain:"phone",command:"phone_is_state_ok"}
response: {type:"boolean",value:"true"}

1.2 phone_call_name(拨打联系人姓名)

request: {"command":"phone_call_name","domain":"phone","contact":{"name":"吴德宏","number":"18664876864"}}
response: {type:"boolean",value:"true"}

2.Navi

2.1 navi_locate_me(当前位置定位)

request: {domain:"navi",command:"navi_locate_me"}
response: {type:"boolean",value:"true"}

2. navi_search_poi(查找POI)

request: {domain:"navi",command:"navi_search_poi",keyword:"<POI>"}
response: {type:"boolean",value:"true"}

2. navi_home(导航到家)

request: {domain:"navi",command:"navi_home"}
response: {type:"boolean",value:"true"}

2. navi_office(导航到公司)

request: {domain:"navi",command:"navi_office"}
response: {type:"boolean",value:"true"}

2. navi_to_poi(从出发地导航到目的地)

request: {domain:"navi",command:"navi_to_poi",to:"北京北海公园"}
response: {type:"boolean",value:"true"}

2. navi_a2b(从位置A到位置B)

request: {domain:"navi",command:"navi_a2b",from:"新华学院",to:"科大讯飞"}
response: {type:"boolean",value:"true"}

2. navi_nearby(查找附近的POI)

request: {domain:"navi",command:"navi_nearby",category:"加油站"}
response: {type:"boolean",value:"true"}

2. navi_search_info_by_location(餐饮-查询商家名称)

request: {domain:"navi",command:"navi_search_info_by_location",location:"合肥",name:"海底捞火锅"}
response: {type:"boolean",value:"true"}

2. navi_search_nearby_food(位置信息餐饮查询)

request: {domain:"navi",command:"navi_search_nearby_food",location:"合肥大学城"}
response: {type:"boolean",value:"true"}

3.Media

3. media_play_song(歌名搜索)

request: {domain:"media",command:"media_play_song",name:"飞得更高"}
response: {type:"boolean",value:"true"}

3. media_play_artist(歌手搜索)

request: {domain:"media",command:"media_play_artist",artist:"刘德华"}
response: {type:"boolean",value:"true"}

3. media_play_artist_song(歌名+歌手搜索)

request: {domain:"media",command:"media_play_artist_song",artist:"张学友",name:"吻别"}
response: {type:"boolean",value:"true"}

4.Radio

4. radio_play(FM<频率>、AM<频率>)

request: {domain:"radio",command:"radio_play",type:"fm",freq:"75.8"}
response: {type:"boolean",value:"true"}

5.System

5. system_close_app(关闭应用)

request: {domain:"system",command:"system_close_app",app:"Radio"}
response: {type:"boolean",value:"true"}

5. system_open_app(打开应用)

request: {domain:"system",command:"system_open_app",app:"Setup"}
response: {type:"boolean",value:"true"}

6.Info

6. info_query_weather(查询地区天气信息)

request: {domain:"info",command:"info_query_weather",location:"合肥",date:"today"}
response: {type:"boolean",value:"true"}

6. info_query_stock(查询指定股票行情)

request: {domain:"info",command:"info_query_stock",name:"科大讯飞"}
response: {type:"boolean",value:"true"}

6. info_query_news(播报新闻)

request: {domain:"info",command:"info_query_news"}
response: {type:"boolean",value:"true"}

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 wilber_bai@hotmail.com

文章标题:VoConXX项目语音接口定义

文章字数:1,037

本文作者:风沉殇史

发布时间:2017-12-12, 12:12:12

最后更新:2018-06-21, 16:20:40

原始链接:http://wilber.win/posts/9f1d4f9e/

版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。

目录
×

喜欢就点赞,疼爱就打赏