Android App- speech to text in Indian English - android

I am developing an Android App that uses speech to text recognition.I have used RecognizerIntent and i know about the link
http://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE
But this allows US-english. I want the speech recognizer to recognize Indian Englishas i need the App to recognize Indian names. Is it possible?

As the linked document says, the value is a "IETF language tag (as defined by BCP 47)". Which values are actually supported depends on the speech recognizer that you are using. E.g. Google's recognizer supports en-IN, so if you are using Google's recognizer then you could try to set the value of EXTRA_LANGUAGE to en-IN and test if Indian names will be recognized.

Related

Handwriting recognition in android studio

I need to recognize some text written on a postit. The text has no meaning, it is a succession of letters written in block capitals.
I inquired and discovered that it is a problem of localization of handwriting and then of recognition of the handwriting. There is google OCR, but those models only recognize English language phrases.
I leave you an example image:enter image description here
I would like that, for each postit, the text is recognized, so for the first postit: "769213" for the second "ALHSFP"
The Cloud Vision API is able to detect more than just "English language phrases". Try Google Translate; it can translate directly from camera input; Lens might also use the same. You could as well use TensorFlow Lite on Android. Keras is required for training models (won't run on Android).
For example:
https://cloud.google.com/vision/docs/handwriting
https://towardsdatascience.com/build-a-handwritten-text-recognition-system-using-tensorflow-2326a3487cd5
https://keras.io/examples/vision/handwriting_recognition/
The mere difference is, that the one requires a network connection, while the other doesn't.

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.

Google speech API - only transcribe from a given set of words or ban certain words?

Is it possible to restrict the Google Speech API to only recognize from a given set of words? Alternatively, is it possible to "ban" certain words? If not, is it possible with any other speech API that supports German?
I do know that I can set hint phrases via a speech context. Still it rather recognizes a different word.
As an example, I use the API mostly for the German language. I want to recognize the word "stärker" (which is also listed as a speech context hint), though, the API mostly transcribes it to "Stärke" unless I pronounce the "r" at the end unnaturally strong. So, is it possible to prevent the speech API from transcribing that word, for instance?
Thanks in advance!
No, that's not possible with Google Speech API. I don't know if it's possible with other speech recognition services.
Google speech API supports set of parameters in RecognitionConfig.
There is an optional boolean parameter called "profanityFilter", which filters out profanities.
https://cloud.google.com/speech-to-text/docs/reference/rest/v1beta1/RecognitionConfig

How to use Hindi(Indian Mother Tongue) language in Text-To-Speech?

I am creating an application for student. I need to enter data in Hindi or Marathi.
When user clicks on specific topic then user should be able to listen this topic in Hindi Or Marathi.
I know How to set Language in TextToSpeech like
Tts.setLanguage(Locale.US);
I need to set Hindi or Marathi Language. My question is that how to use Marathi or Hindi
Language in TextToSpeech. Please give me any reference or hint.
You need a text-to-speech (TTS) engine that supports Hindi. Each TTS engine has specific languages that it supports. Here is a TTS engine that supports Hindi, but this runs on Windows. I see from the tags that you want to support this on Android. Here is a post about supporting Hindi TTS on an Android. The native TTS on Android does not support Hindi. What you may have to do is create a service that uses the Hindi text and translates it to an audio file. You would then stream the audio file to your Android application.
In my opinion though you will not want to use TTS for an educational application. I think you will find the output from the TTS very robotic and hard to understand by the students. I would record the lessons/information and just stream it in your application. Before you purchase any TTS engine I would try it out first to make sure that the generated voice is acceptable. Most of the top educational application today (ex: Khan Academy) use pre-recorded audio and/or video.
you should use
msg.lang = 'hi-IN';
you should have to use :-
tts.setLanguage(Locale.forLanguageTag("hin-IND"));
or
tts.setLanguage(new Locale("hin","IND",null));

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