gotev / android-speech

Android speech recognition and text to speech made easy
http://gotev.github.io/android-speech/
Apache License 2.0
473 stars 156 forks source link

Issue in Offline mode #38

Closed Anshul1507 closed 4 years ago

Anshul1507 commented 4 years ago

Didn't recognizing properly in offline mode?

Is there any separate method for offline? PS: Speech.getInstance().setPreferOffline(true); is not working.

gotev commented 4 years ago

It vastly depends on the vendor, language availability (not all languages are available offline), android version and Google App version installed.

Anshul1507 commented 4 years ago

I tried English Language and it is not recognized. Android Version is 9.0 and 6.0.

gotev commented 4 years ago

AFAIK the only setting available in the public APIs is whether or not offline mode should be preferred (that's how Speech does it), but I have found no way to actually tell the system to download selected languages programmatically, which is maybe what causes your issues.

On my stock Moto X4 Android 9, just by setting offline it works. Do you have stock Android?

Take a look here: https://stackoverflow.com/questions/31562229/offline-speech-recognition-in-android

Do you have proposals or other suggestions?

Anshul1507 commented 4 years ago

Yep, my Android 9.0 device is stock android but offline recogn. is somewhat not perfect. Later, I found another library which also works in offline mode, here is demo of that.

gotev commented 4 years ago

Thanks for sharing! It's interesting and it's using Kaldi open source speech recognition engine.

It's completely different from what this library is using, which is Android bundled-in SpeechRecognizer and TextToSpeech.

Anshul1507 commented 4 years ago

Agreed, totally different. that kaldi is whole model based on different language.