Share via


OpenAITextToAudioExecutionSettings Class

Request settings for OpenAI text to audio services.

Initialize the prompt execution settings.

Constructor

OpenAITextToAudioExecutionSettings(service_id: str | None = None, *, extension_data: dict[str, Any] = None, function_choice_behavior: FunctionChoiceBehavior | None = None, ai_model_id: str | None = None, input: str | None = None, voice: Literal['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'] = 'alloy', response_format: Literal['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] | None = None, speed: float | None = None)

Parameters

Name Description
service_id
str

The service ID to use for the request.

Default value: None
kwargs
Required
Any

Additional keyword arguments, these are attempted to parse into the keys of the specific prompt execution settings.

Keyword-Only Parameters

Name Description
extension_data
Required
function_choice_behavior
Required
ai_model_id
Required
input
Required
voice
Default value: alloy
response_format
Required
speed
Required

Methods

validate_speed

Validate the speed parameter.

validate_speed

Validate the speed parameter.

validate_speed() -> OpenAITextToAudioExecutionSettings

Attributes

ai_model_id

ai_model_id: str | None

input

input: str | None

response_format

response_format: Literal['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] | None

speed

speed: float | None

voice

voice: Literal['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer']