Skip to main content
POST
/
gender-detection
/
classify
Classify speaker gender
curl --request POST \
  --url https://restapi.deepdub.ai/api/v1/gender-detection/classify \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "audio_url": "https://example.com/audio/sample.wav",
  "audio_base64": "<string>"
}
'
{
  "predicted_gender": "female",
  "confidence": 0.95,
  "prediction": {
    "female": 0.95,
    "male": 0.05
  },
  "duration_seconds": 3.5,
  "processing_time_ms": 120.5
}

Authorizations

x-api-key
string
header
required

API key for authentication. Must start with dd- prefix.

Headers

x-api-key
string
default:dd-00000000000000000000000065c9cbfe
required

API Key

Body

application/json

Request for gender classification from audio

audio_url
string

URL to an audio file (S3 or HTTP). Provide either audio_url or audio_base64.

Example:

"https://example.com/audio/sample.wav"

audio_base64
string

Base64-encoded audio data. Provide either audio_url or audio_base64.

Response

Successful classification

Gender classification result

predicted_gender
enum<string>
required

Predicted gender of the speaker

Available options:
female,
male
Example:

"female"

confidence
number
required

Confidence score (0.0 to 1.0)

Required range: 0 <= x <= 1
Example:

0.95

prediction
object

Full prediction scores for both genders

duration_seconds
number

Duration of the audio in seconds

Example:

3.5

processing_time_ms
number

Processing time in milliseconds

Example:

120.5