VoiceAgentAudioOutputConfig Class
Output audio configuration for a voice agent.
Provider-specific fields are selected by voice_type:
openai: voice and speed.
azure-standard: voice, voice_locale, speed, voice_temperature, custom_lexicon_url, custom_text_normalization_url, prefer_locales, style, pitch, and volume.
azure-custom: all azure-standard fields except style, plus custom_voice_endpoint_id.
azure-personal: all azure-standard fields except style, plus personal_voice_model.
avatar-voice-sync: all azure-standard fields except voice and style, plus personal_voice_model; the voice name is derived from the avatar.
azure-realtime-native: voice and speed. format and output_audio_timestamp_types apply to every voice type.
Constructor
VoiceAgentAudioOutputConfig(*args: Any, **kwargs: Any)
Variables
| Name | Description |
|---|---|
|
format
|
The output audio format. Applies to every |
|
voice
|
The voice name or identifier. Applies to |
|
voice_type
|
The voice implementation. Known values are: "openai", "azure-standard", "azure-custom", "azure-personal", "avatar-voice-sync", and "azure-realtime-native". |
|
voice_locale
|
The enforced BCP-47 output locale. Applies to |
|
speed
|
The numeric output speed multiplier. Applies to all known |
|
voice_temperature
|
The voice variation temperature. Applies to |
|
custom_lexicon_url
|
The URL of a custom pronunciation lexicon. Applies to
|
|
custom_text_normalization_url
|
The URL of a custom text-normalization configuration.
Applies to |
|
prefer_locales
|
Preferred BCP-47 locales for multilingual synthesis. Applies to
|
|
style
|
The voice speaking style. Applies only when |
|
pitch
|
The voice pitch adjustment. Applies to |
|
volume
|
The voice volume adjustment. Applies to |
|
custom_voice_endpoint_id
|
The Azure custom-voice deployment endpoint identifier. Applies
only when |
|
personal_voice_model
|
The Azure personal or avatar voice model. Applies only when
|
|
output_audio_timestamp_types
|
Timestamp kinds to include with output audio. Applies to
every |
Methods
| as_dict |
Return a dict that can be turned into json using json.dump. |
| clear |
Remove all items from the dictionary. |
| copy | |
| get |
Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: The value for key if key is in the dictionary, else default. :rtype: any |
| items | |
| keys | |
| pop |
Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given. |
| popitem |
Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if the dictionary is empty. |
| setdefault |
Return the value for key if key is in the dictionary; otherwise set the key to default and return default. :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: The value for key if key is in the dictionary, else default. :rtype: any |
| update |
Update the dictionary from a mapping or an iterable of key-value pairs. :param any args: Either a mapping object or an iterable of key-value pairs. |
| values |
as_dict
Return a dict that can be turned into json using json.dump.
as_dict(*, exclude_readonly: bool = False) -> dict[str, Any]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
exclude_readonly
|
Whether to remove the readonly properties. Default value: False
|
Returns
| Type | Description |
|---|---|
|
A dict JSON compatible object |
clear
Remove all items from the dictionary.
clear() -> None
copy
copy() -> Model
get
Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: The value for key if key is in the dictionary, else default. :rtype: any
get(key: str, default: Any = None) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
Default value: None
|
items
items() -> ItemsView[str, Any]
Returns
| Type | Description |
|---|---|
|
a set-like object providing a view on the mapping's items |
keys
keys() -> KeysView[str]
Returns
| Type | Description |
|---|---|
|
a set-like object providing a view on the mapping's keys |
pop
Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.
pop(key: str, default: ~typing.Any = <object object>) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
|
popitem
Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if the dictionary is empty.
popitem() -> tuple[str, Any]
setdefault
Return the value for key if key is in the dictionary; otherwise set the key to default and return default. :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: The value for key if key is in the dictionary, else default. :rtype: any
setdefault(key: str, default: ~typing.Any = <object object>) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
|
update
Update the dictionary from a mapping or an iterable of key-value pairs. :param any args: Either a mapping object or an iterable of key-value pairs.
update(*args: Any, **kwargs: Any) -> None
values
values() -> ValuesView[Any]
Returns
| Type | Description |
|---|---|
|
an object providing a view on the mapping's values |
Attributes
custom_lexicon_url
The URL of a custom pronunciation lexicon. Applies to azure-standard, azure-custom,
azure-personal, and avatar-voice-sync.
custom_lexicon_url: str | None
custom_text_normalization_url
The URL of a custom text-normalization configuration. Applies to azure-standard,
azure-custom, azure-personal, and avatar-voice-sync.
custom_text_normalization_url: str | None
custom_voice_endpoint_id
The Azure custom-voice deployment endpoint identifier. Applies only when voice_type is
azure-custom.
custom_voice_endpoint_id: str | None
format
The output audio format. Applies to every voice_type and defaults to 24 kHz PCM.
format: _models.RealtimeAudioFormats | None
output_audio_timestamp_types
Timestamp kinds to include with output audio. Applies to every voice_type.
output_audio_timestamp_types: list[typing.Union[str, ForwardRef('_models.VoiceAgentAudioTimestampType')]] | None
personal_voice_model
The Azure personal or avatar voice model. Applies only when voice_type is
azure-personal or avatar-voice-sync.
personal_voice_model: str | None
pitch
The voice pitch adjustment. Applies to azure-standard, azure-custom,
azure-personal, and avatar-voice-sync.
pitch: str | None
prefer_locales
Preferred BCP-47 locales for multilingual synthesis. Applies to azure-standard,
azure-custom, azure-personal, and avatar-voice-sync.
prefer_locales: list[str] | None
speed
The numeric output speed multiplier. Applies to all known voice_type values and defaults to
1.
speed: float | None
style
The voice speaking style. Applies only when voice_type is azure-standard.
style: str | None
voice
The voice name or identifier. Applies to openai, azure-standard, azure-custom,
azure-personal, and azure-realtime-native. It does not apply to avatar-voice-sync,
which derives the voice name from the avatar.
voice: str | None
voice_locale
The enforced BCP-47 output locale. Applies to azure-standard, azure-custom,
azure-personal, and avatar-voice-sync.
voice_locale: str | None
voice_temperature
The voice variation temperature. Applies to azure-standard, azure-custom,
azure-personal, and avatar-voice-sync.
voice_temperature: float | None
voice_type
"openai", "azure-standard", "azure-custom", "azure-personal", "avatar-voice-sync", and "azure-realtime-native".
voice_type: str | _models.VoiceType | None
volume
The voice volume adjustment. Applies to azure-standard, azure-custom,
azure-personal, and avatar-voice-sync.
volume: str | None