Class: Telnyx::Models::TextToSpeechStreamParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/text_to_speech_stream_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::TextToSpeechStreamParams for more details.

Parameters:

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

    Audio output format override. Supported for Telnyx ‘Natural`/`NaturalHD` models

  • 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` (Teln

  • provider (Symbol, Telnyx::Models::TextToSpeechStreamParams::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_stream_params.rb', line 60

Instance Attribute Details

#audio_formatSymbol, ...

Audio output format override. Supported for Telnyx ‘Natural`/`NaturalHD` models only. Accepted values: `pcm`, `wav`.



15
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 15

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

#disable_cacheBoolean?

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

Returns:

  • (Boolean, nil)


21
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 21

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

#model_idString?

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

Returns:

  • (String, nil)


28
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 28

optional :model_id, String

#providerSymbol, ...

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



35
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 35

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

#socket_idString?

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

Returns:

  • (String, nil)


42
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 42

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


52
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 52

optional :voice, String

#voice_idString?

Voice identifier for the chosen provider.

Returns:

  • (String, nil)


58
# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 58

optional :voice_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/text_to_speech_stream_params.rb', line 88