Skip to content

Add confirmed local FFmpeg audio preparation workflow - #1

Closed
LittleLaXerath wants to merge 1 commit into
mainfrom
codex/ffmpeg-user-workflow
Closed

LittleLaXerath wants to merge 1 commit into
mainfrom
codex/ffmpeg-user-workflow

Conversation

@LittleLaXerath

Copy link
Copy Markdown
Contributor

中文

用户可见变化

  • 新增独立“音频准备”页面,不改变现有聊天入口与 SynthV 实时音符插入流程。
  • 支持选择或拖入单个本地媒体文件,先显示时长、容器/编码、采样率和声道。
  • 支持生成新的 PCM WAV,可选择采样率、单/立体声、s16/s24/f32,以及可选裁剪范围。
  • 支持只读 EBU R128 响度测量,并在用户确认后生成标准化 WAV;默认值明确标记为通用试听预设,而非 SynthV 标准。
  • 支持输入/输出试听、打开文件位置、复制路径和另存为。

确认、安全与组件维护

  • 所有写入操作先展示输入、参数和输出位置,确认后才开始;源文件不会被覆盖。
  • 输出使用唯一文件名并限制在 ~/.SynthVcopilot/output/ffmpeg;不会自动导入 SynthV、运行 CVRS、批处理或执行任意 FFmpeg 命令。
  • 将组件占位页改为真实 FFmpeg 状态与维护界面,安装、更新和卸载均需确认;系统或显式配置的 FFmpeg 不会被卸载,也不修改系统 PATH。
  • 增加全局任务条、跨页面单任务互斥、进度、取消、页面缓存和窗口关闭清理。

Runtime 与架构

  • 新增类型化 DTO、六项 C ABI 绑定、SafeHandle 和 FfmpegService 后台任务服务。
  • 修复取消/启动竞态,确保旧取消请求不会命中新任务,窗口关闭也能取消刚登记的任务。
  • 修正 x64/ARM64 到 Rust target 的映射,并扩展非 GUI ABI 冒烟测试。
  • 子模块固定到 pi-agent 提交 5cdb12f;对应依赖 PR:Restrict Agent FFmpeg tools to read-only inspection pi-agent#1。
  • Agent 仅保留只读探测和响度分析;准备与标准化只从 Desktop 确认流程启动。
  • synthv-agent-bridge、IPC v3、sv_* 工具和 add_notes 均未修改。

验证

  • 真实 C ABI:probe / prepare / loudness analysis / normalization 全部通过。
  • Rust:57 项测试通过,2 项按设计忽略;Clippy -D warnings 通过。
  • SynthV Bridge:240 项检查通过,工作树无改动。
  • XAML XML 与事件绑定检查通过;Desktop 非 XAML C# 源编译通过。
  • 本机缺少 Visual Studio C++ Build Tools、MSVC linker 与 Windows SDK;完整 WinUI XAML 和 ARM64 native 构建需由正式 Windows 构建节点补跑。

完整中英文记录见 CHANGELOG.md。

English

User-visible changes

  • Add a dedicated Audio Preparation page without changing Chat or the live SynthV note-insertion workflow.
  • Select or drop one local media file and inspect duration, container/codec, sample rate, and channels before processing.
  • Create a new PCM WAV with explicit sample-rate, mono/stereo, s16/s24/f32, and optional trim choices.
  • Measure EBU R128 loudness read-only, then create a normalized WAV only after confirmation. The defaults are clearly described as a general listening preset, not a SynthV standard.
  • Preview input/output audio, open the file location, copy the path, or use Save As.

Confirmation, safety, and maintenance

  • Show input, parameters, and destination before every write-capable action; never overwrite the source.
  • Generate unique output names under ~/.SynthVcopilot/output/ffmpeg; do not auto-import into SynthV, run CVRS, batch files, or expose arbitrary FFmpeg commands.
  • Replace the component placeholder with real FFmpeg status and confirmed maintenance actions. System or explicitly configured FFmpeg remains read-only, and global PATH is never modified.
  • Add a global cross-page task bar, process-wide mutual exclusion, progress, cancellation, navigation caching, and shutdown cleanup.

Runtime and architecture

  • Add typed DTOs, six C ABI bindings, SafeHandle ownership, and a background FfmpegService.
  • Close start/cancel races so stale cancellation cannot terminate a newer job and shutdown cancels newly registered work.
  • Correct x64/ARM64 Rust target mapping and expand the non-GUI ABI smoke suite.
  • Pin the submodule to pi-agent commit 5cdb12f; dependency PR: Restrict Agent FFmpeg tools to read-only inspection pi-agent#1.
  • Keep only read-only probe and loudness analysis in the Agent; preparation and normalization start only from the confirmed Desktop path.
  • Leave synthv-agent-bridge, IPC v3, the sv_* tools, and add_notes unchanged.

Validation

  • Real C ABI passed probe, prepare, loudness analysis, and normalization.
  • Rust passed 57 tests with 2 intentionally ignored; Clippy passed with -D warnings.
  • SynthV Bridge passed 240 checks and remained unchanged.
  • XAML XML/event binding checks and non-XAML Desktop C# source compilation passed.
  • This machine lacks Visual Studio C++ Build Tools, the MSVC linker, and the Windows SDK; complete WinUI XAML and ARM64 native builds remain for a fully provisioned Windows build node.

See CHANGELOG.md for the complete bilingual release notes.

Add a first-class Audio Preparation page for local file selection or drag-and-drop, media probing, PCM WAV preparation, EBU R128 analysis, confirmed loudness normalization, before/after playback, file-location handoff, path copying, and Save As. Every write-capable action shows its input, parameters, and destination, creates a unique output, and preserves the source file.

Replace the component placeholder with an operational FFmpeg maintenance surface. Add typed C ABI DTOs and bindings, SafeHandle job ownership, process-wide mutual exclusion, progress polling, race-safe cancellation, a cross-page global job bar, cached task pages, and shutdown cleanup. Correct x64/ARM64 Rust target mapping and expand the non-GUI ABI smoke test across component status and all four allow-listed FFmpeg operations.

Update the pi-agent submodule to 5cdb12f, where the conversational Agent exposes only read-only probe and loudness analysis tools. Keep preparation and normalization behind Desktop confirmation. The existing pi-agent to synthv-agent-bridge to SynthV live note-insertion path remains unchanged.

中文:新增独立的音频准备页面,支持选择或拖入文件、格式检测、PCM WAV 准备、EBU R128 响度测量、确认后标准化、前后试听、打开位置、复制路径与另存为。所有写入操作都会展示输入、参数和输出位置,只生成唯一命名的新文件,不覆盖源音频,也不自动导入 SynthV 或运行 CVRS。

中文:加入真实 FFmpeg 组件维护界面、类型化 C ABI、SafeHandle、全局单任务互斥、进度与安全取消、跨页面任务条、页面状态保留和关闭清理;修正 x64/ARM64 native 构建映射并扩展真实 ABI 冒烟测试。同步 pi-agent 只读权限提交,同时保持 SynthV 实时音符插入链路不变。完整中英文更新记录见 CHANGELOG.md。

Validation: real C ABI smoke passed probe, prepare, loudness analysis, and normalization; Rust passed 57 tests with 2 intentionally ignored and Clippy -D warnings; SynthV Bridge passed 240 checks and remained unchanged; XAML XML and event-handler checks passed. Full WinUI XAML and ARM64 native builds remain pending on a node with Visual Studio C++ Build Tools, MSVC linker, and Windows SDK.
@LittleLaXerath

Copy link
Copy Markdown
Contributor Author

Superseded by the native Tauri implementation in #2 and #3.

The original branch is intentionally preserved as a UX and test reference, but it is based on the removed WinUI/P/Invoke architecture and cannot be safely rebased onto the current Rust/Tauri mainline. The replacement keeps the confirmed-write, PCM preparation, EBU R128, progress/cancellation, preview, safe Save As, and path-safety advantages while staying close to the current codebase.

已由原生 Tauri 实现 #2 与 #3 取代。

旧分支会保留,继续作为交互与测试参考;但它基于已经移除的 WinUI/P/Invoke 架构,不能安全 rebase 到当前 Rust/Tauri 主线。新实现保留了写入确认、PCM 准备、EBU R128、进度/取消、试听、安全另存为和路径安全等优势,同时贴合当前代码库。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant