Closed ilhamwahabi closed 3 years ago
@iwgx Are you testing on chrome? If so, chrome will still use the speech recognition API since it's available, the cross-browser is intended for other browsers such as Firefox, Edge, Brave, etc.
I also added a speechRecognitionProperties
param you can pass to the hook the customize the settings for chrome speech recognition API such as language code https://github.com/Riley-Brown/react-speech-to-text#speechrecognitionproperties
I see, thanks for the confirmation
Previously I think if we pass the crossBrowser
params, it will override the SpeechRecognition
so It will use GCP in all browser.
Since I think GCP will more reliable
The reasoning for this is because Chrome is the most popular browser so more users would use the built-in Chrome speech recognition API which is free and provides faster speech-to-text than using the GCP method.
I can add a useOnlyGoogleCloud
param to override this if you think it's needed
I thinks that's needed, since we can control if we want:
BTW the reliability that I mean is in terms of transcription. I think since GCP process it in their server, it will have higher accuracy than processed the browser (although of course it will be faster)
Just published version 0.5.0 with useOnlyGoogleCloud
param to force GCP on chrome browsers
Also, this is from the speech recognition docs
Note: On some browsers, like Chrome, using Speech Recognition on a web page involves a server-based recognition engine. Your audio is sent to a web service for recognition processing, so it won't work offline.
So I would think Chrome built in speech API would use the same engine that google cloud speech to text uses so the results should be the same
Thanks for the update
And I just learn about that, will investigate further if there is different between them
If we enable
crossBrowser
and providegoogleApiKey
seems it's still not using Google Cloud for the transcription, so:googleCloudRecognitionConfig
there is nothing changedReproduction (I'm just using example code): https://codesandbox.io/s/nifty-raman-thfsj?file=/src/App.js