Package com.azure.ai.openai.models
Class AudioTranslationOptions
java.lang.Object
com.azure.ai.openai.models.AudioTranslationOptions
The configuration information for an audio translation request.
-
Constructor Summary
ConstructorsConstructorDescriptionAudioTranslationOptions(byte[] file) Creates an instance of AudioTranslationOptions class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getFile()Get the file property: The audio data to translate.Get the filename property: The optional filename or descriptive identifier to associate with with the audio data.getModel()Get the model property: The model to use for this translation request.Get the prompt property: An optional hint to guide the model's style or continue from a prior audio segment.Get the responseFormat property: The requested format of the translation response data, which will influence the content and detail of the result.Get the temperature property: The sampling temperature, between 0 and 1.setFilename(String filename) Set the filename property: The optional filename or descriptive identifier to associate with with the audio data.Set the model property: The model to use for this translation request.Set the prompt property: An optional hint to guide the model's style or continue from a prior audio segment.setResponseFormat(AudioTranslationFormat responseFormat) Set the responseFormat property: The requested format of the translation response data, which will influence the content and detail of the result.setTemperature(Double temperature) Set the temperature property: The sampling temperature, between 0 and 1.
-
Constructor Details
-
AudioTranslationOptions
public AudioTranslationOptions(byte[] file) Creates an instance of AudioTranslationOptions class.- Parameters:
file- the file value to set.
-
-
Method Details
-
getFile
public byte[] getFile()Get the file property: The audio data to translate. This must be the binary content of a file in one of the supported media formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.- Returns:
- the file value.
-
getResponseFormat
Get the responseFormat property: The requested format of the translation response data, which will influence the content and detail of the result.- Returns:
- the responseFormat value.
-
getPrompt
Get the prompt property: An optional hint to guide the model's style or continue from a prior audio segment. The written language of the prompt should match the primary spoken language of the audio data.- Returns:
- the prompt value.
-
setPrompt
Set the prompt property: An optional hint to guide the model's style or continue from a prior audio segment. The written language of the prompt should match the primary spoken language of the audio data.- Parameters:
prompt- the prompt value to set.- Returns:
- the AudioTranslationOptions object itself.
-
getTemperature
Get the temperature property: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.- Returns:
- the temperature value.
-
setTemperature
Set the temperature property: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.- Parameters:
temperature- the temperature value to set.- Returns:
- the AudioTranslationOptions object itself.
-
getModel
Get the model property: The model to use for this translation request.- Returns:
- the model value.
-
setModel
Set the model property: The model to use for this translation request.- Parameters:
model- the model value to set.- Returns:
- the AudioTranslationOptions object itself.
-
setResponseFormat
Set the responseFormat property: The requested format of the translation response data, which will influence the content and detail of the result.- Parameters:
responseFormat- the responseFormat value to set.- Returns:
- the AudioTranslationOptions object itself.
-
getFilename
Get the filename property: The optional filename or descriptive identifier to associate with with the audio data.- Returns:
- the filename value.
-
setFilename
Set the filename property: The optional filename or descriptive identifier to associate with with the audio data.- Parameters:
filename- the filename value to set.- Returns:
- the AudioTranslationOptions object itself.
-