
You're running into a known issue - webkitSpeechRecognition has spotty support in Edge, even though it works perfectly in Chrome. That "language not supported" error is unfortunately typical for Edge, regardless of what language you specify.
Here's what's happening:
Chrome: Works great
Edge: Hit or miss (mostly miss)
Your code is fine - it's just Edge being Edge!
Quick fixes to try:
javascript// Use feature detection first
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
if (!SpeechRecognition) {
console.log('Speech recognition not supported in this browser');
return;
}
For production apps, I'd honestly recommend going with a cloud speech service like Azure Speech or Google Cloud Speech API for consistent results across all browsers.
It's frustrating, but you're definitely not doing anything wrong - Edge just hasn't caught up with Chrome on this feature yet.
Hope this helps!