API Reference
Audio classification pipeline
POST
/
v1
/
classifications
/
audio
Audio classification pipeline
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/audio \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
123
],
"top_k": 5,
"function_to_apply": "softmax"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/audio"
payload = {
"inputs": [123],
"top_k": 5,
"function_to_apply": "softmax"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]Body
application/json
Request to classify audio inputs.
Audio input as numpy-like array, raw bytes or a dict descriptor. Required.
Number of top labels to return.
Post-processing function to apply to raw model scores.
Available options:
sigmoid, softmax, none ⌘I
Audio classification pipeline
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/audio \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
123
],
"top_k": 5,
"function_to_apply": "softmax"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/audio"
payload = {
"inputs": [123],
"top_k": 5,
"function_to_apply": "softmax"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]