Skip to content

fix(web): voice on phones that never mark speech final; say up front when voice is unsupported - #3

Merged
flashesofbrilliance merged 1 commit into
mainfrom
claude/voice-branded-mini-app-1ne11t
Nov 15, 2026
Merged

flashesofbrilliance merged 1 commit into
mainfrom
claude/voice-branded-mini-app-1ne11t

Conversation

@flashesofbrilliance

Copy link
Copy Markdown
Owner

What & why

Zach opened the live page (rosetta-shell.arcs.care/voice) in Comet and Chrome on his phone and got "voice not available". Those browsers do not expose speech recognition to web pages. This PR is stage 1 of the fix; stage 2, server speech-to-text through ElevenLabs so voice works in every browser, follows separately.

Changes (web/rosetta-voice.html)

  • Keep every word heard. The page kept only results marked final. Phones often end recognition before marking anything final, so the gold strip showed the words and the page then said "Heard nothing". It now keeps final plus the latest partial, exactly what the strip shows.
  • Unlock read-aloud inside the tap. iOS speaks only from a user gesture; a silent phrase is spoken during the mic tap so the answer can be read later.
  • Say it before anyone taps. With no speech recognition (Comet, Firefox, every non-Safari iPhone browser), the page shows "Voice isn't supported in this browser" on load and points to typing. In claude.ai, the platform's dictation restores the normal prompt.

Verification

  • Simulated recognizer that ends without a final result: the old page showed the words but never translated or spoke them; the new page translates them ("Case conversion", matched by words) and reads the answer aloud.
  • Simulated browser with no speech recognition: the message shows on load, 0 errors, typing still works.
  • node web/parity.test.js: all 5 files identical. sh test.sh: ALL SMOKE CHECKS PASSED.
  • Not verified: a real phone (no audio device in the build container).

Generated by Claude Code

…front when a browser can't do voice

Zach tested rosetta-shell.arcs.care/voice in Comet and Chrome on a phone:
"voice not available". Three fixes:
- Keep every word heard (final plus the latest partial). Phones often end
  recognition before marking text final, so the page showed the words and
  then said "Heard nothing". Simulated: the old page lost the words, the
  new one translates and speaks them.
- Unlock read-aloud inside the tap (iOS only speaks from a user gesture).
- When the browser has no speech recognition (Comet, Firefox, every
  non-Safari iPhone browser), say so on load and point to typing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBNUQdkatVyamBSDKM3qUB
@flashesofbrilliance
flashesofbrilliance merged commit cfaa26f into main Nov 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants