---
title: Audio Speech Recognition
slug: audio-speech-recognition
docTags: 
createdAt: 2024-04-05T07:55:59.851Z
---

The below parameters are for various Audio speech recognition attack types. To know more about the different attack input parameters see [Automatic Speech Recognition](docId\:jzmdhfXEhv4mJlKb6GUsi)

:::CodeblockTabs
Evasion&#x20;

```json
{
            "use_model_api": "yes"
            "model_api_details": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
            "model_framework": "onnx"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse",
  "name": "Model anaylsis",
  "method": "POST",
  "request": {
    "pathParameters": [
      {
        "name": "model_id",
        "kind": "optional",
        "type": "string",
        "description": "",
        "children": []
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "x-api-key",
        "type": "string",
        "children": [],
        "description": "Enter your API key"
      },
      {
        "kind": "required",
        "name": "Org_id",
        "type": "string",
        "children": [],
        "description": "Enter your organization id"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "DL4HDcclTH6dUtOu-opbD",
        "code": "// 200 OK: Returns a JSON object containing unique model ID and urls to upload required files.",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "z5dS_OPIMHsxFEwrtKnkw",
        "language": "401",
        "code": "// 401 Unauthorized: Returns an error message if the provided API key or Org-ID is invalid or expired.",
        "customLabel": ""
      },
      {
        "id": "xJHL9zR5wAZ30f4gu2BUz",
        "language": "400",
        "code": "// 400 Bad request Error: Returns an error message if the application cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, etc.)",
        "customLabel": ""
      },
      {
        "id": "eXy7xHvpQ-HT16gZp2CNA",
        "language": "412",
        "code": "// 412 precondition failed: Returns an error message if access to the target resource has been denied. (For example- if any of the parameter value is incorrect or license has expired)",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "eXy7xHvpQ-HT16gZp2CNA"
  },
  "examples": {
    "languages": [
      {
        "id": "_mGBjlMU9k01Z6CEkara5",
        "language": "python",
        "code": "import requests\n\nmodelID=\"<< Enter Model ID >>\"\nurl = \"https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/\"+modelID+\"\"\n\n# please select proper payload for your usecase for extraction, evasion or poisoning.\npayload={\n    # <<Enter Payload Data>>\n}\nheaders = {\n   'Accept': 'application/json',\n   'x-api-key': '########################################',\n   'Org-Id': '####################################################################################################'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)",
        "customLabel": ""
      },
      {
        "id": "EZTVIARgk4Cgsi2z3kaoP",
        "language": "curl",
        "code": "modelID=\"<< Enter Model ID >>\"\ncurl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/${modelID}' \\\n--header 'x-api-key: ########################################' \\\n--header 'org_id: ####################################################################################################' \\\n--header 'Content-Type: application/json' \\\n--data '{\n        <<Enter Payload Data>>\n}'",
        "customLabel": ""
      },
      {
        "id": "kc6RvtVQgBj0xpcZD7Nak",
        "language": "nodejs",
        "code": "var request = require('request');\n\nmodelID = '<<Enter Model ID >>'\nvar options = {\n  'method': 'POST',\n  'url': 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/'+modelID+'',\n  'headers': {\n    'x-api-key': '########################################',\n    'org_id': '####################################################################################################',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n        // <<Enter Task Pair based Payload>>\n  })\n\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "Nx00RqrLXpofFTyDCguK0",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"x-api-key\", \"########################################\");\nmyHeaders.append(\"org_id\", \"####################################################################################################\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n    // << Enter Payload Details based on Task pair >>\n});\n\nvar modelID = \"<< Enter Model ID >>\"\n\nvar requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: raw,\n  redirect: 'follow'\n};\n\nfetch(\"https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/\"+modelID+\"\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "_mGBjlMU9k01Z6CEkara5"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  }
}
```
:::

:::hint{type="info"}
te: In the response, copy job\_id. This value is required to trigger the GET APIs. See [\<GET> Job Metadata](docId\:S-mZ7r0HNzicDQy6Q-6Hq).

The "job\_id" is used to retrieve model analysis metadata and check the processing status of the request. It is also used for generating reports for the analyzed model. Copy the dashboard link from the response and open it in a new tab. This allows users to monitor the job progress and download reports.
:::

**

