Gather Speech
Gather Speech records are generated when you are using the <Gather> verb with Speech input type. Those records are hosted with CPaaS and are available for you to retrieve. The Gather Speech records list resource represents a set of an account’s Gather Speech records.
The Gather Speech API endpoint supports JSON output only. |
Resource Properties
Property | Description |
---|---|
sid |
A string that uniquely identifies this record. |
date_created |
The date this record was created. |
account_sid |
The unique id of the Account that created this record. |
org_sid |
The unique id of the Organization which belongs to the Account. |
call_sid |
The unique id of the call during which gathering of the call was made. |
provider |
Configured ASR provider to use. |
language |
Configured language for the ASR operation. |
preTimeout |
Configured preTimeout. The amount of time to wait for a user to speak before timing out. |
postTimeout |
Configured postTimeout. The amount of time to wait for the next word to be spoken by the user before timing out. |
hints |
Configured hint words that are passed to the ASR engine. |
action_on_empty_result |
Configured value for this parameter. Whether to invoke an action if the result is empty. |
duration |
The time it took in seconds to recognize the speech. |
status |
The status of the Gather Verb. Values can be |
reason |
The reason why the Gather failed. |
api_version |
The API version in use during the recording. |
uri |
The URI for this Gather Speech record, relative to |
Supported Operations
HTTP GET. Returns the representation of a Gather Speech resource, including the properties above.
Listing a Singe Gather Speech Record
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech/GAc377eb0e657e415383de087ab38797db \
-u 'YourAccountSid:YourAuthToken'
Example Response
{
"sid": "GAc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"preTimeout" : 5,
"postTimeout" : 5,
"actionOnEmptyResult" : "false",
"status": "completed",
"hints" : "hello world",
"reason" :,
"provider" : "google",
"language" : "en-US",
"duration": 3,
"api_version": "2012-04-24",
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech/GAc377eb0e657e415383de087ab38797db.json"
}
Getting a List of Gather Speech Records
You can list Gather Speech records by making the following API request:
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech \
-u 'YourAccountSid:YourAuthToken'
Example Response
{"page":0,"num_pages":0,"page_size":50,"total":34,"start":"0","end":"34","uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech","first_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech?Page=0&PageSize=50","previous_page_uri":"null","next_page_uri":"null","last_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech?Page=0&PageSize=50","gathers":
[
{
"sid": "GAc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"duration": 15,
"preTimeout" : 5,
"postTimeout" : 5,
"actionOnEmptyResult" : "false",
"status": "completed",
"hints" : "hello world",
"reason" :,
"provider" : "google",
"language" : "en-US",
"api_version": "2012-04-24"
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech/GAc377eb0e657e415383de087ab38797db.json"
},
...
]
}
Request Parameters
Parameter | Description |
---|---|
DateCreated |
Only show gather Speech records that started on this date/time or later, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-05T22:45:32). If you want to omit the time, YYYY-MM-DD (for example 2018-10-05). If only a date is provided the time is assumed to be at midnight of the given date. Note that the given date/time is inclusive and is assumed to be in the UTC timezone. A 400 response will be returned if the syntax is invalid. |
CallSid |
Only show gather speech records generated by the call with this corresponding Sid. |
Filtering by CallSid Parameter
The example below will return Gather Speech records that have been initiated from a specific CallSid.
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech?CallSid=IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49 \
-u 'YourAccountSid:YourAuthToken'
Example Response
{"page":0,"num_pages":0,"page_size":50,"total":34,"start":"0","end":"34","uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech","first_page_uri":"/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech?Page=0&PageSize=50","previous_page_uri":"null","next_page_uri":"null","last_page_uri":"/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech?Page=0&PageSize=50","gather":
[
{
"sid": "GAc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"duration": 15,
"preTimeout" : 5,
"postTimeout" : 5,
"actionOnEmptyResult" : "false",
"status": "completed",
"hints" : "yes no",
"reason" :,
"provider" : "google",
"language" : "en-US",
"api_version": "2012-04-24"
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Gathers/Speech/GAc377eb0e657e415383de087ab38797db.json"
},
...
]
}
Paging Information
The Gather Speech API request supports standard paging information. For more details, please visit the Paging Information documentation.