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
  • Method Details

    • 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 - File folder where to download the produced audio file
      Returns:
      the downloaded audio File
      Throws:
      IOException - if the target folder is not accessible