要在Android中发言的文字

问题描述:

Android中是否有内置的文字说话库?如果不是,你知道任何外部库的使用?问候要在Android中发言的文字

看看这个Android TTS API

下面是使用它的一个例子:

t1=new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() { 
     @Override 
     public void onInit(int status) { 
      if(status != TextToSpeech.ERROR) { 
       t1.setLanguage(Locale.UK); 
      } 
     } 
    }); 

t1.speak("This will be spoken.", TextToSpeech.QUEUE_FLUSH, null); 
+2

Link是死了... – h22 2012-12-03 07:31:18

+0

http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech- in.html – 2014-06-06 20:42:56