Class: Telnyx::Models::TextToSpeechGenerateParams::Telnyx

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

Defined Under Namespace

Modules: Emotion

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(emotion: nil, response_format: nil, sampling_rate: nil, temperature: nil, voice_speed: nil, volume: nil) ⇒ Object

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

Telnyx provider-specific parameters. Use ‘voice_speed` and `temperature` for `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`, `volume`, and `emotion`.

Parameters:

  • emotion (Symbol, ::Telnyx::Models::TextToSpeechGenerateParams::Telnyx::Emotion) (defaults to: nil)

    Emotion control for the Ultra model. Adjusts the emotional tone of the synthesiz

  • response_format (String) (defaults to: nil)

    Audio response format.

  • sampling_rate (Integer) (defaults to: nil)

    Audio sampling rate in Hz.

  • temperature (Float) (defaults to: nil)

    Sampling temperature. Applies to ‘Natural` and `NaturalHD` models only.

  • voice_speed (Float) (defaults to: nil)

    Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.

  • volume (Float) (defaults to: nil)

    Volume level for the Ultra model. Range: 0.0 to 2.0.



# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 491

Instance Attribute Details

#emotionSymbol, ...

Emotion control for the Ultra model. Adjusts the emotional tone of the synthesized speech.



459
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 459

optional :emotion, enum: -> { ::Telnyx::TextToSpeechGenerateParams::Telnyx::Emotion }

#response_formatString?

Audio response format.

Returns:

  • (String, nil)


465
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 465

optional :response_format, String

#sampling_rateInteger?

Audio sampling rate in Hz.

Returns:

  • (Integer, nil)


471
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 471

optional :sampling_rate, Integer

#temperatureFloat?

Sampling temperature. Applies to ‘Natural` and `NaturalHD` models only.

Returns:

  • (Float, nil)


477
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 477

optional :temperature, Float

#voice_speedFloat?

Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.

Returns:

  • (Float, nil)


483
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 483

optional :voice_speed, Float

#volumeFloat?

Volume level for the Ultra model. Range: 0.0 to 2.0.

Returns:

  • (Float, nil)


489
# File 'lib/telnyx/models/text_to_speech_generate_params.rb', line 489

optional :volume, Float