v1

latestOpenAPI 3.1.02026-07-22122760.2 KB

Identify the spoken language of an audio file

Accepts a single audio file and returns the detected language as a synchronous JSON response.

post/api/velma-2-language-detection-batch

Response

Language detection completed successfully.

predicted_languagestring required

Human-readable language name (e.g. "English", "French", "Mandarin"). Suitable for display to end users.

predicted_language_codestring required

Lowercase ISO 639-1 language code (e.g. "en", "fr", "zh"). Suitable for routing, locale switching, or BCP-47 tags.

confidencenumber double required

Probability associated with the predicted language, in the range 0.0-1.0. Higher means more confident.

duration_msinteger required

Total duration of the decoded audio in milliseconds. Note: only the first 30 seconds are analyzed regardless of this value.

Example response

{
  "predicted_language": "English",
  "predicted_language_code": "en",
  "confidence": 0.9847,
  "duration_ms": 14253
}