From a1ff324a5acb3bb335d686ae41ca38fdf625635b Mon Sep 17 00:00:00 2001 From: Sergei Date: Thu, 29 Jan 2026 16:34:53 -0800 Subject: [PATCH] Increase Android STT silence timeout from 2s to 4s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix premature speech cutoff during natural pauses: - EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS: 4000ms (was 2000ms) - EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS: 3000ms (was 1500ms) This allows users to pause between sentences without being cut off. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- hooks/useSpeechRecognition.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hooks/useSpeechRecognition.ts b/hooks/useSpeechRecognition.ts index b1f6bf1..13ef72b 100644 --- a/hooks/useSpeechRecognition.ts +++ b/hooks/useSpeechRecognition.ts @@ -259,9 +259,11 @@ export function useSpeechRecognition( continuous, addsPunctuation: Platform.OS === 'ios' ? addsPunctuation : undefined, // Android-specific: longer silence timeout for more natural pauses + // CRITICAL FIX: Increased from 2000ms to 4000ms to prevent premature speech cutoff + // This allows users to pause between sentences without being cut off androidIntentOptions: Platform.OS === 'android' ? { - EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS: 2000, - EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS: 1500, + EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS: 4000, // 4 sec silence before final (was 2000) + EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS: 3000, // 3 sec pause detection (was 1500) } : undefined, });