From 6cfcd564c0684c52618235e6366f4a81c02b9a5b Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 1 Sep 2026 14:32:05 -0400 Subject: slop refactor/dedup --- app/converter/clients/faster.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/converter/clients/faster.py') diff --git a/app/converter/clients/faster.py b/app/converter/clients/faster.py index 48c26ab..eeecee9 100644 --- a/app/converter/clients/faster.py +++ b/app/converter/clients/faster.py @@ -31,8 +31,8 @@ class FasterTTSClient(BaseTTSClient): def __init__(self, chunks_dir: Path, voice: Optional[str] = None, api_url: Optional[str] = None, - quiet: bool = False): - super().__init__(chunks_dir, quiet=quiet) + quiet: bool = False, cancel=None): + super().__init__(chunks_dir, quiet=quiet, cancel=cancel) # The voice is per-run (--voice / the Generate form's Voice pick); # there is no configured default. self.voice = (voice or "").strip() @@ -85,10 +85,12 @@ class FasterTTSClient(BaseTTSClient): except urllib.error.HTTPError as exc: detail = "" try: - detail = exc.read().decode("utf-8", errors="replace")[:200] + detail = exc.read().decode("utf-8", errors="replace") except Exception: pass - raise RuntimeError(f"Faster TTS server returned HTTP {exc.code}: {detail}") from exc + raise RuntimeError( + f"Faster TTS server returned HTTP {exc.code}: {detail[:200]}" + ) from exc except urllib.error.URLError as exc: raise RuntimeError(f"Faster TTS request failed: {exc.reason}") from exc if not pcm: -- cgit v1.2.3