diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-20 07:20:46 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-20 07:32:54 +0800 |
| commit | 9b896d697eb582dedd2533f6d2054f062c8381a0 (patch) | |
| tree | b7e8db33af8e6837f3d389d4302b821d401ec0d8 /help.txt | |
| parent | 69354929928d1d071698262c259cdffbf9aec468 (diff) | |
feat: add custom help message and fix clap help conflict
Disable clap's built-in help flag and reroute `-h`/`--help` to
print an embedded help text from `help.txt`. Use `try_parse` to
avoid clap's default exit on parse failure, allowing custom error
output.
Diffstat (limited to 'help.txt')
| -rw-r--r-- | help.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/help.txt b/help.txt new file mode 100644 index 0000000..013c782 --- /dev/null +++ b/help.txt @@ -0,0 +1,33 @@ +Usage: dmvop [OPTIONS] + +Options + --device=<name> Microphone (WASAPI name or device ID). Required. + -O, --output=<mode> Output destination(s). May be repeated. [default: stdout] + stdout | stderr | tcp | udp | udp-broadcast | ipc + -m, --model=<model> Whisper model. [default: base_en] + --lang=<code> Language hint (zh, ja, en, fr...). Skips detection. + -f, --format=<pattern> Output format with %{vol}, %{word}, %{confid}. + [default: %{vol},%{word}] + -S, --format-file=<path> Read format from file. + -p, --port=<num> Port for TCP/UDP modes. [default: 5117] + --socket-file=<path> Unix socket path for IPC. [default: ./dmvop.sock] + --subnet-mask=<mask> Subnet mask for UDP broadcast. + [default: 255.255.255.0] + -L, --list-devices List microphones and exit. + --list-models List Whisper models and exit. + --download-model=<name> Download a model and exit. + -V, --verbose Show debug output. + -h, --help Show this help. + +Examples + dmvop --list-devices + dmvop --device="My Mic" -O stdout -O tcp -m small --lang=zh + dmvop --device="My Mic" -f "[%{vol}] %{word}" + dmvop --device="My Mic" -O udp-broadcast -p 8888 + dmvop --download-model=small + +Notes + - First run downloads the model (~142 MB for base_en). + - Use --verbose to see speech events and timing. + - Ctrl+C to stop. + - All outputs initialize in parallel. |
