V2 · Whole-clip analysis
1 API request per callV2 checks for human speech, then uses the ECAPA-TDNN voice model to classify the full recording. Use it for recordings with one speaker. Send one audio file as multipart/form-data in the file field.
Why choose V2 over V1? V1's legacy model always predicts male or female, even for silence, music, or noise. V2 adds speech detection and returns unknown when it detects no speech instead of guessing. It also uses ECAPA-TDNN, which models voice characteristics over time; backend test-voice comparisons found it more accurate than the V1 model. V2 combines voices in the same clip, so choose V3 for multi-speaker recordings.
Endpoint
POST /v1/voice-gender-recognition/api/v2Successful responses return gender as male, female, or unknown, confidence as a percentage, and remainingRequests. When gender is unknown, the response also includes a message explaining why.
An unknown result is returned when no human speech is detected. It is a successful response, not an API error.
cURL request
curl -X POST 'https://api.genderrecognition.com/v1/voice-gender-recognition/api/v2' \ -H 'apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/recording.wav'
Example detected-gender response
{
"success": true,
"gender": "female",
"confidence": 92,
"remainingRequests": 119
}Example unknown response
{
"success": true,
"gender": "unknown",
"confidence": 0,
"message": "No clear speech was detected in the audio, so the gender could not be determined.",
"remainingRequests": 119
}