Commit ddf5e3a8cd9f120d8e610381ea44073eaf07accb
1 parent
26285eda
tune(lifelog): 纪要关思考 + 声纹聚类阈值收紧
- HermesClient: 加 chat_template_kwargs.enable_thinking=false —— 纪要走本地 Qwen3.5,不需要 <think>,关掉省 token/发热(Kimi 等不认会忽略)。 - SpeakerClusterer: MATCH_THRESHOLD 0.5 → 0.55 —— 0.5 偏松过度合并 (4B 测试「说话人4」吃了 23 段),收紧分得更细。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Showing
2 changed files
with
6 additions
and
2 deletions
lifelog-recorder/app/src/main/kotlin/com/lemon/lifelog/asr/HermesClient.kt
| ... | ... | @@ -51,6 +51,9 @@ class HermesClient( |
| 51 | 51 | val payload = JSONObject().apply { |
| 52 | 52 | put("model", model) |
| 53 | 53 | put("max_tokens", maxTokens) |
| 54 | + // 本地 Qwen3.5 默认开思考——纪要不需要 <think>,关掉省 token/发热。 | |
| 55 | + // Kimi 等不认这个参数会忽略,故无条件加。 | |
| 56 | + put("chat_template_kwargs", JSONObject().put("enable_thinking", false)) | |
| 54 | 57 | put("messages", JSONArray().apply { |
| 55 | 58 | if (systemPrompt.isNotBlank()) { |
| 56 | 59 | put(JSONObject().apply { | ... | ... |
lifelog-recorder/app/src/main/kotlin/com/lemon/lifelog/asr/SpeakerClusterer.kt
| ... | ... | @@ -97,8 +97,9 @@ class SpeakerClusterer( |
| 97 | 97 | /** 自动簇命名前缀。重命名后不再以此开头,即视为「人工命名」。 */ |
| 98 | 98 | const val AUTO_PREFIX = "说话人" |
| 99 | 99 | |
| 100 | - /** CAMPPlus 余弦阈值:同人通常 > 0.55,异人 < 0.45,取 0.5 为分界。 */ | |
| 101 | - const val MATCH_THRESHOLD = 0.5f | |
| 100 | + /** CAMPPlus 余弦阈值:同人通常 > 0.55,异人 < 0.45。0.5 偏松易过度合并 | |
| 101 | + * (4B 测试时「说话人4」吃了 23 段),收紧到 0.55 分得更细。再细可上 0.6。 */ | |
| 102 | + const val MATCH_THRESHOLD = 0.55f | |
| 102 | 103 | |
| 103 | 104 | /** 短于此时长的段不开新簇(短段 embedding 噪声大,易产生伪说话人)。 */ |
| 104 | 105 | const val MIN_NEW_CLUSTER_MS = 1000L | ... | ... |