History log of /frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
af802c6831551323126537cf8edabea97d2fc762 05-Dec-2011 Narayan Kamath <narayan@google.com> Remove BlockingMediaPlayer.

No need to spawn a new thread for every audio item sent to
the TTS class.

Change-Id: Ia52b0951f4249b0da460a5ecaff5dd11a6e5d5fc
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
67ae6bc83cf2b30b0c61b9ebba5fed7a0038549c 30-Nov-2011 Narayan Kamath <narayan@google.com> Simplify the implementation of AudioPlaybackHandler.

Now uses a queue of runnables, one per synthesis. Also
introduce an abstraction that wraps AudioTrack that implements
the blocking semantics that we desire.

bug:5680699

Change-Id: I34a1248ff05766a7d9b3002055fb5b24aa9f230b
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
492b7f0d51f53164aa6eb974cd7ab6a7889af677 29-Nov-2011 Narayan Kamath <narayan@google.com> Allow multiple TextToSpeech instances per calling app.

We now use an IBinder object as an identity token of the
caller instead of Context#getPackageName.

bug:5680696
Change-Id: I1ca29e7161f709d2a85218206f3f117dfa620282
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
68e2af55d65d2e61fbf8096eccaa2e4ca02b6c5a 28-Nov-2011 Narayan Kamath <narayan@google.com> Fix TTS instantiation from webview accessibility handlers.

The TTS instantiated from here shouldn't clobber any
existing TTS objects opened within the same package context.

Ideally, the TTS API should work fine with multiple TTS object
instances within the same package context but making that happen
correctly is a larger change.

bug:5659758
Change-Id: Ia1f63c61b9f12ac92ff42a427a004d414e42a759
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
40f71f0be3cefabde9dc066d7707a1e5ebaec820 23-Nov-2011 Narayan Kamath <narayan@google.com> Fix regressions in TTS completion callbacks.

(a) onUtteranceCompleted should be called on errors too. Also,
fix up the error handling so that onUtteranceCompleted is
always called.
(b) Don't treat empty utterances as errors, and let the engine
synthesize them, as before.

bug:5662598
Change-Id: I9223592bc6fe5f47d71103f4f02f046b54a655a8
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
754c72ed9e8e83e5a913aa7552fc2e1b1b5277e0 09-Nov-2011 Narayan Kamath <narayan@google.com> Notifiy callers when a speech synthesis error occurs.

bug:5589877
Change-Id: Ideca8966ea1caa6789b3273e388dd1f25c1e2758
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
6c07a2028505e28abd601870f05d4752e92a4b7b 07-Nov-2011 Narayan Kamath <narayan@google.com> Fix a bug in the network TTS api.

bug:5284966
Change-Id: I460bd12c27671ed42681fd4ccad567c08cb8f70f
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
748af66ca27d3afe2e16ccc80b147d447635292a 31-Oct-2011 Narayan Kamath <narayan@google.com> Add an API for querying / enabling network TTS support.

bug:5284966
Change-Id: I01708f40bf0e975449125320dbcd4842210ca168
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
a65c62acabd204a0a1eb5504160238b288bee52b 06-Sep-2011 Narayan Kamath <narayan@google.com> Fix two TTS bugs.

(a) Fix a null pointer exception, caused by a race condition
between stop / start calls.
(b) Fix a deadlock observed when multiple apps call stop() when
an item from one of those apps is currently being processed.

bug:5253061

Change-Id: I78533aecfda028588ce6aedb041009bc0a6f4620
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
e5b8c4dfc70288f661e0da4f082dd51cc1399f86 22-Aug-2011 Narayan Kamath <narayan@google.com> Framework changes to support new TTS settings features.

Locale is now stored per engine, instead of as a global
option.

bug:5149036
Change-Id: I9848172623fe8aea1dd8e6678bca008da6a4cfb1
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
84deb60cf1055385b9922811e5942076dd72e315 27-Jul-2011 Narayan Kamath <narayan@google.com> Reduce the priority of the TTS thread.

It's at a very high priority currently - and will trump
foreground processes (and UI threads) which it shouldnt.

bug:5076001
Change-Id: I0d71c2941950782491ae31526a47ea6f97c38ffb
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
90e5650f96dabadaaf141beae20a646855073ae1 18-Jul-2011 Narayan Kamath <narayan@google.com> Few minor TTS clean ups.

(a) Remove unnecessary null check.
(b) Remove unused function.
(c) Clean up for TextToSpeech#shutdown.

Change-Id: I3ec5bccc327437064da130634a14aaf7d48eca4d
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
be4ad4ac66d6b4b878ed052975f7fb09af92c6d6 15-Jul-2011 Narayan Kamath <narayan@google.com> Fix a few threading issues in the AudioPlaybackHandler.

Also fixes a bug where PlaybackSynthesisCallback would
continue to pump audio to the audio playback thread after
being stopped.

Change-Id: I3233eb4858245b6e7c7df72e241a0708c668f1b4
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
c34f76fe89b5a31d01d63067c2f24b9a6a76df18 15-Jul-2011 Narayan Kamath <narayan@google.com> Improve TextToSpeech#isSpeaking()

Query the audio playback thread to check if it's busy.

bug:5033910
Change-Id: Ie57c7776bac27c2e712ddad4ec50fb7d78ea82e7
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
6dabb63307a0b63f9386d61e8444aed29db2081e 08-Jul-2011 Narayan Kamath <narayan@google.com> Add event-log logging for TTS requests.

Change-Id: I5023194c469a602b85259088a2e59373c96a941e
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
c3edf2a01a2cf2123a3de17ec1da11a3b6c459f0 15-Jun-2011 Narayan Kamath <narayan@google.com> Don't enforce defaults any more in the TextToSpeech API.

This has been discussed in an email thread. This brings the
text to speech API in line with other android APIs.

The user can set default speech rates / languages and
engine preferences, which the API obeys BUT these can be
overriden by individual apps (much like intent.setComponent
and intent.setClassName can be used to launch a specific
handler for a given intent).

Also, all installed engines are enabled by default. The
user is shown the "data privacy" warning every time an
installed engine is set to the default.

Change-Id: I24f5f331b3a7cc7ce1a62962192e3a452bdca9d4
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
abc63fbddab2477a2954bc804aba2826e1f11084 10-Jun-2011 Narayan Kamath <narayan@google.com> Some TTS fixes.

(a) Document the undocumented queue mode (mode == 2)
(b) intern strings to fix a bug in removeCallbacksAndMessages
(c) remove an unnecessarly lock object, change the field it
guarded to volatile.

Change-Id: If46bbfe2afb047b3ba5b3cb9a90c292656379ec1
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
4924fe38675f0bf69bb0c16fc059ffa1606807ce 09-Jun-2011 Narayan Kamath <narayan@google.com> Implement QUEUE_FLUSH and QUEUE_DESTROY addition modes.

Note that this change is slightly more flexible, it defines
a priority for each playback request. We needn't really throw
away synthesis requests from other apps. We could just play
them after higher priority ones (for e.g from talkback).

Change-Id: I6c7dd9abe4871e87da08d9aaa4c55225a69078e5
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
e22b69a7de0349b99d3107349d1d3aa72d62c841 08-Jun-2011 Narayan Kamath <narayan@google.com> Make changes to the TTS api suggested by the API review.

This ended up making the implementation a lot cleaner
as well. See the bug listed below for some background.

bug:4553470
Change-Id: If16476a57e389c2f9b228f6548e426642d292b49
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
8d1fc2403b8277e68d7816b2bbf05464a4c7a58a 03-Jun-2011 Narayan Kamath <narayan@google.com> Fix the threading behaviour of TTS audio requests.

All audio is played back on a separate thread.

Change-Id: I2bbb7b3140f6a04ef705cadb2bd1ae88951e3c48
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
7a3af86dc03a45280ceca6154040577f614c571e 02-Jun-2011 Narayan Kamath <narayan@google.com> Language loading / availablity should repsect defaults enforcement.

There is no point loading a language that will never be used.
It is in fact harmful, because the engine might load it and
then receive a request for the default voice and have to load
the default voice again.

Change-Id: I8082f28d15b6e325d6a39d439b66753711a2c244
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
c90f1c815dc06d5bb563474a340f7bb158fab2e2 24-May-2011 Narayan Kamath <narayan@google.com> Add a separate thread for writing to audiotracks.

Now, SynthesisRequest.audioAvailable( ) will not block
until all data has been written to the audiotrack.

Change-Id: Ie24c0b6873ae44659e88646fb7ef821750dc314e
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
b956f37e375bb2588208d4b5e8a40fae6fae5f86 16-May-2011 Narayan Kamath <narayan@google.com> Pass synthesis request params through to the TTS service.

Change-Id: I1ffd617d8dfa0814382643e3cf6b3ab7417c742a
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
4bbca889df9ca76c398f3a11e871fc6ad4a4514d 19-Apr-2011 Bjorn Bringert <bringert@android.com> Expose TTS engine API

This is a new API for writing text-to-speech engines.
The existing API for apps that use TTS remains the same,
with some minor additions.

Change-Id: Id577db449ae0e5baec40621d4a08387dbd755342
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
360eb168d6f9c967543852c7bbab370ef5d8c1bd 19-Apr-2011 Bjorn Bringert <bringert@android.com> TTS: SynthesisRequest.error() instead of return value

Change-Id: I02fe8ca1070a4e7c62ad30fd84c82bd6ecc2ecfa
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java
50e657bb2d005568f5dd8bc1d904d07b0d94018f 08-Mar-2011 Bjorn Bringert <bringert@android.com> Add Java API for writing TTS engines

This removes the old non-public C++ API for TTS
engines and replaces it with a Java API.

The new API is still @hidden, until it has been approved.

Bug: 4148636
Change-Id: I7614ff788e11f897e87052f684f1b4938d539fb7
/frameworks/base/core/java/android/speech/tts/TextToSpeechService.java