1. Check out our companion app, Forums for Android! Download from Google Play

Text-To-Speech

Discussion in 'Application Development' started by GiantKruemel, Feb 13, 2009.

  1. GiantKruemel

    GiantKruemel Member
    Thread Starter
    5

    Feb 13, 2009
    6
    0
    5
    Hello everybody.
    I'm trying to program an application that uses Text-To-Speech functionally.
    I followed the tutorial at this page:
    http://eyes-free.googlecode.com/svn/trunk/documentation/tutorial/tutorial.html

    (Of course I didn t forget to run the virtual phone with the virtual sdcard and to add the TTS library)
    Here is the code:

    Code (Text):
    1.  
    2. package wolf.android.hello;
    3.  
    4. import com.google.tts.TTS;
    5.  
    6. import android.app.Activity;
    7. import android.os.Bundle;
    8.  
    9. public class hello extends Activity {
    10.     private TTS myTts;
    11.    
    12.     /** Called when the activity is first created. */
    13.     @Override
    14.     public void onCreate(Bundle savedInstanceState) {
    15.         super.onCreate(savedInstanceState);
    16.         setContentView(R.layout.main);
    17.         myTts = new TTS(this, ttsInitListener, true);
    18.     }
    19.    
    20.     private TTS.InitListener ttsInitListener = new TTS.InitListener() {
    21.         public void onInit(int version) {
    22.           myTts.speak("Hello world", 0, null);
    23.         }
    24.       };
    25. }
    26.  
    When I start this application, than a message comes up: "This application can talk using the text-to-speech (TTS) libary. Please install the TTS."I clicked on "install the TTS" And the Exception "Sorry! The application Hello you! (process wolf.android.hello) has stopped unexpectedly. Please try again." came up.

    Can someone help me with this? I am trying to fix this since monday and its still not working.

    MFG Da Wolf
     

    Advertisement

  2. GiantKruemel

    GiantKruemel Member
    Thread Starter
    5

    Feb 13, 2009
    6
    0
    5
    its working...
     
  3. mbreezy

    mbreezy New Member
    5

    Feb 23, 2009
    3
    0
    5
    How did you get this working? I'm encountering the same problem.
     
  4. mbreezy

    mbreezy New Member
    5

    Feb 23, 2009
    3
    0
    5
    Nevermind... I installed the APK for the TTS; however, I'm still not hearing anything. Is it downloading the voice?
     
  5. Jenish

    Jenish New Member
    5

    Sep 11, 2009
    1
    0
    5
    Me didn hear nythg...
    I have done everythg.... but didn knw y i cant hear nythg
    am new to Android...
    thnx in advance...:)
     

Share This Page

Loading...