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 不再依赖命令行参数:首次启动打开设置对话框,可在应用内下载模型 (下载源/代理/断点续传)、选择当前模型与识别语言;字幕窗增加托盘(显示 隐藏/设置/退出),关闭按钮改为隐藏到托盘以免关掉后无法再打开,语言标签 点击进设置;字号/透明度/行数/位置都会持久化。命令行参数保留作自动化测试。
This commit is contained in:
1 parent
b37b9eb779
commit
a7a6f3e6b6
15 files changed
+1175
-90
No files matched your search
@@ -33,10 +33,16 @@ aria2c -x16 -s16 -k4M -o mmproj-Qwen3-ASR-0.6B-Q8_0.gguf "$B/mmproj-Qwen3-ASR-0.
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j
|
||||
|
||||
# 3. 悬浮字幕窗
|
||||
./build/live-caption \
|
||||
--model Qwen3-ASR-0.6B-Q8_0.gguf \
|
||||
--mmproj mmproj-Qwen3-ASR-0.6B-Q8_0.gguf
|
||||
# 3. 悬浮字幕窗(首次启动会打开设置对话框,引导下载并选择模型)
|
||||
./build/live-caption
|
||||
|
||||
# 完全通过 GUI 操作:
|
||||
# · 首次启动 → 设置对话框:下载模型 / 选择当前使用 / 选识别语言 / 下载源与代理
|
||||
# · 点左上角的语言标签 → 再次打开设置
|
||||
# · 托盘图标:显示/隐藏字幕、设置、退出
|
||||
# · 窗口的 ✕ = 隐藏到托盘(用托盘菜单可以再显示回来)
|
||||
# 命令行参数仍保留,仅用于自动化测试(显式给出时覆盖设置),例如:
|
||||
# ./build/live-caption --asr-backend sherpa --asr-model zipformer-zh-2025 --no-tray
|
||||
|
||||
# 4. 命令行:单文件转写 / 流式转写 / 无窗口实时
|
||||
./build/live-caption-cli --model M --mmproj MM --file some_16k_mono.wav
|
||||
@@ -55,7 +61,8 @@ ctest --test-dir build --output-on-failure
|
||||
- **`sherpa`**:sherpa-onnx + 流式 ONNX 模型(X-ASR / zipformer / Nemotron) —— 原生流式,每步成本恒定,CPU 约为前者的 1/35,中英准确率持平。
|
||||
|
||||
模型都放在 `~/.local/share/live-caption/models/`,注册表是 `data/models.json`
|
||||
(**加模型只加一条数据,不改代码**),用 `scripts/fetch-models.sh` 下载。
|
||||
(**加模型只加一条数据,不改代码**)。GUI 里可以直接下载(支持设置下载源与代理、
|
||||
断点续传),命令行下也可以用 `scripts/fetch-models.sh`。
|
||||
|
||||
```bash
|
||||
# 流式后端
|
||||
|
||||
Reference in new issue
Block a user