记录来自AudioContext的声音(Web Audio API) [英] Record Sounds from AudioContext (Web Audio API)
问题描述
有没有办法记录发送到webkitAudioContext.destination
的音频数据?
Is there a way to record the audio data that's being sent to webkitAudioContext.destination
?
节点正在发送的数据正在由浏览器播放,因此应该有某种方法可以将这些数据存储到(.wav)文件中.
The data that the nodes are sending there is being played by the browser, so there should be some way to store that data into a (.wav) file.
推荐答案
当前,尚无本机方法,但正如Max在上面的评论中所述,Recorderjs基本上是这样做的(它不会链接到目标上,但它是一个ScriptProcessorNode,您可以将其连接到其他节点并记录其输入.我基于Recorderjs来做一个简单的音频文件记录器-
Currently, there's not a native way to do that, but as Max said in the comment above, Recorderjs does essentially this (it doesn't chain onto the destination, but is a ScriptProcessorNode you can connect other nodes to, and have its input recorded. I built on Recorderjs to do a simple audio file recorder - https://github.com/cwilso/AudioRecorder.
这篇关于记录来自AudioContext的声音(Web Audio API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!