apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · AUDIO PROCESSING

AI Audio Language Detection API

Hosted on ApyHub

What it does

Audio Language Detector identifies the spoken language in an audio file and returns a locale code with a confidence score. Send a WAV, MP3, or another supported audio file, or point the API at a publicly accessible audio URL.

Use it when you need to route recordings to the right transcription pipeline, pre-sort call-center audio by language, or add language-aware logic to voice apps before transcription starts. The API is useful when you only need a fast language check and not a full transcript.

The /file endpoint accepts a binary file upload in the request body. The /url endpoint accepts a public url to the audio asset. Both endpoints return data.azure.language as a locale such as en-US, along with data.azure.confidence as a score from 0.0 to 1.0.

Audio Language Detector is a good fit when you want a lightweight classification step for audio ingestion, moderation, or localization workflows without building your own model pipeline.

Provider (requested_service)Atoms
Azure500
▣ ENDPOINT 01 / 02
POST
Detect audio language (file upload)
https://api.eu.apyhub.com/apyhub/ai-detect-audio-language/file

QUICKSTART

GUIDE

Quickstart

Upload an audio file to detect its language.

curl -X POST "https://api.eu.apyhub.com/apyhub/ai-detect-audio-language/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/audio.mp3"

What you'll get back

Returns a JSON object with a data object. Inside data, azure.language is the detected language locale code and azure.confidence is the detection confidence level from 0.0 to 1.0.

{
  "data": {
    "azure": {
      "language": "en-US",
      "confidence": 0.98
    }
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Audio file binary (WAV, MP3, etc.).

About this endpoint

What it does

Detects the language of an uploaded audio file. The request sends an audio file binary, and the response returns a JSON object with detected language information under data.azure.

Request Body

ParameterTypeDescription
fileBinaryAudio file binary (WAV, MP3, etc.).

Response

Returns a JSON object with a data object field. Inside data, the azure object contains the detected language details.

ParameterTypeDescription
dataObjectResponse wrapper object.
data.azureObjectDetected language details from Azure.
data.azure.languageStringDetected language locale code.
data.azure.confidenceNumberDetection confidence level (0.0 to 1.0).

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 02
POST
Detect audio language (URL input)
https://api.eu.apyhub.com/apyhub/ai-detect-audio-language/url

QUICKSTART

GUIDE

Quickstart

Send the audio file URL to detect its language.

curl -X POST "https://api.eu.apyhub.com/apyhub/ai-detect-audio-language/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample-speech.mp3"}'

What you'll get back

Returns a JSON object with a data object. Inside data, azure is an object with the detected language locale code and confidence score.

{
  "data": {
    "azure": {
      "language": "en-US",
      "confidence": 0.98
    }
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible URL of the audio file.

About this endpoint

What it does

Detects the language of an audio file provided as a publicly accessible URL and returns the detection result in the response.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL of the audio file. Must be a URI.

Response

Returns a JSON object with a data object field. Inside data, the azure object contains the detected language string and confidence number.

ParameterTypeDescription
dataObjectResponse container object.
data.azureObjectDetection details returned by the Azure result object.
data.azure.languageStringDetected language locale code.
data.azure.confidenceNumberDetection confidence level, from 0.0 to 1.0.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.