diff --git a/.gradle/8.11.1/executionHistory/executionHistory.bin b/.gradle/8.11.1/executionHistory/executionHistory.bin index 7240a71..75d4fcd 100644 Binary files a/.gradle/8.11.1/executionHistory/executionHistory.bin and b/.gradle/8.11.1/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.11.1/executionHistory/executionHistory.lock b/.gradle/8.11.1/executionHistory/executionHistory.lock index b441928..520601e 100644 Binary files a/.gradle/8.11.1/executionHistory/executionHistory.lock and b/.gradle/8.11.1/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.11.1/fileHashes/fileHashes.bin b/.gradle/8.11.1/fileHashes/fileHashes.bin index 8e3d0dd..661ef67 100644 Binary files a/.gradle/8.11.1/fileHashes/fileHashes.bin and b/.gradle/8.11.1/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.11.1/fileHashes/fileHashes.lock b/.gradle/8.11.1/fileHashes/fileHashes.lock index 4d9a31d..f855f61 100644 Binary files a/.gradle/8.11.1/fileHashes/fileHashes.lock and b/.gradle/8.11.1/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.11.1/fileHashes/resourceHashesCache.bin b/.gradle/8.11.1/fileHashes/resourceHashesCache.bin index c5cce6f..0575588 100644 Binary files a/.gradle/8.11.1/fileHashes/resourceHashesCache.bin and b/.gradle/8.11.1/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index f530215..be627ae 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index c531ca5..44dcfd3 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/app/build.gradle b/app/build.gradle index a7aecc4..406d257 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.soniox.remotemic" minSdk 24 targetSdk 34 - versionCode 201 - versionName "2.01" + versionCode 202 + versionName "2.02" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex index 595db76..6f0dce5 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex differ diff --git a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt index 1237364..a6ce15c 100644 --- a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt +++ b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt @@ -1,4 +1,4 @@ -#Wed Aug 26 12:04:16 UTC 2026 +#Wed Aug 26 12:21:37 UTC 2026 path.3=5/classes.dex path.2=10/classes.dex path.1=0/classes.dex diff --git a/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources b/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources index cc846a6..3090c83 100644 Binary files a/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources and b/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources differ diff --git a/app/build/intermediates/manifest_merge_blame_file/debug/processDebugMainManifest/manifest-merger-blame-debug-report.txt b/app/build/intermediates/manifest_merge_blame_file/debug/processDebugMainManifest/manifest-merger-blame-debug-report.txt index 0dadd6a..f79dd03 100644 --- a/app/build/intermediates/manifest_merge_blame_file/debug/processDebugMainManifest/manifest-merger-blame-debug-report.txt +++ b/app/build/intermediates/manifest_merge_blame_file/debug/processDebugMainManifest/manifest-merger-blame-debug-report.txt @@ -1,8 +1,8 @@ 1 2 +4 android:versionCode="202" +5 android:versionName="2.02" > 6 7 + android:versionCode="202" + android:versionName="2.02" > + android:versionCode="202" + android:versionName="2.02" > + android:versionCode="202" + android:versionName="2.02" > CFBundlePackageType APPL CFBundleShortVersionString - 2.01 + 2.02 CFBundleVersion - 201 + 202 LSMinimumSystemVersion 13.0 LSUIElement diff --git a/server/relay_server.py b/server/relay_server.py index 1c84c35..206755d 100644 --- a/server/relay_server.py +++ b/server/relay_server.py @@ -339,25 +339,26 @@ async def handle_phone_stream_ws(request): logger.info("🎙️ Started Live Speech Session: %s", current_session_id) elif msg_type == "stop": - logger.info("⏹️ Stop received for %s. Draining audio queue...", sid) + logger.info("⏹️ Stop received for %s. Draining audio queue (%d pending)...", sid, audio_queue.qsize()) - # 1. Drain audio queue to Soniox with timeout + # 1. Drain audio queue to Soniox with generous timeout for long speech try: - await asyncio.wait_for(audio_queue.join(), timeout=2.0) + await asyncio.wait_for(audio_queue.join(), timeout=3.0) except Exception: pass - # 2. Send finalize + # 2. Send finalize and wait for Soniox to transcribe 100% of the speech if active_soniox_ws and is_ws_open(active_soniox_ws): await active_soniox_ws.send(json.dumps({"type": "finalize"})) try: - await asyncio.wait_for(stop_event.wait(), timeout=0.45) + # Generous 3.5s wait so long speech (e.g. 30-40s) is never truncated prematurely + await asyncio.wait_for(stop_event.wait(), timeout=3.5) except asyncio.TimeoutError: logger.info("Finalize wait completed (timeout reached)") raw_final = "".join(full_final_tokens) + current_non_final clean_final = sanitize_text(raw_final, allow_multiline=False, preserve_trailing_space=True) - logger.info("⚡ Session %s final text: '%s'", sid, clean_final) + logger.info("⚡ Session %s final text (%d chars): '%s'", sid, len(clean_final), clean_final) # Return final speech text to phone (phone updates UI and broadcasts full state to Mac) if is_ws_open(ws):