public class BaseSynthesizeCallback extends Object implements SynthesizeCallback
| Constructor and Description |
|---|
BaseSynthesizeCallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
onAudioStream(byte[] bytes)
Called when the service returns byte info in the specified audio format as a result of
synthesis.
|
void |
onConnected()
Called when a WebSocket connection was made.
|
void |
onContentType(String contentType)
Called when the service returns the type of audio it will be sending back.
|
void |
onDisconnected()
Called when a WebSocket connection was closed.
|
void |
onError(Exception e)
Called when there is an error in the WebSocket connection.
|
void |
onMarks(Marks marks)
Called when the service returns SSML mark information.
|
void |
onTimings(Timings timings)
Called when the service returns word timing information.
|
void |
onWarning(Exception e)
Called when there is a warning in the WebSocket connection.
|
public void onConnected()
SynthesizeCallbackonConnected in interface SynthesizeCallbackpublic void onError(Exception e)
SynthesizeCallbackonError in interface SynthesizeCallbacke - the exceptionpublic void onWarning(Exception e)
SynthesizeCallbackonWarning in interface SynthesizeCallbacke - the exceptionpublic void onDisconnected()
SynthesizeCallbackonDisconnected in interface SynthesizeCallbackpublic void onContentType(String contentType)
SynthesizeCallbackonContentType in interface SynthesizeCallbackcontentType - the content type of the synthesized audiopublic void onTimings(Timings timings)
SynthesizeCallbackonTimings in interface SynthesizeCallbacktimings - array of words and their start and end timespublic void onMarks(Marks marks)
SynthesizeCallbackonMarks in interface SynthesizeCallbackmarks - array of marks and their appearance timespublic void onAudioStream(byte[] bytes)
SynthesizeCallbackonAudioStream in interface SynthesizeCallbackbytes - array of bytes in the specified audio format or the default
(audio/ogg;codecs=opus)Copyright © 2022 IBM Cloud. All rights reserved.