patternfly / virtual-assistant

This repo contains the code for the PatternFly virtual assistant extension
MIT License
0 stars 17 forks source link

v6 chatbot - microphone button doesn't work on Firefox #174

Open rebeccaalpert opened 1 week ago

rebeccaalpert commented 1 week ago

You will see a microphone button in the message bar if the prop hasMicrophoneButton is passed in to the message bar in Chrome and Safari. The button will only appear if 'SpeechRecognition' or 'webkitSpeechRecognition' are available in window. This does not currently work in Firefox.

I think is code that was originally from a demo. PatternFly is held to something of a higher standard here - we should explore a solution for Firefox in the near future.

rebeccaalpert commented 1 week ago

Firefox doesn't support SpeechRecognition out of the box: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#browser_compatibility

However, it appears there is a feature flag that can be turned on: https://wiki.mozilla.org/Web_Speech_API_-_Speech_Recognition