Audio Speech Recognition
2 min
The below parameters are for various Audio speech recognition attack types. To know more about the different attack input parameters see Automatic Speech Recognition
{
"use_model_api": "yes"
"model_api_details": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
"model_framework": "onnx"
}Model anaylsis
POST
https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse
Path Parameters
- model_idstring
Header Parameters
- x-api-keystringrequiredDescription
- Org_idstringrequiredDescription
python
import requests
modelID="<< Enter Model ID >>"
url = "https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/"+modelID+""
# please select proper payload for your usecase for extraction, evasion or poisoning.
payload={
# <<Enter Payload Data>>
}
headers = {
'Accept': 'application/json',
'x-api-key': '########################################',
'Org-Id': '####################################################################################################'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)curl
modelID="<< Enter Model ID >>"
curl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/${modelID}' \
--header 'x-api-key: ########################################' \
--header 'org_id: ####################################################################################################' \
--header 'Content-Type: application/json' \
--data '{
<<Enter Payload Data>>
}'nodejs
var request = require('request');
modelID = '<<Enter Model ID >>'
var options = {
'method': 'POST',
'url': 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/'+modelID+'',
'headers': {
'x-api-key': '########################################',
'org_id': '####################################################################################################',
'Content-Type': 'application/json'
},
body: JSON.stringify({
// <<Enter Task Pair based Payload>>
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("x-api-key", "########################################");
myHeaders.append("org_id", "####################################################################################################");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
// << Enter Payload Details based on Task pair >>
});
var modelID = "<< Enter Model ID >>"
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/"+modelID+"", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));200
// 200 OK: Returns a JSON object containing unique model ID and urls to upload required files.401
// 401 Unauthorized: Returns an error message if the provided API key or Org-ID is invalid or expired.400
// 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.)412
// 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)te: In the response, copy job_id. This value is required to trigger the GET APIs. See <GET> Job Metadata. 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.