Class: Zavudev::Models::Senders::SendersAgent::Voice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/senders/agent.rb,
sig/zavudev/models/senders/agent.rbs

Overview

See Also:

  • Zavudev::Models::Senders::SendersAgent#voice

Defined Under Namespace

Modules: VoicemailAction

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(enabled:, greeting: nil, greetings: nil, interruptible: nil, language: nil, max_call_duration_minutes: nil, max_idle_seconds: nil, model: nil, record_calls: nil, stt_model: nil, stt_provider: nil, transfer_phone_number: nil, tts_provider: nil, tts_voice_id: nil, voicemail_action: nil, voicemail_message: nil, voice_speed: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::Senders::SendersAgent::Voice for more details.

Voice Agent configuration. When present and enabled, the agent can answer inbound phone calls and place outbound calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to be enabled for your team.

Parameters:

  • enabled (Boolean)

    Whether the agent handles voice calls. When false, the sender's number is not an

  • greeting (String) (defaults to: nil)

    Opening line the agent speaks when the call connects. If omitted, the agent wait

  • greetings (Hash{Symbol=>String}) (defaults to: nil)

    Greeting per language, keyed by language code. Used when the caller's language d

  • interruptible (Boolean) (defaults to: nil)

    Whether the caller can interrupt the agent while it is speaking (barge-in). When

  • language (String) (defaults to: nil)

    BCP-47 language code used for both speech recognition and speech synthesis (e.g.

  • max_call_duration_minutes (Integer) (defaults to: nil)

    Hard limit on call length in minutes. The call ends automatically when reached.

  • max_idle_seconds (Integer) (defaults to: nil)

    How long the agent waits during silence before ending the call.

  • model (String) (defaults to: nil)

    Model that runs the conversation, co-located in the voice network for lowest lat

  • record_calls (Boolean) (defaults to: nil)

    Whether the call audio is recorded.

  • stt_model (String) (defaults to: nil)

    Speech-recognition model. Uses the default when omitted.

  • stt_provider (String) (defaults to: nil)

    Speech-recognition provider. Uses the default when omitted.

  • transfer_phone_number (String) (defaults to: nil)

    E.164 phone number the agent can transfer the call to. When set, the agent is gi

  • tts_provider (String) (defaults to: nil)

    Speech-synthesis provider. Uses the default when omitted.

  • tts_voice_id (String) (defaults to: nil)

    Identifier of the synthesized voice that speaks. Choose from the voices availabl

  • voicemail_action (Symbol, Zavudev::Models::Senders::SendersAgent::Voice::VoicemailAction) (defaults to: nil)

    What the agent does when an answering machine or voicemail is detected on an out

  • voicemail_message (String) (defaults to: nil)

    Message spoken when voicemailAction is leave_message. Falls back to `greetin

  • voice_speed (Float) (defaults to: nil)

    Speech rate. 1.0 is natural. Only honoured by voices that support rate control;



# File 'lib/zavudev/models/senders/agent.rb', line 302

Instance Attribute Details

#enabledBoolean

Whether the agent handles voice calls. When false, the sender's number is not answered by the voice agent and outbound calls are rejected.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


191
# File 'lib/zavudev/models/senders/agent.rb', line 191

required :enabled, Zavudev::Internal::Type::Boolean

#greetingString?

Opening line the agent speaks when the call connects. If omitted, the agent waits for the caller to speak first.

Parameters:

  • (String)

Returns:

  • (String, nil)


198
# File 'lib/zavudev/models/senders/agent.rb', line 198

optional :greeting, String

#greetingsHash{Symbol=>String}?

Greeting per language, keyed by language code. Used when the caller's language differs from the one greeting is written in.

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


205
# File 'lib/zavudev/models/senders/agent.rb', line 205

optional :greetings, Zavudev::Internal::Type::HashOf[String]

#interruptibleBoolean?

Whether the caller can interrupt the agent while it is speaking (barge-in). When true, the agent stops talking as soon as the caller starts.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


212
# File 'lib/zavudev/models/senders/agent.rb', line 212

optional :interruptible, Zavudev::Internal::Type::Boolean

#languageString?

BCP-47 language code used for both speech recognition and speech synthesis (e.g. en, es, pt-BR). Auto-detected from the recipient when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


219
# File 'lib/zavudev/models/senders/agent.rb', line 219

optional :language, String

#max_call_duration_minutesInteger?

Hard limit on call length in minutes. The call ends automatically when reached.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


225
# File 'lib/zavudev/models/senders/agent.rb', line 225

optional :max_call_duration_minutes, Integer, api_name: :maxCallDurationMinutes

#max_idle_secondsInteger?

How long the agent waits during silence before ending the call.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


231
# File 'lib/zavudev/models/senders/agent.rb', line 231

optional :max_idle_seconds, Integer, api_name: :maxIdleSeconds

#modelString?

Model that runs the conversation, co-located in the voice network for lowest latency. Independent of the model used for text messaging. Derived from the agent's text model when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


239
# File 'lib/zavudev/models/senders/agent.rb', line 239

optional :model, String

#record_callsBoolean?

Whether the call audio is recorded.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


245
# File 'lib/zavudev/models/senders/agent.rb', line 245

optional :record_calls, Zavudev::Internal::Type::Boolean, api_name: :recordCalls

#stt_modelString?

Speech-recognition model. Uses the default when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


251
# File 'lib/zavudev/models/senders/agent.rb', line 251

optional :stt_model, String, api_name: :sttModel

#stt_providerString?

Speech-recognition provider. Uses the default when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


257
# File 'lib/zavudev/models/senders/agent.rb', line 257

optional :stt_provider, String, api_name: :sttProvider

#transfer_phone_numberString?

E.164 phone number the agent can transfer the call to. When set, the agent is given a transfer tool it can use to hand the call to a human.

Parameters:

  • (String)

Returns:

  • (String, nil)


264
# File 'lib/zavudev/models/senders/agent.rb', line 264

optional :transfer_phone_number, String, api_name: :transferPhoneNumber

#tts_providerString?

Speech-synthesis provider. Uses the default when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


270
# File 'lib/zavudev/models/senders/agent.rb', line 270

optional :tts_provider, String, api_name: :ttsProvider

#tts_voice_idString?

Identifier of the synthesized voice that speaks. Choose from the voices available in the dashboard. Uses a neutral default when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


277
# File 'lib/zavudev/models/senders/agent.rb', line 277

optional :tts_voice_id, String, api_name: :ttsVoiceId

#voice_speedFloat?

Speech rate. 1.0 is natural. Only honoured by voices that support rate control; ignored by the others.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


300
# File 'lib/zavudev/models/senders/agent.rb', line 300

optional :voice_speed, Float, api_name: :voiceSpeed

#voicemail_actionSymbol, ...

What the agent does when an answering machine or voicemail is detected on an outbound call.



284
285
286
# File 'lib/zavudev/models/senders/agent.rb', line 284

optional :voicemail_action,
enum: -> { Zavudev::Senders::SendersAgent::Voice::VoicemailAction },
api_name: :voicemailAction

#voicemail_messageString?

Message spoken when voicemailAction is leave_message. Falls back to greeting when omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


293
# File 'lib/zavudev/models/senders/agent.rb', line 293

optional :voicemail_message, String, api_name: :voicemailMessage

Instance Method Details

#to_hash{

Returns:

  • ({)


266
# File 'sig/zavudev/models/senders/agent.rbs', line 266

def to_hash: -> {