Class: Twilio::TwiML::Connect
- Defined in:
- lib/twilio-ruby/twiml/voice_response.rb
Overview
<Connect> TwiML Verb
Instance Attribute Summary
Attributes inherited from TwiML
Instance Method Summary collapse
-
#assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) {|assistant| ... } ⇒ Object
- Create a new <Assistant> element id
- The assistant ID of the AI Assistant language
- Language to be used for both text-to-speech and transcription tts_language
- Language to be used for text-to-speech transcription_language
- Language to be used for transcription tts_provider
- Provider to be used for text-to-speech voice
- Voice to be used for text-to-speech transcription_provider
- Provider to be used for transcription speech_model
- Speech model to be used for transcription profanity_filter
- Whether profanities should be filtered out of the speech transcription dtmf_detection
- Whether DTMF tones should be detected and reported in speech transcription welcome_greeting
- The sentence to be played automatically when the session is connected partial_prompts
- Whether partial prompts should be reported to WebSocket server before the caller finishes speaking welcome_greeting_interruptible
- “Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting interruptible
- Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech preemptible
- Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media hints
- Phrases to help better accuracy in speech recognition of these pharases intelligence_service
- The Conversational Intelligence Service id or unique name to be used for the session report_input_during_agent_speech
- Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled elevenlabs_text_normalization
- When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature interrupt_sensitivity
-
Set the sensitivity of the interrupt feature for speech.
-
#autopilot(name, **keyword_args) ⇒ Object
- Create a new <Autopilot> element name
- Autopilot assistant sid or unique name keyword_args
-
additional attributes.
-
#conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) ⇒ Object
- Create a new <Conversation> element service_instance_sid
- Service instance Sid inbound_autocreation
- Inbound autocreation routing_assignment_timeout
- Routing assignment timeout inbound_timeout
- Inbound timeout url
- TwiML URL method
- TwiML URL method record
- Record trim
- Trim recording_status_callback
- Recording status callback URL recording_status_callback_method
- Recording status callback URL method recording_status_callback_event
- Recording status callback events status_callback
- Status callback URL status_callback_method
- Status callback URL method status_callback_event
- Events to call status callback URL keyword_args
-
additional attributes.
-
#conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) {|conversation_relay| ... } ⇒ Object
- Create a new <ConversationRelay> element url
- URL of the remote service where the session is connected to language
- Language to be used for both text-to-speech and transcription tts_language
- Language to be used for text-to-speech transcription_language
- Language to be used for transcription tts_provider
- Provider to be used for text-to-speech voice
- Voice to be used for text-to-speech transcription_provider
- Provider to be used for transcription speech_model
- Speech model to be used for transcription profanity_filter
- Whether profanities should be filtered out of the speech transcription dtmf_detection
- Whether DTMF tones should be detected and reported in speech transcription welcome_greeting
- The sentence to be played automatically when the session is connected partial_prompts
- Whether partial prompts should be reported to WebSocket server before the caller finishes speaking welcome_greeting_interruptible
- “Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting interruptible
- Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech preemptible
- Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media hints
- Phrases to help better accuracy in speech recognition of these pharases intelligence_service
- The Conversational Intelligence Service id or unique name to be used for the session report_input_during_agent_speech
- Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled elevenlabs_text_normalization
- When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature interrupt_sensitivity
-
Set the sensitivity of the interrupt feature for speech.
-
#initialize(**keyword_args) {|_self| ... } ⇒ Connect
constructor
A new instance of Connect.
-
#room(name, participant_identity: nil, **keyword_args) ⇒ Object
- Create a new <Room> element name
- Room name participant_identity
- Participant identity when connecting to the Room keyword_args
-
additional attributes.
-
#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object
- Create a new <Stream> element name
- Friendly name given to the Stream connector_name
- Unique name for Stream Connector url
- URL of the remote service where the Stream is routed track
- Track to be streamed to remote service status_callback
- Status Callback URL status_callback_method
- Status Callback URL method keyword_args
-
additional attributes.
-
#virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|virtual_agent| ... } ⇒ Object
- Create a new <VirtualAgent> element connector_name
- Defines the conversation profile Dialogflow needs to use language
- Language to be used by Dialogflow to transcribe speech sentiment_analysis
- Whether sentiment analysis needs to be enabled or not status_callback
- URL to post status callbacks from Twilio status_callback_method
- HTTP method to use when requesting the status callback URL keyword_args
-
additional attributes.
Methods inherited from TwiML
#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml
Constructor Details
#initialize(**keyword_args) {|_self| ... } ⇒ Connect
Returns a new instance of Connect.
1891 1892 1893 1894 1895 1896 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1891 def initialize(**keyword_args) super(**keyword_args) @name = 'Connect' yield(self) if block_given? end |
Instance Method Details
#assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) {|assistant| ... } ⇒ Object
Create a new <Assistant> element
- id
-
The assistant ID of the AI Assistant
- language
-
Language to be used for both text-to-speech and transcription
- tts_language
-
Language to be used for text-to-speech
- transcription_language
-
Language to be used for transcription
- tts_provider
-
Provider to be used for text-to-speech
- voice
-
Voice to be used for text-to-speech
- transcription_provider
-
Provider to be used for transcription
- speech_model
-
Speech model to be used for transcription
- profanity_filter
-
Whether profanities should be filtered out of the speech transcription
- dtmf_detection
-
Whether DTMF tones should be detected and reported in speech transcription
- welcome_greeting
-
The sentence to be played automatically when the session is connected
- partial_prompts
-
Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
- welcome_greeting_interruptible
-
“Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
- interruptible
-
Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
- preemptible
-
Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
- hints
-
Phrases to help better accuracy in speech recognition of these pharases
- intelligence_service
-
The Conversational Intelligence Service id or unique name to be used for the session
- report_input_during_agent_speech
-
Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
- elevenlabs_text_normalization
-
When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
- interrupt_sensitivity
-
Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
- debug
-
Multiple debug options to be used for troubleshooting
- keyword_args
-
additional attributes
2022 2023 2024 2025 2026 2027 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 2022 def assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) assistant = Assistant.new(id: id, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, welcome_greeting_interruptible: welcome_greeting_interruptible, interruptible: interruptible, preemptible: preemptible, hints: hints, intelligence_service: intelligence_service, report_input_during_agent_speech: report_input_during_agent_speech, elevenlabs_text_normalization: elevenlabs_text_normalization, interrupt_sensitivity: interrupt_sensitivity, debug: debug, **keyword_args) yield(assistant) if block_given? append(assistant) end |
#autopilot(name, **keyword_args) ⇒ Object
Create a new <Autopilot> element
- name
-
Autopilot assistant sid or unique name
- keyword_args
-
additional attributes
1911 1912 1913 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1911 def autopilot(name, **keyword_args) append(Autopilot.new(name, **keyword_args)) end |
#conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) ⇒ Object
Create a new <Conversation> element
- service_instance_sid
-
Service instance Sid
- inbound_autocreation
-
Inbound autocreation
- routing_assignment_timeout
-
Routing assignment timeout
- inbound_timeout
-
Inbound timeout
- url
-
TwiML URL
- method
-
TwiML URL method
- record
-
Record
- trim
-
Trim
- recording_status_callback
-
Recording status callback URL
- recording_status_callback_method
-
Recording status callback URL method
- recording_status_callback_event
-
Recording status callback events
- status_callback
-
Status callback URL
- status_callback_method
-
Status callback URL method
- status_callback_event
-
Events to call status callback URL
- keyword_args
-
additional attributes
1963 1964 1965 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1963 def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, url: url, method: method, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args)) end |
#conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) {|conversation_relay| ... } ⇒ Object
Create a new <ConversationRelay> element
- url
-
URL of the remote service where the session is connected to
- language
-
Language to be used for both text-to-speech and transcription
- tts_language
-
Language to be used for text-to-speech
- transcription_language
-
Language to be used for transcription
- tts_provider
-
Provider to be used for text-to-speech
- voice
-
Voice to be used for text-to-speech
- transcription_provider
-
Provider to be used for transcription
- speech_model
-
Speech model to be used for transcription
- profanity_filter
-
Whether profanities should be filtered out of the speech transcription
- dtmf_detection
-
Whether DTMF tones should be detected and reported in speech transcription
- welcome_greeting
-
The sentence to be played automatically when the session is connected
- partial_prompts
-
Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
- welcome_greeting_interruptible
-
“Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
- interruptible
-
Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
- preemptible
-
Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
- hints
-
Phrases to help better accuracy in speech recognition of these pharases
- intelligence_service
-
The Conversational Intelligence Service id or unique name to be used for the session
- report_input_during_agent_speech
-
Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
- elevenlabs_text_normalization
-
When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
- interrupt_sensitivity
-
Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
- debug
-
Multiple debug options to be used for troubleshooting
- keyword_args
-
additional attributes
1991 1992 1993 1994 1995 1996 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1991 def conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args) conversation_relay = ConversationRelay.new(url: url, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, welcome_greeting_interruptible: welcome_greeting_interruptible, interruptible: interruptible, preemptible: preemptible, hints: hints, intelligence_service: intelligence_service, report_input_during_agent_speech: report_input_during_agent_speech, elevenlabs_text_normalization: elevenlabs_text_normalization, interrupt_sensitivity: interrupt_sensitivity, debug: debug, **keyword_args) yield(conversation_relay) if block_given? append(conversation_relay) end |
#room(name, participant_identity: nil, **keyword_args) ⇒ Object
Create a new <Room> element
- name
-
Room name
- participant_identity
-
Participant identity when connecting to the Room
- keyword_args
-
additional attributes
1903 1904 1905 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1903 def room(name, participant_identity: nil, **keyword_args) append(Room.new(name, participant_identity: participant_identity, **keyword_args)) end |
#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object
Create a new <Stream> element
- name
-
Friendly name given to the Stream
- connector_name
-
Unique name for Stream Connector
- url
-
URL of the remote service where the Stream is routed
- track
-
Track to be streamed to remote service
- status_callback
-
Status Callback URL
- status_callback_method
-
Status Callback URL method
- keyword_args
-
additional attributes
1924 1925 1926 1927 1928 1929 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1924 def stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args) yield(stream) if block_given? append(stream) end |
#virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|virtual_agent| ... } ⇒ Object
Create a new <VirtualAgent> element
- connector_name
-
Defines the conversation profile Dialogflow needs to use
- language
-
Language to be used by Dialogflow to transcribe speech
- sentiment_analysis
-
Whether sentiment analysis needs to be enabled or not
- status_callback
-
URL to post status callbacks from Twilio
- status_callback_method
-
HTTP method to use when requesting the status callback URL
- keyword_args
-
additional attributes
1939 1940 1941 1942 1943 1944 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1939 def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) virtual_agent = VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args) yield(virtual_agent) if block_given? append(virtual_agent) end |