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

Android TTS 应用

 2010-03-24 03:48:00 来源:WEB开发网   
核心提示:1 IntroductionThe Text-To-Speech (TTS) library is allows developers to add speech to their applications. Developers give the TTS object a text string, and the T

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

1 2 3  下一页

Tags:Android TTS 应用

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