Dhina
11/19/2024, 4:36 PMVapi
11/19/2024, 4:38 PMinput
action within your VAPI NCCO (Nexmo Call Control Object). This action allows you to wait for input from the user and can be configured to capture both speech and DTMF tones.
Here's a simple example of how you might set up an NCCO to collect a date of birth from a caller, either by saying it or by entering it using their phone's keypad:
json
[
{
"action": "talk",
"text": "Please enter or say your date of birth in month, day, year format."
},
{
"action": "input",
"type": ["dtmf", "speech"],
"dtmf": {
"maxDigits": 8,
"timeOut": 10
},
"speech": {
"endOnSilence": 1,
"language": "en-US"
},
"eventUrl": ["https://your-webhook.url/events"]
}
]
In this example, the input
action is configured to accept both DTMF and speech. The dtmf
object specifies that a maximum of 8 digits can be entered (for the MMDDYYYY format), and the timeOut
parameter defines the maximum amount of time in seconds that the system will wait for the user to enter their DTMF input. The speech
object includes parameters like endOnSilence
to determine when to end the speech input and language
to specify the language model to be used for speech recognition.
When the user provides their input, an event is sent to the specified eventUrl
containing the details of the input received. Your application can then process this input accordingly.
For more detailed documentation and additional examples, please visit the official VAPI documentation on the Nexmo Developer Portal or reach out to support for further assistance.Vapi
11/19/2024, 4:38 PMDhina
11/19/2024, 8:49 PMShubham Bajaj
11/20/2024, 4:41 PMkaza69
11/21/2024, 9:51 AMShubham Bajaj
11/21/2024, 12:14 PM