1

I want to use Google Chrome's built in webkitSpeechRecognition API from a Node.js application by managing a headless Playwright browser. This set-up works fine if I am running the app from my machine:

  • Playwight browser gets opened, and i can access the window.webkitSpeechRecognition object
  • SpeechRecognition succesfully get's initialized: recognition = new SpeechRecognition()
  • then I can call recognition.start() method
  • and I can listen to the recognition.onresult events capturing the speech as excepted.

However if I am running the same app from a dockerized environment, everything works as expected (webkitSpeechRecognition gets succesfully initialized and started), but the recognition.onresult goes totally silent.

I am also listening for the recognition.onerror events, but not getting any useful information about why am I not getting any results back.

Does someone have any information which could be useful for resolving this issue? Maybe there is some kind of security rule which prohibits this API to function in such an environment?

Marci
  • 41
  • 5

0 Answers0