4 Commits
Author SHA1 Message Date
blumia 8b9a8c420e chore(pack): add CPack configuration to build a deb package
Add install rules and CPack settings so cpack produces an installable
.deb. Dependencies are derived with dpkg-shlibdeps, so they follow the
binaries. The sherpa-onnx runtime the streaming backend needs is bundled
because no distro package provides it. The fetch-models script now also
locates its registry when installed system-wide.

增加 CPack 配置,可直接用 cpack 打出 deb:安装规则含桌面入口、应用图标、
模型注册表与下载脚本、用户文档;依赖由 dpkg-shlibdeps 自动推导;流式后端
需要的 sherpa-onnx 运行时(发行版无对应包)随包携带;fetch-models 脚本
装到系统后也能找到注册表。
2026-10-13 11:53:07 +08:00
blumia 0fa0bcb44a fix(gui): stop quitting when the last window closes; add device and verify
Accepting the settings dialog quit the app: with a tray-resident program
"last window closed" must not mean "quit", but QApplication's default
made it so, and on first run the dialog is the only window. Disable
quitOnLastWindowClosed. Also fix listOutputDevices hanging forever
(its callbacks never signalled the PulseAudio main loop), enlarge the
caption window's close button, and add capture-device selection
(enumerated sinks, settings combo, --list-devices/--device) plus model
integrity verification (size + sha256 in the registry, --verify-model and
a "校验完整性" button).

点「确定」后程序自己退出:本程序常驻托盘,"最后一个窗口关闭"不该等于退出,
但 QApplication 默认如此,而首次启动时设置对话框正是唯一窗口。已关闭该默认
行为。同时修复 listOutputDevices 永久卡死(回调没有 signal 主循环)、放大
字幕窗关闭按钮,并新增采集设备选择与模型完整性校验(注册表含 size/sha256,
提供 --verify-model 与设置里的「校验完整性」按钮)。
2026-10-12 17:03:20 +08:00
blumia a7a6f3e6b6 feat(gui): drive everything from settings, add tray and in-app download
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 不再依赖命令行参数:首次启动打开设置对话框,可在应用内下载模型
(下载源/代理/断点续传)、选择当前模型与识别语言;字幕窗增加托盘(显示
隐藏/设置/退出),关闭按钮改为隐藏到托盘以免关掉后无法再打开,语言标签
点击进设置;字号/透明度/行数/位置都会持久化。命令行参数保留作自动化测试。
2026-10-12 16:30:00 +08:00
blumia bd921b1ac5 feat(asr): add pluggable ONNX streaming backend and model registry
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。
2026-10-12 16:06:51 +08:00