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 Summary
Constructors Constructor Description Builder()
Sets default values for the Request. -
Method Summary
Modifier and Type Method Description MotorLargeTranscriptionRequest.Builder
aiModel(String aiModel)
Sets the OpenAI model to use for the requestMotorLargeTranscriptionRequest
build()
Builds and returns aMotorLargeTranscriptionRequest
instance based on the set parameters.MotorLargeTranscriptionRequest.Builder
chatMotor(ChatMotor chatMotor)
Sets theChatMotor
instance for this request.MotorLargeTranscriptionRequest.Builder
filePath(String filePath)
Sets the file of the audio file to be transcribed.MotorLargeTranscriptionRequest.Builder
inputChunkSize(ChunkSize inputChunkSize)
Sets the input chunk size.MotorLargeTranscriptionRequest.Builder
progressListener(ProgressListener progressListener)
Sets the progress listener for tracking the progress of chunk processing.MotorLargeTranscriptionRequest.Builder
timestamp(boolean timestampTranscript)
Sets if the transcription should be timestamped.
-
Constructor Details
-
Builder
public Builder()Sets default values for the Request.
-
-
Method Details
-
chatMotor
Sets theChatMotor
instance for this request.- Parameters:
chatMotor
- theChatMotor
instance- Returns:
- this builder instance for chaining
-
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
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
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
Sets the input chunk size. Defaults to 4MB.- Parameters:
inputChunkSize
- the input chunk size- Returns:
- this Builder instance for chaining
-
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 aMotorLargeTranscriptionRequest
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.
-