请问有解决办法吗
语音转文字怎么实现const recorderManager = wx.getRecorderManager() Page({ onLoad: function (options) { this.initVido() }, initVido() { recorderManager.onPause(() => { console.log('recorder pause') }) recorderManager.onStop((res) => { console.log('recorder stop', res) const { tempFilePath } = res var audio = wx.createInnerAudioContext(); audio.src = tempFilePath; audio.autoplay = true; }) recorderManager.onFrameRecorded((res) => { const { frameBuffer } = res console.log('frameBuffer.byteLength', frameBuffer.byteLength) }) }, startRecord() { const options = { format: 'mp3', duration: 10000 } recorderManager.start(options) }, stopRecord() { recorderManager.stop() } }) 我想问一下,就是录音了,然后怎么调用以下微信接口获取到语音识别结果? 接口文档——获取语音识别结果 接口调用请求说明 http请求方式: POST http://api.weixin.qq.com/cgi-bin/media/voice/queryrecoresultfortext?access_token=ACCESS_TOKEN&voice_id=xxxxxx&lang=zh_CN access_token 是 接口调用凭证 voice_id 是 语音唯一标识 lang 否 语言,zh_CN 或 en_US,默认中文 其中voice_id和access_token是怎么拿到的?
04-09