58

I want to develop an Speech recognizer in android, which should work in offline. As the android's built-in speech recognizer uses google server which needs internet, i want an alternative which works in the absence of internet.

Please suggest me some way to achieve the above feature.

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
Swathi EP
  • 3,864
  • 6
  • 26
  • 25
  • Please use SO as per the regulations. This is a very clean place, please help to keep it that way. – Faiz Jul 22 '12 at 04:18
  • Has Google made this easy using SpeechRecognizer? http://www.androidpolice.com/2013/02/15/utter-claims-to-be-the-first-non-ime-app-to-utilize-offline-voice-recognition-in-jelly-bean/ – rmooney Jul 12 '13 at 13:39
  • http://stackoverflow.com/questions/35388720/cant-start-service-speech-recog – Ruchir Baronia Feb 14 '16 at 05:40

5 Answers5

53

We used to recommend pocketsphinx, but now more advanced technology based on Kaldi toolkit is available.

The demo is here: Vosk API, you can simply load it in Android Studio and run. Full disclosure: I am the primary author of Vosk.

It supports speech recognition in 7 major languages - English, Chinese, Spanish, Portuguese, German, French and Russian.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
0

You can download Google voices for later use. From you mobile -> Setting -> “Language and Input” -> "Voice Search" -> "Download offline speech recognition" -> Choose the language pack .

Or you can use other programs, such as Dragon Mobile Assistant https://play.google.com/store/apps/details?id=com.nuance.balerion&hl=en

skan
  • 7,423
  • 14
  • 59
  • 96
  • 1
    Seems to be incompatible with nexus 5? What about http://www.nuancemobilelife.com/apps/ ? – rubo77 Dec 18 '14 at 03:10
  • 1
    And there is no "Download offline speech recognition" on my kit kat – rubo77 Dec 18 '14 at 03:14
  • There is no "Download offline speech recognition" on my Jelly Bean (4.1.2) either. Nexus S. Looks like a whimsical feature. – ih8ie8 Jan 19 '15 at 15:42
  • 1
    http://www.kizeo.com/how-to-enable-offline-speech-recognition-on-samsungandroid-devices/ But you can find it in slightly different places depending on your exact version. It's available even on MIUI V5 – skan Jan 19 '15 at 19:39
  • @skan Thank you. I did arrive at the same exact screen shown in the link you provided but instead of the 3 options ("Choose input languages", "Block offensive words" and "Offline speech recognition"), I only have 2 options on my phone (**No** "Offline speech recognition"). Weird. – ih8ie8 Jan 21 '15 at 03:24
  • Maybe depends on your firmware. I'm sorry I can't help you more. Perhaps you can download it in some other way. – skan Jan 21 '15 at 18:02
  • Only one android version, which I don't remember, was blessed with this feature. – Josh Feb 17 '16 at 09:09
0

If the speech recognizer has limited vocabulary (as in a simple voice user interface) and is limited few samples - it maybe possible. Applications such as Transcription is not a likely task to be performed on Android (in offline mode). Also DSP is required for Voice Recognition ... A limited vocabulary and limited to very few samples might be your best bet.

abRao
  • 2,787
  • 1
  • 25
  • 37
0

If you really want to invest time and manpower for your goal, look at the Java-Project Java Speech API 2.0 (JSR 113).

It is used on "normal" mobile phones for voice commands and works offline. Unfortunately, the project is discontinued.

Thrawn80
  • 351
  • 2
  • 7
-3

You're not going to be happy with this workaround but here goes: Record the speech & store it for later. When an internet connection is available, connect to the internet, playback the recorded speech and convert it to text.

Hey, it's the easiest way I can think of and might work for some applications, like dictation and memos.

Mike
  • 19
  • 1