Spaces:
Paused
Paused
Commit History
-
feat: persist voice profiles to Voice_Profile/ with auto-load on startup
Voice profile persistence: - Profiles saved to Voice_Profile/<id>/profile.pt + metadata.json on clone - On app startup, most recent profile auto-loaded as default voice - voice_profile_state initialized with saved profile (or None for stock) - synthesize_cloned() falls back to disk if not in memory cache - has_profile() checks both memory cache and disk - create_voice_profile() now accepts voice_name param for metadata - Player shows actual cloned voice name (from metadata) instead of generic label New APIs in voice_clone.py: - save_profile_to_disk(profile_id, voice_name) -> Path - load_profile_from_disk(profile_id) -> bool - list_saved_profiles() -> list[dict] - load_default_profile() -> str | None Voice_Profile/ added to .gitignore (user data). 102 tests pass (28 latency/persistence + 74 integration). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>0d420e4 -
perf: add TTS latency optimizations
Optimizations applied to voice_clone.py and tts.py: - Auto-select bfloat16 (Ampere+) or float16 per GPU architecture - FlashAttention-2 when available, SDPA fallback - Streaming mode (non_streaming_mode=False) - Reduced sampling: top_k=20, temperature=0.7, max_new_tokens=1024 - torch.set_float32_matmul_precision('high') - torch.compile on decoder/predictor submodules (best-effort) - Reference audio trimmed to 10s max for faster embedding extraction - 0.6B CustomVoice model as fast non-cloned fallback (env: QWEN_TTS_MODE) - Added librosa to requirements.txt - FlashAttention-2 install instructions in requirements.txt - 18-test suite for all optimization configs (test_latency_optimizations.py) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d3a755c