Class: Telnyx::Models::StreamClientEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/stream_client_event.rb,
sig/telnyx/models/stream_client_event.rbs

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(text:, force: nil, voice_settings: nil) ⇒ Object

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

Client-to-server frame containing text to synthesize.

Parameters:

  • text (String)

    Text to convert to speech. Send " " (single space) as an initial handshake wit

  • force (Boolean) (defaults to: nil)

    When true, stops the current synthesis worker and starts a new one. Used to in

  • voice_settings (Hash{Symbol=>Object}) (defaults to: nil)

    Provider-specific voice settings sent with the initial handshake. Contents vary



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

Instance Attribute Details

#forceBoolean?

When true, stops the current synthesis worker and starts a new one. Used to interrupt speech mid-stream and begin synthesizing new text.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


19
# File 'lib/telnyx/models/stream_client_event.rb', line 19

optional :force, Telnyx::Internal::Type::Boolean

#textString

Text to convert to speech. Send " " (single space) as an initial handshake with optional voice_settings. Subsequent messages contain the actual text to synthesize.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/telnyx/models/stream_client_event.rb', line 12

required :text, String

#voice_settingsHash{Symbol=>Object}?

Provider-specific voice settings sent with the initial handshake. Contents vary by provider — e.g. {"speed": 1.2} for Minimax, {"voice_speed": 1.5} for Telnyx.

Parameters:

  • (::Hash[Symbol, top])

Returns:

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


27
# File 'lib/telnyx/models/stream_client_event.rb', line 27

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

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/telnyx/models/stream_client_event.rbs', line 23

def to_hash: -> {