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
@@ -109,7 +109,7 @@ inline void addBackendOptions(QCommandLineParser & p)
|
||||
// 按注册表里的模型直接构造后端(GUI 用;不依赖任何命令行参数)
|
||||
inline std::unique_ptr<IAsr> makeAsrForModel(const models::ModelInfo & m,
|
||||
const QString & language,
|
||||
int threads, bool verbose,
|
||||
int threads, int maxTokens, bool verbose,
|
||||
std::string * err)
|
||||
{
|
||||
QStringList missing;
|
||||
@@ -125,6 +125,7 @@ inline std::unique_ptr<IAsr> makeAsrForModel(const models::ModelInfo & m,
|
||||
o.modelPath = m.filePath(QStringLiteral("model")).toStdString();
|
||||
o.mmprojPath = m.filePath(QStringLiteral("mmproj")).toStdString();
|
||||
o.threads = threads;
|
||||
if (maxTokens > 0) o.maxTokens = maxTokens;
|
||||
o.verbose = verbose;
|
||||
auto a = std::make_unique<Qwen3Asr>();
|
||||
if (!a->load(o, err)) return nullptr;
|
||||
|
||||
Reference in new issue
Block a user