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
No description provided.
The text was updated successfully, but these errors were encountered:
可以,关掉自动解码,在transform里面手动调用Recorder.AMR.decode进行解码成pcm,参考Recorder.amr2wav
Sorry, something went wrong.
testTransform=function(arrayBuffer,sampleRate,True,False){ var reader=new FileReader(); reader.onload=function(){ var amr=new Uint8Array(reader.result); Recorder.AMR.decode(arrayBuffer,function(pcm){ Recorder({type:"pcm"}).mock(pcm,sampleRate).stop(function(wavBlob,duration){ True(wavBlob,duration); },False); },False); }; reader.readAsArrayBuffer(new Blob([arrayBuffer])); }; var socket = io('http://127.0.0.1:8085', {transports: ['websocket']}); socket.binaryType = 'arraybuffer'; stream=Recorder.BufferStreamPlayer({ decode:false, //传输过来的不是pcm就需要开启解码 play:true, //要播放声音,设为false不播放,只提供MediaStream realtime:true, transform:function(pcm,sampleRate,True,False){ console.log(pcm); testTransform(pcm,sampleRate,function(pcm,sampleRate){ // True(pcm,sampleRate); testSampleRate=sampleRate; // testAllPcm.push(pcm);//另存一份 结束时转成一个完整音频 对比接收到的数据音质 },False); } });
报错:n.subarray is not a function at Object.decode (beta-amr.js:6:777)
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: