From 2f07e907a889d2954032b345278497b4e409bdd9 Mon Sep 17 00:00:00 2001 From: mohitkale Date: Fri, 24 Jul 2026 02:25:41 +0530 Subject: [PATCH 1/8] Fix CI Ruff failures in ASR and Chatterbox engines Replace bare except-pass with logged/explicit fallbacks and sort Chatterbox imports so lint-and-test passes. --- app/engines/asr.py | 3 ++- app/engines/chatterbox.py | 2 +- scripts/chatterbox_worker.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/engines/asr.py b/app/engines/asr.py index d2167d5..c6f7370 100644 --- a/app/engines/asr.py +++ b/app/engines/asr.py @@ -114,6 +114,7 @@ def release_asr_model() -> None: if torch.cuda.is_available(): torch.cuda.empty_cache() except Exception: - pass + # Best-effort cleanup — free references even if CUDA teardown fails. + logger.debug("ASR CUDA cleanup failed", exc_info=True) _asr_processor = None _asr_model = None diff --git a/app/engines/chatterbox.py b/app/engines/chatterbox.py index 5a509e0..20fcde7 100644 --- a/app/engines/chatterbox.py +++ b/app/engines/chatterbox.py @@ -24,8 +24,8 @@ Tier, VoiceArtifact, ) -from app.engines.wav_output import to_wav_bytes from app.engines.chatterbox_daemon import synthesize_via_daemon +from app.engines.wav_output import to_wav_bytes from app.engines.worker_client import ping_worker from app.storage import artifacts_dir diff --git a/scripts/chatterbox_worker.py b/scripts/chatterbox_worker.py index a7e6fbc..44c123b 100644 --- a/scripts/chatterbox_worker.py +++ b/scripts/chatterbox_worker.py @@ -44,7 +44,8 @@ def cmd_setup(_args: argparse.Namespace) -> int: if torch.cuda.is_available(): device = "cuda" except Exception: - pass + # Torch may be missing or CUDA unavailable in the worker venv. + device = "cpu" ChatterboxTTS.from_pretrained(device=device) emit("setup_complete") except Exception as exc: From c54dca187589478f7558367c5cded6a5ccace815 Mon Sep 17 00:00:00 2001 From: mohitkale Date: Fri, 24 Jul 2026 02:34:59 +0530 Subject: [PATCH 2/8] Add Studio consent checkbox and token-optional engine loading Require an explicit consent acknowledgement before clone, default to openvoice-v2, and load engines/voices when the API has no token configured. --- app/static/index.html | 121 ++++++++++++++++++++++------------------ tests/test_studio_ui.py | 2 + 2 files changed, 70 insertions(+), 53 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index 299c296..baf35d7 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -256,11 +256,11 @@

VoiceForge Studio

1. Clone

- + @@ -308,11 +308,20 @@

1. Clone

+ +

All supported engines are listed below. ready means - bundled in this deployment; not in this deployment means you - can clone with it elsewhere (Docker GPU) but not here. Failed voices - in the list are usually old attempts — delete them. + usable in this process; other labels mean extra install, GPU, or a + sidecar is required. Start with openvoice-v2 on CPU. + Failed voices in the list are usually old attempts — delete them.

@@ -346,7 +355,7 @@

Voices