Class: Twilio::TwiML::Assistant

Inherits:
TwiML
  • Object
show all
Defined in:
lib/twilio-ruby/twiml/voice_response.rb

Overview

<Assistant> TwiML Noun

Instance Attribute Summary

Attributes inherited from TwiML

#name

Instance Method Summary collapse

Methods inherited from TwiML

#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml

Constructor Details

#initialize(**keyword_args) {|_self| ... } ⇒ Assistant

Returns a new instance of Assistant.

Yields:

  • (_self)

Yield Parameters:



2023
2024
2025
2026
2027
2028
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 2023

def initialize(**keyword_args)
  super(**keyword_args)
  @name = 'Assistant'

  yield(self) if block_given?
end

Instance Method Details

#language(code: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, **keyword_args) ⇒ Object

Create a new <Language> element

code

Language code of this language setting is for

tts_provider

Provider to be used for text-to-speech of this language

voice

Voice to be used for text-to-speech of this language

transcription_provider

Provider to be used for transcription of this language

speech_model

Speech model to be used for transcription of this language

keyword_args

additional attributes



2038
2039
2040
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 2038

def language(code: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, **keyword_args)
  append(Language.new(code: code, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, **keyword_args))
end

#parameter(name: nil, value: nil, **keyword_args) ⇒ Object

Create a new <Parameter> element

name

The name of the custom parameter

value

The value of the custom parameter

keyword_args

additional attributes



2047
2048
2049
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 2047

def parameter(name: nil, value: nil, **keyword_args)
  append(Parameter.new(name: name, value: value, **keyword_args))
end