We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
每次上传固定音频流,实时转写,在移动版本上,录制时间越久,转写结果出来的越慢 ,可能是什么原因导致的呢 借鉴以下案例代码实现的 https://xiangyuecn.gitee.io/recorder/assets/%E5%B7%A5%E5%85%B7-%E4%BB%A3%E7%A0%81%E8%BF%90%E8%A1%8C%E5%92%8C%E9%9D%99%E6%80%81%E5%88%86%E5%8F%91Runtime.html?jsname=teach.realtime.encode_transfer_frame_pcm
The text was updated successfully, but these errors were encountered:
发送的音频数据没有问题的话,那就是语音识别接口的问题
Sorry, something went wrong.
检查每次最终发送出去的数据长度 把每次发送的数据存起来,最后保存成一个blob 用URL.createObjectURL生成url下载下来,这里可以播放pcm 检查音频数据是不是正常的 发送的音频数据没有问题的话,那就是语音识别接口的问题
按照上面那个例子会出现数据延后一点发送的情况,现在改为直接转了数据就发送给后端是实时的
realTimeSendChunk(buffers, bufferSampleRate) { if (buffers.length > 0) { let pcm = [] let chunk = Recorder.SampleData(buffers, bufferSampleRate, targetSampleRate, realTimeSendTryChunk) for(let i = realTimeSendTryChunk ? realTimeSendTryChunk.index : 0; i < chunk.index; i++){ buffers[i] = null } realTimeSendTryChunk = chunk pcm = chunk.data this.transferUpload(pcm.buffer) } },
我移植到了 react-native 上来实现移动版本,实时速度很棒 https://github.com/flyskywhy/react-native-live-audio-fft
No branches or pull requests
每次上传固定音频流,实时转写,在移动版本上,录制时间越久,转写结果出来的越慢
,可能是什么原因导致的呢
借鉴以下案例代码实现的
https://xiangyuecn.gitee.io/recorder/assets/%E5%B7%A5%E5%85%B7-%E4%BB%A3%E7%A0%81%E8%BF%90%E8%A1%8C%E5%92%8C%E9%9D%99%E6%80%81%E5%88%86%E5%8F%91Runtime.html?jsname=teach.realtime.encode_transfer_frame_pcm
The text was updated successfully, but these errors were encountered: