The GUI no longer needs command line arguments: on first run it opens a
settings dialog that lists the registry, downloads models in-app (mirror
base, HTTP proxy, resume), and picks the active model. The caption window
gains a tray icon (show/hide, settings, quit); its close button hides to
the tray so the window can always be brought back, and the language pill
opens the settings. Appearance (font, opacity, line counts, position) is
persisted. CLI flags remain for automated testing and override settings.
GUI 不再依赖命令行参数:首次启动打开设置对话框,可在应用内下载模型
(下载源/代理/断点续传)、选择当前模型与识别语言;字幕窗增加托盘(显示
隐藏/设置/退出),关闭按钮改为隐藏到托盘以免关掉后无法再打开,语言标签
点击进设置;字号/透明度/行数/位置都会持久化。命令行参数保留作自动化测试。
Add a second backend (sherpa-onnx) alongside llama.cpp, so native
streaming models can be selected by ID from a JSON registry. All such
models share one adapter: only the model files and a few options differ.
Models now live under the app data directory and are fetched by
scripts/fetch-models.sh. Adding a model is a data change, not code.
Measured on the same audio: the streaming backend is ~35x cheaper in CPU
than Qwen3-ASR (0.10-0.12 vs 4.27 core-seconds per audio second), shows
the first caption at 0.48-1.44s, and matches its accuracy for zh/en.
新增 sherpa-onnx 流式后端,与 llama.cpp 并存;模型按注册表 id 从应用
数据目录加载。同族模型共用一个适配器,新增模型只改 data/models.json。
实测流式后端 CPU 约为 Qwen3-ASR 的 1/35,首个字幕 0.48~1.44s,中英
准确率持平。注意预编译库是旧 C++ ABI,必须走其 C API。
Qt does not print default values in --help output; the default passed to
the option constructor is only a fallback for value(). Append them to
the descriptions instead, via one shared helper used by both programs.
Qt 不会把默认值印进 --help(构造参数里的默认值只作为 value() 的兜底),
改为在说明后拼上「(默认 X)」;两个程序共用同一处定义,并统一了措辞。
Move all business logic into liblivecaption_core (no Qt dependency) and
the widgets into liblivecaption_ui, leaving two executables: the caption
window and the CLI, which no longer links Qt Widgets. Abstract the ASR
backend behind IAsr so the streaming policy and the live pipeline can be
tested with a scripted fake backend instead of a real model.
把全部业务逻辑下沉到不依赖 Qt 的 liblivecaption_core,界面独立成
liblivecaption_ui,拆出悬浮窗与命令行两个可执行程序(CLI 不再链接 Qt
Widgets);并用 IAsr 抽象推理后端,使流式策略与实时管线可脱离真模型
用假实现做单元测试。测试还抓到一个真 bug:段恰好结束在 chunk 边界时
只提交了稳定部分,最后几个词被丢掉,已修。