twilio.voice.gather

type: meya.twilio.voice.component.gather
class: TwilioVoiceGatherComponent
path: /meya/twilio/voice/component/gather.py
signature: ask

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.

Fields

field

signature

required

type

default

description               

spec

ForwardRef('Spec')

null

Override the original spec for this element

context

dict

{}

Send context data with this component's event

sensitive

bool

false

Mark this component's event as sensitive

triggers

list

[]

Activate these dynamic triggers when the component runs

quick_replies

list

[]

List of buttons that the user can select for replies

composer

ComposerElementSpec

focus: text
placeholder:
visibility: show

markdown

list
bool
NoneType

null

Override the bot Markdown mode for this component

ask

str

Question to send to the user

retries

Real

"inf"

error_message

str

"Invalid input, please try again."

input

GatherInput

timeout

timedelta

null

profanity_filter

bool

null

finish_on_key

str

null

num_digits

int

null

language

str

null

hints

str

null

speech_timeout

timedelta

null

speech_model

SpeechModel

null

enhanced

bool

null

Examples

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: '?'
    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
        icon:
          url: STRING
          color: STRING
          path: STRING
        action: COMPONENT
        result: ANY
        data:
          STRING: ANY
        magic: false
        type: text|url|static|action|flow_next|component_next
        text: STRING
    composer:
      focus: file|image|text|blur
      placeholder: STRING
      visibility: collapse|hide|show
    markdown:
      - format|linkify|breaks|typographer
    ask: STRING
    retries: 123
    error_message: STRING
    input: dtmf|speech|dtmf speech
    timeout:
    profanity_filter: false
    finish_on_key: STRING
    num_digits: 123
    language: STRING
    hints: STRING
    speech_timeout:
    speech_model: default|numbers_and_commands|phone_call
    enhanced: false