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.BuilderaiModel(String aiModel)Sets the OpenAI model to use for the requestMotorLargeTranscriptionRequestbuild()Builds and returns aMotorLargeTranscriptionRequestinstance based on the set parameters.MotorLargeTranscriptionRequest.BuilderchatMotor(ChatMotor chatMotor)Sets theChatMotorinstance for this request.MotorLargeTranscriptionRequest.BuilderfilePath(String filePath)Sets the file of the audio file to be transcribed.MotorLargeTranscriptionRequest.BuilderinputChunkSize(ChunkSize inputChunkSize)Sets the input chunk size.MotorLargeTranscriptionRequest.BuilderprogressListener(ProgressListener progressListener)Sets the progress listener for tracking the progress of chunk processing.MotorLargeTranscriptionRequest.Buildertimestamp(boolean timestampTranscript)Sets if the transcription should be timestamped.
-
Constructor Details
-
Builder
public Builder()Sets default values for the Request.
-
-
Method Details
-
chatMotor
Sets theChatMotorinstance for this request.- Parameters:
chatMotor- theChatMotorinstance- 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 aMotorLargeTranscriptionRequestinstance 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.
-