Add audio generation config, refactor rep_announcer

- AudioConfig now includes rep_max_count and rep_audio_dir
- app/audio/generate.py uses config instead of hardcoded constants
- RepAnnouncer rewrote with pre-generated audio cache
- Supports Windows winsound, macOS afplay, Linux paplay/aplay
- Pin requirements back to mediapipe==0.10.21 with numpy<2
This commit is contained in:
2026-06-10 11:42:40 +08:00
parent 1f6c3f3de8
commit b45a8e2e85
5 changed files with 337 additions and 56 deletions
+2
View File
@@ -22,6 +22,8 @@ audio:
rep_announcer_enabled: true
rep_announcer_rate: 185
rep_announcer_volume: 1.0
rep_max_count: 200 # 预生成语音文件的最大次数
rep_audio_dir: "" # 空 = 自动使用 app/audio/reps
logging:
dir: logs