Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Speech to Text using Microphone

AaronJ
New Member

Hi there, 

Was trying to use convert speech to text using a microphone, getting a pop-up security error saying "failed to construct 'worker': script at .........."

Any idea why?

Also, how can I use the speech to text service with microphone input, I tested uploading a video file and worked perfectly, but no idea how to use the service with microphone input?

Please let me know 

AJ

0 2 491
2 REPLIES 2

- The error message [1] can be seen in Chrome as Chrome doesn't let you load web workers when running scripts from a local file. You can try using a different web browser like Firefox and verify if it works for you.

- In order to read from microphone, you can install PyAudio in your machine.

You can refer to the documentation [2] [3] to use the speech to text service with microphone input.

[1] "failed to construct 'worker': script at

[2] https://www.thepythoncode.com/article/using-speech-recognition-to-convert-speech-to-text-python

[3] https://pypi.org/project/SpeechRecognition/

I see that this thread is a couple of years old, but the issue you raised with speech-to-text using a microphone is still relevant. If you encountered the "failed to construct 'worker'" error back then, it might have been due to browser security restrictions.
And if you're ever in need of microphone recommendations or information on improving your microphone setup, you can visit https://asmrmicrophones.com/ for the latest insights.
I hope this information helps, and you can find a solution to your microphone input concerns, even if the thread is a bit older.