Repository navigation
音频降噪和节拍检测 - #86
Open
devin-ai-integration[bot] wants to merge 8 commits into
Open
音频降噪和节拍检测#86devin-ai-integration[bot] wants to merge 8 commits into
devin-ai-integration[bot] wants to merge 8 commits into
Conversation
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tinuous Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
…markers Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 4 findings. Devin automatically fixed all 4 findings.
Fixed by Devin (4)
- Missing beat markers at trim starts — detectBeats takes a range: padded audio is used only for comparison, and beats outside the visible source window are skipped before the minimum-gap check. Unit test added.
- Noise reduction dips at export boundaries — A new gate sets its level and open/closed state from the first 10 ms of input, so continuous sound stays open at export window boundaries; unit test added.
- Paused previews leave noise gates alive — Disconnecting a preview route posts 'stop' to the gate; process() then returns false so the processor is released.
- Missing beat markers at clip edges — detectBeats tests the first and last frames (missing neighbours count as 0) and clip analysis pads 0.1 s on each side so edge beats compare against the surrounding audio; unit test added.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
叠在 #85 上。
降噪:视频和音频片段属性里新增「降噪」开关(
track.denoise)。降噪链在src/utils/denoise.ts:setElementGain(el, gain, denoise))和导出(mixAudio的OfflineAudioContext)用同一个 worklet,听到的就是导出的。worklet 模块加载完成前预览先直连,加载后下一帧切到降噪链。dn: 1;分割、分离音频会带上这个开关;MCPupdate_clip({ denoise });剪映草稿不支持,导出时会提示跳过「声音「降噪」」。节拍检测:工具栏新增「节拍检测」按钮,MCP 新增
detect_beats({ clipId })。对片段可见区间的声音降采样到约 11kHz,按约 23ms 一帧计算能量的上升量(简化的谱通量),超过自适应阈值(0.5s 窗口内均值 + 1.5σ)并且是局部峰值时记为一拍,两拍至少间隔 0.25s;再用timelineFrameAt换算到时间轴帧,在每拍处添加时间轴标记。倒放片段不支持。测试:
src/utils/beats.test.ts覆盖节拍检测和噪声门 worklet。e2eMCP detects beats and exports denoised audio生成一段带底噪的鼓点 WAV,检查 5 个节拍和对应标记,并检查导出的 MP4 中停顿处的 RMS:不降噪时约 0.0027,开启降噪后低于 0.001,鼓点保留。Link to Devin session: https://app.devin.ai/sessions/a882af08b80c444280600c6cdc988c2e
Open in Devin Desktop: https://app.devin.ai/desktop/session/a882af08b80c444280600c6cdc988c2e?variant=devin
Requested by: @x007xyz
🟢 Devin fixed all 4 findings · Follow Devin's work