speaker_helper.click_cli module
Click-based command-line interface for speaker-helper (the primary CLI).
Module summary
speaker-helper ships two CLI front-ends over the same command handlers: the
standard-library argparse one in speaker_helper.cli (dependency-
free, exposed as speaker-helper-argparse) and this click one (the default speaker-helper
entry point). Click gives nicer help, grouped sub-commands, and composable
options; to avoid two diverging implementations, every command here just builds
the argparse.Namespace the shared _cmd_* handlers already expect and
delegates to them. So the logic lives once, in speaker_helper.cli; this
module is only a front-end.
Global options (--backend, --engine, --language, the --clone*
family, …) sit on the top-level group, so they precede the sub-command —
speaker-helper --backend mock synth "hi" — exactly like the argparse CLI’s
“global flags precede the sub-command” behaviour. They are stashed on the click
context and merged into each command’s namespace.
Usage example
speaker-helper synth "Bonjour le monde." -o hello.wav --engine kokoro
speaker-helper route --condition online_realtime --language fr
speaker-helper --backend mock voices --engine kokoro
speaker-helper serve --bind-host 0.0.0.0 --bind-port 8080