Add a voice message recorder button to a web page that captures microphone audio and saves it as an MP3 file for upload.
Stream live audio chunks from the browser to a server in real time while the user is still speaking, without waiting for them to finish.
Display a live waveform animation on an HTML canvas element while the user records audio inside a WeChat Mini Program.
Record the audio track from a playing video element on the page and save it as a separate audio file.
Recorder is a JavaScript library that lets web pages record audio from a device's microphone directly in the browser, without requiring any additional software or plugins. It works by tapping into the browser's built-in audio capture capabilities and supports a wide range of browsers on desktop and mobile, including Chrome, Firefox, Safari, iOS 14.3 and later, Android WebView, and the browser engines used inside WeChat and QQ on Android. Once audio is captured, the library handles saving it in whichever format the developer needs. The supported formats include MP3, WAV, OGG, AMR, and several telephone-grade compressed formats (G711a and G711u used in voice call systems). The library can also encode audio in real time as it is being recorded, which makes it possible to stream audio to a server while a user is still speaking rather than waiting for them to finish. Beyond basic recording and saving, the project includes a collection of plugins for additional tasks. There are visualization tools that draw audio waveforms or frequency graphs on screen. There is support for connecting to speech recognition services so recorded audio can be transcribed to text. A separate plugin handles DTMF tones, which are the sounds that telephones make when you press number keys. Another plugin adjusts the playback speed or pitch of a recording. The library also supports recording from sources other than a microphone, such as the audio track of a video element playing on the page or an incoming WebRTC call. The project comes with sample code for Android and iOS native app wrappers, WeChat Mini Programs, and the uni-app cross-platform framework, so developers building hybrid mobile apps can use the same library. Numerous small runnable demos are linked in the README covering format conversion, audio mixing, filtering, and other signal processing tasks. Documentation and demos are written primarily in Chinese and hosted as live HTML pages. The core recording library is available as an npm package. The full README is longer than what was shown.
← xiangyuecn on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.