|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Vocalizer.Listener
The Vocalizer.Listener interface defines the callback methods called by a
Vocalizer
object during the speech synthesis process. These methods
provide progress information regarding the speech process. Since the Vocalizer
will automatically queue sequential speech requests, it is not even necessary
to know when a speech request has finished.
If the Vocalizer object was given a Handler when
created, the listener methods will be posted to the handler thread. Otherwise,
they will be called from a thread owned by SpeechKit
.
Method Summary | |
---|---|
void |
onSpeakingBegin(Vocalizer vocalizer,
java.lang.String text,
java.lang.Object context)
Called when the Vocalizer begins speaking each string. |
void |
onSpeakingDone(Vocalizer vocalizer,
java.lang.String text,
SpeechError error,
java.lang.Object context)
Called when the Vocalizer finishes speaking or ends with an error. |
Method Detail |
---|
void onSpeakingBegin(Vocalizer vocalizer, java.lang.String text, java.lang.Object context)
Vocalizer
begins speaking each string.
This method is called at most one time for each speech request. In the case that there is valid speech to play, this method will be called when the audio begins playing.
If there is no valid audio for the string, or there is an error,
onSpeakingDone(com.nuance.nmdp.speechkit.Vocalizer, java.lang.String, com.nuance.nmdp.speechkit.SpeechError, java.lang.Object)
() may be called with an error without calling
this method.
vocalizer
- The Vocalizer objecttext
- The text that is being spoken.context
- The context object passed when speech was started.void onSpeakingDone(Vocalizer vocalizer, java.lang.String text, SpeechError error, java.lang.Object context)
Vocalizer
finishes speaking or ends with an error.
This method will be called exactly one time for each speech request sent. In the case that there are no errors, this method will be called when the speech playback finishes with error set to null. If there is an error at any stage of the speech request, this method will be called immediately with error set to indicate the failure.
vocalizer
- The Vocalizer objecttext
- The text that was spokenerror
- The error, or null if there was no errorcontext
- The context object passed when speech was started.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |