History log of /frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d0ea0fe210db85a8a8a44c63d8fef195e206abb 21-Mar-2017 Niels Egberts <nielse@google.com> Add time markers to synthesizeToFile API.

Also rename onUtteranceRangeStart to onRangeStart based on feedback from
the API council.

Bug: 35767714
Bug: 35767290
Test: cts-tradefed run cts-dev --module CtsSpeechTestCases
Change-Id: I2c17a06e401313d4f35e5ec4958c2251c195ef05
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
65c50784564d0bae9276fde5472dd8898a781bcd 23-Dec-2016 Niels Egberts <nielse@google.com> Implement time markers for TTS.

The service can inform the framework at which frame a part of the input
is spoken, and that information is then relayed to the client.

This can be used to highlight the currently spoken word/sentence or to
resume synthesis requests at the start of the last word/sentence.

Test: manual
Change-Id: Ie20a6764a8788cc3539cb058425e55eb6fde07db
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
c99ba1c3edf725e070383b27724c9ed63e1e5765 20-Nov-2015 Niels Egberts <nielse@google.com> API to listen in on the synthesized audio.

Change-Id: Ic943d39a0540f0061ef6f629e4934dc71f69ab6b
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
9b2b2f50909b0278fee7f26d0070f318fd6b354a 08-Dec-2015 Niels Egberts <nielse@google.com> Fix checks for audio format.

Change-Id: I43e9a94f8ddd46f72d24e06d72702f354bbeae46
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
a24b50bee1aca19028477b235862bcd2c37135ed 20-Nov-2015 Niels Egberts <nielse@google.com> Restrict audioformat to 8bit, 16bit or float PCM with an annotation and
a warning.

TextToSpeech.synthesizeToFile has only ever worked with 8bit and 16bit
PCM. In case of float PCM an invalid file would be generated and in case
of other encodings the TTS engine would crash.

Also add more annotations to SynthesisCallback.

Change-Id: I1c44a44509e9b53bb2e1b0f2044b1a5919875e1c
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
5cbf17ca053b09beadd0b031a46ce193ab27a0f8 18-Jun-2014 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add support for audio session id in the TTS

+ #playEarcon & #queueAudio respects request Volume/Pan settings.

Bug:15432115
Change-Id: I136afef77afbc56c34810c64123f7be4b431d378
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
fc4b2890378eb1b6e0b11d60d703eb6854268064 26-Jun-2014 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove TextToSpeechClient API.

Removed all of TTS V2 api with exception of error codes.

Bug: 15834470
Change-Id: I9d9d2aad01811af9b86bf7a3fd018a8d4e5c2f33
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.java
90d15d2371ad85f22254be6985455aa2baa5d15d 14-Jun-2013 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add new TTS API.

Much of existing API is reused (mostly on the service side). The new API
provides better support for network-based synthesis, defines explicit
synthesis fallback support, has better error handling, allows for multiple
different voices per locale, features enumeration and custom extensions
on a voice level and many more.

If a service does not provide a V2 implementation, a basic adapter
from V2 to existing V1 implementation is provided.

Bug: 8259486
Change-Id: I797b7fc054f11c9b0d930f4dea582e57596ea127
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.java
2a0518cd1d18dc50ffa063a71133e69de2e866ab 26-Aug-2011 Narayan Kamath <narayan@google.com> Don't allow TTS engines to synthesize too for ahead.

For each synthesis request, we inspect the number of
bytes of audio that have not been written to the mixer yet
and if that is above a certain threshold (currently 500ms),
we block the synthesis thread.

bug:5214603
Change-Id: I24c64c48466bdb96ce47b34cee7da2523ee5f0eb
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.java
c3da8818f0598b3ab2cd6f4168349da6d0f72cb1 01-Jul-2011 Narayan Kamath <narayan@google.com> Remove the completeAudioAvailable API.

Measurements have shown that the audio track in streaming mode
is pretty efficient as is, thanks to dalvik's JNI implementation.

Also, in streaming mode write( ) blocks until all data has been
copied to the mixer, which is the kind of behaviour we want so
that we don't have to explicitly block in our code. Also,
the java AudioTrack is thread-safe with respect to stop( ) calls
during write, which means we can do everything completeAudioAvailable
did, just as efficiently without it.

Change-Id: I70a8a108d94c7260676673979b5ea29f37fa5db4
/frameworks/base/core/java/android/speech/tts/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.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/PlaybackSynthesisCallback.java