Repository navigation
feat: AutoMix 智能混音过渡 - #429
Merged
Merged
Conversation
# Conflicts: # package.json # pnpm-lock.yaml
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical defects can break all six platform builds, exhaust user disk space through unbounded downloads, and trigger abrupt track changes when bridge plans exceed the native engine’s duration limit.
4 open issues
打包脚本导入 Electron 专用模块导致构建失败 · New 下载流缺少大小上限可能耗尽用户磁盘 · New 桥接候选超过原生引擎 18 秒上限导致提交失败 · New 人声复核未覆盖原始入口至计划入口的完整跳过区间 · New
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
本 PR 为 SPlayer-Next 新增 AutoMix 智能混音过渡,将节拍分析、声部分离与原生音频混音接入现有预载和切歌流程,并提供模型管理与回退设置。
主要变更:
- 新增分析组件下载、独立推理进程、节拍规划和人声交接复核。
- 扩展原生引擎的声部处理、自动变速、过渡取消及跨进程接口。
- 增加设置界面、过渡状态展示、相关测试、文档和组件发布流程。
| 文件 | 说明 |
|---|---|
src/types/settings.ts |
扩展过渡模式及回退设置类型 |
src/stores/status.ts |
保存当前过渡类型 |
src/stores/settings.ts |
添加默认值与旧设置兼容处理 |
src/settings/categories/player.ts |
添加 AutoMix 设置与资源占用提示 |
src/settings/categories/player.spec.ts |
补充过渡开启确认测试 |
src/settings/categories/localCache.ts |
联动缓存关闭与过渡设置 |
src/services/nextTrackPreloader.spec.ts |
覆盖预载时机、组件就绪和失败处理 |
src/services/automix.ts |
共享模型组件状态与订阅 |
src/i18n/locales/zh-CN.json |
添加中文设置与状态文案 |
src/i18n/locales/en-US.json |
添加英文设置与状态文案 |
src/core/player/preload.spec.ts |
覆盖 AutoMix 交接和回退条件 |
src/core/player/index.ts |
接入计划交接与失败后的预载处理 |
src/core/player/failure.spec.ts |
更新预载服务测试桩 |
src/core/player/events.ts |
接收实际过渡模式 |
src/components/ui/SSlider.vue |
更新进度条发光与减弱动画支持 |
src/components/settings/SettingsSection.vue |
调整动态设置项入场动画 |
src/components/settings/custom/AutoMixComponents.vue |
新增模型下载管理弹窗 |
src/components/player/PlayerTimeInfo.vue |
区分 AutoMix 与交叉过渡提示 |
src/components/player/FullPlayer/index.vue |
全屏进度条显示过渡发光 |
shared/types/player.ts |
扩展预载结果及过渡接口 |
shared/types/automix.ts |
定义分析、编排和组件管理类型 |
shared/constants/playback.ts |
定义 AutoMix 提交与预热时间 |
public/licenses/automix.txt |
补充模型和运行时许可说明 |
package.json |
增加压缩包处理与数学文档依赖 |
native/taskbar-lyric/src/strategy/win11.rs |
简化任务栏扫描错误分支 |
native/automix-worker/src/demucs.rs |
实现分段声部分离推理 |
native/automix-worker/src/beats.rs |
实现节拍模型窗口推理 |
native/automix-worker/Cargo.toml |
配置独立推理进程依赖 |
native/audio-engine/src/tests/decoder.rs |
调整双声道采样测试遍历 |
native/audio-engine/src/player/tests/preload.rs |
验证取消预载释放声部资源 |
native/audio-engine/src/player/preload.rs |
按预载代次清理声部 |
native/audio-engine/src/player/mod.rs |
接入过渡模式和参数变更取消 |
native/audio-engine/src/player/events.rs |
扩展原生过渡事件 |
native/audio-engine/src/player/crossfade.rs |
安装声部并提交、取消混音计划 |
native/audio-engine/src/output/playback.rs |
提供输出侧过渡取消入口 |
native/audio-engine/src/lib.rs |
注册音频分析模块 |
native/audio-engine/src/dsp/transition_mix.rs |
实现声部增益和底鼓分频 |
native/audio-engine/src/dsp/tests/limiter.rs |
验证限幅后的声部一致性 |
native/audio-engine/src/dsp/tests/automix_tempo.rs |
验证自动变速时序和尾音排空 |
native/audio-engine/src/dsp/tempo.rs |
接入独立自动倍率和源采样计数 |
native/audio-engine/src/dsp/mod.rs |
注册混音信号处理模块 |
native/audio-engine/src/dsp/limiter.rs |
对主路和声部应用一致限幅增益 |
native/audio-engine/src/dsp/fft.rs |
调整立体声频谱采样遍历 |
native/audio-engine/src/dsp/equalizer.rs |
支持克隆均衡器状态 |
native/audio-engine/src/dsp/automix_tempo.rs |
实现自动变速预热与排空 |
native/audio-engine/src/decoder/tests/source.rs |
更新音频块测试结构 |
native/audio-engine/src/decoder/tests/processing.rs |
验证声部处理与主路对齐 |
native/audio-engine/src/decoder/tests/buffer.rs |
更新缓冲测试数据 |
native/audio-engine/src/decoder/stems.rs |
载入并重采样有限声部窗口 |
native/audio-engine/src/decoder/stem_processing.rs |
独立处理并重组各声部 |
native/audio-engine/src/decoder/source.rs |
同步读取主路、声部和源位置 |
native/audio-engine/src/decoder/reader.rs |
传递音频块响度增益 |
native/audio-engine/src/decoder/processing.rs |
将声部接入后台处理链 |
native/audio-engine/src/decoder/mod.rs |
注册声部解码模块 |
native/audio-engine/src/decoder/buffer.rs |
管理声部窗口与音频块数据 |
native/audio-engine/src/bindings/player/types.rs |
定义原生混音参数类型 |
native/audio-engine/src/bindings/player/transition.rs |
转换计划参数并处理取消结果 |
native/audio-engine/src/bindings/player/preload.rs |
暴露声部安装和预载接口 |
native/audio-engine/src/bindings/player/events.rs |
转发过渡模式字段 |
native/audio-engine/src/bindings/mod.rs |
导出分析接口 |
native/audio-engine/src/bindings/analysis.rs |
暴露特征分析和音频窗口导出 |
native/audio-engine/index.d.ts |
更新原生接口类型声明 |
eslint.config.mjs |
允许测试文件定义多个桩组件 |
electron/preload/index.ts |
暴露组件管理和扩展播放接口 |
electron/preload/index.d.ts |
声明窗口侧 AutoMix API |
electron/main/utils/paths.ts |
添加模型与临时声部目录 |
electron/main/services/playerPreloadReset.spec.ts |
补充分析模块测试桩 |
electron/main/services/playerPreload.spec.ts |
覆盖分析回退、通知和取消流程 |
electron/main/services/automix/vocals.spec.ts |
验证人声活动与交接安排 |
electron/main/services/automix/runtime.ts |
实现受限 ZIP 解压与取消 |
electron/main/services/automix/inference.ts |
串行运行并管理推理子进程 |
electron/main/services/automix/inference.spec.ts |
验证推理取消和排队行为 |
electron/main/services/automix/features.ts |
构建节拍、电平和音级档案 |
electron/main/services/automix/enhancement.ts |
分离候选窗口并复核人声 |
electron/main/services/automix/components.ts |
管理组件状态、下载和安装 |
electron/main/services/automix/beats.ts |
提取拍点并拟合稳定周期 |
electron/main/services/automix/assets.ts |
定义组件清单与平台支持条件 |
electron/main/services/automix/arrangement.ts |
编排对拍和原速桥接包络 |
electron/main/services/automix/analysisHost.ts |
调度特征分析与有限档案缓存 |
electron/main/ipc/player.ts |
串联预载、计划提交和时间转换 |
electron/main/ipc/index.ts |
注册组件管理接口 |
electron/main/ipc/automix.ts |
处理组件请求与退出清理 |
electron.vite.config.ts |
生产构建复用组件声明 |
electron-builder.config.ts |
精确限定音频原生模块打包文件 |
docs/crossfade.md |
说明交叉过渡算法与局限 |
docs/.vitepress/config.ts |
添加过渡文档导航和数学公式支持 |
components.d.ts |
注册模型管理组件类型 |
Cargo.toml |
将推理进程加入工作区 |
Cargo.lock |
锁定新增 Rust 依赖 |
.gitignore |
忽略 Python 缓存文件 |
.github/workflows/automix.yml |
构建、校验并发布模型及运行包 |
Review effort: Balanced
| name: automix-models | ||
| path: models | ||
| - name: 构建运行包并校验两个模型的实际推理 | ||
| run: pnpm exec tsx scripts/package-automix-runtime.ts node_modules/.cache/automix-runtime models |
| const source = (async function* () { | ||
| for await (const chunk of body) { | ||
| hash.update(chunk); | ||
| model.received += chunk.byteLength; |
| signal.throwIfAborted(); | ||
| const cached = completed.get(key); | ||
| if (cached) return cached.plan; | ||
| const separation = await separate( |
| profiles.map((profile, index) => { | ||
| const start = index ? candidate.inStartMs : candidate.outStartMs; | ||
| return { | ||
| startMs: Math.max(profile.startMs, start - 1500), |
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.


改动类型
是否包含破坏性变更
改动说明
新增 AutoMix 智能混音过渡模式,与「无过渡 / 交叉过渡」并列,位于 设置 → 播放 → 播放过渡。
关联 Issue
无
测试情况
pnpm typecheck、pnpm lint通过vitest全量 66 个文件 / 534 个用例通过,覆盖 AutoMix 规划、人声复核、推理、预载与过渡流程截图 / 录屏
自查清单
pnpm format,并确认pnpm typecheck、pnpm lint通过pnpm build:native验证;未手写native/*/index.d.tsdev分支提交🤖 Generated with Claude Code