heard
HEARD · DOCUMENTATION

Browser listening recovery

What changed

Previously, recognition HTTP 401 explicitly called Stop, and an account storage event from any other tab clicked Stop even for the same account. Audio context/track interruptions after startup were not monitored. These are confirmed code paths, not a proven diagnosis of a particular iPhone session.

The browser listener now preserves explicit listening intent across transient audio and network problems. It resumes an interrupted context, reacquires a muted or ended microphone track, and rejects empty/stalled samples before recognition. A missed sample uses bounded retry backoff. Browser coordination keeps its existing one-device-at-a-time behavior.

Identification requests time out after 45 seconds, account requests after 15 seconds, and coordination requests after 10 seconds. Audio resume and microphone permission also have deadlines. Signed-in device authorization can be repaired once after a definite HTTP 401. An existing guest credential is not silently replaced, because it identifies that browser's guest history.

Stop, sign-out, account changes, and invalid account credentials cancel pending work. A late microphone permission grant is immediately closed; a late recognition result cannot notify or restart listening. The single-sample button still deliberately stops after its sample.

Diagnostics

Open Configuration → Debug → Save listening diagnostics. The JSON export lists recent start/stop reasons, audio state/track transitions, sample block counts/RMS and timeout/retry events. It includes no microphone audio, account credentials, location coordinates or song metadata. Up to 120 events are kept in sessionStorage in this browser tab, so they can survive a reload. Clearing browser data removes this local log. There is no automatic diagnostic upload.

Browser limits

Recovery runs only while browser JavaScript can execute. iOS may suspend capture or the page, change microphone access, or require a fresh user gesture. A complete reload does not automatically reopen the microphone. Explicit Stop is never overridden. Permission denial or unrecoverable authorization shows a clear stopped/paused state rather than retrying under another account.

Verification

Automated tests cover context interruptions, muted/ended tracks, empty audio, Stop during capture and permission requests, late permission/recognition results, request deadlines, one-shot authorization repair, guest identity preservation, same-account storage refresh and sign-out. Real browser integration uses simulated microphone events; it does not qualify physical iPhone behavior.

For iPhone acceptance: start listening with Safari visible; confirm successive sampling; test an audio-route change and return from an interruption; verify recovery or an explicit permission message; tap Stop while reconnecting and confirm no further capture. Export diagnostics immediately if listening unexpectedly stops. Also test signed-in and guest modes separately.