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

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:
collapse_placeholder:
visibility: show

header

HeaderElementSpec

buttons:
title:
progress:
milestones:
extra_buttons:

Override the header for this component

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:
      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
    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