Open eilzo opened 1 year ago
Does initialize
return true on that browser? I know that on Chrome desktop there is a permission step to grant access to the microphone for web apps. Do you know if the same is true on their mobile browser? The error makes me think that possibly the web app doesn't have permission to use the microphone.
Howdy, thanks for the quick response!
My mobile browser requests permissions, confirms initialization, starts listening, then fails:
bool isInitialized = await speech.initialize(onError: (error) {
speech.stop();
print('$error');
});
if (isInitialized && speech.isNotListening) {
print('starting text recording'); // this prints
speech.listen(... // fails here
As another note, I just tried running the example of https://pub.dev/packages/record and that works successfully on my mobile browser, so this seems to be a package-specific issue.
Edit: The record
package works on my Pixel 4, but still fails on a Pixel 7 and an iPhone 13.
As part of another issue I've just been testing this on Android Chrome and version 6.5.0 seems to work fine. I know this has been a while but if you have a chance to try the updated version do let me know.
Related: https://github.com/csdcorp/speech_to_text/issues/389
My app can successfully call
listen()
and get STT responses as a web app running on desktop Chrome, and when installed as an Android app. However, it fails when called from a web application running on a mobile Android device.After calling
listen()
, I get an immediate errorSpeechRecognitionError msg: not-allowed, permanent: false
.The microphone works correctly on all other mobile websites that use the microphone (Google search, keyboard input, etc). I've verified
SpeechToText().hasPermission
before callinglisten()
.To recreate
Open
<IP address>:8080
on tethered Android device.Other notes: