Class AudioTranscriptionPrompt
java.lang.Object
org.springframework.ai.audio.transcription.AudioTranscriptionPrompt
- All Implemented Interfaces:
ModelRequest<org.springframework.core.io.Resource>
public class AudioTranscriptionPrompt
extends Object
implements ModelRequest<org.springframework.core.io.Resource>
Represents an audio transcription prompt for an AI model. It implements the
ModelRequest interface and provides the necessary information required to
interact with an AI model, including the audio resource and model options.- Since:
- 0.8.1
- Author:
- Michael Lavelle, Piotr Olaszewski
-
Constructor Summary
ConstructorsConstructorDescriptionAudioTranscriptionPrompt(org.springframework.core.io.Resource audioResource) Construct a new AudioTranscriptionPrompt given the resource representing the audio file.AudioTranscriptionPrompt(org.springframework.core.io.Resource audioResource, AudioTranscriptionOptions modelOptions) Construct a new AudioTranscriptionPrompt given the resource representing the audio file. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.ResourceRetrieves the instructions or input required by the AI model.Retrieves the customizable options for AI model interactions.
-
Constructor Details
-
AudioTranscriptionPrompt
public AudioTranscriptionPrompt(org.springframework.core.io.Resource audioResource) Construct a new AudioTranscriptionPrompt given the resource representing the audio file. The following input file types are supported: mp3, mp4, mpeg, mpga, m4a, wav, and webm.- Parameters:
audioResource- resource of the audio file.
-
AudioTranscriptionPrompt
public AudioTranscriptionPrompt(org.springframework.core.io.Resource audioResource, AudioTranscriptionOptions modelOptions) Construct a new AudioTranscriptionPrompt given the resource representing the audio file. The following input file types are supported: mp3, mp4, mpeg, mpga, m4a, wav, and webm.- Parameters:
audioResource- resource of the audio file.modelOptions-
-
-
Method Details
-
getInstructions
public org.springframework.core.io.Resource getInstructions()Description copied from interface:ModelRequestRetrieves the instructions or input required by the AI model.- Specified by:
getInstructionsin interfaceModelRequest<org.springframework.core.io.Resource>- Returns:
- the instructions or input required by the AI model
-
getOptions
Description copied from interface:ModelRequestRetrieves the customizable options for AI model interactions.- Specified by:
getOptionsin interfaceModelRequest<org.springframework.core.io.Resource>- Returns:
- the customizable options for AI model interactions
-