问题描述
我在问,因为我无法在任何地方找到答案。
我已成功实施,以便在JS中录制麦克风输入。但是,录制的文件是WAV,导致大文件。我正在寻找一种方法用JS直接录制到MP3,或者以某种方式将这些位编码为MP3而不是WAV。
I am asking because I couldn't find the answer anywhere.I have successfully implemented RecorderJS in order to record microphone input in JS. However, the recorded file is WAV which results in large files. I am looking for a way to record with JS directly to MP3, or encode the bits somehow to MP3 instead of WAV.
如何做到这一点?有没有可以做到的Web Audio API功能或某种JS MP3编码器?
How can it be done? Is there a Web Audio API function that can do that or JS MP3 encoder of some sort?
推荐答案
我见过的唯一的Javascript MP3编码器是,这是一个使用emscripten的端口。它应该很慢,而且我从来没有使用它。
The only Javascript MP3 encoder I've seen is https://github.com/akrennmair/libmp3lame-js, which is a port using emscripten. It's supposed to be slow, and I've never used it.
我不知道任何原生编写的Javascript MP3编码器,编码不包括在内Web Audio API。
I don't know of any natively-written Javascript MP3 encoders, and encoding is not covered by the Web Audio API.
这篇关于Web Audio API - 记录到MP3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!