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

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));

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.

Converting audio file into text file using pocketsphinx

Good day ma'am/sirs! I'm new to android app developing, and I'm really in need of help. I'm developing a Speech-to-Text app though its not the usual STT apps that are available on app-stores. I'm using pocketsphinx for offline speech recognition and conversion, and Android Studio IDE.
My app has three main features and those are:
Record - here is where the user will be able to record his/her speech. The recorded speech will be saved into the device's storage.
Library - Here is where the user will be able to see his/her recorded speech and converted audio-to-text files. Also the convert feature where the user may convert his/her recorded speech into text files.
Edit - here is where the user will be able to edit his/her audio/text files. Only cut, delete, and modify(only text) are the available features.
My main problem is, is it actually possible to convert a recorded speech into text by using pocketsphinx? To make it more understandable, I've tried demos of pocketsphinx and what I've experienced through it is when you speak through your device, it directly converts what you said. Unlike my idea, where you may record your speech, and convert it into text whenever you want. I'm so confused if its possible, if yes, may someone tell/explain to me how? If no, may someone tell/explain to me the other ways to follow my idea? Thanks in advance!

TextoToSpeech in another language

I'm trying to do a TextoToSpeech program in Android Studio but I want it to get a word and say it in another language(portuguese) that is not listed when I hit CTRL+SPACE.
How do I set this new language?
Well, It's related to the TTS Engine, there is a lot of engines like the Google TTS Engine, You can change language to speak by using setLanguage() function. Lot of languages are supported like Canada, French, Chinese, Germany etc.,but if the 'portuguese' language does not appear so you can not add it using this engine, so i suggest you to change your engine, there are a lot of engines, try to use Ekho engine, or find what engine support the portuguese language!!
tts.setLanguage(Locale.CHINESE); // Chinese language
I hope it will help you, best regards

Android App- speech to text in Indian English

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.

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