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

Instance Attribute 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(voice:, api_key_ref: nil, background_audio: nil, similarity_boost: nil, speed: nil, style: nil, temperature: nil, use_speaker_boost: nil, voice_speed: nil) ⇒ Object

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

Parameters:

  • voice (String)

    The voice to be used by the voice assistant. Check the full list of [available v

  • api_key_ref (String) (defaults to: nil)

    The ‘identifier` for an integration secret [/v2/integration_secrets](dev

  • background_audio (Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia, Telnyx::Models::AI::VoiceSettings::BackgroundAudio::MediaURL, Telnyx::Models::AI::VoiceSettings::BackgroundAudio::MediaName) (defaults to: nil)

    Optional background audio to play on the call. Use a predefined media bed, or su

  • similarity_boost (Float) (defaults to: nil)

    Determines how closely the AI should adhere to the original voice when attemptin

  • speed (Float) (defaults to: nil)

    Adjusts speech velocity. 1.0 is default speed; values less than 1.0 slow speech;

  • style (Float) (defaults to: nil)

    Determines the style exaggeration of the voice. Amplifies speaker style but cons

  • temperature (Float) (defaults to: nil)

    Determines how stable the voice is and the randomness between each generation. L

  • use_speaker_boost (Boolean) (defaults to: nil)

    Amplifies similarity to the original speaker voice. Increases computational load

  • voice_speed (Float) (defaults to: nil)

    The speed of the voice in the range [0.25, 2.0]. 1.0 is deafult speed. Larger nu



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

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 }

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


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

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)


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

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)


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

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)


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

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)


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

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)


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

optional :voice_speed, Float