Callr Actions: gather@v3 accepts an audio file or a text-to-speech prompt

gather@v3 collects DTMF digits like gather@v2. The prompt can now be either a pre-uploaded audio file (sid) or a text-to-speech prompt.

# Audio file prompt
- action: gather@v3
  params:
    sid: '0d0f9ef6'
    maxDigits: 4
    timeout: 30
  result: $digits

# Text-to-speech prompt
- action: gather@v3
  params:
    prompt:
      what: Please enter your code
    maxDigits: 4
  result: $digits
  • Set at most one of sid and prompt. With neither, gather@v3 waits for digits in silence, like gather@v2.
  • Barge-in: the first key pressed stops the prompt (file or text-to-speech), and digit collection continues. gather@v1 and gather@v2 already behaved this way.
  • Same parameters (endOnKey, maxDigits, timeout, stopOnTalk) and same result as gather@v2: { ok, timeout, input, recognized, stoppedOnKey, stoppedOnTalk }.
  • prompt.voice and prompt.language now work together: the language is inferred from the voice.
  • timeout also limits how long the prompt can play, so use a larger value for long audio files.
  • An audio file prompt incurs no text-to-speech charge.

gather@v2 is unchanged and not deprecated for now. To migrate, rename gather@v2 to gather@v3. Our starter templates already use it.