Objective
This article explains how to track user DTMF keypresses or speech inputs captured by the Gather Input on Call widget in Twilio Studio. It also shows how to retrieve the captured values for any execution to ensure proper flow conditions.
Product
Twilio Studio
Environment
legacy Twilio Console
Procedure
The Gather Input on Call widget collects user input during a call, either via:
- DTMF keypresses
- Speech recognition
While DTMF values are consistent, speech recognition results can vary across languages and dialects. This makes it harder to directly configure matching conditions in the Split Based On widget, compared to handling numeric inputs. To ensure proper matching, it is important to first track the exact captured speech input.
To view or retrieve the gathered input:
- Go to the Twilio Console → Studio → Flows.
- Select your flow and open Logs.
- Choose the execution you want to inspect.
- Expand the steps and locate the Gather Input on Call widget (use its widget name if you have multiple in the flow).
Note: If the gather widget shows timeout as the event then this widget was timed out before the input was captured, so it is recommended to increase the “Stop gathering after” field in the gather widget. If the input was captured it would either show speech or keypress in the event row for the gather input on call widget.
- Open the Widget & Flow Properties tab.
- Here, you’ll find the captured input inside the flow data.
Additional Information
You can also fetch this flow data programmatically using the Execution Context API:
In the returned JSON, the values are stored under:flow_data.widgets.<GatherWidgetName>.digits → for keypress inputflow_data.widgets.<GatherWidgetName>.SpeechResult → for speech input
The SpeechResult will reflect the recognition text based on the language configured in the widget settings, and may vary depending on speech recognition accuracy.