public interface SynthesizeCallback
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.
|
void onConnected()
void onError(Exception e)
e
- the exceptionvoid onWarning(Exception e)
e
- the exceptionvoid onDisconnected()
void onContentType(String contentType)
contentType
- the content type of the synthesized audiovoid onTimings(Timings timings)
timings
- array of words and their start and end timesvoid onMarks(Marks marks)
marks
- array of marks and their appearance timesvoid onAudioStream(byte[] bytes)
bytes
- array of bytes in the specified audio format or the default
(audio/ogg;codecs=opus)Copyright © 2022 IBM Cloud. All rights reserved.