aboutsummaryrefslogtreecommitdiff
path: root/converter/config.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-18 23:27:42 -0400
committerhistoria <historiavg@proton.me>2026-08-18 23:27:42 -0400
commitf3e21980320c1708ff17cc6f699a9aa4758accdf (patch)
tree596ff71ba68600bb24a5a9d88424951c77e02808 /converter/config.py
parenta97c0506f8b20cdc5ed8a11892ef10a9fc1938ef (diff)
downloadtts-audiobook-generator-f3e21980320c1708ff17cc6f699a9aa4758accdf.tar.gz
feat: support for faster-qwen3-tts backend server
Diffstat (limited to 'converter/config.py')
-rw-r--r--converter/config.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/converter/config.py b/converter/config.py
index f795520..efec0dd 100644
--- a/converter/config.py
+++ b/converter/config.py
@@ -108,6 +108,28 @@ VOICE_CLONE_SEED = -1
VOICE_CLONE_API_URL = "http://127.0.0.1:7861"
# =============================================================================
+# FASTER TTS SETTINGS (optional --faster backend)
+# =============================================================================
+# --faster talks to the OpenAI-compatible server from faster-qwen3-tts
+# (examples/openai_server.py) instead of the qwen-tts Gradio demos. The
+# reference voice (ref audio, ref text) and language are configured on the
+# SERVER side (--ref-audio/--ref-text or a --voices JSON file); the converter
+# only sends text. See the "Faster backend" section of the README.
+
+FASTER_TTS_API_URL = "http://127.0.0.1:8000"
+# Voice entry to request. MUST match a key in the server's voices.json (or
+# "default" when the server was launched with --ref-audio). NOTE: the stock
+# server silently falls back to its first configured voice when the requested
+# name is unknown, so a mismatch here is easy to miss.
+FASTER_TTS_VOICE = "default"
+FASTER_TTS_SAMPLE_RATE = 24000 # Qwen3-TTS 12Hz codec output rate
+# The Gradio demo sub-chunked text server-side (~200 chars); the faster server
+# takes one generation per request, so long chunks are sub-chunked client-side.
+FASTER_SUBCHUNK_WORDS = 40 # ~200 chars per request
+FASTER_HTTP_TIMEOUT = 300 # Seconds before a speech request times out
+FASTER_SUBCHUNK_RETRIES = 3 # Attempts per sub-chunk request
+
+# =============================================================================
# PROCESSING SETTINGS
# =============================================================================