Commit Graph
5 Commits
Author SHA1 Message Date
blumia 898763eb74 fix(gui): drop a dead setting, make the language list and tail toggle real
Three settings were only half-wired:

- autoPickByLanguage was saved but never read anywhere: delete it.
- showUnstableTail had a checkbox and a setter, but nothing ever called
  the setter, so the checkbox did nothing: apply it in applyAppearance
  and re-render from the cached text instead of blanking the caption.
- the language dropdown was hard-coded to auto/zh/en/ja while the registry
  declares up to 16 languages per model: build it from the selected
  model's own language list, with an ISO-code to display-name mapping
  (plus a unit test covering every code in the registry). The caption
  window's language pill now follows the setting too, instead of keeping
  whatever it showed at startup.

windowPos is not dead -- it stores the dragged window position -- so it stays.

三个「半死」设置:autoPickByLanguage 存了但从没被读取,直接删掉;showUnstableTail
有复选框也有 setter,但从来没人调用 setter(复选框点了没用),改为在 applyAppearance
里生效并用缓存文本重画;「识别语言」下拉原来硬编码 自动/中/英/日,而注册表里每个模型
声明了最多 16 种语言,改为按所选模型的语言动态生成,并补 ISO 码→显示名映射与单元测试。
字幕窗的语言标签也跟着设置走了(原来只在启动时读一次)。windowPos 不是死设置(它存的
是拖动后的位置),保留。
2026-10-12 17:48:21 +08:00
blumia 6c04071bb5 feat(gui): expose the streaming and debug options in the advanced page
These were command-line only. Add them to the settings dialog so the whole
feature set is reachable without arguments: stream mode, window limit,
segment limit, prefix-rollback token count, cold-start chunk count, max
tokens per step, thread count, verbose logging and the model directory. The
streaming group is grouped and greyed out for streaming-ONNX models, which
only use the commit granularity. The backend fingerprint now includes them,
so changing one restarts the recogniser; appearance changes still apply live.

Also add a test-only --settings-tab so a specific page can be screenshotted.

设置「高级」页补上原来只有命令行才有的选项:流式策略/滑窗上限/单段最长/前缀回滚
token 数/冷启动 chunk 数/单段最多生成 token/线程数/详细日志/模型目录。流式那一组
单独成组,选了流式 ONNX 模型时置灰(它们只用「更新粒度」)。这些值纳入「后端指纹」,
改动会重启识别后端;外观类改动仍然即时生效。另加测试用 --settings-tab 以便给单个
页签截图。
2026-10-12 17:36:43 +08:00
blumia 370c869ad0 feat(gui): add an Apply button for live preview of settings
Split applying settings from closing the dialog, so appearance changes
(opacity, font size, line counts) can be previewed without dismissing it.
The caption window now listens to settingsApplied and updates immediately;
only model, language or capture-device changes restart the ASR backend.

设置对话框新增「应用」按钮:应用设置但不关闭对话框,方便实时预览(不透明度、
字号等立刻可见)。字幕窗改为监听 settingsApplied 即时更新;只有模型/识别语言/
采集设备变化才重启识别后端,外观调整不会打断正在进行的转写。
2026-10-12 17:18:16 +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