csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
351 stars 218 forks source link

'Yes' is not recognized and throws error_no_match #421

Closed gitsofkhaleel closed 9 months ago

gitsofkhaleel commented 9 months ago

We are struck please help. This library is excellent except for it throws error_no_match for very commonly used word 'Yes' in our app. I feel it is because Words like 'Yes' 'Why' 'Queue' are sounding similar with 'S', 'Y', 'Q'. all these words are throwing error_no_match . but very very rarely it works sometimes. Please help.

sowens-csd commented 9 months ago

Unfortunately recognition accuracy is up to the device and OS, the plugin doesn't change it. Some things that can affect recognition accuracy are background noise, accents, the selected language, etc.

I am surprised it is not recognizing simple words such 'yes' or 'why' as they are common words that I would expect it to get right most times. Have you tried using a headset instead of the builtin microphone or vice versa? It also depends on the device hardware so different devices and device manufacturers will give different results.

gitsofkhaleel commented 9 months ago

yes same issue with headphones too. One more finding is that it recognizes 'yes please' ' yes of course' but not 'yes' is it something to do with the minimum time limit of listening ? atleast if it gives more details or alternatives when there is 'error_no_match' then we can pick something from there.

sowens-csd commented 9 months ago

I just tested on an iPhone XR and a Pixel 6a. Both consistently recognized 'yes' and 'why' either alone or in a sentence. iOS did not get queue alone but did get it when used in a sentence. The 6a never successfully recognized that word and always used Q or once IQ. It sounds like you're running into normal variation in OS, devices, ambient noise, pronunciation variations and the limitations of speech recognition tech.

error_no_match is given when the OS does not detect any words in the sound stream. I did see that from Android in some of my attempts with queue, though not with any of the other words. In that case there are no alternatives to give because the recognizer did not find any words.

sowens-csd commented 9 months ago

I'm going to close this as working as intended unless you have other issues?

anjenkuhn commented 9 months ago

I am facing the exact same issue and I have a Galaxy S22Ultra with actual Android. I can't believe it is not able to detect the correct words, because if you use such words in a sentence or speak them twice it will get detected. The issue appears mainly for low numbers under 13 on my device. If I say '2' nothing is detected. But if I say '2 2 2' everything is fine. This is reproducable with a lot of single syllable inputs, if nothing else is found beside that single syllable in the detection cycle.

I am using German language. Could also try it in English, but I don't think it relies on that.

sowens-csd commented 9 months ago

Unfortunately there's really nothing I can do about this. This issue is about the quality of the speech recognition services on a particular platform which the plugin does not affect.