I have questions regarding the implementation of tts service for android. Here's the deal:
-I've looked over Flite code and I see that service is require to have these 3 activities:
<activity
android:name=".DownloadVoiceData"
android:label="@string/flite_voice_manager"
android:theme="@android:style/Theme.Holo"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.speech.tts.engine.INSTALL_TTS_DATA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".CheckVoiceData"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.speech.tts.engine.CHECK_TTS_DATA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".GetSampleText"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.speech.tts.engine.GET_SAMPLE_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
The actual actions of these activities are self explainable, but I want to know: Are they mandatory, how they work .... I have google it but with no luck.
Can anybody point out to some documentation where these activities are explained?
Also, is there any documentation of tts service flow explained in detail?
Thanx in advance.
CheckVoiceData
is necessary because it may be invoked by a client willing to know if the engine will work. I think you can live without the other two at least for some time.In
CheckVoiceData.onCreate()
you will do something like this:An example of a valid language string is
"eng-USA"
.