diff options
| author | historia <historiavg@proton.me> | 2026-08-25 16:49:36 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-25 16:49:36 -0400 |
| commit | 775b716d86f5e681807698522e56c3d0f861c5bf (patch) | |
| tree | 420b31c7b2f743ee83ad933bbc00073d5f6b9e2a /app/ui | |
| parent | 867866f131b0b6c76c54272791e7f7dea01db990 (diff) | |
| download | tts-audiobook-generator-775b716d86f5e681807698522e56c3d0f861c5bf.tar.gz | |
feat: combine --speaker and --voice for clarity
Diffstat (limited to 'app/ui')
| -rw-r--r-- | app/ui/hub.py | 15 |
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), } |
