iOS Safari: SpeechRecognition + audio playback loop breaks after first cycle
Issue: iOS Safari Web Speech API + audio playback loop breaks after first cycle
I’m building a browser-based voice interaction loop:
TTS playback → start SpeechRecognition → process result → play TTS again → repeat
Tech:
- webkitSpeechRecognition (Web Speech API)
- <audio>.play() for TTS (ElevenLabs)
- Plain JS (no framework)
Problem (iPhone / iOS Safari & Chrome):
- First cycle works correctly
- On subsequent cycles:
- audio playback fails or is silent
- or SpeechRecognition gets stuck / doesn’t restart
- sometimes a “click” occurs with no audio output
Desktop browsers work fine.
Suspected cause:
iOS WebKit audio session conflict when switching repeatedly between:
- microphone input (SpeechRecognition)
- audio output (HTMLAudioElement)
Question:
Is this a known limitation of iOS WebKit?
Is there any reliable way to alternate mic + playback in-browser, or is the only stable approach:
- continuous recording (getUserMedia + MediaRecorder), or
- server-side transcription (e.g., Whisper), avoiding SpeechRecognition entirely?
1
0 comments
Luis Arias
3
iOS Safari: SpeechRecognition + audio playback loop breaks after first cycle
Clief Notes
skool.com/quantum-quill-lyceum-1116
Jake Van Clief, giving you the Cliff notes on the new AI age.
Leaderboard (30-day)
Powered by