Class: Telnyx::Models::AI::VoiceSettings

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/voice_settings.rb

Defined Under Namespace

Modules: BackgroundAudio, LanguageBoost

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(value:, type: :media_name) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::VoiceSettings::BackgroundAudio::MediaName for more details.

Parameters:

  • value (String)

    The ‘name` of a media asset created via [Media Storage API](developers.t

  • type (Symbol, :media_name) (defaults to: :media_name)

    Reference a previously uploaded media by its name from Telnyx Media Storage.



# File 'lib/telnyx/models/ai/voice_settings.rb', line 97

Instance Attribute Details

#api_key_refString?

The ‘identifier` for an integration secret [/v2/integration_secrets](developers.telnyx.com/api-reference/integration-secrets/create-a-secret) that refers to your ElevenLabs API key. Warning: Free plans are unlikely to work with this integration.

Returns:

  • (String, nil)


26
# File 'lib/telnyx/models/ai/voice_settings.rb', line 26

optional :api_key_ref, String

#background_audioTelnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia, ...

Optional background audio to play on the call. Use a predefined media bed, or supply a looped MP3 URL. If a media URL is chosen in the portal, customers can preview it before saving.



34
# File 'lib/telnyx/models/ai/voice_settings.rb', line 34

optional :background_audio, union: -> { Telnyx::AI::VoiceSettings::BackgroundAudio }

#expressive_modeBoolean?

Enables emotionally expressive speech using SSML emotion tags. When enabled, the assistant uses audio tags like angry, excited, content, and sad to add emotional nuance. Only supported for Telnyx Ultra voices.

Returns:

  • (Boolean, nil)


42
# File 'lib/telnyx/models/ai/voice_settings.rb', line 42

optional :expressive_mode, Telnyx::Internal::Type::Boolean

#language_boostSymbol, ...

Enhances recognition for specific languages and dialects during MiniMax TTS synthesis. Default is null (no boost). Set to ‘auto’ for automatic language detection. Only applicable when using MiniMax voices.



50
# File 'lib/telnyx/models/ai/voice_settings.rb', line 50

optional :language_boost, enum: -> { Telnyx::AI::VoiceSettings::LanguageBoost }, nil?: true

#similarity_boostFloat?

Determines how closely the AI should adhere to the original voice when attempting to replicate it. Only applicable when using ElevenLabs.

Returns:

  • (Float, nil)


57
# File 'lib/telnyx/models/ai/voice_settings.rb', line 57

optional :similarity_boost, Float

#speedFloat?

Adjusts speech velocity. 1.0 is default speed; values less than 1.0 slow speech; values greater than 1.0 accelerate it. Only applicable when using ElevenLabs.

Returns:

  • (Float, nil)


64
# File 'lib/telnyx/models/ai/voice_settings.rb', line 64

optional :speed, Float

#styleFloat?

Determines the style exaggeration of the voice. Amplifies speaker style but consumes additional resources when set above 0. Only applicable when using ElevenLabs.

Returns:

  • (Float, nil)


72
# File 'lib/telnyx/models/ai/voice_settings.rb', line 72

optional :style, Float

#temperatureFloat?

Determines how stable the voice is and the randomness between each generation. Lower values create a broader emotional range; higher values produce more consistent, monotonous output. Only applicable when using ElevenLabs.

Returns:

  • (Float, nil)


80
# File 'lib/telnyx/models/ai/voice_settings.rb', line 80

optional :temperature, Float

#use_speaker_boostBoolean?

Amplifies similarity to the original speaker voice. Increases computational load and latency slightly. Only applicable when using ElevenLabs.

Returns:

  • (Boolean, nil)


87
# File 'lib/telnyx/models/ai/voice_settings.rb', line 87

optional :use_speaker_boost, Telnyx::Internal::Type::Boolean

#voiceString

The voice to be used by the voice assistant. Check the full list of [available voices](developers.telnyx.com/docs/tts-stt/tts-available-voices) via our voices API. To use ElevenLabs, you must reference your ElevenLabs API key as an integration secret under the ‘api_key_ref` field. See [integration secrets documentation](developers.telnyx.com/api-reference/integration-secrets/create-a-secret) for details. For Telnyx voices, use `Telnyx.<model_id>.<voice_id>` (e.g. Telnyx.KokoroTTS.af_heart)

Returns:

  • (String)


17
# File 'lib/telnyx/models/ai/voice_settings.rb', line 17

required :voice, String

#voice_speedFloat?

The speed of the voice in the range [0.25, 2.0]. 1.0 is deafult speed. Larger numbers make the voice faster, smaller numbers make it slower. This is only applicable for Telnyx Natural voices.

Returns:

  • (Float, nil)


95
# File 'lib/telnyx/models/ai/voice_settings.rb', line 95

optional :voice_speed, Float