Class MotorLargeTranscriptionRequest.Builder

java.lang.Object
com.chatmotorapi.api.transcription.MotorLargeTranscriptionRequest.Builder
Enclosing class:
MotorLargeTranscriptionRequest

public static class MotorLargeTranscriptionRequest.Builder
extends Object
Builder class for MotorSummaryRequest.
  • Constructor Details

    • Builder

      public Builder()
      Sets default values for the Request.
  • Method Details

    • chatMotor

      public MotorLargeTranscriptionRequest.Builder chatMotor​(ChatMotor chatMotor)
      Sets the ChatMotor instance for this request.
      Parameters:
      chatMotor - the ChatMotor instance
      Returns:
      this builder instance for chaining
    • aiModel

      public MotorLargeTranscriptionRequest.Builder aiModel​(String aiModel)
      Sets the OpenAI model to use for the request
      Parameters:
      aiModel - the model identifier, e.g., "gpt-4"
      Returns:
      this Builder instance for chaining
    • filePath

      public MotorLargeTranscriptionRequest.Builder filePath​(String filePath)
      Sets the file of the audio file to be transcribed.

      Note that on Android, the file must be a MP3 file.
      Parameters:
      filePath - the file path of the audio file
      Returns:
      this builder instance for chaining
    • timestamp

      public MotorLargeTranscriptionRequest.Builder timestamp​(boolean timestampTranscript)
      Sets if the transcription should be timestamped. Defaults to false.
      Parameters:
      timestampTranscript - if true, the transcription should be timestamped
      Returns:
      this Builder instance for chaining
    • inputChunkSize

      public MotorLargeTranscriptionRequest.Builder inputChunkSize​(ChunkSize inputChunkSize)
      Sets the input chunk size. Defaults to 4MB.
      Parameters:
      inputChunkSize - the input chunk size
      Returns:
      this Builder instance for chaining
    • progressListener

      public MotorLargeTranscriptionRequest.Builder progressListener​(ProgressListener progressListener)
      Sets the progress listener for tracking the progress of chunk processing.
      Parameters:
      progressListener - the progress listener instance
      Returns:
      this builder instance for chaining
    • build

      Builds and returns a MotorLargeTranscriptionRequest instance based on the set parameters.
      Returns:
      a new MotorLargeTranscriptionRequest
      Throws:
      IllegalArgumentException - if the chatMotor is not provided.
      IllegalArgumentException - if the filePath is not provided.
      IllegalArgumentException - if the file specified by filePath does not exist.