POST Compute Request
Congratulations πŸ₯³ Now that you have received your txnId you can start to enable and configure required models.
Different Configurable Models can be invoked on the unique txnId using the Speech Analytics APIs. Each model can be independently enabled or disabled depending on the requirement using enableModels. Each model can be configured using modelConfig.
For more information on how to configure each model refer to the Configuring Models section of the documentation.

Prerequisite Information

Metadata can be computed on any Conversation with a Transaction ID txnID
  • A Transaction ID txnID must be obtained before metadata can be computed.
  • Depending on the Type of Conversation (audio or video) some of the models will not be available. (Eg. Screengrabs model is only available for video-based Conversations)
  • Some models are dependent on the output of other models and the dependent models have to be enabled. This dependency can be understood in the Flow of Data and stacking models section.
  • Each Compute request will generate a requestIdThe progress of the model and its output metadata can be fetched using the requestId . More information on request ID can be obtained from the What is requestId section.

Enable & Configure Models using enableModels andmodelConfig

Using txnId you can now select models usingenableModels and Configure Models using modelConfig and submit a request using POST Compute Request.
Each enabled model will be given a unique requestId.
The following are the models that can be enabled using the txnId . Click on each of the Models to learn how to enable and configure it.
Models
Description
​Speech-to-text​
Marsview Automatic Speech Recognition (ASR) technology accurately converts speech into text in live or batch mode. API can be deployed in the cloud or on-premise. Get superior accuracy, speaker separation, punctuation, casing, word-level time markers, and more. (Supported Language: English)
​Speaker Separation​
automatically detect the number of speakers in your audio file, and each word in the transcription text can be associated with its speaker
​Keywords & Topics​
Extract the most relevant topics, concepts, discussion points from the conversation are generated based on each paragraph spoken (Topics by Sentence).
​Tone Analysis​
Tone Analysis suggests speaker emotion using only audio clues. Sometimes the speaker may show emotions in the tone of the response and this is important to capture to get the overall sentiment/mood of the conversation which cannot be extracted from conventional Lexical Emotion analysis.
Marsview is capable of detecting the following tone in an audio file:
  • Calm
  • Happy
  • Sad
  • Angry
  • Fearful
  • Disgust
  • Surprised
​Emotion Analysis​
The Emotion Analysis model will help you understand and interpret speaker emotions in a conversation or text. It is designed to understand human conversation in the form of free text or spoken text and is designed after the emotion wheel.
Marsview is capable of detecting the following Emotions in an audio file:
  • Anger
  • Anticipation
  • Disgust
  • Fear
  • Joy
  • Love
  • Optimism
  • Pessimism
  • Sadness
  • Surprise
  • Trust
​Sentiment Analysis​
Sentiment Analysis will help you interpret and quantify if the conversation in the audio or text is Positive, Negative, or Neutral.
Speech Type model helps you understand the type of conversation at any given time. Every phone call, online or offline conversation can be broadly classified into four categories - Statement, Command, Action Item, or a Question.
Action Item API detects an event, task, activity, or action that needs to take place in the future (after the conversation). These Action items can be of high priority with a definite assignee and due date or of lower priority with a non-definite due date.
All action items are generated with action phrases, assignees, and due dates to make the output immediately consumable by your CRM or project management tools
Automatically identify and detect questions or requests posed during the conversation and also the apt response in the conversation in a consumable form. The API detects the Question and Response by the speaker.
​Summary​
Extractive summarization aims at identifying the salient information that is then extracted and grouped together to form a concise summary.
Captures keyframes and slides from videos and screen sharing from an online web conference.
​Screen Activity​
Identify and analyze the visual aspects of the meeting along with the corresponding timestamps and with Screen Activity API.
Marsview detects the following Screen Activity:
  • Screen Share
  • Interaction
  • Whiteboard
  • Presentation
To learn more on how to Configure Models goto:

Flow of Data and Stacking Models

Shown above is the flow of data between different models (left to right).
In the above diagram, the arrows show the flow of data from one model to another. Some of these models are dependent on the output of previous models. (For Example: Sentiment Analysis model is dependent on the outputs of Speech to Text and Diarization model outputs).
Therefore in the case where Sentiment Analysis has to be enabled the Compute Request API has to be configured to enableModels (Speech to text , Diarization and Sentiment analysis models).Shown below is the sample configuration for the same.
1
"enableModels":[
2
{
3
"modelType":"speech_to_text",
4
"modelConfig": {
5
"speaker_seperation":{
6
"num_speakers":2
7
}
8
}
9
},
10
{
11
"modelType":"sentiment_analysis",
12
}
13
]
14
​
Copied!

Stacking of requests

Requests for models can be stacked in the same API call or they can be sent in separate API calls. Shown below are two tabs with examples for the same.
Stacked Requests
Separate Requests
1
----------------------> API CALL #1
2
​
3
"enableModels":[
4
{
5
"type":"speech_to_text",
6
},
7
{
8
"type":"sentiment_analysis",
9
},
10
{
11
"type":"emotion_analysis",
12
}
13
]
14
​
Copied!
1
----------> API CALL #1
2
​
3
"enableModels":[
4
{
5
"modelType":"speech_to_text",
6
}
7
]
8
​
9
----------> API CALL #2
10
​
11
"enableModels":[
12
{
13
"modelType":"sentiment_analysis",
14
},
15
{
16
"modelType":"emotion_analysis",
17
}
18
]
Copied!
Note that when you are sending in Separate API Calls on the same txnId, Requests from previous API Calls must be in "completed" or "error" state
post
https://api.marsview.ai/cb/v1/conversation/compute
Compute Request

What is a requestId?

For each Transaction ID txnId, multiple models can be requested to be computed, and for each one of these requests, a unique requestId is created.
Using the requestId the model progress and the model metadata output can be obtained.

States of a Request ID

State
Description
Uploaded
When the model request is uploaded/queued by the system. In this state, the metadata generation by the model is either in progress or in queued State
Processed
When the model request has finished processing.
Error
When there was an error processing the request.

Example: How to compute only STT and Diarization on a transaction ID?

Step 1: Get the authentication token.

Using your apiKey and apiSecretyou can generate the token as shown below.
Curl
Python
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/auth/create_access_token' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"apiKey": "{{Insert API Key}}",
5
"apiSecret": "{{Insert API Secret}}",
6
"userId": "[email protected]"
7
}'
8
​
Copied!
1
import requests
2
​
3
userId = 'Paste the user ID here'
4
apiKey = 'Paste the API key here'
5
apiSecret = 'Paste the API secret here'
6
​
7
def get_token():
8
​
9
url = "https://api.marsview.ai/cb/v1/auth/get_access_token"
10
​
11
payload={"apiKey":apiKey,
12
"apiSecret":apiSecret,
13
"userId":userId}
14
headers = {
15
'Content-Type': 'application/json'
16
}
17
​
18
response = requests.request("POST", url, headers=headers, json=payload)
19
print(response.text)
20
21
if __name__ == "__main__":
22
get_token()
Copied!
Step 2: Send a Compute Request
Curl
Python
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/conversation/compute' \
2
--header 'Content-Type: application/json' \
3
--header 'authorization: <Your access token>' \
4
--data-raw '{
5
"txnId": "your txn id",
6
"enableModels":[
7
{
8
"modelType":"speech_to_text",
9
"modelConfig":{
10
"custom_vocabulary":["Marsview", "Communication"],
11
"speaker_seperation":{
12
"num_speakers":2
13
},
14
"topics":true
15
}
16
}
17
]
18
}'
Copied!
1
import requests
2
​
3
auth_token = "Bearer <API TOKEN>"
4
txnId = "Your transaction ID"
5
​
6
​
7
def compute_request():
8
​
9
url = "https://api.marsview.ai/cb/v1/conversation/{userId}/compute"
10
​
11
payload={
12
"txnId":txnId,
13
"enableModels":[
14
{
15
"modelType":"speech_to_text",
16
"modelConfig":{
17
"automatic_punctuation" : True,
18
"custom_vocabulary":["Marsview", "Communication"],
19
"speaker_seperation":{
20
"num_speakers":2
21
},
22
"enableKeywords":True
23
}
24
},
25
{
26
"modelType":"emotion_analysis"
27
},
28
{
29
"modelType":"sentiment_analysis"
30
},
31
{
32
"modelType":"speech_type_analysis"
33
},
34
{
35
"modelType":"action_items",
36
"modelConfig":{
37
"priority": 1
38
}
39
},
40
{
41
"modelType":"question_response",
42
"modelConfig":{
43
"quality" : 1
44
}
45
},
46
{
47
"modelType":"extractive_summary"
48
},
49
{
50
"modelType":"meeting_topics"
51
},
52
{
53
"modelType":"screengrabs",
54
"modelConfig":{
55
"ocr":{
56
"enable":True
57
}
58
}
59
},
60
{
61
"modelType":"screen_activity"
62
}
63
​
64
]
65
}
66
​
67
headers = {
68
'Content-Type': 'application/json',
69
'authorization': auth_token
70
}
71
72
print(url.format(userId=userId))
73
response = requests.request("POST", url.format(userId=userId), headers=headers, json=payload)
74
print(response.text)
75
76
if __name__ == "__main__":
77
compute_request()
Copied!

Example Response for POST Compute Request

1
{
2
"status": true,
3
"data": {
4
"requestId": [
5
{
6
"type": "speech_to_text",
7
"requestId": "req-1c6q6f7dkq1y6lm0-1623997503719"
8
},
9
{
10
"type": "emotion_analysis",
11
"requestId": "req-1c6q6f7dkq1y6lm1-1623997503719"
12
},
13
{
14
"type": "sentiment_analysis",
15
"requestId": "req-1c6q6f7dkq1y6lm2-1623997503719"
16
},
17
{
18
"type": "speech_type_analysis",
19
"requestId": "req-1c6q6f7dkq1y6lm3-1623997503719"
20
},
21
{
22
"type": "action_items",
23
"requestId": "req-1c6q6f7dkq1y6lm4-1623997503719"
24
},
25
{
26
"type": "question_response",
27
"requestId": "req-1c6q6f7dkq1y6lm5-1623997503719"
28
},
29
{
30
"type": "extractive_summary",
31
"requestId": "req-1c6q6f7dkq1y6lm6-1623997503719"
32
},
33
{
34
"type": "meeting_topics",
35
"requestId": "req-1c6q6f7dkq1y6lm7-1623997503719"
36
},
37
{
38
"type": "screengrabs",
39
"requestId": "req-1c6q6f7dkq1y6lm8-1623997503719"
40
},
41
{
42
"type": "screen_activity",
43
"requestId": "req-1c6q6f7dkq1y6lm9-1623997503719"
44
}
45
]
46
}
47
}
Copied!
​
Last modified 3mo ago