diff options
| author | historia <historiavg@proton.me> | 2026-08-28 14:57:48 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-28 14:57:48 -0400 |
| commit | db38085d07ce75f8961eecdc1919e98748254c53 (patch) | |
| tree | beaea2ba84de05bfc2fa90e9b92a24568d3b4cb9 /app/converter/clients/faster.py | |
| parent | afb2c2d5b297c5aa28bcced0e3f90e207d799c2a (diff) | |
| download | tts-audiobook-generator-db38085d07ce75f8961eecdc1919e98748254c53.tar.gz | |
refactor: overhaul config.py, remove cli default options
Diffstat (limited to 'app/converter/clients/faster.py')
| -rw-r--r-- | app/converter/clients/faster.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/converter/clients/faster.py b/app/converter/clients/faster.py index f0874e0..48c26ab 100644 --- a/app/converter/clients/faster.py +++ b/app/converter/clients/faster.py @@ -33,7 +33,13 @@ class FasterTTSClient(BaseTTSClient): voice: Optional[str] = None, api_url: Optional[str] = None, quiet: bool = False): super().__init__(chunks_dir, quiet=quiet) - self.voice = voice or config.FASTER_VOICE + # The voice is per-run (--voice / the Generate form's Voice pick); + # there is no configured default. + self.voice = (voice or "").strip() + if not self.voice: + raise RuntimeError( + "The faster backend requires a voice: pass --voice NAME " + "naming a key in the server's voices.json (see README).") self.api_url = (api_url or config.FASTER_API_URL).rstrip("/") self._check_health() |
