Topics

This API helps you detect topics, entities, concepts, keywords, and key-phrases from the conversation.

Overview

Extract the most relevant topics, concepts, discussion points from the conversation are generated based on the overall scope of the discussion (Global Topics) or by each paragraph spoken (Topics by Sentence).

Input Type Supported: Audio, Text

Model Dependency: Speech to Text, Speaker Separation

Types of Topics

Type

Description

AI-generated topics

Topics generated by AI based on key concepts spoken, topics modeling.

Entity

Extract entities such as custom, location, person, date, number, organization, date-time, date range, etc. from the conversation.

Tech Topics

Extract Technology terms from the conversation

Finance Topics

Extract Financial terms from the conversation

Medical Topics

Extract Medical/Pharma terms from the conversation

Custom Topics

Contact us for more info: [email protected]

post
Compute Metadata

https://api.marsview.ai/v1/conversation/compute
This method is used to upload an audio or video file on which metadata has to be computed. Settings object can be used to enable/disable metadata from different models. Check the overview section for getting a list of models that are available
Request
Response
Request
Headers
appSecret
required
string
<sample-app-secret>
appId
required
string
<sample-app-Id>
Content-Type
optional
string
application/json
Body Parameters
topics.global_enable
optional
boolean
Global topics extracted from the entire audio/video file will appear as a separate object.
Response
200: OK
A Transaction ID is returned in the JSON body once the processing job is launched successfully. This Transaction ID can be used to check the status of the job or fetch the results of the job once the metadata is computed
{
"status":true,
"transaction_id":32dcef1a-5724-4df8-a4a5-fb43c047716b,
"message": " Compute job for file-id: 32dcef1a-5724-4df8-a4a5-fb43c047716b launched successfully"
}
400: Bad Request
This usually happens when the settings for computing the metadata are not configured correctly. Check the request object and also the dependencies required to compute certain metadata objects. ( For Example: Speech to Text has to be enabled for Action Items to be enabled)
{
"status":false,
"error":{
"code":"MCST07",
"message":"DependencyError: emotion_analysis depends on speech_to_text"
}
}

Example API Call

Request

CURL
CURL
curl --request POST 'https://api.marsview.ai/v1/conversation/compute' \
--header 'appSecret: 32dcef1a-5724-4df8-a4a5-fb43c047716b' \
--header 'appId: 1ZrKT0tTv7rVWX-qNAKLc' \
--header 'Content-Type: application/json' \
--data-raw '{
"settings":{
"speech_to_text":{
"enable":true,
"pii_detection":false,
"custom_vocabulary":["Marsview" , "Pikachu"],
"topics":true
},
"speaker_separation":{
"enable":true,
"num_speakers":4
},
"speech_type_analysis":{
"enable":true
},
"topics":{
"global_enable":true
}
}
}'

Response

Given below is a sample response JSON when the Status code is 200.

{
"status":true,
"transaction_id":32dcef1a-5724-4df8-a4a5-fb43c047716b,
"message": " Compute job for file-id: 32dcef1a-5724-4df8-a4a5-fb43c047716b launched successfully"
}

Global Topics

The most relevant topics, concepts, discussion points from the conversation are generated based on the overall scope of the discussion.

post
Request Metadata

https://api.marsview.ai/v1/conversation/fetch
This method is used to fetch specific Metadata for a particular file_id. It can also be used for long polling to track the progress of compute under the status object.
Request
Response
Request
Headers
Content-Type
optional
string
application/json
appId
optional
string
<sample-app-id>
appSecret
optional
string
<sample-app-secret>
Body Parameters
data.global_topics
optional
boolean
Returns global topics extracted from the transcript
fileID
optional
string
fileId of the audio/video file
data.sentence_topics
optional
boolean
Returns topics for as a part of the transcript object
Response
200: OK
The output consists of two objects. The data object returns the requested metadata if it is computed. The status object shows the current state of the requested metadata. Status for each metadata field can take values "Queued"/"Processing"/"Completed". Shown below is a case where "global_topics" Job is in "Queued" state and "Completed" state.
QUEUED STATE
COMPLETED STATE
QUEUED STATE
{
"status":{
"global_topics":"Queued",
}
"data":{
"global_topics":{}
}
}
COMPLETED STATE
{
"status":{
"global_topics":"Completed"
}
"data":{
"global_topics":[
...
{
"topic":"Machine Learning",
"type": "AI Generated"
},
{
"topic":"Tesla",
"type": "Entity-Name"
},
{
"topic":"sales forecast",
"type":"Finance"
},
...
]
}
}

Response Object Fields

Fields

Description

global_topics

List of global topics extracted from the audio/video file

response

Text of the extracted topic

type

Type of the extracted topic

Topics by Sentence

The most relevant topics, concepts, discussion points from the conversation are generated based on each sentence/paragraph spoken.

Sentence level topics are generated as a part of the Speech To Text object.