Class: Telnyx::Models::TextToSpeechGenerateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/text_to_speech_generate_params.rb

Overview

Defined Under Namespace

Modules: OutputType, Provider, TextType Classes: Aws, Azure, Elevenlabs, Minimax, Resemble, Rime, Telnyx

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

Rime provider-specific parameters.

Parameters:

  • response_format (String) (defaults to: nil)

    Audio output format.

  • sampling_rate (Integer) (defaults to: nil)

    Audio sampling rate in Hz.

  • voice_speed (Float) (defaults to: nil)

    Voice speed multiplier.



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

Instance Attribute Details

#aws::Telnyx::Models::TextToSpeechGenerateParams::Aws?

AWS Polly provider-specific parameters.



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

optional :aws, -> { ::Telnyx::TextToSpeechGenerateParams::Aws }

#azure::Telnyx::Models::TextToSpeechGenerateParams::Azure?

Azure Cognitive Services provider-specific parameters.



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

optional :azure, -> { ::Telnyx::TextToSpeechGenerateParams::Azure }

#disable_cacheBoolean?

When ‘true`, bypass the audio cache and generate fresh audio.

Returns:

  • (Boolean, nil)


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

optional :disable_cache, ::Telnyx::Internal::Type::Boolean

#elevenlabs::Telnyx::Models::TextToSpeechGenerateParams::Elevenlabs?

ElevenLabs provider-specific parameters.



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

optional :elevenlabs, -> { ::Telnyx::TextToSpeechGenerateParams::Elevenlabs }

#languageString?

Language code (e.g. ‘en-US`). Usage varies by provider.

Returns:

  • (String, nil)


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

optional :language, String

#minimax::Telnyx::Models::TextToSpeechGenerateParams::Minimax?

Minimax provider-specific parameters.



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

optional :minimax, -> { ::Telnyx::TextToSpeechGenerateParams::Minimax }

#output_typeSymbol, ...

Determines the response format. ‘binary_output` returns raw audio bytes, `base64_output` returns base64-encoded audio in JSON.



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

optional :output_type, enum: -> { ::Telnyx::TextToSpeechGenerateParams::OutputType }

#providerSymbol, ...

TTS provider. Required unless ‘voice` is provided.



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

optional :provider, enum: -> { ::Telnyx::TextToSpeechGenerateParams::Provider }

#resemble::Telnyx::Models::TextToSpeechGenerateParams::Resemble?

Resemble AI provider-specific parameters.



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

optional :resemble, -> { ::Telnyx::TextToSpeechGenerateParams::Resemble }

#rime::Telnyx::Models::TextToSpeechGenerateParams::Rime?

Rime provider-specific parameters.



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

optional :rime, -> { ::Telnyx::TextToSpeechGenerateParams::Rime }

#telnyx::Telnyx::Models::TextToSpeechGenerateParams::Telnyx?

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



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

optional :telnyx, -> { ::Telnyx::TextToSpeechGenerateParams::Telnyx }

#textString?

The text to convert to speech.

Returns:

  • (String, nil)


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

optional :text, String

#text_typeSymbol, ...

Text type. Use ‘ssml` for SSML-formatted input (supported by AWS and Azure).



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

optional :text_type, enum: -> { ::Telnyx::TextToSpeechGenerateParams::TextType }

#voiceString?

Voice identifier in the format ‘provider.model_id.voice_id` or `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`, `Telnyx.Ultra.<voice_id>`, `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When provided, `provider`, `model_id`, and `voice_id` are extracted automatically and take precedence over individual parameters.

Returns:

  • (String, nil)


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

optional :voice, String

#voice_settingsHash{Symbol=>Object}?

Provider-specific voice settings. Contents vary by provider — see provider-specific parameter objects below.

Returns:

  • (Hash{Symbol=>Object}, nil)


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

optional :voice_settings, ::Telnyx::Internal::Type::HashOf[::Telnyx::Internal::Type::Unknown]

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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