Concatenate two audio blobs JavaScript

二次信任 提交于 2019-12-11 14:49:48

问题


I am using recorder.js to record two audio files on my web page, which then creates recordings as blobs.

Once I have these audio blobs I would like to concatenate them into one track.

How can I do it?


回答1:


if you save the raw PCM of the orig clips from the callbacks on the buffer of the mic, i think you can just provide array of bufferd Clips to a new blob constructor.

 let recordedBlob = new Blob($ArrBuff[clip1,clip2], { type: "audio/*" });
    recording.src = URL.createObjectURL(recordedBlob);



回答2:


if you have them in audio files such as wav or mp3 etc., you can use Audacity to edit them and export however you want. or use ffmpeg to concat them together. I would use Audacity because it makes it easier to edit the material.



来源:https://stackoverflow.com/questions/51224040/concatenate-two-audio-blobs-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!