Audio language detection

Analyze spoken audio waveforms to identify the primary Indic language spoken, enabling automated call routing and dynamic ASR model dispatch.

What it does

  • Acoustic Language Identification: Accurately detects which Indic language is being spoken from raw audio features.
  • Pre-routing Gate: Resolves incoming audio language when unknown, removing the need for manual user language prompts.
  • Multi-accent Discrimination: Differentiates closely related Indic language families (e.g., Hindi, Bhojpuri, Maithili).

1-Minute Quick Call

Identify spoken language from an audio sample via the Dhruva pipeline:

curl --location 'https://dhruva-api.bhashini.gov.in/services/inference/pipeline' \
  --header 'Accept: */*' \
  --header 'Authorization: <YOUR_INFERENCE_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "pipelineTasks": [
      {
        "taskType": "audio-lang-detection",
        "config": {
          "serviceId": "ai4bharat/indic-audio-lang-detection--gpu-t4"
        }
      }
    ],
    "inputData": {
      "audio": [
        { "audioContent": "<BASE64_ENCODED_AUDIO>" }
      ]
    }
  }'

Audio Recommendations

MetricIdeal RangeImpact on Accuracy
Duration2.5 to 5.0 secondsBelow 1.0s lacks sufficient phonetic variety; 2.5s–5.0s delivers peak classification confidence.
Sampling Rate16,000 Hz (16 kHz)Optimal feature extraction; lower rates (8 kHz) supported for telephony.
ChannelsMono (1 channel)Stereo audio should be downmixed prior to base64 encoding.

Common Use Cases

  • Intelligent IVR Call Routing: Automatically direct citizen telephony calls to language-specialized agents or language-matched ASR models.
  • Multilingual Media Cataloging: Tag regional broadcast audio, podcasts, and interviews by spoken language.
  • Data Crowdsourcing Filtering: Validate and categorize audio submissions in platforms like Bhashadaan.

Developer Guides & References