Wednesday, December 21, 2011

Android TextToSpeech

Android TextToSpeech:

this example for text convert speech. ex: what you are passing value into texttospeech it convert speech.
android text to speech example code ;

Emulator this is working fine but mobile you have install external library speech synthesis..... form android android market.

Goto->mobile->settings->voice input and output->text-to-speech settings->install voice data.

public class TextToSpeachActivity extends Activity implements OnInitListener {
    /** Called when the activity is first created. */
    private TextToSpeech    textToSpeech;;
    EditText edt;
    public void onCreate(Bundle savedInstanceState) {
        Button btn =(Button)findViewById(;
        textToSpeech=new TextToSpeech(this, this);
      //  textToSpeech.setLanguage(Locale.US);
        btn.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                textToSpeech.speak(edt.getText().toString(), TextToSpeech.SUCCESS, null);
    public void onDestroy() {
        if (textToSpeech != null) {
    public void onInit(int status) {


  1. Hi there, I discovered your blog by means of Google
    whilst searching for a similar topic, your website came up, it seems
    good. I've bookmarked it in my google bookmarks.
    Hi there, simply turned into alert to your weblog through Google, and found that it's really informative.
    I am going to be careful for brussels. I will be grateful when you proceed
    this in future. Lots of folks will probably be benefited out of your writing.
    Also see my website > cigarettes online

  2. Hello Sir ,
    i have a problem ,i create a application voice recogation password.voice not match this application .if u have appliction plz send me ..

  3. Hey! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up.
    Do you have any methods to protect against hackers?
    My web site - male breast reduction


Check out this may be help you

Related Posts Plugin for WordPress, Blogger...