fix(google-meet): tighten realtime echo overlap

This commit is contained in:
Vincent Koc
2026-05-03 17:56:05 -07:00
parent 5ef1885ce3
commit d5ecee2cf3
3 changed files with 14 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ Docs: https://docs.openclaw.ai
- Plugin tools: keep auth-unavailable optional tools hidden even when another default tool from the same plugin is available and `tools.alsoAllow` names the optional tool. Thanks @vincentkoc.
- Realtime transcription: report socket closes before provider readiness as closed-before-ready failures instead of mislabeling them as connection timeouts for OpenAI, xAI, and Deepgram streaming transcription. Thanks @vincentkoc.
- OpenAI/Google Meet: fail realtime voice connection attempts when the socket closes before `session.updated`, avoiding stuck Meet joins waiting on a bridge that never became ready. Thanks @vincentkoc.
- Google Meet: avoid treating repeated participant words as multiple assistant-overlap matches when suppressing realtime echo transcripts. Thanks @vincentkoc.
- QA/cache: require the full `CACHE-OK <suffix>` marker before live cache probes stop retrying, so suffix-only prose cannot hide a broken probe response. Thanks @vincentkoc.
- Slack/Matrix: avoid creating blank progress-draft messages when `streaming.progress.label=false` and progress tool lines are disabled. Thanks @vincentkoc.
- QA/Matrix: keep the mock OpenAI tool-progress provider aligned with exact-marker Matrix prompts so the hardened live preview scenario still forces a deterministic read before final delivery. Thanks @vincentkoc.

View File

@@ -3857,6 +3857,13 @@ describe("google-meet plugin", () => {
nowMs,
}),
).toBe(false);
expect(
isGoogleMeetLikelyAssistantEchoTranscript({
transcript,
text: "yes yes yes yes",
nowMs,
}),
).toBe(false);
});
it("uses a local barge-in input command to clear active Chrome playback", async () => {

View File

@@ -173,9 +173,13 @@ function hasMeaningfulEchoOverlap(userTokens: string[], assistantTokens: string[
if (userTokens.length < 4 || assistantTokens.length < 4) {
return false;
}
const uniqueUserTokens = [...new Set(userTokens)];
if (uniqueUserTokens.length < 4) {
return false;
}
const assistantTokenSet = new Set(assistantTokens);
const overlap = userTokens.filter((token) => assistantTokenSet.has(token)).length;
return overlap / userTokens.length >= 0.58;
const overlap = uniqueUserTokens.filter((token) => assistantTokenSet.has(token)).length;
return overlap / uniqueUserTokens.length >= 0.58;
}
export function isGoogleMeetLikelyAssistantEchoTranscript(params: {