无缝插话提速+切行即挂名:深低分一票强切(deepLowSwitch=0.22,同人实测最低~0.39/异人窗0.14~0.19,安全带中枢),浅低维持两票;SWITCH-FORCE 改走 onOnsetSwitch 落地通道,切行同时经 pendingOnsetLabel 挂已知标签或当场占号(与开口即查共用防双号/封行/时序作废),不再等下一句结算;无缝场景 4~6s→3~4s 且标签即时
This commit is contained in:
parent
86cea18dcb
commit
a4631a0735
|
|
@ -189,6 +189,10 @@ class MainActivity : AppCompatActivity() {
|
|||
// 实测(2026-09-14):2s 短窗 + base 模型下同人 simA 在 0.05~0.7 震荡,
|
||||
// 阈值维度已不可分 → 判定窗加长到 4s 拉开分布,阈值回调到 0.35
|
||||
private val speakerSwitchDrop = 0.35f // cos(window, reference) below this => switch
|
||||
// 深低分一票强切(2026-09-16):同人波动实测最低 ~0.39,异人插话窗稳落
|
||||
// 0.14~0.19,0.22 取安全带中枢——深低首票即切(无缝插话 4~6s→3~4s);
|
||||
// 0.22~0.35 浅低维持连续两票,毛刺照旧被误断防护拦下
|
||||
private val deepLowSwitch = 0.22f
|
||||
// 最近邻兜底(P1 收紧,2026-09-11):精确匹配不中→top≥0.42 且领先第二名
|
||||
// ≥0.06 才归入最相似身份;模糊判新人(修"错并到别人行")
|
||||
private val verdictFallbackMin = 0.42f
|
||||
|
|
@ -771,16 +775,35 @@ class MainActivity : AppCompatActivity() {
|
|||
// 路线A:只"预备",不立即切
|
||||
switchSuspicionAtMs =
|
||||
SystemClock.elapsedRealtime()
|
||||
val deepLow = simA < deepLowSwitch
|
||||
Log.i(TAG, "SWITCH-SUSPECT" +
|
||||
" armed fast-endpoint owner=sid$owner")
|
||||
// 无缝插话确证:连续低分够了
|
||||
// → 不等停顿,本窗立即强判
|
||||
if (rollingLowStreak >= forceSwitchStreaks) {
|
||||
pendingForceEndpoint = true
|
||||
" armed fast-endpoint owner=sid$owner" +
|
||||
(if (deepLow) " deepLow" else ""))
|
||||
// 无缝插话确证:深低一票即切;
|
||||
// 浅低维持连续两票。切行同时把
|
||||
// 新说话人挂名(切行即挂名,复用
|
||||
// 开口即查的落地通道 onOnsetSwitch)
|
||||
if (deepLow ||
|
||||
rollingLowStreak >= forceSwitchStreaks
|
||||
) {
|
||||
rollingLowStreak = 0
|
||||
val label = newLabel
|
||||
?: SpeakerRecognition.nextAutoLabel()
|
||||
.also {
|
||||
SpeakerRecognition
|
||||
.fastRegistry
|
||||
.addAuto(it, emb)
|
||||
}
|
||||
Log.i(TAG, "SWITCH-FORCE" +
|
||||
" streak>=$forceSwitchStreaks" +
|
||||
(if (deepLow)
|
||||
" deep-low<${deepLowSwitch}"
|
||||
else
|
||||
" streak>=$forceSwitchStreaks") +
|
||||
" label=$label" +
|
||||
" owner=sid$owner")
|
||||
uiHandler.post {
|
||||
onOnsetSwitch(label)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue