<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                > 錄入語音后識別成文字,比如搜索頁里進行語音搜索或者聊天窗口里對好友發過來的語音進行識別 [TOC] ## 申請百度合成接口 > 地址:https://ai.baidu.com/tech/speech/asrpro > 找到語音技術 - 應用列表,創建應用,填寫相應信息,語音包名選擇不需要 ![](https://img.kancloud.cn/6d/34/6d34d6fa7988a33b438d9cd7d13b7d8b_690x865.png) > 創建完成后,可以看到AppID、API Key、Secret Key ## manifest.json 配置語音輸入模塊 > App模塊配置 -> Speech(語音輸入,只能選一個) -> 百度語音識別 ![](https://img.kancloud.cn/08/34/0834d398cbb17861f6a51c2f42d91f28_555x332.png) ## 客戶端調用 > 參考資料:https://uniapp.dcloud.io/api/plugins/voice?id=voice ~~~ <template> <view> <button @tap="startRecord">開始錄音</button> <button @tap="endRecord">停止錄音</button> <button @tap="playVoice">播放錄音</button> <button @tap="startRecognize">開始識別</button> </view> </template> <script> const recorderManager = uni.getRecorderManager(); const innerAudioContext = uni.createInnerAudioContext(); innerAudioContext.autoplay = true; var _this; export default { data(){ return { voicePath : '' } }, onLoad() { _this = this; recorderManager.onStop(function(res) { console.log(res) _this.voicePath = res.tempFilePath // 使用uni.uploadFile上傳到服務器上,此時是mp3格式 }); }, methods: { startRecord() { console.log('開始錄音'); recorderManager.start({ sampleRate: 16000 // 必須設置是后臺設置的參數,不然百度語音識別不了 }); }, endRecord() { console.log('錄音結束'); _this = this; recorderManager.stop(); }, playVoice() { console.log('播放錄音'); if (this.voicePath) { innerAudioContext.src = this.voicePath; innerAudioContext.play(); } }, startRecognize() { var options = {}; options.engine = 'baidu'; console.log("開始語音識別:"); plus.speech.startRecognize(options, function(s){ console.log("識別結果:"+s) plus.speech.stopRecognize(); }, function(e){ console.log("語音識別失敗:"+e.message); }); } } } </script> ~~~
                  <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>

                              哎呀哎呀视频在线观看