From 5b17639bdbbcb8a824af71fb06083a5e597ba3dd Mon Sep 17 00:00:00 2001 From: NaturalPsi Date: Thu, 11 Jun 2026 23:08:18 +0900 Subject: [PATCH] fix: stop feeding running ASR output back as Whisper initial prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conditioning Whisper on its own prior output (previousTranscription) lets a single hallucinated phrase self-reinforce into a repetition loop across decode windows — the dominant failure mode for low-volume / quiet-speaker audio in Japanese. Drop the previousTranscription injection in both the local whisper provider and the Amical Cloud provider; vocabulary and cursor context (static, non-looping) are preserved. Co-Authored-By: Claude Fable 5 --- .../providers/transcription/amical-cloud-provider.ts | 4 +++- .../pipeline/providers/transcription/whisper-provider.ts | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/pipeline/providers/transcription/amical-cloud-provider.ts b/apps/desktop/src/pipeline/providers/transcription/amical-cloud-provider.ts index df7092d1..73ffdcfa 100644 --- a/apps/desktop/src/pipeline/providers/transcription/amical-cloud-provider.ts +++ b/apps/desktop/src/pipeline/providers/transcription/amical-cloud-provider.ts @@ -1030,7 +1030,9 @@ export class AmicalCloudProvider implements TranscriptionProvider { vadProbs, languages: snapshot.currentLanguages, vocabulary: snapshot.currentVocabulary, - previousTranscription: snapshot.currentAggregatedTranscription, + // Not sent: conditioning on the running ASR output can seed a + // self-reinforcing repetition loop on the server side too. + previousTranscription: undefined, formatting: { enabled: enableFormatting, }, diff --git a/apps/desktop/src/pipeline/providers/transcription/whisper-provider.ts b/apps/desktop/src/pipeline/providers/transcription/whisper-provider.ts index 1109da5b..60c400a8 100644 --- a/apps/desktop/src/pipeline/providers/transcription/whisper-provider.ts +++ b/apps/desktop/src/pipeline/providers/transcription/whisper-provider.ts @@ -286,9 +286,15 @@ export class WhisperProvider implements TranscriptionProvider { aggregatedTranscription?: string, accessibilityContext?: TranscribeContext["accessibilityContext"], ): string { + // NOTE: previousTranscription (the running ASR output) is intentionally not + // fed back as the initial prompt. Conditioning Whisper on its own prior + // output lets a single hallucinated phrase self-reinforce into a repetition + // loop across windows. Vocabulary and cursor context are static, so they + // stay. See whisper repetition-hallucination behavior. + void aggregatedTranscription; const prompt = buildWhisperPrompt({ vocabulary, - previousTranscription: aggregatedTranscription, + previousTranscription: undefined, beforeText: accessibilityContext?.context?.textSelection?.preSelectionText, });