Android TTS 应用
2010-03-24 03:48:00 来源:WEB开发网1 Introduction
The Text-To-Speech (TTS) library is allows developers to add speech to their applications. Developers give the TTS object a text string, and the TTS will take care of converting that string to text and speaking it to the user.
The TTS library is designed such that different underlying speech engines can be used without affecting the higher level application logic. Currently, a port of the eSpeak engine is available.
2 Requirements
Using the eSpeak engine requires the user to have an SD card with free space available that the phone can access. The voice data for eSpeak will be downloaded and unzipped onto the SD card when the TTS is first run.
Note that if the SD card is mounted on the computer, it will not be accessible to the phone. You must unmount the SD card from the computer before the TTS will work properly.
3 Setting Up an Eclipse Project That Uses the TTS
Setup an Android project as you would normally.
Go to Project > Properties > Java Build Path > Libraries and click on "Add External JARs..." Then add in the TTS_library_stub.jar file.
Start coding!
4 A Step-By-Step Tutorial To Get You Started
This tutorial will take you step-by-step through writing a simple Hello World application. It assumes that you have Eclipse setup to work with the Android SDK already.
Get the TTS_library_stub.jar file from the downloads area. If you want to develop against the upcoming release, get the release candidate version by grabbing the _rc.jar and installing the _rc.apk on your phone. If you want to develop against the version of the TTS that is currently on Market, get the _market.jar and install the TTS from the Android Market. You should always build your app using the _market version before you release it on the Market; otherwise, there is a high probability that your app will not work correctly as
- ››Android 当修改一些代码时,使用什么编译命令可以最...
- ››Android 如何添加一个apk使模拟器和真机都编译进去...
- ››Android 修改Camera拍照的默认保存路径
- ››Android 如何修改默认输入法
- ››android开发中finish()和System.exit(0)的区别
- ››Android手势识别简单封装类
- ››android中查看项目数字证书的两种方法
- ››Android中获取IMEI码的办法
- ››android 相机报错 setParameters failed
- ››Android重启运用程序的代码
- ››Android为ListView的Item设置不同的布局
- ››android bitmap与base64字符串的互相转换
更多精彩
赞助商链接