Add voice history, default preset voice, and one-click tab

Keep synthesized wav files browsable with playback and download, default to preset steady male voice, show one-click pipeline as the first tab, and reduce post-synthesis UI flicker.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-12 18:37:53 +08:00
parent 7c50b13c57
commit bdc63c04df
4 changed files with 269 additions and 119 deletions
-6
View File
@@ -635,7 +635,6 @@ def _concat_wavs(
def generate_voice(
refined_text: str,
voice_id: str = "custom",
progress_callback=None,
) -> Tuple[bool, str, Optional[str]]:
"""
使用 ChatTTS(本地 GPU)将润色稿合成为 wav。
@@ -725,11 +724,6 @@ def generate_voice(
for idx, chunk in enumerate(chunks, start=1):
if not chunk or len(chunk) < 2:
continue
if progress_callback is not None:
try:
progress_callback(idx, len(chunks))
except Exception:
logger.debug("TTS 进度回调失败", exc_info=True)
release_cuda_cache()
chunk_infer = replace(params_infer_code, manual_seed=42 + idx)
wavs = None