Questions & Responses

Enable this model configuration to detect all the questions and responses from the conversation

Overview

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 automatically detects the Question and Response by the speaker.

modelTypeConfiguration

Keys

Value

modelType

question_response

modelConfig

Model Configuration object for question_response (No configurations)

modelConfig Values

Keys

Allowed values

Default

quality

0,1, 2(Check question quality values for usage)

1

Question Quality

Quality Value

Description

0

Detect only well defined questions.

1

Detect well defined and reasonably well defined questions

2

Detect well defined, reasonably well defined and small talk based questions

Example Request

curl --location --request POST 'https://api.marsview.ai/cb/v1/conversation/compute' \
--header 'Content-Type: application/json' \
--header "Authorization: {{Insert Auth Token}}" \
--data-raw '{
        "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":false
                    }
            },
            {
            "modelType":"speech_type_analysis"
            },
            {
            "modelType":"question_response"
            "modelConfig":{
                "quality" : 1
            }
            }
        ]
}' 

Example Response

"data": {
    "questionResponse": [
        {
            "questionStartTime": 74840,
            "questionEndTime": 76010,
            "responseEndTime": "91389.999",
            "questionBlock": [
                {
                    "question": "Why should we choose you?",
                    "startTime": 74840,
                    "endTime": 76010
                }
            ],
            "response": "well, I'll probably myself on my work ethic. I am willing and capable of working long hours to complete the tasks. I have experience in this field and I am continuing my education so further my status.",
            "questionConfidence": "1.0",
            "responseConfidence": "0.7773251640550028",
            "source": "ai_generated",
            "speaker": "unknown"
        },
    ]
}

Response Object

Field

Description

questionResponse

List of question response objects which occured together.

questionStartTime

Start time of the question in milliseconds.

questionEndTime

End time of the question in milliseconds.

responseEndTIme

End time of the response in milliseconds.

questionBlock

List of questions identified in the given time frame.

question

Question identified in the given time frame.

startTime

Start time of the identified question in the given time frame.

endTime

End time of the identified question in the given time frame.

response

Response given to the question identified in the time frame.

questionConfidence

Model's confidence in the identified question block.

responseConfidence

Model's confidence in the identified response .

source

speaker

Id of the speaker whose voice is identified in the given time frame. (Will return a String "unknown" if the speaker could not be identified or speaker separation is set to -1(disabled).

Last updated