8 Commits

Author SHA1 Message Date
Przemyslaw Szczepaniak
4b73867a12 Add UtteranceProgressListener#onStop callback
New UtteranceProgressListener callback that allows
to detect a call to TextToSpeech#stop() (or QUEUE_FLUSH usage)
from the same client, or a QUEUE_DESTROY usage from any other
client (Talkback uses it to preempt other users of TextToSpeech
queue). This change is required for seamless Books read aloud
feature+Talkback usage.

+ Fixes for broken tests/TtsTests

Bug: 17901521

Change-Id: I30d2f297bb7c8d05cbeb16f63e85c1be0cca5c84
2014-12-09 11:06:06 +00:00
Przemyslaw Szczepaniak
fd80746bb9 Set the TTS voice name for the default language.
This changes makes the initial, default language set and
the #setLanguage call with the default language as input
exactly the same.

Previously, the requests made after the initial default language
set were missing the name of the default voice.

+ Some tests clean-up. Some of them fail due to issues with
Locale#toLanguageTag upper-casing the variant field.

Change-Id: I5470617007fe45462b7198bf62a03eb5fe47a590
2014-08-05 14:50:34 +01:00
Niels Egberts
34d4ac88f7 Remove Markup and Utterance classes.
Markup is replaced by TtsSpan, and the Utterance class will be replaced
by TtsSpanBuilder.

Change-Id: I443786681f065ad8458fc05825de3ef182db8062
2014-07-08 14:53:35 +01:00
Przemyslaw Szczepaniak
ad6df74ada Add support for voices in TTS API.
Voices allow to expose multiple backends/voice packs for a single
Locale. This is an attempt to port this feature from V2 API.

Bug: 15834470
Change-Id: I0117de238cfcf028bcec5344b8d65c960b96b98c
2014-07-04 11:28:06 +01:00
Przemyslaw Szczepaniak
1b5637ee32 Expose "default tts locale" to the TTS V2 API.
This change allows TTS V2 API client applications to honor the
"default TTS locale" set by the user in the TTS settings.

Note that the TTS V1 API uses 3 character country/language codes
for locale encoding. It's the only system component that does
that. TTS V2 uses the standard, valid Locale objects. The default
TTS locale setting was stored as a 3 character locale string with
"-" as the separator.

This change switches the TTS locale setting format to the output of
Locale.toString() call (on a valid Locale object). Methods used for
reading this value can interpret both forms and try to return a valid
Locale object as an output.

Change-Id: Ice2e6c25a43eb9dd6e17d371ee582c2dae3329c9
2014-06-11 13:49:48 +01:00
Niels Egberts
a6cc9b85ad Markup support for framework
Change-Id: Ia5ad6cff7593c295944a90775a1b061c95f5cc3f
2014-05-30 13:48:09 +00:00
Przemyslaw Szczepaniak
93d34a61db Fix TTS tests.
Fix breakages steaming from recent changes:
- onGetLanguage is no longer called anywhere (it's used in API <= 17),
tests for it no longer apply.
- onLoadLanguage is called as item on synthesis thread queue. To return
value to client asap, onIsLanguageAvailable is called as well - added
missing expectations for mocks.

Change-Id: I205bc406f085e2c2f7e98f8495ddb96ad3701b97
2013-07-29 16:30:04 +00:00
Narayan Kamath
c60aad2a8a Write unit tests for android.speech.tts.
Change-Id: Ie5b3b4cdd13be2babee9a44bae00da179b372d12
2012-01-09 13:38:55 +00:00