Phonemes in eSpeak TextToSpeech in Android - android

I am working on an application in which i would like to use TTS to read text. I want to support Indian Languages offline so i have installed eSpeak Text To Speech engine in my android device and have set it as default. After understanding Speech Synthesis Markup Language (SSML) i realized that i can give phonemes as an input to make the Speech Engine pronounce words correctly. So i created a sample application in which i am using TextToSpeech class of Android.
String text = "[[ D,Is Iz sVm f#n'EtIk t'Ekst 'InpUt ]]";// "This is some phonetic text input"
tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
I read in the documentation of espeak that to make the engine understand phonemes, simply put phonetic expression in double square brackets and it would accept it as phoneme and render it accordingly. But this doesn't work in Android. Is the syntax correct?
Thanks

I directly used following code with Punjabi language unicode text in my app and it works.
m_objTTS = new TextToSpeech(this, this, "com.googlecode.eyesfree.espeak");
m_strTexttoSpeak = "ਸਕਰੀਨ ਤੇ ਟੈਪ ਕਰੋ|"; // its punjabi translation for "Tap on Screen"
m_objTTS.speak(m_strTexttoSpeak,TextToSpeech.QUEUE_FLUSH, null, null);
You should have espeak TTS app installed on mobile device and set it as default TTS engine. Default system language set to language of your choice ( Punjabi is set in my case )

Related

Locale for Gujrati language for Text to Speech

I want to try speech Gujarati language for my application. I've tried this locale code for the Gujarati language:
result = tts.setLanguage(Locale("gu-IN"))
result = tts.setLanguage(Locale("gu"))
result = tts?.setLanguage(Locale("gu-IND"))!!
I've tried these locale codes for the Gujarati Language .. but none of them work.
The code gu-IN is correct you can confirm by here.
If it's not working in your program then you can try this code to confirm if the language is in the list or not.
If it's available then you need to re-check your code. You can also share your code for help.

Adobe Air Android / Arabic text issue

i'm using Adobe Flash Air for IOS & Android problem now is the Arabic RTL i can't write arabic.
My
Input Text is Classic not " TLF Text "
The TLF problem is the keyboard not showing up in android..
Example
1) Did you try doing some research? I googled as3 "android" keyboard not showing.
What's wrong with solutions suggested on first page results of the above link?
2) Consider using Stage text and there's an introduction article about it.
3) Try something like below (untested) as a starting point. Hard to fix your code since none shown.
Also read this guide first. Might be useful.
var testInput : TextField = new TextField();
testInput.needsSoftKeyboard = true;
testInput.type = "input";
testInput.addEventListener(FocusEvent.FOCUS_IN, onFocusText);
stage.addChild(testInput);
function onFocusText( e:FocusEvent ):void
{
testInput.requestSoftKeyboard();
}

German pronounciation of Minuend with Android TTS

I try to say the word Minuend in German with Android TTS. But my Phone pronounces the ue as a ü (u-Umlaut). Anyone knows a way to force TTS speaking the ue as an ue?
Best Regards, Thomas.
This was used in ancient times for those typewriters which didn't have the umlauted vowels...
Trick: Try inserting something between the u and the e, like replacing "ue" with "u-e" before reading it.
i.e.:
tts.speak(txt,replace("ue", "u-e"), TextToSpeech.QUEUE_FLUSH, null);
Where txt is your string ("Minuendo") and tts is the TextToSpeech instance.
It should work, because the TTS engine won't recognize the ue as a diphtong anymore.
And "-" won't be read (or use a comma instead or some other MUTE character).

how to make gujrati font supported in android app

i'm going make a web site in which i have lots of Gujarati language text.
i found that in many cell phones (Micromax canvas2,etc) Gujarati language is not supported.
so i'm thinking to make a web browser in android which support Gujarati font. so user can use that my web site through my android browser.
plzz help me quickly
Few devices doesn't support Gujarati language packs.
You need to define css and apply it to your webview.
Below post may help you as well.
Android 2.2 webview not supporting Tamil font
Hi Try this this will work fine
TextView mtxt = (TextView) findViewById(R.id.action_settings);
Typeface face1 = Typeface.createFromAsset(getAssets(),
"Lohit-Gujarati.ttf");
mtxt.setTypeface(face1);
mtxt.setText("પૂર્વ વડાપ્રધાન રાજીવ ગાંધીની હત્યા કરનારા 3 આરોપીઓની ફાંસીની સજા સુપ્રિમ કોર્ટે ઉમ્રકેદમાં ફેરવી નાંખી છે.આમ રાજીવગાંધીના" +
"3 હત્યારાઓને હવે ફાંસીની સજા નહી થાય.સુપ્રીમ કોર્ટમાં 3 જજોની બેન્ચે આજે આ ચુકાદો આ");

How do I create an Android application to convert Text to Speech?

![enter image description here][1]I am working an Android application where I am using both a text to speech conversion and speech recognition elements. However, when I give a repeat instruction or press a repeat button in order to start tts to speak , it throws these warnings:
**speak failed: not bound to TTS engine**
**stop failed: not bound to TTS engine**
What do I need to do for this to work?
You have to make sure that you call speak only after onInit is called.

Categories

Resources