Gender Recognition
Predict the gender of the speaker in an audio sample
Request
Endpoint
POSThttps://speakerscope.ai/api/gender
Fields
| Field | Type | Description |
|---|---|---|
audio_url | string | URL of the audio file |
Example
import requests
response = requests.post(
"https://speakerscope.ai/api/gender",
auth=("<API_KEY>", "<API_SECRET>"),
json={
"audio_url": "<AUDIO_URL>",
},
)
print(response.json())Response
Fields
| Field | Type | Description |
|---|---|---|
prediction | str | Predicted gender ("male" or "female") |
probabilities | dict[str, float] | Maps gender labels to their confidence scores, sorted in descending order |
Example
{
"prediction": "male",
"probabilities": {
"male": 0.97,
"female": 0.03
}
}