Package com.azure.ai.openai.models
Class SpeechGenerationOptions
java.lang.Object
com.azure.ai.openai.models.SpeechGenerationOptions
A representation of the request options that control the behavior of a text-to-speech operation.
-
Constructor Summary
ConstructorsConstructorDescriptionSpeechGenerationOptions(String input, SpeechVoice voice) Creates an instance of SpeechGenerationOptions class. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()Get the input property: The text to generate audio for.getModel()Get the model property: The model to use for this text-to-speech request.Get the responseFormat property: The audio output format for the spoken text.getSpeed()Get the speed property: The speed of speech for generated audio.getVoice()Get the voice property: The voice to use for text-to-speech.Set the model property: The model to use for this text-to-speech request.setResponseFormat(SpeechGenerationResponseFormat responseFormat) Set the responseFormat property: The audio output format for the spoken text.Set the speed property: The speed of speech for generated audio.
-
Constructor Details
-
SpeechGenerationOptions
Creates an instance of SpeechGenerationOptions class.- Parameters:
input- the input value to set.voice- the voice value to set.
-
-
Method Details
-
getInput
Get the input property: The text to generate audio for. The maximum length is 4096 characters.- Returns:
- the input value.
-
getVoice
Get the voice property: The voice to use for text-to-speech.- Returns:
- the voice value.
-
getResponseFormat
Get the responseFormat property: The audio output format for the spoken text. By default, the MP3 format will be used.- Returns:
- the responseFormat value.
-
setResponseFormat
Set the responseFormat property: The audio output format for the spoken text. By default, the MP3 format will be used.- Parameters:
responseFormat- the responseFormat value to set.- Returns:
- the SpeechGenerationOptions object itself.
-
getSpeed
Get the speed property: The speed of speech for generated audio. Values are valid in the range from 0.25 to 4.0, with 1.0 the default and higher values corresponding to faster speech.- Returns:
- the speed value.
-
setSpeed
Set the speed property: The speed of speech for generated audio. Values are valid in the range from 0.25 to 4.0, with 1.0 the default and higher values corresponding to faster speech.- Parameters:
speed- the speed value to set.- Returns:
- the SpeechGenerationOptions object itself.
-
getModel
Get the model property: The model to use for this text-to-speech request.- Returns:
- the model value.
-
setModel
Set the model property: The model to use for this text-to-speech request.- Parameters:
model- the model value to set.- Returns:
- the SpeechGenerationOptions object itself.
-