aboutsummaryrefslogtreecommitdiff
path: root/app/ui/hub.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-25 16:49:36 -0400
committerhistoria <historiavg@proton.me>2026-08-25 16:49:36 -0400
commit775b716d86f5e681807698522e56c3d0f861c5bf (patch)
tree420b31c7b2f743ee83ad933bbc00073d5f6b9e2a /app/ui/hub.py
parent867866f131b0b6c76c54272791e7f7dea01db990 (diff)
downloadtts-audiobook-generator-775b716d86f5e681807698522e56c3d0f861c5bf.tar.gz
feat: combine --speaker and --voice for clarity
Diffstat (limited to 'app/ui/hub.py')
-rw-r--r--app/ui/hub.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py
index 84b4155..f937b84 100644
--- a/app/ui/hub.py
+++ b/app/ui/hub.py
@@ -741,7 +741,6 @@ def _preflight(stdscr, cmd: tuple) -> bool:
voice_clone_ref_audio=kwargs.get("clone"),
output_format=kwargs.get("output_format") or config.AUDIO_FORMAT,
instructions=kwargs.get("instructions"),
- speaker=kwargs.get("speaker"),
confirm=confirm)
if not book_files:
tui.flash(stdscr, "No books to convert. Add a .txt, .pdf or .epub "
@@ -994,19 +993,15 @@ def _audiocpp_fields(stdscr, api_url: Optional[str] = None) -> Optional[tuple]:
capability = audiocpp_entry_voice_capability(
entry.get("family") or "", entry.get("task") or "tts",
entry.get("id") or "")
- picked = result["audiocpp_voice"]
- voice = None
- speaker = None
- if capability == AUDIOCPP_VOICE_SPEAKER:
- speaker = picked or None
- elif capability == AUDIOCPP_VOICE_CLONE:
- voice = picked or None
- # design: neither — the voice comes from --instructions
+ # The picked voice (a built-in speaker name on a CustomVoice entry,
+ # a server-side preset otherwise); the client resolves which it is.
+ voice = result["audiocpp_voice"] or None
+ # design: the voice comes from --instructions
instructions = None
if capability in (AUDIOCPP_VOICE_DESIGN, AUDIOCPP_VOICE_SPEAKER):
instructions = (result["instructions"] or "").strip() or None
kwargs = {
- "model_id": model_id, "voice": voice, "speaker": speaker,
+ "model_id": model_id, "voice": voice,
"instructions": instructions,
**_common_kwargs(result),
}