Gather
Collect digits or transcribe speech during a call.
Parameters:
input: Specify which inputs Twilio should accept with the input attribute.
- dtmf
- speech
- dtmf speech
timeout: Wait for the caller to press another digit or say another word before it sends data to your action URL.
profanity_filter: Filter profanities out of your speech transcription.
finish_on_key: Set a value that your caller can press to submit their digits.
num_digits: Set the number of digits you expect from your caller.
language: Specifies the language should recognize from your caller.
hints: Improve recognition of the words or phrases you expect from your callers.
speech_timeout: Wait before it stops its speech recognition.
speech_model: Specifies the model that is best suited for your use case to improve the accuracy of speech to text.
- default
- numbers_and_commands
- phone_call
enhanced: Improve the accuracy of transcription results.
Element details
type: meya.twilio.voice.component.gather
class: TwilioVoiceGatherComponent
path: /meya/twilio/voice/component/gather.py
signature: ask
Fields
field | description | required | signature | default | type |
---|---|---|---|---|---|
spec | Override the original spec for this element. | ○ | ○ | null | Spec |
context | Send context data with this component's event. | ○ | ○ | {} | dict |
sensitive | Mark this component's event as sensitive. This will encrypt the event if the Sensitive Data integration has been enabled. | ○ | ○ | false | bool |
triggers | Activate these dynamic triggers when the component runs. Check the component triggers guide for more info. | ○ | ○ | [] | list |
quick_replies | List of buttons that the user can select for replies. | ○ | ○ | [] | list |
composer | The composer spec that allows you to control the Orb's input composer. Check the Composer guide for more info. | ○ | ○ | focus: text placeholder: collapse_placeholder: visibility: show character_limit: | ComposerElementSpec |
header | Override the header for this component. | ○ | ○ | buttons: title: progress: milestones: extra_buttons: | HeaderElementSpec |
markdown | Override the bot Markdown mode for this component. Check the Markdown guide for more info. | ○ | ○ | null | list bool NoneType |
ask | Question to send to the user. | ○ | ◉ | str | |
retries | ○ | ○ | "inf" | Real | |
error_message | ○ | ○ | "Invalid input, please try again." | str | |
input | ◉ | ○ | GatherInput | ||
timeout | ○ | ○ | null | timedelta | |
profanity_filter | ○ | ○ | null | bool | |
finish_on_key | ○ | ○ | null | str | |
num_digits | ○ | ○ | null | int | |
language | ○ | ○ | null | str | |
hints | ○ | ○ | null | str | |
speech_timeout | ○ | ○ | null | timedelta | |
speech_model | ○ | ○ | null | SpeechModel | |
enhanced | ○ | ○ | null | bool | |
Usage reference
Basic
triggers:
- keyword: meya.twilio.voice.component.gather
steps:
- ask: STRING
input: dtmf|speech|dtmf speech
Full
triggers:
- keyword: meya.twilio.voice.component.gather
steps:
- spec:
type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
context:
STRING: ANY
sensitive: false
triggers:
- type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
quick_replies:
- url: STRING
javascript: STRING
button_id: STRING
context:
STRING: ANY
default: false
disabled: false
divider: false
icon:
url: STRING
color: STRING
path: STRING
action: COMPONENT
value: ANY
result: ANY
data:
STRING: ANY
magic: false
type: text|url|static|menu|divider|action|flow_next|component_next
menu:
- BUTTONELEMENTSPEC
text: STRING
composer:
focus: file|image|text|blur
placeholder: STRING
collapse_placeholder: STRING
visibility: collapse|hide|show
character_limit:
length: 123
error_text: STRING
header:
buttons:
- url: STRING
javascript: STRING
button_id: STRING
context:
STRING: ANY
default: false
disabled: false
divider: false
icon:
url: STRING
color: STRING
path: STRING
action: COMPONENT
value: ANY
result: ANY
data:
STRING: ANY
magic: false
type: text|url|static|menu|divider|action|flow_next|component_next
menu:
- BUTTONELEMENTSPEC
text: STRING
title:
text: STRING
icon:
url: STRING
color: STRING
path: STRING
progress:
value: 123
show_percent: false
milestones:
- text: STRING
current: false
extra_buttons:
- url: STRING
javascript: STRING
button_id: STRING
context:
STRING: ANY
default: false
disabled: false
divider: false
icon:
url: STRING
color: STRING
path: STRING
action: COMPONENT
value: ANY
result: ANY
data:
STRING: ANY
magic: false
type: text|url|static|menu|divider|action|flow_next|component_next
menu:
- BUTTONELEMENTSPEC
text: STRING
markdown:
- format|linkify|breaks|typographer
ask: STRING
retries: 123
error_message: STRING
input: dtmf|speech|dtmf speech
timeout: 60s
profanity_filter: false
finish_on_key: STRING
num_digits: 123
language: STRING
hints: STRING
speech_timeout: 60s
speech_model: default|numbers_and_commands|phone_call
enhanced: false