什么是在线音频剪辑器?
在线音频剪辑器是一款基于浏览器的音频裁切工具,无需安装任何软件,打开网页即可上传音频文件、拖动滑块选取片段、导出为新的 MP3 文件。所有音频数据都在浏览器本地处理,不会上传到任何服务器,保障您的隐私安全。
核心功能:
- 波形可视化:上传后自动绘制音频波形图,直观显示音频强弱和节奏
- 拖动滑块选取片段:双滑块范围选择器,精确控制起始和结束位置,选区外波形自动变暗
- 播放全部 / 播放选段:试听整段音频或只听选中的片段,确认裁切效果
- 导出 MP3:选中的片段直接编码为 MP3 文件下载,支持 64/128/192/256/320 kbps 五种码率
- 拖放上传:支持拖放音频文件或点击选择,兼容 MP3、WAV、OGG、FLAC、AAC、M4A 等常见格式
典型使用场景:
- 手机铃声制作:从完整歌曲中截取 30 秒高潮段落作为铃声
- 会议录音重点截取:从长时会议录音中裁切出关键讨论片段
- 短视频 BGM:从音乐文件中截取适合短视频时长的背景音乐片段
- 播客剪辑:裁掉播客开头和结尾的冗余部分
技术原理:
- Web Audio API:使用 AudioContext.decodeAudioData 将上传的音频文件解码为原始 PCM 数据
- Canvas 波形绘制:遍历 PCM 采样数据,计算每像素列的最小/最大值,绘制波形柱状图
- lamejs MP3 编码:纯 JavaScript MP3 编码器,将裁切后的 PCM 数据编码为 MP3 格式
- Pointer Events:滑块拖拽使用 Pointer Events 统一处理鼠标和触摸操作
What is the Online Audio Clipper?
The Online Audio Clipper is a browser-based audio trimming tool that requires no software installation. Simply open the webpage, upload an audio file, drag the sliders to select a segment, and export it as a new MP3 file. All audio data is processed locally in your browser and never uploaded to any server, ensuring your privacy.
Core features:
- Waveform Visualization: Automatically draws the audio waveform after upload, showing volume and rhythm visually
- Drag-to-Select Segment: Dual-handle range slider for precise start/end control, with dimmed waveform outside the selection
- Play All / Play Clip: Preview the entire audio or just the selected segment before exporting
- Export as MP3: Encode the selected segment directly to MP3 with five bitrate options: 64/128/192/256/320 kbps
- Drag & Drop Upload: Drag and drop audio files or click to select, supporting MP3, WAV, OGG, FLAC, AAC, M4A and more
Common use cases:
- Phone Ringtones: Extract a 30-second chorus from a full song as your ringtone
- Meeting Recording Highlights: Cut out key discussion segments from long meeting recordings
- Short Video BGM: Extract a suitable-length background music segment for short videos
- Podcast Editing: Trim redundant intros and outros from podcast episodes
Technical details:
- Web Audio API: Decodes uploaded audio files to raw PCM data via AudioContext.decodeAudioData
- Canvas Waveform: Iterates PCM samples, computes min/max per pixel column, draws waveform bars
- lamejs MP3 Encoding: Pure JavaScript MP3 encoder that converts trimmed PCM data to MP3 format
- Pointer Events: Slider dragging uses Pointer Events for unified mouse and touch handling