diff options
| author | 2017-04-13 14:41:55 +0000 | |
|---|---|---|
| committer | 2017-04-13 14:41:59 +0000 | |
| commit | 3a543a1bd2876e1d9b7da706e55594f589d16ec1 (patch) | |
| tree | da08bb77a87875cdd390ae3012b929f1583319b1 | |
| parent | 809f4cf1219cd3afb74f5112325cfefd26a8bb54 (diff) | |
| parent | 04637f3d4d68f6e5a4820e207b444d93704649b6 (diff) | |
Merge "Document examples where a developer might use the APIs." into oc-dev
| -rw-r--r-- | core/java/android/speech/tts/SynthesisCallback.java | 3 | ||||
| -rw-r--r-- | core/java/android/speech/tts/UtteranceProgressListener.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/speech/tts/SynthesisCallback.java b/core/java/android/speech/tts/SynthesisCallback.java index e535cfab3ab6..f5e5f4d8356c 100644 --- a/core/java/android/speech/tts/SynthesisCallback.java +++ b/core/java/android/speech/tts/SynthesisCallback.java @@ -151,6 +151,9 @@ public interface SynthesisCallback { * listener ({@link UtteranceProgressListener#onRangeStart}) at the moment that frame has been * reached by the playback head. * + * <p>This information can be used by the client, for example, to highlight ranges of the text + * while it is spoken. + * * <p>The markerInFrames is a frame index into the audio for this synthesis request, i.e. into * the concatenation of the audio bytes sent to audioAvailable for this synthesis request. The * definition of a frame depends on the format given by {@link #start}. See {@link AudioFormat} diff --git a/core/java/android/speech/tts/UtteranceProgressListener.java b/core/java/android/speech/tts/UtteranceProgressListener.java index 59ee8f360c12..ef81f1211364 100644 --- a/core/java/android/speech/tts/UtteranceProgressListener.java +++ b/core/java/android/speech/tts/UtteranceProgressListener.java @@ -128,6 +128,9 @@ public abstract class UtteranceProgressListener { * <p>This method is called when the audio is expected to start playing on the speaker. Note * that this is different from {@link #onAudioAvailable} which is called as soon as the audio is * generated. + + * <p>This information can be used, for example, to highlight ranges of the text while it is + * spoken. * * <p>Only called if the engine supplies timing information by calling {@link * SynthesisCallback#rangeStart(int, int, int)}. |