From 364129d6e29bd75f3ba37dc1da86dcb64c9a6246 Mon Sep 17 00:00:00 2001 From: pema-s <81958801+pema-s@users.noreply.github.com> Date: Thu, 3 Feb 2022 16:28:19 +0530 Subject: [PATCH 1/4] DC-294 Adds Offset timestamp in Messages API --- .../api-reference/messages.md | 95 ++++++++++++------- docs/faq.md | 1 + 2 files changed, 60 insertions(+), 36 deletions(-) diff --git a/docs/conversation-api/api-reference/messages.md b/docs/conversation-api/api-reference/messages.md index 104b4e98..5f514b32 100644 --- a/docs/conversation-api/api-reference/messages.md +++ b/docs/conversation-api/api-reference/messages.md @@ -10,22 +10,15 @@ import TabItem from '@theme/TabItem'; --- -The Messages API returns a list of all the messages in a conversation. You can use this for providing **Speech to Text data (also known as transcription sometimes)** for video conference, meeting or telephone call. +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 message refer to a continuous sentence spoken by a speaker. +Here, the message refers to a continuous sentence spoken by a speaker. -### Word-level Confidence Score LABS +#### Sentiment Analysis in messages BETA -This API provides word-level confidence score that represents the confidence level of individual words within the message or transcript. The confidence score shows the relevancy of the word in the transcript which means higher the word-level confidence score, the more relevant it is to the message. +You can enable sentiment analysis over each message being spoken in the conversation. -When you pass `verbose=true`, the word-level confidence score is by default returned in the response body. - - -### Sentiment Analysis in messages BETA - -Here you can enable sentiment analysis over each message which is being spoken in the conversation. - -All you need to do is pass `sentiment=true` as a query parameter. [Read more about it](/docs/concepts/sentiment-analysis). +To do this, pass the query parameter `sentiment=true`. Read more about Sentiment Analysis [here](/docs/concepts/sentiment-analysis). ### HTTP Request @@ -33,8 +26,6 @@ All you need to do is pass `sentiment=true` as a query parameter. [Read more abo ### Example API Call - - :::info Before using the Conversation API you must get the authentication token (`AUTH_TOKEN`) from [our authentication process](/docs/developer-tools/authentication). ::: @@ -146,11 +137,13 @@ Parameter | Required | Value |Description | }, "startTime": "2020-07-10T11:16:21.024Z", "endTime": "2020-07-10T11:16:26.724Z", + "timeOffset": 15.251, + "duration": 1.235, "conversationId": "6749556955938816", "phrases": [ { "type": "action_phrase", - "text": "$69.99 per month" + "text": "$69.99 per month", } ], "sentiment": { @@ -164,49 +157,65 @@ Parameter | Required | Value |Description | "word": "Best", "startTime": "2020-08-18T11:10:14.536Z", "endTime": "2020-08-18T11:10:15.536Z", - "score": 0.91 + "timeOffset": 15.251, + "duration": 0.590, + "score": 0.91, }, { "word": "package", "startTime": "2020-08-18T11:10:16.536Z", "endTime": "2020-08-18T11:10:17.536Z", - "score": 0.80 + "timeOffset": 15.262, + "duration": 0.587, + "score": 0.80, }, { "word": "for", "startTime": "2020-08-18T11:10:18.536Z", "endTime": "2020-08-18T11:10:19.536Z", - "score": 0.79 + "timeOffset": 15.265, + "duration": 0.586, + "score": 0.79, }, { "word": "you", "startTime": "2020-08-18T11:10:20.536Z", "endTime": "2020-08-18T11:10:22.536Z", - "score": 0.85 + "timeOffset": 15.266, + "duration": 0.585, + "score": 0.85, }, { "word": "is", "startTime": "2020-08-18T11:10:22.536Z", "endTime": "2020-08-18T11:10:25.536Z", - "score": 0.89 + "timeOffset": 15.267, + "duration": 0.584, + "score": 0.89, }, { "word": "$69.99", "startTime": "2020-08-18T11:10:25.536Z", "endTime": "2020-08-18T11:10:27.536Z", - "score": 0.86 + "timeOffset": 15.268, + "duration": 0.583, + "score": 0.86, }, { "word": "per", "startTime": "2020-08-18T11:10:27.536Z", "endTime": "2020-08-18T11:10:29.536Z", - "score": 0.82 + "timeOffset": 15.269, + "duration": 0.581, + "score": 0.82, }, { "word": "month.", "startTime": "2020-08-18T11:10:30.536Z", "endTime": "2020-08-18T11:10:32.536Z", - "score": 0.90 + "timeOffset": 15.270, + "duration": 0.580, + "score": 0.90, }] }, { @@ -218,11 +227,13 @@ Parameter | Required | Value |Description | } "startTime": "2020-08-18T11:11:14.536Z", "endTime": "2020-08-18T11:11:18.536Z", + "timeOffset": 15.272, + "duration": 1.238, "conversationId": "5139780136337408", "phrases": [], "sentiment": { "polarity": { - "score": 0.2 + "score": 0.2, }, "suggested": "neutral" }, @@ -230,32 +241,42 @@ Parameter | Required | Value |Description | { "word": "Okay,", "startTime": "2020-08-18T11:11:14.536Z", - "endTime": "2020-08-18T11:11:14.936Z" - "score": 0.91 + "endTime": "2020-08-18T11:11:14.936Z", + "timeOffset": 15.251, + "duration": 0.590, + "score": 0.91, }, { "word": "Where", "startTime": "2020-08-18T11:11:14.936Z", - "endTime": "2020-08-18T11:11:15.436Z" - "score": 0.91 + "endTime": "2020-08-18T11:11:15.436Z", + "timeOffset": 15.252, + "duration": 0.591, + "score": 0.91, }, { "word": "is", "startTime": "2020-08-18T11:11:16.236Z", - "endTime": "2020-08-18T11:11:16.536Z" - "score": 0.88 + "endTime": "2020-08-18T11:11:16.536Z", + "timeOffset": 15.253, + "duration": 0.589, + "score": 0.88, }, { "word": "the", "startTime": "2020-08-18T11:11:16.536Z", - "endTime": "2020-08-18T11:11:16.936Z" - "score": 0.85 + "endTime": "2020-08-18T11:11:16.936Z", + "timeOffset": 15.254, + "duration": 0.587, + "score": 0.85, }, { "word": "file?", "startTime": "2020-08-18T11:11:16.936Z", - "endTime": "2020-08-18T11:11:17.236Z" - "score": 0.89 + "endTime": "2020-08-18T11:11:17.236Z", + "timeOffset": 15.256, + "duration": 0.590, + "score": 0.89, } ] } @@ -270,7 +291,9 @@ Field | Description ```from``` | User object with name and email. ```startTime``` | DateTime value. ```endTime``` | DateTime value. -```conversationId``` | Unique conversation identifier. -```words``` | Words object with properties `word`, `startTime`, `endTime` and `score`. The `score` represents the word level confidence score. The value that is accepted for the data type is float. +```timeOffset``` | This variable is returned as a float value measuring in seconds. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation started (i.e., `startTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation started (i.e., `startTime`). This variable is currently in Labs. +```duration``` | This variable is returned as a float value measuring in seconds. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation ended (i.e.,`endTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation ended (i.e., `endTime`). This variable is currently in Labs. +```conversationId``` | Unique conversation identifier. Read more about the Conversation ID [here](/docs/api-reference/getting-conversation-intelligence#what-is-a-conversation-id). +```words``` | Words 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 message or transcript. The confidence score shows the relevancy of the word in the transcript which means higher the word-level confidence score, the more relevant it is to the message. The word level confidence score is currently in Labs. ```phrases``` | It shows the most important action phrases in each sentence. It's enabled when you pass `detectPhrases=true` during submiting the request in Async and Websocket API. ```sentiment```| Shows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral). \ No newline at end of file diff --git a/docs/faq.md b/docs/faq.md index 499e2953..be3c321e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -66,3 +66,4 @@ You can create up to 200 Trackers per account. ### Can I view the logs of Streaming API? Yes, you can view the Streaming API logs via the [Symbl Platform](https://platform.symbl.ai/#/login). + From 59a381bc7b523d876bccf1b6fc8e5d7442d2f724 Mon Sep 17 00:00:00 2001 From: pema-s <81958801+pema-s@users.noreply.github.com> Date: Wed, 9 Feb 2022 15:54:10 +0530 Subject: [PATCH 2/4] Updates sample response --- .../api-reference/messages.md | 83 ++++++++++--------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/docs/conversation-api/api-reference/messages.md b/docs/conversation-api/api-reference/messages.md index 5f514b32..71b75772 100644 --- a/docs/conversation-api/api-reference/messages.md +++ b/docs/conversation-api/api-reference/messages.md @@ -137,8 +137,8 @@ Parameter | Required | Value |Description | }, "startTime": "2020-07-10T11:16:21.024Z", "endTime": "2020-07-10T11:16:26.724Z", - "timeOffset": 15.251, - "duration": 1.235, + "timeOffset": 5.9, + "duration": 1, "conversationId": "6749556955938816", "phrases": [ { @@ -157,65 +157,69 @@ Parameter | Required | Value |Description | "word": "Best", "startTime": "2020-08-18T11:10:14.536Z", "endTime": "2020-08-18T11:10:15.536Z", - "timeOffset": 15.251, - "duration": 0.590, "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", - "timeOffset": 15.262, - "duration": 0.587, "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", - "timeOffset": 15.265, - "duration": 0.586, - "score": 0.79, + "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", - "timeOffset": 15.266, - "duration": 0.585, - "score": 0.85, + "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", - "timeOffset": 15.267, - "duration": 0.584, - "score": 0.89, + "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", - "timeOffset": 15.268, - "duration": 0.583, - "score": 0.86, + "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", - "timeOffset": 15.269, - "duration": 0.581, - "score": 0.82, + "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", - "timeOffset": 15.270, - "duration": 0.580, - "score": 0.90, + "score": 0.67, + "timeOffset": 6.8, + "duration": 0.5 }] }, { @@ -227,8 +231,8 @@ Parameter | Required | Value |Description | } "startTime": "2020-08-18T11:11:14.536Z", "endTime": "2020-08-18T11:11:18.536Z", - "timeOffset": 15.272, - "duration": 1.238, + "timeOffset": 15.27, + "duration": 1.23, "conversationId": "5139780136337408", "phrases": [], "sentiment": { @@ -242,41 +246,42 @@ Parameter | Required | Value |Description | "word": "Okay,", "startTime": "2020-08-18T11:11:14.536Z", "endTime": "2020-08-18T11:11:14.936Z", - "timeOffset": 15.251, - "duration": 0.590, "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", - "timeOffset": 15.252, - "duration": 0.591, "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", - "timeOffset": 15.253, - "duration": 0.589, "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", - "timeOffset": 15.254, - "duration": 0.587, "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", - "timeOffset": 15.256, - "duration": 0.590, "score": 0.89, + "timeOffset": 15.25, + "duration": 0.59 } ] } @@ -291,9 +296,9 @@ Field | Description ```from``` | User object with name and email. ```startTime``` | DateTime value. ```endTime``` | DateTime value. -```timeOffset``` | This variable is returned as a float value measuring in seconds. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation started (i.e., `startTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation started (i.e., `startTime`). This variable is currently in Labs. -```duration``` | This variable is returned as a float value measuring in seconds. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation ended (i.e.,`endTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation ended (i.e., `endTime`). This variable is currently in Labs. +```timeOffset``` | Returned as a float value measuring in seconds, up to 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation started (i.e., `startTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation started (i.e., `startTime`). This variable is currently in Labs. +```duration``` | Returned as a float value measuring in seconds, upto 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation ended (i.e.,`endTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation ended (i.e., `endTime`). This variable is currently in Labs. ```conversationId``` | Unique conversation identifier. Read more about the Conversation ID [here](/docs/api-reference/getting-conversation-intelligence#what-is-a-conversation-id). -```words``` | Words 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 message or transcript. The confidence score shows the relevancy of the word in the transcript which means higher the word-level confidence score, the more relevant it is to the message. The word level confidence score is currently in Labs. +```words``` | Words 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 message or transcript. The confidence 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 in the response body. Note that processed text conversation will not return any confidence score since it is already in the transcript form. The word level confidence score is currently in Labs. ```phrases``` | It shows the most important action phrases in each sentence. It's enabled when you pass `detectPhrases=true` during submiting the request in Async and Websocket API. ```sentiment```| Shows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral). \ No newline at end of file From aa36e734fa641f225596eb14db6026950d42d453 Mon Sep 17 00:00:00 2001 From: pema-s <81958801+pema-s@users.noreply.github.com> Date: Thu, 10 Feb 2022 11:22:30 +0530 Subject: [PATCH 3/4] Adds feedback + minor changes --- .../api-reference/messages.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/conversation-api/api-reference/messages.md b/docs/conversation-api/api-reference/messages.md index 71b75772..2210454f 100644 --- a/docs/conversation-api/api-reference/messages.md +++ b/docs/conversation-api/api-reference/messages.md @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem'; 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 spoken by a speaker. +Here, the message refers to a continuous sentence by a speaker. #### Sentiment Analysis in messages BETA @@ -175,7 +175,7 @@ Parameter | Required | Value |Description | "word": "for", "startTime": "2020-08-18T11:10:18.536Z", "endTime": "2020-08-18T11:10:19.536Z", - "score": 0.68, + "score": 0.68, "timeOffset": 6.2, "duration": 0.1 @@ -291,14 +291,14 @@ Parameter | Required | Value |Description | Field | Description ---------- | ------- | -```id``` | Unique message identifier. -```text``` | Message text. -```from``` | User object with name and email. -```startTime``` | DateTime value. -```endTime``` | DateTime value. -```timeOffset``` | Returned as a float value measuring in seconds, up to 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation started (i.e., `startTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation started (i.e., `startTime`). This variable is currently in Labs. +```id``` | Unique message identifier.| +```text``` | Message text.| +```from``` | User object with name and email.| +```startTime``` | DateTime value.| +```endTime``` | DateTime value.| +```timeOffset``` | Returned as a float value measuring in seconds, up to 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the time it took in speaking the sentence. At the word level, it means the time it took in speaking the word. This variable is currently in Labs.| ```duration``` | Returned as a float value measuring in seconds, upto 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation ended (i.e.,`endTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation ended (i.e., `endTime`). This variable is currently in Labs. -```conversationId``` | Unique conversation identifier. Read more about the Conversation ID [here](/docs/api-reference/getting-conversation-intelligence#what-is-a-conversation-id). -```words``` | Words 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 message or transcript. The confidence 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 in the response body. Note that processed text conversation will not return any confidence score since it is already in the transcript form. The word level confidence score is currently in Labs. -```phrases``` | It shows the most important action phrases in each sentence. It's enabled when you pass `detectPhrases=true` during submiting the request in Async and Websocket API. -```sentiment```| Shows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral). \ No newline at end of file +```conversationId``` | Unique conversation identifier. Read more about the Conversation ID [here](/docs/api-reference/getting-conversation-intelligence#what-is-a-conversation-id). | +```words``` | Words 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. See above for more details. The word level confidence score is currently in Labs. | +```phrases``` | It shows the most important action phrases in each sentence. It's enabled when you pass `detectPhrases=true` during submiting the request in Async and Websocket API.| +```sentiment```| Shows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral). | \ No newline at end of file From 358d8b33d2122959bdacf647c9a912a10fdc0dc2 Mon Sep 17 00:00:00 2001 From: pema-s <81958801+pema-s@users.noreply.github.com> Date: Thu, 10 Feb 2022 15:27:47 +0530 Subject: [PATCH 4/4] Updates description for variables --- docs/conversation-api/api-reference/messages.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conversation-api/api-reference/messages.md b/docs/conversation-api/api-reference/messages.md index 2210454f..837d5be0 100644 --- a/docs/conversation-api/api-reference/messages.md +++ b/docs/conversation-api/api-reference/messages.md @@ -296,9 +296,9 @@ Field | Description ```from``` | User object with name and email.| ```startTime``` | DateTime value.| ```endTime``` | DateTime value.| -```timeOffset``` | Returned as a float value measuring in seconds, up to 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the time it took in speaking the sentence. At the word level, it means the time it took in speaking the word. This variable is currently in Labs.| -```duration``` | Returned as a float value measuring in seconds, upto 2 decimal points. It is returned at the sentence level as well as the word level. At the sentence level, it means the relative timestamp of when the sentence was spoken to when the conversation ended (i.e.,`endTime`). At the word level, it means the relative timestamp of when the word was spoken to when the conversation ended (i.e., `endTime`). This variable is currently in Labs. +```timeOffset``` | Returned 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.| +```duration``` | Returned 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. ```conversationId``` | Unique conversation identifier. Read more about the Conversation ID [here](/docs/api-reference/getting-conversation-intelligence#what-is-a-conversation-id). | -```words``` | Words 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. See above for more details. The word level confidence score is currently in Labs. | +```words``` | Words 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. | ```phrases``` | It shows the most important action phrases in each sentence. It's enabled when you pass `detectPhrases=true` during submiting the request in Async and Websocket API.| ```sentiment```| Shows the sentiment polarity(intensity of negativity or positivity of a sentence) and suggested sentiment type (positive, negative and neutral). | \ No newline at end of file