Package org.springframework.ai.openai
Class OpenAiAudioTranscriptionModel
java.lang.Object
org.springframework.ai.openai.OpenAiAudioTranscriptionModel
- All Implemented Interfaces:
TranscriptionModel,Model<AudioTranscriptionPrompt,AudioTranscriptionResponse>
OpenAI audio transcription model implementation using the OpenAI Java SDK. You provide
as input the audio file you want to transcribe and the desired output file format of
the transcription of the audio.
- Author:
- Michael Lavelle, Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for creatingOpenAiAudioTranscriptionModelinstances. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder forOpenAiAudioTranscriptionModel.call(AudioTranscriptionPrompt transcriptionPrompt) Transcribes the audio from the given prompt.Gets the transcription options for this model.mutate()Creates a builder initialized with this model's configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.audio.transcription.TranscriptionModel
transcribe, transcribe
-
Method Details
-
builder
Creates a new builder forOpenAiAudioTranscriptionModel.- Returns:
- a new builder instance
-
mutate
Creates a builder initialized with this model's configuration.- Returns:
- a builder for creating a modified copy
-
getOptions
Gets the transcription options for this model.- Returns:
- the transcription options
-
call
Description copied from interface:TranscriptionModelTranscribes the audio from the given prompt.- Specified by:
callin interfaceModel<AudioTranscriptionPrompt,AudioTranscriptionResponse> - Specified by:
callin interfaceTranscriptionModel- Parameters:
transcriptionPrompt- The prompt containing the audio resource and options.- Returns:
- The transcription response.
-