brave / browser-laptop

[DEPRECATED] Please see https://github.com/brave/brave-browser for the current version of Brave
https://www.brave.com
Other
7.95k stars 975 forks source link

webkitSpeechRecognition disabled and no way of detection #15312

Closed sebscholl closed 5 years ago

sebscholl commented 6 years ago

Description

In our application, we use a Speech to Text Recognition. Depending on whether or not a service is available in a given browser, we'll go in the following order for the used service.

1) Web Speech API 2) Watson API 3) Google Speech

Web Speech API is available in Chrome, which makes it available in Brave. However, it is disabled in Brave from returning data results, and we have no way of telling which speech service to use.

We need a way of detecting whether the Browser is a Brave browser so we know to ignore the disabled API, or for the API to be removed since it is not functional.

Steps to Reproduce

        navigator.getUserMedia({ audio: true },
          (stream) => {
             let recognition = new Recognition()

             // API Options
             recognition.lang = 'en-US';
             recognition.maxAlternatives = 1
             recognition.interimResults = true;

             // Results callback
             recognition.onresult = (event) => console.log(event)

             recognition.start()
          }

What version of Brave are you using?

5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

bsclifton commented 5 years ago

Since this is an issue in the newer version of Brave (we never release Chromium 70 on Muon), I opened an issue to track this in the new repository 😄 https://github.com/brave/brave-browser/issues/2802