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 以便给单个 页签截图。
This commit is contained in:
1 parent
d234b9658d
commit
6c04071bb5
8 files changed
+252
-25
No files matched your search
@@ -42,6 +42,15 @@ void AppSettings::load()
|
||||
|
||||
chunkSec = s.value(QStringLiteral("chunkSec"), 0.0).toDouble();
|
||||
threads = s.value(QStringLiteral("threads"), 8).toInt();
|
||||
|
||||
streamMode = s.value(QStringLiteral("streamMode"), QStringLiteral("incremental")).toString();
|
||||
streamWindowSec = s.value(QStringLiteral("streamWindowSec"), 16.0).toDouble();
|
||||
streamSegmentSec = s.value(QStringLiteral("streamSegmentSec"), 30.0).toDouble();
|
||||
unfixedTokens = s.value(QStringLiteral("unfixedTokens"), 5).toInt();
|
||||
unfixedChunks = s.value(QStringLiteral("unfixedChunks"), 2).toInt();
|
||||
maxTokens = s.value(QStringLiteral("maxTokens"), 256).toInt();
|
||||
verbose = s.value(QStringLiteral("verbose"), false).toBool();
|
||||
modelDir = s.value(QStringLiteral("modelDir")).toString();
|
||||
s.endGroup();
|
||||
}
|
||||
|
||||
@@ -74,6 +83,14 @@ void AppSettings::save()
|
||||
|
||||
s.setValue(QStringLiteral("chunkSec"), chunkSec);
|
||||
s.setValue(QStringLiteral("threads"), threads);
|
||||
s.setValue(QStringLiteral("streamMode"), streamMode);
|
||||
s.setValue(QStringLiteral("streamWindowSec"), streamWindowSec);
|
||||
s.setValue(QStringLiteral("streamSegmentSec"), streamSegmentSec);
|
||||
s.setValue(QStringLiteral("unfixedTokens"), unfixedTokens);
|
||||
s.setValue(QStringLiteral("unfixedChunks"), unfixedChunks);
|
||||
s.setValue(QStringLiteral("maxTokens"), maxTokens);
|
||||
s.setValue(QStringLiteral("verbose"), verbose);
|
||||
s.setValue(QStringLiteral("modelDir"), modelDir);
|
||||
s.endGroup();
|
||||
s.sync();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user