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 89

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 }

#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.



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

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)


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

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)


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

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)


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

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)


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

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)


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

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/api/call-control/list-text-to-speech-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)


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

optional :voice_speed, Float