Class: Telnyx::Models::StreamClientEvent

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

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.

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.

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. ‘1.2` for Minimax, `1.5` for Telnyx.

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]