AbstractSynthesisCallbackpublic abstract class AbstractSynthesisCallback extends Object implements SynthesisCallbackDefines additional methods the synthesis callback must implement that
are private to the TTS service implementation.
All of these class methods (with the exception of {@link #stop()}) can be only called on the
synthesis thread, while inside
{@link TextToSpeechService#onSynthesizeText} or {@link TextToSpeechService#onSynthesizeTextV2}.
{@link #stop()} is the exception, it may be called from multiple threads. |
Fields Summary |
---|
protected final boolean | mClientIsUsingV2If true, request comes from V2 TTS interface |
Constructors Summary |
---|
AbstractSynthesisCallback(boolean clientIsUsingV2)Constructor.
mClientIsUsingV2 = clientIsUsingV2;
|
Methods Summary |
---|
int | errorCodeOnStop()Get status code for a "stop".
V2 Clients will receive special status, V1 clients will receive standard error.
This method should only be called on the synthesis thread,
while in {@link TextToSpeechService#onSynthesizeText}.
return mClientIsUsingV2 ? TextToSpeech.STOPPED : TextToSpeech.ERROR;
| abstract void | stop()Aborts the speech request.
Can be called from multiple threads.
|
|