急救数据对接


3、vr程序对话

<p><strong>简要描述:</strong> 【接口来源】EMVR后端 提供接口</p> <p>【接口备注】 “救助人员” 指真实的的操作用户 “响应指令”数据见接口:EMVR获取沙盘的初始信息.voiceCommandsList</p> <p>【接口功能】“救助人员”跟npc对话时,当“救助人员”说出一句话,会转成文本,并调用当前接口。该接口需要识别 “救助人员”的这句话里面,是否有响应指令(如:跟我走,坐到附近的座椅上)。如果有响应指令,输出的npc数据需要跟响应指令匹配上,如果无响应指令,则只需要返回普通对话数据</p> <ul> <li>接口编写人员:xx</li> <li>接口开发人员:xx</li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>http://xxx</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST </li> <li>http请求head需设置数据编码方式:Content-Type=application/json;charset=utf-8</li> </ul> <p><strong>是否需要登录:</strong>不需要</p> <p><strong>请求参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">npcId</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>npc编号</td> </tr> <tr> <td style="text-align: left;">askStr</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>对话内容(麦克风拾取“救助人员” 说的音频并转成文本)</td> </tr> </tbody> </table> <p><strong>请求示例</strong></p> <pre><code>{ &amp;quot;npcId&amp;quot;:&amp;quot;xxx&amp;quot;, &amp;quot;askStr&amp;quot;:&amp;quot;xxx&amp;quot; } </code></pre> <p><strong>返回示例</strong></p> <pre><code>{ &amp;quot;msg&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;code&amp;quot;: 0 }</code></pre> <p><strong>返回参数说明</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">int</td> <td>请求状态 0成功,非0失败</td> </tr> <tr> <td style="text-align: left;">responseStr</td> <td style="text-align: left;">string</td> <td>ai生成的npc响应说话内容文本</td> </tr> <tr> <td style="text-align: left;">responseMp3Url</td> <td style="text-align: left;">string</td> <td>ai生成的npc响应说话内容语音mp3播放地址(性别、音色、情绪等需要和npc的情况对应)</td> </tr> <tr> <td style="text-align: left;">responseStr</td> <td style="text-align: left;">string</td> <td>表情 数据见接口:EMVR获取沙盘的初始信息.expressionList</td> </tr> <tr> <td style="text-align: left;">responseStr</td> <td style="text-align: left;">string</td> <td>动作 数据见接口:EMVR获取沙盘的初始信息.situationInjuryList</td> </tr> </tbody> </table> <p><strong>备注</strong> </p> <p>更多返回错误代码请看[首页-公共-错误代码描述]的描述 1.<strong>Content-Type=application/json</strong> 2.<strong>请求参数传JSON格式:</strong></p> <p>通过判断code是否等于0判断是否正常返回</p> <p>欢迎使用ShowDoc!欢迎使用ShowDoc!</p>

页面列表

ITEM_HTML