Class SynchronousDownloadStage
- java.lang.Object
-
- bg.codexio.ai.openai.api.sdk.voice.speech.SpeechConfigurationStage
-
- bg.codexio.ai.openai.api.sdk.voice.speech.SynchronousDownloadStage
-
public class SynchronousDownloadStage extends SpeechConfigurationStage
Sends blocking requests to OpenAI API
-
-
Field Summary
-
Fields inherited from class bg.codexio.ai.openai.api.sdk.voice.speech.SpeechConfigurationStage
executor, requestBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FiledownloadTo(File targetFolder)Executes the request so far in synchronous blocking fashion, the result of the OpenAI API response is then downloaded to the supplied folder.
-
-
-
Method Detail
-
downloadTo
public File downloadTo(File targetFolder) throws IOException
Executes the request so far in synchronous blocking fashion, the result of the OpenAI API response is then downloaded to the supplied folder.- Parameters:
targetFolder-Filefolder where to download the produced audio file- Returns:
- the downloaded audio
File - Throws:
IOException- if the target folder is not accessible
-
-