Microphone voice recognition not working in Bubble app using Toolbox and Web Speech API

Hi, I need help with voice recognition in my Bubble app. I have a microphone button that should start Spanish speech recognition and use the spoken text to create an invoice.

I am using the Toolbox plugin and the Web Speech API. The microphone permissions are enabled in Windows and Chrome, but clicking the microphone button does not start voice recognition.

I previously received the error: “Action only supported on mobile views.”

I tried moving the speech-recognition JavaScript into an HTML element and calling window.__startVoice(); from the workflow, but the microphone still does not start.

Could someone please help me check the correct Bubble workflow and Toolbox configuration to make Web Speech API voice recognition work on desktop and mobile?

Thank you!

Have you tried putting the recognition.start() directly in the Toolbox’s Run javascript action?

Thanks! Not yet. We were calling window.__startVoice(); from the Toolbox Run JavaScript action. I can try putting recognition.start(); directly in the Run JavaScript action. Would you recommend creating the SpeechRecognition object in that same action as well?

Better if separate, if possible, so they are called only once.