Class AsyncPromiseStage
java.lang.Object
bg.codexio.ai.openai.api.sdk.voice.speech.SpeechConfigurationStage
bg.codexio.ai.openai.api.sdk.voice.speech.AsyncPromiseStage
Registers callbacks
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.voice.speech.SpeechConfigurationStage
executor, requestBuilder -
Method Summary
Modifier and TypeMethodDescriptionvoidonEachLine(Consumer<String> onEachLine) Sends request in asynchronous fashion, registers a callback to be called when String/byteArray line of the response is received.voidonEachLine(Consumer<String> onEachLine, Consumer<Throwable> onError) Sends request in asynchronous fashion, registers a callback to be called when String/byteArray line of the response is received.voidSends request in asynchronous fashion, registers a callback to be called when file is downloaded.voidSends request in asynchronous fashion, registers a callback to be called when file is downloaded.voidSends request in asynchronous fashion, registers a callback to be called when file is downloaded and a callback to be called when String/byteArray line
-
Method Details
-
then
Sends request in asynchronous fashion, registers a callback to be called when file is downloaded.- Parameters:
afterAll- a callback which accepts the downloaded audioFile
-
then
Sends request in asynchronous fashion, registers a callback to be called when file is downloaded.- Parameters:
afterAll- a callback which accepts the downloaded audioFileonError- a callback which will be invoked if an error occurs
-
onEachLine
Sends request in asynchronous fashion, registers a callback to be called when String/byteArray line of the response is received.- Parameters:
onEachLine- a callback which accepts a String line of the response
-
onEachLine
Sends request in asynchronous fashion, registers a callback to be called when String/byteArray line of the response is received.- Parameters:
onEachLine- a callback which accepts a String line of the responseonError- a callback which will be invoked if an error occurs
-
then
Sends request in asynchronous fashion, registers a callback to be called when file is downloaded and a callback to be called when String/byteArray line- Parameters:
onEachLine- a callback which accepts a String line of the responseafterAll- a callback which accepts the downloaded audioFileonError- a callback which will be invoked if an error occurs
-