Speech Insights (BETA)
Enable this model configuration to get useful conversational insights that can measure or help measure many of your KPIs.
This API is in BETA and will be provided on request. Please contact support@marsview.ai to enable this API.
Overview
Perform in-depth analysis of conversational data to visualize trends on topics, sentiments, keywords, and behaviors to achieve better outcomes.
Marsview provides a way to capture the engagement level of speakers in real-time. Additionally, you can track user sentiment and emotions along with engagement data.
Insights
For each conversation/file uploaded it returns the following
modelType
Configuration
modelType
Configuration modelConfig
Parameters
modelConfig
ParametersExample Request
curl --location --request POST 'https://api.marsview.ai/cb/v1/conversation/{{userId}}/compute' \
--header 'Content-Type: application/json' \
--header "Authorization:{{Insert Auth Token}}" \
--data-raw '{
"userId":"{{Insert User ID}}",
"txnId": "{{Insert txn ID}}",
"enableModels":[
{
"modelType":"speech_to_text",
"modelConfig":{
"automatic_punctuation" : true,
"custom_vocabulary":["Marsview", "Communication"],
"speaker_seperation":{
"num_speakers":2
},
"enableKeywords":true,
"enableTopics":true
}
},
{
"modelType":"emotion_analysis"
},
{
"modelType":"sentiment_analysis"
},
{
"modelType":"data_insights",
"modelConfig": {
"dead_air": {
"threshold": 3000
}
}
}
]
}'
import requests
user_id = "hello@marsview.ai"
auth_token = "replace this with your auth token"
txn_id = "Replace this with your transaction ID"
#Note: the speech to text model does not depends on any other models, hence
#can be used independently
def get_speech_insights():
url = "https://api.marsview.ai/cb/v1/conversation/{user_id}/compute"
payload={
"userId":user_id,
"txnId": txn_id,
"enableModels":[
{
"modelType":"speech_to_text",
"modelConfig":{
"automatic_punctuation" : True,
"custom_vocabulary":["Marsview", "Communication"],
"speaker_seperation":{
"num_speakers":2
},
"enableKeywords":True,
"enableTopics":False
}
},
{
"modelType":"emotion_analysis"
},
{
"modelType":"sentiment_analysis"
},
{
"modelType":"data_insights",
"modelConfig": {
"dead_air": {
"threshold": 3000
}
}
}
]
}
headers = {'authorization': '{}'.format(auth_token)}
response = requests.request("POST", url.format(user_id=user_id), headers=headers, json=payload)
print(response.text)
if response.status_code == 200 and response.json()["status"] == "true":
return response.json()["data"]["enableModels"]["state"]["status"]
else:
raise Exception("Custom exception")
if __name__ == "__main__":
get_speech_insights()
Example Metadata Response
"data":{
"dataInsights": {
"meetingInsights": {
"meetingSentiment": [
{
"sentiment": "Very Positive",
"value": 0.17777777777777778
},
{
"sentiment": "Mostly Positive",
"value": 0.15555555555555556
},
{
"sentiment": "Neutral",
"value": 0.6666666666666666
},
{
"sentiment": "Mostly Negative",
"value": 0
},
{
"sentiment": "Very Negative",
"value": 0
}
],
"meetingEmotion": [
{
"emotion": "joy",
"value": 0.007523583540714161
},
{
"emotion": "optimism",
"value": 0.3097979975693039
},
{
"emotion": "anticipation",
"value": 0.2518085595231206
},
{
"emotion": "Misc",
"value": 0.2654667631228659
},
{
"emotion": "anger",
"value": 0.07488859308987789
},
{
"emotion": "fear",
"value": 0.08391689912610677
},
{
"emotion": "sadness",
"value": 0.00659760402801088
}
],
"conversationStartTime": 1390,
"engagementRatio": 0.9813153112221717,
"keywords": [
{
"keyword": "will",
"frequency": 2
},
],
"deadAir": 0.015454716272078131
},
"speakerInsights": {
"speakers": [
"-1"
],
"speakersTalktimePc": {
"-1": 0.007523583540714161
},
"speakersTalktime": {
"-1": 1300
},
"speakersMonologue": {
"-1": 13750
},
"speakersEmotion": {
"-1": [
{
"emotion": "joy",
"value": 0.007523583540714161
},
{
"emotion": "optimism",
"value": 0.3097979975693039
},
{
"emotion": "anticipation",
"value": 0.2518085595231206
},
{
"emotion": "Misc",
"value": 0.2654667631228659
},
{
"emotion": "anger",
"value": 0.07488859308987789
},
{
"emotion": "fear",
"value": 0.08391689912610677
},
{
"emotion": "sadness",
"value": 0.00659760402801088
}
]
},
"speakersSentiment": {
"-1": [
{
"sentiment": "Very Positive",
"value": 0.17777777777777778
},
{
"sentiment": "Mostly Positive",
"value": 0.15555555555555556
},
{
"sentiment": "Neutral",
"value": 0.6666666666666666
},
{
"sentiment": "Mostly Negative",
"value": 0
},
{
"sentiment": "Very Negative",
"value": 0
}
]
},
"speakerAvgWpm": {
"-1": 163.55519043739972
}
},
"transcriptInsights": [
{
"sentence": "I am currently attending Nicholas State University to complete my degree in secondary education with a focus on social studies.",
"startTime": 56180,
"endTime": 64779.999,
"speaker": "-1",
"topics": [
{
"tiers": [
{
"tierName": "Education",
"type": 1
}
],
"name": "Secondary Education"
},
],
"keywords": [
"state",
"education",
"focus",
"Nicholas State University"
],
"speechType": "statement",
"speechTypeConfidence": 0.9999955892562866,
"sentiment": "Neutral",
"polarity": -0.041666666666666664,
"subjectivity": 0.2916666666666667,
"tone": "angry",
"toneConfidence": 0.7229840755462646,
"emotion": "optimism",
"emotionConfidence": 0.640371561050415,
"wordsPerMinute": 132.57355506454238
},
]
},
},
Response Objects
transcriptInsights
List<Objects>
transcriptInsights
List<Objects>meetingInsights
Object
meetingInsights
ObjectspeakerInsights
Object
speakerInsights
ObjectLast updated