aboutsummaryrefslogtreecommitdiff
path: root/converter/converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'converter/converter.py')
-rw-r--r--converter/converter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/converter/converter.py b/converter/converter.py
index 4da3626..3915fe4 100644
--- a/converter/converter.py
+++ b/converter/converter.py
@@ -18,7 +18,7 @@ from .tts import (
BACKENDS,
BACKEND_AUDIOCPP,
BACKEND_FASTER,
- BACKEND_GRADIO,
+ BACKEND_QWEN,
MODEL_SIZE,
VOICE_MODE_CLONE,
VOICE_MODE_CUSTOM,
@@ -131,12 +131,12 @@ def prompt_overwrite(existing: List[Path], output_name: str) -> bool:
class AudiobookConverter:
- """Audiobook converter using the Qwen TTS API."""
+ """Audiobook converter using a local TTS API."""
def __init__(self, voice_mode: str = VOICE_MODE_CUSTOM, voice_clone_ref_audio: Optional[str] = None,
voice_clone_ref_text: Optional[str] = None, skip_transcription: bool = False,
speed: float = 1.0, single_file: bool = False, output_format: str = config.AUDIO_FORMAT,
- language: Optional[str] = None, backend: str = BACKEND_GRADIO,
+ language: Optional[str] = None, backend: str = config.BACKEND,
voice: Optional[str] = None, debug: bool = False,
chunk: bool = False, model_id: Optional[str] = None):
if speed <= 0:
@@ -158,7 +158,7 @@ class AudiobookConverter:
self.backend = backend
self.voice = voice
self.debug = bool(debug)
- # Client-side chunking: the gradio and faster backends always chunk
+ # Client-side chunking: the qwen and faster backends always chunk
# (their servers do one generation per request and silently truncate
# long text). The audio.cpp server chunks long text itself, so it
# defaults to one request per chapter; --chunk forces client-side
@@ -192,7 +192,7 @@ class AudiobookConverter:
f"Unknown voice mode: {self.voice_mode!r} "
f"(expected one of {VOICE_MODES})"
)
- if self.voice_mode == VOICE_MODE_CLONE and self.backend == BACKEND_GRADIO:
+ if self.voice_mode == VOICE_MODE_CLONE and self.backend == BACKEND_QWEN:
if not self.voice_clone_ref_audio:
raise ValueError(
"Voice Clone mode requires a reference audio file. "
@@ -464,7 +464,7 @@ class AudiobookConverter:
def _chapter_chunks(self, text: str) -> List[str]:
"""Split chapter text into TTS requests.
- Client-side chunking splits into CHUNK_SIZE-word chunks (gradio and
+ Client-side chunking splits into CHUNK_SIZE-word chunks (qwen and
faster always; audio.cpp only with --chunk). Otherwise (audio.cpp
default) the whole text is one request and the server does its own
long-form chunking.
@@ -575,7 +575,7 @@ class AudiobookConverter:
def _print_banner(self) -> None:
"""Print the startup summary for the selected backend."""
print("=" * 70)
- print("QWEN-BASED AUDIOBOOK CONVERTER")
+ print("TTS AUDIOBOOK GENERATOR")
print("=" * 70)
print(f"Books folder: {BOOKS_FOLDER}")
print(f"Output folder: {AUDIOBOOKS_FOLDER}")