# Response Payload

## Complete Payload

<details>

<summary>ASR+Translate+TTS</summary>

{% code lineNumbers="true" %}

```json
{
    "pipelineResponse": [
        {
            "taskType": "asr",
            "config": {
                "serviceId": "ai4bharat/conformer-hi-gpu--t4",
                "language": {
                    "sourceLanguage": "hi",
                    "sourceScriptCode": ""
                },
                "audioFormat": "flac",
                "encoding": null,
                "samplingRate": 16000,
                "postProcessors": null
            },
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषा यूज़ कर रहा हूँ"
                }
            ],
            "audio": null
        },
        {
            "taskType": "translation",
            "config": null,
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषा यूज़ कर रहा हूँ",
                    "target": "माझे नाव माहिर आहे आणि मी भाषेच वापरत आहे"
                }
            ],
            "audio": null
        },
        {
            "taskType": "tts",
            "config": {
                "language": {
                    "sourceLanguage": "mr",
                    "sourceScriptCode": ""
                },
                "audioFormat": "wav",
                "encoding": "base64",
                "samplingRate": 22050,
                "postProcessors": null
            },
            "output": null,
            "audio": [
                {
                    "audioContent": "{{returned_base64_content}}",
                    "audioUri": null
                }
            ]
        }
    ]
}
```

{% endcode %}

</details>

The above JSON Response shows the output of the combination of ASR, Translation and TTS task requested by the integrator in that order. Below we will discuss the individual task response as well as combination of tasks in specific sequence.

## Response for Payload sent for Individual Task Request

{% tabs %}
{% tab title="ASR" %}
{% code lineNumbers="true" %}

```json
{
    "taskType": "asr",
    "config": {
        "serviceId": "xxxxx--ssssss-d-ddd--dddd",
        "language": {
            "sourceLanguage": "hi",
            "sourceScriptCode": ""
        },
        "audioFormat": "flac",
        "encoding": null,
        "samplingRate": 16000,
        "postProcessors": null
    },
    "output": [
        {
            "source": "मेरा नाम महीर है और मैं भाषा यूज़ कर रहा हूँ"
        }
    ],
    "audio": null
}
```

{% endcode %}

For **`individual ASR task request`** sent by the integrator, the response will contain only one dictionary where **`taskType`** will be **`asr`**.&#x20;

### Parameter: `config`

**`config`** parameter returns the configuration details of the output generated.

### Parameter: `output`

**`output`** parameter

contains

**`source`** parameter which gives the actual digital text of the audio sent as a part of the request as detailed [here](/bhashini-apis/pipeline-compute-call/request-payload.md#request-payload-for-individual-task).
{% endtab %}

{% tab title="Translation" %}

{% code lineNumbers="true" %}

```json
{
    "taskType": "translation",
    "config": null,
    "output": [
        {
            "source": "मेरा नाम महीर है और मैं भाषा यूज़ कर रहा हूँ",
            "target": "माझे नाव माहिर आहे आणि मी भाषेच वापरत आहे"
        }
    ],
    "audio": null
}
```

{% endcode %}

For **`individual Translation task request`** sent by the integrator, the response will contain only one dictionary where **`taskType`** will be **`translation`**.&#x20;

### Parameter: `config`

**`config`** parameter returns the configuration details of the output generated.

### Parameter: `output`

**`output`** parameter

contains

**`source`** parameter which shows the digital text which was sent as an input as a part of the request.

**`source`** parameter which gives the actual digital text of the audio sent as a part of the request as detailed [here](/bhashini-apis/pipeline-compute-call/request-payload.md#request-payload-for-individual-task).
{% endtab %}

{% tab title="TTS" %}
{% code lineNumbers="true" %}

```json
{
    "taskType": "tts",
    "config": {
        "language": {
            "sourceLanguage": "mr",
            "sourceScriptCode": ""
        },
        "audioFormat": "wav",
        "encoding": "base64",
        "samplingRate": 22050,
        "postProcessors": null
    },
    "output": null,
    "audio": [
        {
            "audioContent": "{{returned_base64_content}}",
            "audioUri": null
        }
    ]
}
```

{% endcode %}

For **`individual TTS task request`** sent by the integrator, the response will contain only one dictionary where **`taskType`** will be **`tts`**.&#x20;

### Parameter: `config`

**`config`** parameter returns the configuration details of the output generated.

### Parameter: `audio`

**`audio`** parameter

contains

**`audioContent`** parameter which gives the **`base64 encoded content`** of the audio content generated on the server and returned. The same shall be converted for a **`wav`** file which can then be heard by the integrator.
{% endtab %}
{% endtabs %}

## Response for Payload sent for Individual Task Request

{% tabs %}
{% tab title="ASR+Translation" %}
Output of **`ASR+Translation`** comes in the form of combination of **`ASR`** and **`Translation`** dictionary as detailed [above](#response-for-payload-sent-for-individual-task-request).

{% code lineNumbers="true" %}

```json
{
    "pipelineResponse": [
        {
            "taskType": "asr",
            "config": {
                "serviceId": "xxxxx--ssssss-d-ddd--dddd",
                "language": {
                    "sourceLanguage": "hi",
                    "sourceScriptCode": ""
                },
                "audioFormat": "flac",
                "encoding": null,
                "samplingRate": 16000,
                "postProcessors": null
            },
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषावर्ष यूज़ कर रहा हूँ"
                }
            ],
            "audio": null
        },
        {
            "taskType": "translation",
            "config": null,
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषावर्ष यूज़ कर रहा हूँ",
                    "target": "माझे नाव माहिर आहे आणि मी भाषेचे वर्ष वापरत आहे"
                }
            ],
            "audio": null
        }
    ]
}
```

{% endcode %}
{% endtab %}

{% tab title="Translation+TTS" %}
Output of **`Translation+TTS`** comes in the form of combination of **`Translation`** and **`TTS`** dictionary as detailed [above](#response-for-payload-sent-for-individual-task-request).

{% code lineNumbers="true" %}

```json
{
    "pipelineResponse": [
        {
            "taskType": "translation",
            "config": null,
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषावर्ष यूज़ कर रहा हूँ",
                    "target": "माझं नाव माहिर आहे आणि मी भाषेचे वर्ष वापरत आहे."
                }
            ],
            "audio": null
        },
        {
            "taskType": "tts",
            "config": {
                "language": {
                    "sourceLanguage": "mr",
                    "sourceScriptCode": ""
                },
                "audioFormat": "wav",
                "encoding": "base64",
                "samplingRate": 22050,
                "postProcessors": null
            },
            "output": null,
            "audio": [
                {
                    "audioContent": "{{generated_base64_content}}",
                    "audioUri": null
                }
            ]
        }
    ]
}
```

{% endcode %}
{% endtab %}

{% tab title="ASR+Translation+TTS" %}
Output of ASR+Translation+TTS comes in the form of combination of **`ASR`**, **`Translation`** and **`TTS`** dictionary as detailed [above](#response-for-payload-sent-for-individual-task-request).

{% code lineNumbers="true" %}

```json
{
    "pipelineResponse": [
        {
            "taskType": "asr",
            "config": {
                "serviceId": "ai4bharat/conformer-hi-gpu--t4",
                "language": {
                    "sourceLanguage": "hi",
                    "sourceScriptCode": ""
                },
                "audioFormat": "flac",
                "encoding": null,
                "samplingRate": 16000,
                "postProcessors": null
            },
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषा वर्ष यूज़ कर रहा हूँ"
                }
            ],
            "audio": null
        },
        {
            "taskType": "translation",
            "config": null,
            "output": [
                {
                    "source": "मेरा नाम महीर है और मैं भाषा वर्ष यूज़ कर रहा हूँ",
                    "target": "माझे नाव माहिर आहे आणि मी भाषेचे वर्ष वापरत आहे"
                }
            ],
            "audio": null
        },
        {
            "taskType": "tts",
            "config": {
                "language": {
                    "sourceLanguage": "mr",
                    "sourceScriptCode": ""
                },
                "audioFormat": "wav",
                "encoding": "base64",
                "samplingRate": 22050,
                "postProcessors": null
            },
            "output": null,
            "audio": [
                {
                    "audioContent": "{{generated_base64_content}}",
                    "audioUri": null
                }
            ]
        }
    ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bhashini.gitbook.io/bhashini-apis/pipeline-compute-call/response-payload.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
