Class: Telnyx::Models::TextToSpeechRetrieveSpeechParams

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

Overview

Defined Under Namespace

Modules: AudioFormat, Provider

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(audio_format: nil, disable_cache: nil, model_id: nil, provider: nil, socket_id: nil, voice: nil, voice_id: nil, request_options: {}) ⇒ Object

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

Parameters:

  • audio_format (Symbol, Telnyx::Models::TextToSpeechRetrieveSpeechParams::AudioFormat) (defaults to: nil)

    Audio output format override. Supported for Telnyx models. ‘pcm` and `wav` are a

  • disable_cache (Boolean) (defaults to: nil)

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

  • model_id (String) (defaults to: nil)

    Model identifier for the chosen provider. Examples: ‘Natural`, `NaturalHD`, `Ult

  • provider (Symbol, Telnyx::Models::TextToSpeechRetrieveSpeechParams::Provider) (defaults to: nil)

    TTS provider. Defaults to ‘telnyx` if not specified. Ignored when `voice` is pro

  • socket_id (String) (defaults to: nil)

    Client-provided socket identifier for tracking. If not provided, one is generate

  • voice (String) (defaults to: nil)

    Voice identifier in the format ‘provider.model_id.voice_id` or `provider.voice_i

  • voice_id (String) (defaults to: nil)

    Voice identifier for the chosen provider.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 62

Instance Attribute Details

#audio_formatSymbol, ...

Audio output format override. Supported for Telnyx models. ‘pcm` and `wav` are available for `Natural`/`NaturalHD` models. The `Ultra` model outputs PCM at 24kHz s16le or MP3 at 128kbps 24kHz.



16
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 16

optional :audio_format, enum: -> { Telnyx::TextToSpeechRetrieveSpeechParams::AudioFormat }

#disable_cacheBoolean?

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

Returns:

  • (Boolean, nil)


22
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 22

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

#model_idString?

Model identifier for the chosen provider. Examples: ‘Natural`, `NaturalHD`, `Ultra` (Telnyx); `Polly.Generative` (AWS).

Returns:

  • (String, nil)


29
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 29

optional :model_id, String

#providerSymbol, ...

TTS provider. Defaults to ‘telnyx` if not specified. Ignored when `voice` is provided.



36
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 36

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

#socket_idString?

Client-provided socket identifier for tracking. If not provided, one is generated server-side.

Returns:

  • (String, nil)


43
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 43

optional :socket_id, String

#voiceString?

Voice identifier in the format ‘provider.model_id.voice_id` or `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`, `Telnyx.Ultra.<voice_id>`, or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`, `model_id`, and `voice_id` are extracted automatically. Takes precedence over individual `provider`/`model_id`/`voice_id` parameters.

Returns:

  • (String, nil)


54
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 54

optional :voice, String

#voice_idString?

Voice identifier for the chosen provider.

Returns:

  • (String, nil)


60
# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 60

optional :voice_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/text_to_speech_retrieve_speech_params.rb', line 92