Skip to main content

Learn how to enable age & gender detection

Append age_detection=true and/or gender_detection=true to your Lightning STT query string. You can toggle them independently or pair them with diarization, timestamps, and emotion scores.

Output format & field of interest

Responses include top-level age (infant, teenager, adult, old) and gender (male, female) fields that describe the dominant speaker in the processed segment. Store these fields next to each transcript to power demographic analytics or routing logic.

Sample request

curl --request POST \
  --url "https://waves-api.smallest.ai/api/v1/lightning/get_text?model=lightning&language=en&age_detection=true&gender_detection=true" \
  --header "Authorization: Bearer $SMALLEST_API_KEY" \
  --header "Content-Type: audio/wav" \
  --data-binary "@/path/to/audio.wav"

Sample response

{
  "status": "success",
  "transcription": "Hello world.",
  "age": "adult",
  "gender": "male",
  "metadata": {
    "filename": "audio.mp3",
    "duration": 1.7
  }
}