企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### 3.4.11 冥想音乐 #### (1)功能说明 冥想音乐能够让你随着空灵的声音快速放松精神,帮助你进入专注的状态。精选9个高质量冥想音乐让你跟着音符,忘记疲惫和忧伤,释放焦虑和烦忧。 #### (2)接口说明 **请求方法** * POST **请求地址** * http://api.ruyi.ai/v1/message **请求参数说明** |参数名 |参数类型 | 是否必须 |参数说明 | :-----| :---| :---:|:----- |q |String| 是| 自然语言表达,例如“我要冥想”等 |app_key| String|是 |应用开发者秘钥,注册开发者后台账号,建立虚拟助理后获得 |user_id |String| 是 |用户唯一标识,便于支持个性化语义解析。建议开发者使用 UUID 字符,且不同用户必须用不同的 user_id,防止意图串。 #### (3)返回说明 **返回参数说明** |名称 |类型| 说明 |:---|:---|:--- |code |Integer | 返回代码 |msg | String |返回代码描述 |parameters|JSON Object |解析到的实体以及服务说明 |action|String|服务的接口名称 |name| String|匹配的意图名称 |result | JSON Object| 接口返回内容 |outputs| Array| 服务输出结果,微信端使用 type 类型为 wechat 开头的内容;硬件端收到所有内容,依据需求解析使用 **返回代码说明** |返回代码 |错误类型|说明 |:---|:---|:--- |0/200 |成功 |请求成功 |400 |无效请求 |某些必需参数缺失或参数值错误,详见msg字段 |401 |未授权 |授权失败,app_key缺失或错误 |403 |请求被禁止|有效请求,但服务拒绝响应,请联系contact@ruyi.ai |408 |请求超时 |请求响应超时,一般响应时间设置为2000ms以内 |429 |短时间内大量访问 |短时间内请求数过多 |500 |内部错误 |服务处理异常 |503 |服务不可用|服务异常或正在维护 #### (4)请求示例 **请求范例** _我要冥想_ _换一个_ _换个鸟叫声_ **请求示例** (打开冥想音乐) * http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=我要冥想 返回结果 ```json { "code": 0, "msg": "ok", "result": { "_text": "我要冥想", "msg_id": "8633062b-6821-4ef0-9236-f19bd4b2bd72", "intents": [ { "parameters": { "soundid": "37730296;37730297;13102995;13102998,9594998,9594996,9594994,10264556,10264213,10264211,10264209,10263749,10263064,10263593,10263594,10263733,10263347,10265132,12686512,10264671,199,9529804,9529819,10395078,2892133,9874061,2900953,288214", "any": "我要", "service": "meditation music" }, "action": "sys.action.xmly/random/soundid", "name": "唤醒v1", "result": { "id": "xmly:sound:10263594", "html_link": "http://www.ximalaya.com/sound/10263594", "source": "喜马拉雅", "source_link": "http://www.ximalaya.com/", "sound_id": "10263594", "title": "Rain downpour fluctuates", "media_url": "http://audio.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJPjBnmDAAePQwem9YI302.m4a", "cover_url": "http://fdfs.xmcdn.com/group11/M0A/CF/8F/wKgDbVZkLhPCPtLfAAGqf9dgFcQ717_mobile_small.jpg", "mp3_audio_url": "http://fdfs.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJOx56soAAO6tZjyrW8718.mp3", "album": "酸爽!暴雨!!", "album_id": "3260172", "type": "sound", "tracks": { "id": 10263594, "kind": "track", "category_id": 2, "track_title": "Rain downpour fluctuates", "track_tags": "3D奇妙体验馆", "track_intro": "酸爽!暴雨!!", "cover_url_small": "http://fdfs.xmcdn.com/group11/M0A/CF/8F/wKgDbVZkLhPCPtLfAAGqf9dgFcQ717_mobile_small.jpg", "cover_url_middle": "http://fdfs.xmcdn.com/group11/M0A/CF/8F/wKgDbVZkLhPCPtLfAAGqf9dgFcQ717_web_large.jpg", "cover_url_large": "http://fdfs.xmcdn.com/group11/M0A/CF/8F/wKgDbVZkLhPCPtLfAAGqf9dgFcQ717_mobile_large.jpg", "announcer": { "id": 1014416, "kind": "user", "nickname": "Timmy_Mao", "avatar_url": "http://fdfs.xmcdn.com/group6/M02/C3/57/wKgDhFUTO7Kgdw91AACC-gTuZoA032_web_large.jpg", "is_verified": true }, "duration": 60, "play_count": 71017, "favorite_count": 120, "comment_count": 46, "can_download": true, "order_num": 1, "subordinated_album": { "id": 3260172, "album_title": "酸爽!暴雨!!", "cover_url_small": "http://fdfs.xmcdn.com/group15/M0A/C3/0E/wKgDZVZkLUCT2FD1AAEwc_b-P_4132_mobile_small.jpg", "cover_url_middle": "http://fdfs.xmcdn.com/group15/M0A/C3/0E/wKgDZVZkLUCT2FD1AAEwc_b-P_4132_mobile_meduim.jpg", "cover_url_large": "http://fdfs.xmcdn.com/group15/M0A/C3/0E/wKgDZVZkLUCT2FD1AAEwc_b-P_4132_mobile_large.jpg" }, "source": 2, "updated_at": 1481397732000, "created_at": 1448448179000, "is_paid": false, "is_free": false, "is_trailer": false, "has_sample": false, "sample_duration": 0, "play_url_32": "http://fdfs.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJOx56soAAO6tZjyrW8718.mp3", "play_size_32": 244405, "play_url_64": "http://fdfs.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJTjq282AAd0LQ22pqY215.mp3", "play_size_64": 488493, "play_url_24_m4a": "http://audio.xmcdn.com/group12/M06/A9/D8/wKgDW1ZVkJKTqVKLAALl5-P4oWs606.m4a", "play_size_24_m4a": 189927, "play_url_64_m4a": "http://audio.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJPjBnmDAAePQwem9YI302.m4a", "play_size_64_m4a": 495427, "play_url_amr": "group23/M08/AE/FE/wKgJL1hMVeTitQJWAADWetbO2j0546.amr", "play_size_amr": 54906, "download_url": "http://download.xmcdn.com/group12/M06/A9/D8/wKgDW1ZVkJOTOrIQAAPdgE-GQgs175.aac", "download_size": 253312, "download_count": 0 }, "current_order_num": 1, "match_rule": "suggest", "track_list": [ { "track_title": "Garden of happiness II (mitNaturgeräuschen)-Largo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group26/M02/8B/82/wKgJRlkVFiDhBZN_ADfsD6tteyA640.m4a", "announcer": "瑜伽音乐台", "track_id": 37730296, "order_num": 0, "album_id": "8079478" }, { "track_title": "The singing garden-Largo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group26/M02/8B/83/wKgJRlkVFizDl9vGADXMvTNWvmM154.m4a", "announcer": "瑜伽音乐台", "track_id": 37730297, "order_num": 1, "album_id": "8079478" }, { "track_title": "05.Running Water自来水", "album_title": "「自然环境音响」易经:沼地明月", "cover_url": "http://fdfs.xmcdn.com/group14/M07/20/58/wKgDY1bkPjPxknDbAAE0J60Cl_Y441_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group15/M02/1D/C5/wKgDaFbkPSLBwQLIACLFpJFApLA203.m4a", "announcer": "聽濤觀海", "track_id": 13102995, "order_num": 4, "album_id": "3858324" }, { "track_title": "08.Beauty is Everywhere美无处不在", "album_title": "「自然环境音响」易经:沼地明月", "cover_url": "http://fdfs.xmcdn.com/group14/M07/20/58/wKgDY1bkPjPxknDbAAE0J60Cl_Y441_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group11/M01/11/29/wKgDa1bkPbqC8KijADCJYIj1lCM126.m4a", "announcer": "聽濤觀海", "track_id": 13102998, "order_num": 7, "album_id": "3858324" }, { "track_title": "Streamside Songbirds", "album_title": "穿过风穿过森林穿过大自然", "cover_url": "http://fdfs.xmcdn.com/group16/M08/90/0B/wKgDalYybVuguTiPAAG6JVqCiPU397_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group14/M02/8F/F7/wKgDZFYybZ3Byqg5ALRtvxO6yFQ585.m4a", "announcer": "声音百科", "track_id": 9594998, "order_num": 0, "album_id": "3123474" }, { "track_title": "Pleasant Beach", "album_title": "穿过风穿过森林穿过大自然", "cover_url": "http://fdfs.xmcdn.com/group16/M08/90/0B/wKgDalYybVuguTiPAAG6JVqCiPU397_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group12/M00/8F/70/wKgDXFYybZDQ0fyjAJDrYq3ozKQ698.m4a", "announcer": "声音百科", "track_id": 9594996, "order_num": 1, "album_id": "3123474" }, { "track_title": "Gentle Rain", "album_title": "穿过风穿过森林穿过大自然", "cover_url": "http://fdfs.xmcdn.com/group16/M08/90/0B/wKgDalYybVuguTiPAAG6JVqCiPU397_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group14/M02/90/38/wKgDY1YybZXiC3a8ACH4KhMuwvQ779.m4a", "announcer": "声音百科", "track_id": 9594994, "order_num": 2, "album_id": "3123474" }, { "track_title": "雷雨", "album_title": "戴着耳机听雨声", "cover_url": "http://fdfs.xmcdn.com/group7/M00/C5/B6/wKgDWlZk4PDi6I_WAABMhw1nmUI562_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group11/M0B/B6/1C/wKgDbVZVmb_A_qw9AEoYRgYLSn0373.m4a", "announcer": "呀呀呀土豆", "track_id": 10264556, "order_num": 6, "album_id": "3260371" }, { "track_title": "辽阔的水流", "album_title": "水声也能如此悦耳", "cover_url": "http://fdfs.xmcdn.com/group11/M00/B6/75/wKgDa1ZkJKviFqO4AAHA6G2OM6I113_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group9/M00/AA/32/wKgDZlZVl_Xx-iFWAAfOrSDpGJM881.m4a", "announcer": "Timmy_Mao", "track_id": 10264213, "order_num": 0, "album_id": "3260235" }, { "track_title": "小溪", "album_title": "水声也能如此悦耳", "cover_url": "http://fdfs.xmcdn.com/group7/M0A/C4/CD/wKgDX1ZkJUSRCdUaAARYpRccIHk997_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group7/M04/AA/D0/wKgDX1ZVl1_y3gUMABRCUlk94_8025.m4a", "announcer": "Timmy_Mao", "track_id": 10264211, "order_num": 2, "album_id": "3260235" } ], "text": "安然地冥想音乐帮你摆脱心念的滋扰,自然的雨声、鸟声、海浪声和流水声,随你点播" }, "outputs": [ { "type": "wechat.music", "property": { "title": "Rain downpour fluctuates", "description": "酸爽!暴雨!!", "music_url": "http://audio.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJPjBnmDAAePQwem9YI302.m4a" } }, { "type": "wechat.text", "property": { "text": "安然地憩息在舒心的冥想音乐中,摆脱心念的滋扰而得庇护" } }, { "type": "voice", "property": { "name": "喜马拉雅", "voice_url": "http://audio.xmcdn.com/group12/M06/A9/AD/wKgDXFZVkJPjBnmDAAePQwem9YI302.m4a" } }, { "type": "dialog", "property": { "text": "安然地冥想音乐帮你摆脱心念的滋扰,自然的雨声、鸟声、海浪声和流水声,随你点播", "emotion": "happy" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "97371051-83da-4f43-aa4c-2f1dbaf3f0d1", "id": "1ba6472e-92d2-4172-81aa-ac22377682fb" } ], "meta_process_milliseconds": 393 } } ``` **请求示例** (切换冥想音乐) * http://api.ruyi.ai/ruyi-api/v1/message?app_key=APP_KEY&user_id=user0&q=换一个 返回结果 ```json { "code": 0, "msg": "ok", "result": { "_text": "换一个", "msg_id": "214b4c9c-6ca7-4cd2-a660-78f97e746c9b", "intents": [ { "parameters": { "soundid": "37730297;37730298;37730299;37730301;39486284;39486283;39486282;39486281;8155113", "service": "meditation music" }, "action": "sys.action.xmly/random/soundid", "name": "切换", "result": { "id": "xmly:sound:39486281", "html_link": "http://www.ximalaya.com/sound/39486281", "source": "喜马拉雅", "source_link": "http://www.ximalaya.com/", "sound_id": "39486281", "title": "The Sacred Shrine-Dan Gibson", "media_url": "http://audio.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sTy_N2bACyAgXAsHcY843.m4a", "cover_url": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "mp3_audio_url": "http://fdfs.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sXyb34-ABX61vu-MAA713.mp3", "album": "聆听大自然", "album_id": "8398042", "type": "sound", "tracks": { "id": 39486281, "kind": "track", "category_id": 2, "track_title": "The Sacred Shrine-Dan Gibson", "track_tags": "", "track_intro": "您听见的动物: 第一、二首:美洲家朱雀、巴尔的摩黄鹂。第三首:棕色夜鸫、白喉带雀、史温森夜鸫、黑顶山雀、橙顶杜鸫。第四首:春雨蛙。第五、六首:黄眉水鸫、红胸五十雀、冬鹪鹩、橙顶杜鸫、红眼绿鹃、白喉带雀。第七、八、九首:白喉带雀、玫胸白翅斑雀、双色树燕、红翅黑鹂、红玉冠戴菊、黄色林莺、黑纹胸林莺、牛蛙、白喉带雀、普通美洲黄喉地莺、栗胁林莺。第十首:旅鸫、红胸五十雀、红眼绿鹃。第十一首:史温森夜鸫、橙顶杜鸫、短嘴鸦、红眼绿鹃、白喉带雀。第十二首:篱雀、加拿大威森莺。第十三首:玫胸白翅斑雀、孤绿鹃。", "cover_url_small": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "cover_url_middle": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_web_large.jpg", "cover_url_large": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_large.jpg", "announcer": { "id": 61430543, "kind": "user", "nickname": "瑜伽音乐台", "avatar_url": "http://fdfs.xmcdn.com/group17/M04/6E/CF/wKgJKVf8nLqAa1lTAAXpPTEhrG8628_web_large.jpg", "is_verified": true }, "duration": 360, "play_count": 1527, "favorite_count": 0, "comment_count": 0, "can_download": true, "order_num": 3, "subordinated_album": { "id": 8398042, "album_title": "聆听大自然", "cover_url_small": "http://fdfs.xmcdn.com/group29/M06/17/DA/wKgJXVkv5wDAe5eUAAA4CXxDuig382_mobile_small.jpg", "cover_url_middle": "http://fdfs.xmcdn.com/group29/M06/17/DA/wKgJXVkv5wDAe5eUAAA4CXxDuig382_mobile_meduim.jpg", "cover_url_large": "http://fdfs.xmcdn.com/group29/M06/17/DA/wKgJXVkv5wDAe5eUAAA4CXxDuig382_mobile_large.jpg" }, "source": 1, "updated_at": 1496317460000, "created_at": 1496311658000, "is_paid": false, "is_free": false, "is_trailer": false, "has_sample": false, "sample_duration": 0, "play_url_32": "http://fdfs.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sXyb34-ABX61vu-MAA713.mp3", "play_size_32": 1440470, "play_url_64": "http://fdfs.xmcdn.com/group29/M04/18/21/wKgJWVkv5sHikxS-ACv09UnrZe8881.mp3", "play_size_64": 2880757, "play_url_24_m4a": "http://audio.xmcdn.com/group29/M04/18/21/wKgJWVkv5sGjHHv0ABEGhwHyg7k353.m4a", "play_size_24_m4a": 1115783, "play_url_64_m4a": "http://audio.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sTy_N2bACyAgXAsHcY843.m4a", "play_size_64_m4a": 2916481, "play_url_amr": "group28/M06/1B/4B/wKgJSFkv8zyh-1hiAATx3GBwTiI128.amr", "play_size_amr": 324060, "download_url": "http://download.xmcdn.com/group28/M08/1D/83/wKgJXFkv_hPzp_XEABX92yes4Bc747.aac", "download_size": 1441243, "download_count": 0 }, "current_order_num": 3, "match_rule": "suggest", "track_list": [ { "track_title": "The singing garden-Largo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group26/M02/8B/83/wKgJRlkVFizDl9vGADXMvTNWvmM154.m4a", "announcer": "瑜伽音乐台", "track_id": 37730297, "order_num": 1, "album_id": "8079478" }, { "track_title": "Under the Trees - Chapter 1-Morpheo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group27/M00/88/81/wKgJR1kVFjKhWyQ5ACiw3NvTzCA587.m4a", "announcer": "瑜伽音乐台", "track_id": 37730298, "order_num": 2, "album_id": "8079478" }, { "track_title": "Eastern journey-Largo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group27/M00/88/99/wKgJW1kVFkPxH_1HADhgEaBqSBU291.m4a", "announcer": "瑜伽音乐台", "track_id": 37730299, "order_num": 3, "album_id": "8079478" }, { "track_title": "Dream of an angel-Largo", "album_title": "沁人心脾的冥想音乐", "cover_url": "http://fdfs.xmcdn.com/group26/M08/8B/9C/wKgJRlkVF92AcIqgABKxNpPcMXo129_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group26/M04/8C/59/wKgJWFkVFmfzQ6CIADiTdDlM2QA326.m4a", "announcer": "瑜伽音乐台", "track_id": 37730301, "order_num": 4, "album_id": "8079478" }, { "track_title": "The Gateless Gate-Dan Gibson", "album_title": "聆听大自然", "cover_url": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group29/M06/18/23/wKgJWVkv5tSAH2FMAA-b5esnN2o309.m4a", "announcer": "瑜伽音乐台", "track_id": 39486284, "order_num": 0, "album_id": "8398042" }, { "track_title": "Perpetual Peace-Dan Gibson", "album_title": "聆听大自然", "cover_url": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group28/M07/1B/F1/wKgJXFkv5tfiyW5tAC-gspWqSP0619.m4a", "announcer": "瑜伽音乐台", "track_id": 39486283, "order_num": 1, "album_id": "8398042" }, { "track_title": "Reunion of Joy-Dan Gibson", "album_title": "聆听大自然", "cover_url": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group29/M04/17/D3/wKgJXVkv5r6hKIyNAAoc8ZCACJY915.m4a", "announcer": "瑜伽音乐台", "track_id": 39486282, "order_num": 2, "album_id": "8398042" }, { "track_title": "The Sacred Shrine-Dan Gibson", "album_title": "聆听大自然", "cover_url": "http://fdfs.xmcdn.com/group28/M01/1B/FC/wKgJXFkv52DhTEX2AAA4CXxDuig329_mobile_small.jpg", "media_url": "http://audio.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sTy_N2bACyAgXAsHcY843.m4a", "announcer": "瑜伽音乐台", "track_id": 39486281, "order_num": 3, "album_id": "8398042" }, { "track_title": "设立守望者(3)", "album_title": "舒国治的默认专辑", "media_url": "http://audio.xmcdn.com/group7/M0A/58/E6/wKgDWlXC5cnyDSrqACWGqaYw5Xg079.m4a", "announcer": "舒国治", "track_id": 8155113, "order_num": 16, "album_id": "2770293" } ] }, "outputs": [ { "type": "wechat.music", "property": { "title": "The Sacred Shrine-Dan Gibson", "description": "聆听大自然", "music_url": "http://audio.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sTy_N2bACyAgXAsHcY843.m4a" } }, { "type": "voice", "property": { "name": "喜马拉雅", "voice_url": "http://audio.xmcdn.com/group29/M04/17/D4/wKgJXVkv5sTy_N2bACyAgXAsHcY843.m4a" } } ], "score": "1.0", "scoreColor": "c4", "is_match": 1, "skill_id": "97371051-83da-4f43-aa4c-2f1dbaf3f0d1", "id": "82e95998-e19e-4ab8-a7d2-0ce7ca072d5e" } ], "meta_process_milliseconds": 293 } } ``` **详细参数说明** |名称|类型|说明| |:---|:---|:--- |service | String |服务名称 |voice_url|String|音频链接 |soundid|String|音频的id