Conversation Type (Speech Type)
Enable this model configuration to distinguish between speech type and capture actionable notes during your conversation

Overview

Conversation Type (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.
NOTE: You can also enable Action Items & Follow-ups to get more actionable and comprehensive Action Items
NOTE: You can also enable Questions & Responses to get more actionable and comprehensive Action Items

Speech Type

Type
Description
Statement
a definite or clear expression of something in chat
Command
an authoritative or peremptory order
Action Item
a chat worded or expressed regarding an event, task, activity, or action that needs to take place
Question
a chat worded or expressed so as to elicit information

modelTypeConfiguration

Keys
Value
modelType
speech_type_analysis
modelConfig
Model Configuration object for speech_type_analysis (No configurations)

Example 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: {{Insert Auth Token}}" \
4
--data-raw '{
5
"txnId": "{{Insert txn ID}}",
6
"enableModels":[
7
{
8
"modelType":"speech_to_text",
9
"modelConfig":{
10
"automatic_punctuation" : true,
11
"custom_vocabulary":["Marsview", "Communication"],
12
"speaker_seperation":{
13
"num_speakers":2
14
},
15
"enableKeywords":true,
16
"enableTopics":false
17
}
18
},
19
{
20
"modelType":"speech_type_analysis"
21
}
22
]
23
}'
Copied!
1
import requests
2
auth_token = "replace this with your auth token"
3
txn_id = "Repalce this with your txn id"
4
request_url = "https://api.marsview.ai/cb/v1/conversation/compute"
5
6
7
def get_speech_type_analysis():
8
payload={
9
"txnId": txn_id,
10
"enableModels":[
11
{
12
"modelType":"speech_to_text",
13
"modelConfig":{
14
"automatic_punctuation" : True,
15
"custom_vocabulary":["Marsview", "Communication"],
16
"speaker_seperation":{
17
"num_speakers":2
18
},
19
"enableKeywords":True,
20
"enableTopics":False
21
}
22
},
23
{
24
"modelType":"speech_type_analysis"
25
}
26
]
27
}
28
headers = {'authorization': '{}'.format(auth_token)}
29
30
response = requests.request("POST", headers=headers, json=payload)
31
print(response.text)
32
if response.status_code == 200 and response.json()["status"] == "true":
33
return response.json()["data"]["enableModels"]["state"]["status"]
34
else:
35
raise Exception("Custom exception")
36
37
if __name__ == "__main__":
38
get_speech_type_analysis()
Copied!

Example Response

1
"data": {
2
"speechType": [
3
{
4
"sentence": "Good evening teresa.",
5
"startTime": 1390,
6
"endTime": 2690,
7
"speaker": "1",
8
"type": "statement",
9
"confidence": 0.9962469935417175
10
},
11
]
12
}
Copied!

Response Object

Field
Description
speechType
A list of speechType objects
sentence
A sentence identified by the model in the given time frame.
startTime
Start time of the sentence in the input Video/Audio in milliseconds.
endTime
End time of the sentence in the input Video/Audio in miliseconds.
speaker
Id of the speaker whose voice is identified in the given time frame.
type
Type of speech in the given time frame.
confidence
Value indicating the models confidence in the predicted speech type.
Last modified 1mo ago