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, temperature: nil, voice_speed: nil) ⇒ Object

Telnyx provider-specific parameters.

Parameters:

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

  • voice_speed (Float) (defaults to: nil)

    Voice speed multiplier.



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

Instance Attribute Details

#awsTelnyx::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 }

#azureTelnyx::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

#elevenlabsTelnyx::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

#minimaxTelnyx::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 }

#resembleTelnyx::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 }

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



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

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

#textString?

The text to convert to speech.

Returns:

  • (String, nil)


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

optional :text, String

#text_typeSymbol, ...

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



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

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`, `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)


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

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)


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

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 195