feat: #1768 节奏曲线模板多样化 — 8种预设 + 时长钳制 + 误差校验 #1788
Reference in New Issue
Block a user
Delete Branch "feat/rhythm-templates-diversify-1768"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#1768 节奏曲线模板多样化
变更内容
1. 模板池扩展(6 → 8 种)
[2,2,1,1,2](前重后轻节奏)[3,2,1,2,1](渐弱节奏)2. Bug 修复
MIN_CLIP_DURATION被重复定义为 1.0 的 bug(恢复为 2.0s)3. 最大片段时长钳制
plan_clip_durations()新增asset_durations参数asset_durations时完全向后兼容4. 时长总和误差校验
5. 调用方更新
edit_plan_service.apply_voice_duration_to_plan传入素材时长参与钳制文件变更
packages/domain/voice_duration_planner.py— 核心模块apps/api/app/services/edit_plan_service.py— 调用方传入素材时长tests/unit/domain/test_rhythm_templates_v2.py— 48 个新增单元测试测试
✅ 48 个新测试全部通过
✅ 78 个已有测试无回归
约束
asset_durations默认 None🚀 预览环境已部署
2024086e5ftoacac17d8f2569e5aa3dcto1ebc9295e87069c9edc1toee4636e087🗑️ 预览环境已清理
PR #1788 已关闭或合并,对应的预览环境已被清理。