mattdiamond / Recorderjs

A plugin for recording/exporting the output of Web Audio API nodes
4.16k stars 1.46k forks source link

WAV is too large. Is there any other type supported? #195

Open lhc-up opened 5 years ago

rescue1155 commented 5 years ago

+1

1 minute of audio goes to 5MB, How can we reduce it ?

martin-nazaryan commented 5 years ago

Yes, i have the same problem. is there any way to compress audio ?

rescue1155 commented 5 years ago

You can use the media recorder (The default way) that supported in all major browsers. For non supported browsers (mostly: safari on iOS devices), you can using media-recorder-polyfill (https://github.com/ai/audio-recorder-polyfill).

That will record the voice in wav format, with best quality 10mints of audio upto 4.5 MBs. (default media recorder). If polyfill media recorder library will use, That will record about 55% less than that library.

xiangyuecn commented 5 years ago

Maybe MediaRecorder can be used to convert recorded wav audio into webm.

Or use lamejs to convert PCM to MP3.

wav blob can get pcm through wavBlob.slice(44,wavBlob.size,"audio/pcm").

demo: https://xiangyuecn.github.io/Recorder/