WEB开发网
开发学院手机开发Android 开发 Android TTS 应用 阅读

Android TTS 应用

 2010-03-24 03:48:00 来源:WEB开发网   
核心提示:prompted to install it.If this is the first time you have used an app that uses the TTS, you will hear the TTS spell out "h e l l o w o r l d" very fa
prompted to install it.

If this is the first time you have used an app that uses the TTS, you will hear the TTS spell out "h e l l o w o r l d" very fast and see a screen that says your device is downloading the voice data files; if you rerun the app, you will hear the TTS say "hello world" as it should.

Congratulations! You just wrote your first TTS-enabled Android app! Please see the documentation on the TTS and look at other apps in the eyes-free project to learn more about how to use the TTS.

Notes:

The TTS constructor takes 3 parameters: the application Context, the TTS.InitListener to call upon successful initialization of the TTS, and whether or not to show a message prompting the user to install the TTS from the Market if they have not done so already.

The speak call takes 3 parameters: the String of text to be spoken, an int that indicates the queuing strategy (0 for no queuing, 1 for fifo queuing), and an array of Strings that are parameters for how to speak the text.

The first time you run an app that uses the TTS, if you do not already have the necessary voice data files on your SD card, they will be downloaded automatically.

5 Tips and Tricks on Using the TTS in Your App

For some tips and tricks on using the TTS in your app, please see the usage notes here.http://eyes-free.googlecode.com/svn/trunk/documentation/tutorial/usage_notes.html

上一页  1 2 3 

Tags:Android TTS 应用

编辑录入:coldstar [复制链接] [打 印]
赞助商链接