Special characters in speech recognition - android

I am wondering if there is a way to recognize special characters (#, -, ., _) with Android SpeechRecognizer?

Android's speech recognizer (i.e. the interfaces and classes in android.speech) return strings. Some of these strings (or their substrings) might be equivalent to e.g. # but you have no way of demanding that (e.g. by settings extras). Your best option is to observe how your favorite speech recognizer works and, assuming that it (always) maps the sound /at sign/ to the phrase "at sign", remap it to # in your application.

Related

Restrict Speech Recognition to one language only

I have one query About Android Speech Recognition.
I want to restrict a speech recognizer to recognize only given/selected language.
For example, if I select "en" as preferred language, speech recognizer should only return English words after Speech to text conversion. And should ignore other languages words like,
If I say "Hola" or "Bonjour", it should return null or should not recognize the word, or no response, etc
I did try EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, but no success.
Also, all other links are about how to add multiple languages, but I want opposite of it, I want single language to be recognized by the speech recognizer.
If there is any workaround or if there is some specific way to use EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, kindly do share here.

is it possible to make a voice recognizing android app which don't uses internet?

I know that android already have an own recognizing voice API but it uses internet, I would like to have like a compiled library with a few voice commands that I could use offline, is that possible?
Yes it is possible you would have to train a model to convert speech to commands.
A simple approach could be to break speech at intervals where the amplitude is minimum, this will give you the words in the speech, match these words with your model with some probability if the matched probability is higher than some threshold value your model can then help execute the commands related to that word. You will have to ship this model within your application. i would recommend to update the model as you train your model further.

Nuance Mobile always returns zero results if I enable Grammar Recognition Mode

I have an iOS and an Android app that do Speech to Text recognition using Nuance Mobile SDK. Both apps work perfectly when using a Nuance sandbox appID.
However, when if I upload a phrase file, the Nuance server always returns zero results, as I can verify in the "didFinishWithResults" methods on both android and ios.
This is the phrase file I upload as a custom vocabulary to Nuance:
<phrases>
<phrase>two on to</phrase>
<phrase>bet 1 3 for</phrase>
<phrase>...and some other phrases.</phrase>
</phrases>
My Nuance custom dictionary is set to:
Topic:WebSearch
Grammar recognition mode: YES (<== Apps work perfectly when set to NO)
Vocabulary Weight: 90
Nuance's documentation claims that:
It is important to note that custom vocabularies are different than the constrained speech
recognition grammars many developers are familiar with. Using constrained grammars results in
high accuracy of words that are in the grammar and low (or no) recognition of words or phrases
that are not in the grammar. With custom vocabularies our large language models are still used
and the vocabulary simply adjusts the recognition probabilities of that large model. As a result,
using a vocabulary will not change your results as much as a conventional grammar would. For
example, you can expect to still get word results that are not in the vocabulary or “out of
grammar.” The grammar recognition mode feature makes the vocabulary act much more like a
traditional recognition grammar but as we are still using the underlying language model even
then you may get “out of grammar” results.
.....So my question is, What am I doing wrong to always get zero results from Nuance ASR when the custom vocabulary's grammar recognition mode is set to YES?
Nuance's customer support is totally useless, they probably outsource a bunch of people with just an FAQ in hand that have no idea about anything.
I hope somebody can help me out on this one.

Android text (from speech) interpretation using grammar (w/o using a recognizer)

I use Google Speech Recognizer for Android that I do not want to replace.
It produces text, which I want to interpret using my own grammar.
I've checked some tools (like sphinx), but all of them seem to require using their recognizer in order to decode text, but I don't want to use their recognizer.
Do you know some tool that can process a given text using a grammar? Or perhaps how can i use sphinx w/o their recognizer?
Thanks
Grammars are equivalent to finite deterministic automata parsing and those are equivalent to regular expressions. So instead of external frameworks you can use Java's regular expressions for parsing the text:
http://developer.android.com/reference/java/util/regex/Pattern.html
If you want named regexps you can consider
https://code.google.com/p/named-regexp/
If you want more complex parsing with semantics and intent extraction which goes beyond automata capabilities, you can find corresponding packages in opennlp
If you want to recognize grammars, you can try CMUSphinx, it's significantly more accurate on constrained recognition.

Android: Speech Recognition Append Dictionary?

I'm using the Speech Recognizer Intent in Android. Is there a way to add your own customized words or phrases to Android's Speech recognition 'dictionary'
No. You can only use the two language models supported.
The built in speech recognition provided by google only supports the dictation and search language models. See http://developer.android.com/reference/android/speech/RecognizerIntent.html and LANGUAGE_MODEL_FREE_FORM or LANGUAGE_MODEL_WEB_SEARCH.
http://developer.android.com/resources/articles/speech-input.html says:
You can make sure your users have the
best experience possible by requesting
the appropriate language model:
free_form for dictation, or web_search
for shorter, search-like phrases. We
developed the "free form" model to
improve dictation accuracy for the
voice keyboard, while the "web search"
model is used when users want to
search by voice
Michael is correct, you cannot change the Language Model.
However, you can use "sounds like" algorithms to process the results from Android and match words it doesn't know.
See my answer here:
speech recognition reduce possible search results

Categories

Resources