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 与设置里的「校验完整性」按钮)。
This commit is contained in:
1 parent
a7a6f3e6b6
commit
0fa0bcb44a
19 files changed
+460
-55
No files matched your search
@@ -63,6 +63,26 @@ IAsr(src/core/iasr.h)
|
||||
> 同步/自旋开销会让它更慢(8 线程比 1 线程慢 2.6 倍、CPU 高 28 倍)。所以适配器里固定
|
||||
> `threads = 1`。
|
||||
|
||||
## 采集设备选择
|
||||
|
||||
默认跟随系统默认输出;也可以在设置里指定某个输出设备(`--list-devices` 可列出):
|
||||
|
||||
```bash
|
||||
./build/live-caption-cli --list-devices
|
||||
./build/live-caption-cli --cli-live --device alsa_output...HiFi__HDMI1__sink
|
||||
```
|
||||
|
||||
## 完整性校验
|
||||
|
||||
注册表里每个文件都记了 `size` 与 `sha256`:
|
||||
|
||||
- 快速检查(打开/选择模型时):文件存在且**大小**对得上;
|
||||
- 完整校验(设置里「校验完整性」或 `--verify-model <id>`):逐个**重算 sha256**,损坏的文件名会列出来。
|
||||
|
||||
```bash
|
||||
./build/live-caption-cli --verify-model zipformer-zh-2025
|
||||
```
|
||||
|
||||
## 两个坑
|
||||
|
||||
1. **sherpa-onnx 的预编译库是旧 C++ ABI**(`_GLIBCXX_USE_CXX11_ABI=0`),和 Qt 的新 ABI 冲突,
|
||||
|
||||
Reference in new issue
Block a user