forked from happyalu/Flite-TTS-Engine-for-Android
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
117 lines (79 loc) · 3.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Flite TTS Engine for Android
============================
This application provides the Flite speech synthesizer for android.
------------
Requirements:
------------
(1) On the Phone:
- Android 1.6 -- 2.1 WITH "TTS Extended" app from google installed
*OR*
Android 2.2 WITHOUT "TTS Extended" app from google.
(2) On your computer, to build this application:
- Flite 1.4.2 or later,
- Android NDK Release 4
- Android SDK
-------------------------
Building this application:
-------------------------
*******************************************************************
* NOTICE *
* ------ *
* This README provides instructions to build this application *
* if you are downloading it separately from Flite itself. *
* *
* If you obtained this code as a part of flite distribution from *
* www.cmuflite.org, please follow the README in *
* /path/to/flite/android/README for build instructions *
* *
*******************************************************************
(1) Build Flite with android support enabled.
cd /path/to/flite-1.4.2
./configure --with-langvox=android --target=arm-android
make
(2) Export necessary environment variables.
export FLITEDIR=/path/to/flite
export ANDROID_NDK=/path/to/android-ndk-r4
export ANDROID_SDK=/path/to/android-sdk
(3) Build the native code in this application.
cd /path/to/flite_app_code/
$ANDROID_NDK/ndk-build
(4) Build the application APK file.
cd /path/to/flite_app_code
echo "sdk.dir=$(ANDROID_SDK)" > local.properties
ant debug
---------------------------
Installing this application:
---------------------------
(1) Connect your device via USB and make sure adb server is running.
$ANDROID_SDK/tools/adb devices
should show your device attached.
(2) Install the application on your phone.
$ANDROID_SDK/tools/adb install \
$FLITEDIR/android/app_code/bin/FliteEngine-debug.apk
(3) Open Text To Speech Settings:
(a) Android 1.6 -- 2.1:
Open "TTS Service" application
(b) Android 2.2 or later:
Menu -> Settings -> Voice Input and Output -> TTS Settings
(4) Scroll down to the bottom and enable Flite.
(5) Scroll back up and click on the "Default Engine" setting.
(6) Select Flite to be the default engine.
(7) Go to the "Install voice data" setting.
(8) Select a voice to download and click the "Download" button. You can
download and install more than one voice.
(9) Go to "Language" and select the voice you want to play.
(10) Click on "Listen to an example" to get a sample of this voice.
----------------------------------
Using Flite as the TTS in your app:
----------------------------------
* Download http://eyes-free.googlecode.com/files/TTS_library_stub_3.0_rc02.jar (or later)
* Add the downloaded jar file to your application's build path.
* Create an object of the TextToSpeechBeta class (say, myTTS)
(1) Requesting Flite:
myTTS.setEngineByPackageName("edu.cmu.cs.speech.tts.flite")
(2) Setting a particular voice:
myTTS.setLanguage(new Locale("eng", "USA", "male,rms"))
List of available voices can be found at
http://tts.speech.cs.cmu.edu/android/general/voices.list?q=browse
More documentation about using TTS itself can be found
by browsing Google's TTS documentation.