Skip to main content

GET Speech to Text


The Messages API returns a list of all the messages in a conversation. You can use this for getting Speech to Text data (also known as transcription) for video conference, meeting or a telephone call. Here, the message refers to a continuous sentence by a speaker.

Sentiment Analysis in messages BETA

You can enable sentiment analysis over each message being spoken in the conversation. To do this, pass the query parameter sentiment=true. Read more about Sentiment Analysis here.

Authentication

Before using this API, you must generate your authentication token (AUTH_TOKEN). To learn how to get the authentication token, see the Authentication page.

HTTP Request

GET https://api.symbl.ai/v1/conversations/{conversationId}/messages

Example API Call

curl "https://api.symbl.ai/v1/conversations/$CONVERSATION_ID/messages?sentiment=true&verbose=true" \
-H "Authorization: Bearer $AUTH_TOKEN"

Request Headers

Header NameRequiredDescription
AuthorizationMandatoryBearer <token> The token you get from our authentication process.
Content-Type Mandatoryapplication/json
x-api-keyOptionalDEPRECATED. The JWT token you get from our authentication process.

Query Params

ParameterRequiredValueDescription
verboseOptionaltrueGives you word level timestamps and score of each sentence.
sentimentOptionaltrueGive you Sentiment Analysis on each message.

Response

{
"messages": [
{
"id": "6412283618000896",
"text": "Best package for you is $69.99 per month.",
"from": {
"name": "Roger",
"email": "Roger@example.com"
},
"startTime": "2020-07-10T11:16:21.024Z",
"endTime": "2020-07-10T11:16:26.724Z",
"timeOffset": 5.9,
"duration": 1,
"conversationId": "6749556955938816",
"phrases": [
{
"type": "action_phrase",
"text": "submit the documents",
}
],
"sentiment": {
"polarity": {
"score": 0.6
},
"suggested": "positive"
},
"words": [
{
"word": "Best",
"startTime": "2020-08-18T11:10:14.536Z",
"endTime": "2020-08-18T11:10:15.536Z",
"score": 0.91,
"timeOffset": 5.9,
"duration": 0.2

},
{
"word": "package",
"startTime": "2020-08-18T11:10:16.536Z",
"endTime": "2020-08-18T11:10:17.536Z",
"score": 0.80,
"timeOffset": 6.1,
"duration": 0.1

},
{
"word": "for",
"startTime": "2020-08-18T11:10:18.536Z",
"endTime": "2020-08-18T11:10:19.536Z",
"score": 0.68,
"timeOffset": 6.2,
"duration": 0.1

},
{
"word": "you",
"startTime": "2020-08-18T11:10:20.536Z",
"endTime": "2020-08-18T11:10:22.536Z",
"score": 0.68,
"timeOffset": 6.3,
"duration": 0.3

},
{
"word": "is",
"startTime": "2020-08-18T11:10:22.536Z",
"endTime": "2020-08-18T11:10:25.536Z",
"score": 0.68,
"timeOffset": 6.6,
"duration": 0.3
},
{
"word": "$69.99",
"startTime": "2020-08-18T11:10:25.536Z",
"endTime": "2020-08-18T11:10:27.536Z",
"score": 0.68,
"timeOffset": 6.67,
"duration": 0.3
},
{
"word": "per",
"startTime": "2020-08-18T11:10:27.536Z",
"endTime": "2020-08-18T11:10:29.536Z",
"score": 0.67,
"timeOffset": 6.6,
"duration": 0.4
},
{
"word": "month.",
"startTime": "2020-08-18T11:10:30.536Z",
"endTime": "2020-08-18T11:10:32.536Z",
"score": 0.67,
"timeOffset": 6.8,
"duration": 0.5
}]
},
{
"id": "5661493169225728",
"text": "Okay, Where is the file?",
"from": {
"name": "John",
"email": "John@example.com"
}
"startTime": "2020-08-18T11:11:14.536Z",
"endTime": "2020-08-18T11:11:18.536Z",
"timeOffset": 15.27,
"duration": 1.23,
"conversationId": "5139780136337408",
"phrases": [],
"sentiment": {
"polarity": {
"score": 0.2,
},
"suggested": "neutral"
},
"words": [
{
"word": "Okay,",
"startTime": "2020-08-18T11:11:14.536Z",
"endTime": "2020-08-18T11:11:14.936Z",
"score": 0.91,
"timeOffset": 15.25,
"duration": 0.59

},
{
"word": "Where",
"startTime": "2020-08-18T11:11:14.936Z",
"endTime": "2020-08-18T11:11:15.436Z",
"score": 0.91,
"timeOffset": 15.25,
"duration": 0.59
},
{
"word": "is",
"startTime": "2020-08-18T11:11:16.236Z",
"endTime": "2020-08-18T11:11:16.536Z",
"score": 0.88,
"timeOffset": 15.25,
"duration": 0.58
},
{
"word": "the",
"startTime": "2020-08-18T11:11:16.536Z",
"endTime": "2020-08-18T11:11:16.936Z",
"score": 0.85,
"timeOffset": 15.25,
"duration": 0.58
},
{
"word": "file?",
"startTime": "2020-08-18T11:11:16.936Z",
"endTime": "2020-08-18T11:11:17.236Z",
"score": 0.89,
"timeOffset": 15.25,
"duration": 0.59
}
]
}

Response Object

FieldDescription
idUnique message identifier.
textMessage text.
fromUser object with name and email.
startTimeDateTime value.
endTimeDateTime value.
timeOffsetReturned as a float value measuring in seconds, up to 2 decimal points. It indicates the seconds elapsed since the start of the conversation. It is returned at the sentence level as well as the word level.
timeOffset= startTime (of current sentence/ word) - startTime (of the very first sentence/ word in the conversation).
This variable is currently in Labs.
durationReturned as a float value measuring in seconds, upto 2 decimal points. It indicates for how long the sentence or word was spoken. It is returned at the sentence level as well as the word level.
duration= endTime (of current sentence/ word) - startTime (of current sentence/ word).
This variable is currently in Labs.
conversationIdUnique conversation identifier. Read more about the Conversation ID here.
wordsWords object with properties word, startTime, endTime and score. The score is the word level confidence score that represents the confidence level of individual words within the transcript. The score shows the relevancy of the word in the transcript. Higher the word-level confidence score, the more relevant it is to the transcript message. When you pass verbose=true, the word-level confidence score is by default returned.
Note that a processed text conversation will not return any confidence score since it is already in the transcript form. words also return the timeOffset and duration variables. The word level confidence score is currently in Labs.
phrasesIt shows the most important action phrases in each sentence. It is enabled when you pass detectPhrases=true while submiting the request in Async and Websocket API.
sentimentShows the sentiment polarity (intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral).