API Reference
Zero-shot audio classification
POST
/
v1
/
classifications
/
zero-shot
/
audio
Zero-shot audio classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot/audio \
--header 'Content-Type: application/json' \
--data '
{
"audios": [
[
123
]
],
"candidate_labels": [
"<string>"
],
"hypothesis_template": "This is a sound of {}"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot/audio"
payload = {
"audios": [[123]],
"candidate_labels": ["<string>"],
"hypothesis_template": "This is a sound of {}"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]Body
application/json
Zero-shot classification request for audio inputs using candidate labels.
⌘I
Zero-shot audio classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot/audio \
--header 'Content-Type: application/json' \
--data '
{
"audios": [
[
123
]
],
"candidate_labels": [
"<string>"
],
"hypothesis_template": "This is a sound of {}"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot/audio"
payload = {
"audios": [[123]],
"candidate_labels": ["<string>"],
"hypothesis_template": "This is a sound of {}"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]