Browser Sound Recording: Using MediaRecorder, Silence Trimming and a Small WAV Encoder
A DEV Community guide explains how to let users record their own sound clips directly in a web browser. Simple recordings often suffer from a half-second of silence at the start, an unwanted tap sound at the end, and inconsistent formats across devices. The tutorial walks through requesting microphone access only on a user action, recording with MediaRecorder using a browser-supported format, decoding the audio, trimming silence and normalising volume. It concludes by encoding the result as a 16-bit WAV file that can be played, downloaded or uploaded. The approach is said to work in current Chrome, Firefox and Safari, provided the page is served over HTTPS or localhost.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in