xref: /aosp_15_r20/development/samples/TtsEngine/_index.html (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker<p>This sample demonstrates how to create a text to speech engine
2*90c8c64dSAndroid Build Coastguard Workerthat users can install on their devices.</p>
3*90c8c64dSAndroid Build Coastguard Worker
4*90c8c64dSAndroid Build Coastguard Worker<p>The application includes a service and two activities:</p>
5*90c8c64dSAndroid Build Coastguard Worker<ul>
6*90c8c64dSAndroid Build Coastguard Worker  <li><a
7*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/ttsengine/RobotSpeakTtsService.html"><code>RobotSpeakTtsService</code></a>,
8*90c8c64dSAndroid Build Coastguard Worker    a simple text to speech engine that converts sentences into audio by
9*90c8c64dSAndroid Build Coastguard Worker    generating a square wave of a given frequency for each alphabet of a
10*90c8c64dSAndroid Build Coastguard Worker    given language. Though this doesn't qualify as speech (except for robots)
11*90c8c64dSAndroid Build Coastguard Worker    it exercises all aspects of the new text to speech API
12*90c8c64dSAndroid Build Coastguard Worker    by subclassing the
13*90c8c64dSAndroid Build Coastguard Worker    <a href="../../../reference/android/speech/tts/TextToSpeechService.html"><code>TextToSpeechService</code></a>
14*90c8c64dSAndroid Build Coastguard Worker    framework class.
15*90c8c64dSAndroid Build Coastguard Worker  </li>
16*90c8c64dSAndroid Build Coastguard Worker  <li><a
17*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/ttsengine/CheckVoiceData.html"><code>CheckVoiceData</code></a>,
18*90c8c64dSAndroid Build Coastguard Worker  an activity that checks that all voice related data is installed and
19*90c8c64dSAndroid Build Coastguard Worker  available.</li>
20*90c8c64dSAndroid Build Coastguard Worker  <li><a
21*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/ttsengine/RobotSpeakSettings.html"><code>RobotSpeakSettings</code></a>,
22*90c8c64dSAndroid Build Coastguard Worker    a settings screen for users to set various engine parameters. This is
23*90c8c64dSAndroid Build Coastguard Worker    usually accessed by users from the system wide settings app. This must be
24*90c8c64dSAndroid Build Coastguard Worker    declared in the <code>AndroidManifest.xml</code> file as a
25*90c8c64dSAndroid Build Coastguard Worker    <code>meta-data</code> element.</li>
26*90c8c64dSAndroid Build Coastguard Worker
27*90c8c64dSAndroid Build Coastguard Worker<!-- TODO: Fix this when the API level for ICS is finalized -->
28*90c8c64dSAndroid Build Coastguard Worker<p>Note that this API is supported only on Android 4.0 (API level 13)
29*90c8c64dSAndroid Build Coastguard Workerand higher versions of the platform.</p>
30*90c8c64dSAndroid Build Coastguard Worker
31