WxProject

微信


语音转文本

<p>[TOC]</p> <h5>简要描述</h5> <ul> <li>语音转文本,调用此接口前 请先下载语音</li> </ul> <h5>下载语音 请求URL</h5> <ul> <li><a href="http://localhost:30001/DownloadVoice">http://localhost:30001/DownloadVoice</a></li> </ul> <h5>下载语音 请求方式</h5> <ul> <li>POST</li> </ul> <h5>下载语音 发送参数</h5> <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;">clientmsgid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收到的语音消息 客户端ID</td> </tr> <tr> <td style="text-align: left;">length</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收到的语音消息 总长度</td> </tr> <tr> <td style="text-align: left;">msgsvrid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收到的语音消息 服务器消息ID</td> </tr> <tr> <td style="text-align: left;">fromgid</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>收到的语音消息 来源群ID 如果收到的语音并非来自于群,则不需传递此参数</td> </tr> </tbody> </table> <h5>下载语音 发送示例</h5> <pre><code>{     &amp;quot;clientmsgid&amp;quot;: &amp;quot;49d03e0a626d01e53ac428b1ebc8bc09wxid_123456_228_1743585568&amp;quot;,     &amp;quot;length&amp;quot;: 34089,     &amp;quot;fromgid&amp;quot;: &amp;quot;&amp;quot;,     &amp;quot;msgsvrid&amp;quot;: 999771845226153333 }</code></pre> <h5>下载语音 返回示例</h5> <pre><code>{ &amp;quot;voice_len&amp;quot;: 34089, &amp;quot;voice_data_hex&amp;quot;: &amp;quot;02232153494C4B5F56331300A426D4EB1735F1269F3A658C56548B02ADDEAF1A00B0DC2836C55AD8CDA9E999ABC3CFA885A203FE5EF96E495A8D271D00B0E42A8C7578270579DFFC100844D82830D5A00CCC7143637A5CAA4C9F2000B0DC29EB9B2FC234BFFF7542A9C49FB01853AE1BB4D613871C2C30B...&amp;quot; }</code></pre> <h5>语音转文本 请求URL</h5> <ul> <li><a href="http://localhost:30001/Voice2Text">http://localhost:30001/Voice2Text</a></li> </ul> <h5>语音转文本 请求方式</h5> <ul> <li>POST</li> </ul> <h5>语音转文本 发送参数</h5> <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;">voice_hex</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收到的语音消息内容</td> </tr> <tr> <td style="text-align: left;">msgsvrid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收到的语音消息 服务器消息ID</td> </tr> </tbody> </table> <h5>语音转文本 发送示例</h5> <pre><code>{     &amp;quot;voice_hex&amp;quot;:&amp;quot;02232153494C4B5F56331300A426D4EB1735F1269F3A658C56548B02ADDEAF1A00B0DC2836C55AD8CDA9E999ABC3CFA885A203FE5EF96E495A8D271D00B0E42A8C7578270579DFFC100844D82830D5A00CCC7143637A5CAA4C9F2000B0DC29EB9B2FC234BFFF7542A9C49FB01853AE1BB4D613871C2C30B....&amp;quot;,     &amp;quot;msgsvrid&amp;quot;:&amp;quot;169982842177745728&amp;quot; }</code></pre> <h5>语音转文本 返回示例</h5> <pre><code>{     &amp;quot;text&amp;quot;: &amp;quot;连续工作20个小时后。&amp;quot; }</code></pre> <h5>语音转文本 返回参数</h5> <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;">text</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>语音转出的文本内容</td> </tr> </tbody> </table>

页面列表

ITEM_HTML