<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                #### 接口路徑:https://temp1.lingju.ai/httpapi/AudioChat.do <table style="width:100%"> <tbody> <tr height="28" style="font-weight:bold;"> <td height="28" width="130px" >名稱</td> <td colspan="3" >聊天接口</td> </tr> <tr height="28" style="font-weight:bold;"> <td height="28" >接口路徑</td> <td colspan="3" >https://temp1.lingju.ai/httpapi/AudioChat.do (請注意:體驗環境,請勿用于生產環境。)</td> </tr> <tr height="28" style="font-weight:bold;"> <td height="28" >請求方式</td> <td colspan="3" >post</td> </tr> </tbody> </table> #### http post請求示例: ~~~ post https://temp1.lingju.ai/httpapi/AudioChat.do json格式串行化post上傳,注意請求的header需添加 'Content-Type':'application/json;charset=UTF-8' { "accessToken":"xxxxxxxxxxxxxxxxxxxxxx", "encodeData":"xxxxxxxxxx", "voiceType":"xxxxxxxxxx", "voiceFormat":"raw", "speex_size":"61", "needTTS":"false", "lat":"23.12635", "lng":"113.38776", "city":"廣州", "position":"廣東廣州", "data":[ { "target":ID, "list":[] } ] } ~~~ #### 請求參數說明: <table style="width:100%"> <thead> <tr height="28"> <th width="130px">參數</th> <th width="100px">數據類型</th> <th width="130px">可需</th> <th colspan="2" >描述</th> </tr> </thead> <tbody> <tr height="23" style="height:17.25pt"> <td height="23" >accessToken</td> <td >String</td> <td>必填</td> <td colspan="2" >分配給開發者的專屬appkey,請妥善保管</td> </tr> <tr > <td>encodeData</td> <td>String</td> <td>必填</td> <td colspan="2">語音數據,要使用 base64 編碼(采用 Python 語言時注意讀取文件應該為 string 而不是 byte,以 byte 格式讀取后要 decode()。編碼后的數據不可帶有回車換行符)。音頻數據要小于600KB。</td> </tr> <tr > <td>voiceType</td> <td>String</td> <td>必填</td> <td colspan="2">識別音頻的采樣率,只支持8k和16k</td> </tr> <tr > <td>voiceFormat</td> <td>String</td> <td>必填</td> <td colspan="2">音頻數據格式 raw:原生音頻(支持單聲道的pcm和wav) speex:speex壓縮后的音頻(8k) speex-wb:speex壓縮后的音頻(16k)<br請注意壓縮前也必須是采樣率16k或8k單聲道的pcm。 </td> </tr> <tr > <td>speex_size</td> <td>int</td> <td>否</td> <td colspan="2">speex音頻幀率,僅在speex音頻時使用 1.由于服務端解壓speex需要額外耗時,如果沒有帶寬等限制建議使用pcm格式。 2.請注意壓縮前的原始音頻文件,必須為采樣率16K、16bits、單聲道的PCM或WAV格式。 3.具體數值參考下方speex庫壓縮等級(quantity)關系表。</td> </tr> <tr > <td>needTTS</td> <td>boolean</td> <td>否</td> <td colspan="2">是否需要返回合成語音URL(true:返回 false:不返回)</td> </tr> <tr > <td>speed</td> <td>int</td> <td>否</td> <td colspan="2">語速:設置播放的語速,在0~9之間(支持浮點值),不傳時默認為5</td> </tr> <tr > <td>volume</td> <td>int</td> <td>否</td> <td colspan="2">音量:設置語音的音量,在0~9之間(只支持整型值),不傳時默認值為5</td> </tr> <tr > <td>pitch</td> <td>int</td> <td>否</td> <td colspan="2">音調:設置語音的音調,取值0-9,不傳時默認為5中語調</td> </tr> <tr > <td>audiotype</td> <td>int</td> <td>否</td> <td colspan="2">音頻種類:可不填,不填時默認為3,表示mp3格式 audiotype=4 :返回16K采樣率的pcm格式 audiotype=5 :返回8K采樣率的pcm格式 audiotype=6 :返回16K采樣率的wav格式 audiotype=6&rate=1 :返回8K的wav格式 audiotype=7 :返回8k8bit的alaw格式文件 audiotype=8 :返回8k8bit的ulaw格式文件</td> </tr> <tr > <td>voiceName</td> <td>int</td> <td>否</td> <td colspan="2">發音人:1=標準女生;2=標準男生;3=女童;4=男童</td> </tr> <tr> <td>city</td> <td>String</td> <td>否</td> <td colspan="2">城市(該字段如果有參數,必須跟“lat”以及“lng”一起傳才有效)</td> </tr> <tr> <td>lat</td> <td>double</td> <td>否</td> <td colspan="2">緯度</td> </tr> <tr> <td>lng</td> <td>double</td> <td>否</td> <td colspan="2">經度</td> </tr> <tr> <td>position</td> <td>String</td> <td>否</td> <td colspan="2">具體位置</td> </tr> <tr> <td rowspan="3">data</td> <td rowspan="3">JsonArray</td> <td rowspan="3">否</td> <td colspan="2">附帶的JSON數據</td> </tr> <tr> <td>target</td> <td>目標對象id,int類型</td> </tr> <tr> <td>list</td> <td>目標對象集合,Json,json<a href="http://doc.lingju.ai/@ljsdk/android_sdk" target="_blank">結構請參照</a></td> </tr> </tbody> </table> #### speex庫壓縮等級(quantity)關系表: <table style="width:100%"> <thead> <tr height="28"> <th width="160px">quantity(壓縮等級)</th> <th width="40px">0</th> <th width="40px">1</th> <th width="40px">2</th> <th width="40px">3</th> <th width="40px">4</th> <th width="40px">5</th> <th width="40px">6</th> <th width="40px">7</th> <th width="40px">8</th> <th width="40px">9</th> <th width="40px">10</th> </tr> </thead> <tbody> <tr height="23" style="height:17.25pt"> <td height="23" >speex</td> <td >7</td> <td>11</td> <td>16</td> <td>21</td> <td>21</td> <td>29</td> <td>29</td> <td>39</td> <td>39</td> <td>47</td> <td>63</td> </tr> <tr height="23" style="height:17.25pt"> <td height="23" >speex-wb</td> <td >11</td> <td>16</td> <td>21</td> <td>26</td> <td>33</td> <td>43</td> <td>53</td> <td>61</td> <td>71</td> <td>87</td> <td>107</td> </tr> </tbody> </table> #### 接口返回JSON示例: ~~~ 普通回復: { "answer":"廣州今天天氣預報說“大雨”,出門最好帶上傘。", "status":0 } 帶指令的回復: { "answer":"{\"rtext\":\"好的\",\"outc\":0, \"actions\":[{\"action\":\"QUERY\", \"target\":{\"recyle\":0,\"id\":100,\"singer\":[\"周杰倫\"],\"release\":0,\"type\":\"歌曲\"}, \"hints\":{ \"success\":{\"text\":\"好的,為您播放周杰倫的歌\"}, \"failure\":{\"text\":\"抱歉,我找不到周杰倫的歌\"}, \"notsupport\":{\"text\":\"抱歉,我沒辦法播放歌曲\"} } }, {\"action\":\"SET\", \"target\":{\"id\":300,\"origin\":\"QUERY\",\"control\":\"PLAY\",\"type\":\"AUDIO\"}}]}", "status":0 } 帶合成音的回復: { "answer":"{\"rtext\":\"好的\",\"outc\":0, \"actions\":[{\"action\":\"QUERY\", \"target\":{\"recyle\":0,\"id\":100,\"singer\":[\"周杰倫\"],\"release\":0,\"type\":\"歌曲\"}, \"hints\":{ \"success\":{\"text\":\"好的,為您播放周杰倫的歌\"}, \"failure\":{\"text\":\"抱歉,我找不到周杰倫的歌\"}, \"notsupport\":{\"text\":\"抱歉,我沒辦法播放歌曲\"} } }, {\"action\":\"SET\", \"target\":{\"id\":300,\"origin\":\"QUERY\",\"control\":\"PLAY\",\"type\":\"AUDIO\"}}]}", "audioURL":"https://xxxxxxxxxxxx", "status":0 } ~~~ #### 接口返回說明: ~~~ Content-Type:application/json;charset=UTF-8 ~~~ <table style="width:100%"> <thead> <tr height="28" > <th height="28" width="130px">屬性名</th> <th width="100px">數據類型</th> <th>描述</th> </tr> </thead> <tbody> <tr height="23"> <td height="23" >status</td> <td>int</td> <td>狀態碼,0=成功,其它值則為錯誤碼,請參考錯誤碼表</td> </tr> <tr height="23"> <td height="23" >description</td> <td >String</td> <td>通常為空,出錯時會有錯誤信息</td> </tr> <tr height="23"> <td height="23" >audioURL</td> <td >String</td> <td>合成語音數據播放鏈接</td> </tr> <tr > <td>answer</td> <td >String</td> <td>普遍的回復文本或json結構的字符串文本,若為json文本,請參考<a href="http://doc.lingju.ai/@ljsdk/android_sdk">指令說明文檔</a>解析,若僅用于普通聊天,建議忽略json文本,以"暫不知道該功能"作為回復。</td> </tr> </tbody></table>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看