apyhub
ARTIFICIAL INTELLIGENCE · AUDIO PROCESSING

Audio Language Detection

What it does

Audio Language Detection identifies the language spoken in an audio file and returns the detected locale code plus a confidence score. Send either a public audio URL to /url or upload an audio file to /file.

Use the URL endpoint when the audio is already hosted somewhere accessible, or the file upload endpoint when you have the binary directly in your app or pipeline. The request body is minimal: url for remote files, or file for uploaded audio such as WAV or MP3.

The response is a structured result under data.azure with language and confidence. language is returned as a locale code like en-US, and confidence is a numeric score from 0.0 to 1.0 that helps you decide whether to trust the detection.

This is useful for routing audio into the right transcription flow, selecting the right language-specific downstream model, or triaging user-submitted media before processing. If you need a simple way to classify spoken audio by language without extra metadata, Audio Language Detection gives you that signal directly.

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

QUICKSTART

GUIDE

Quickstart

Send a public audio file URL to detect its language.

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

What you'll get back

Returns a JSON object with a data object. Inside data, azure is an object containing 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 from a publicly accessible URL and returns the detection result in a JSON object.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL of the audio file. Must be a URI.

Response

Returns a JSON object with a data object field. Inside data, there is an azure object containing the detection result.

ParameterTypeMandatoryDescription
dataObjectNoWrapper object for the response payload.
data.azureObjectNoAzure detection result object.
data.azure.languageStringNoDetected language locale code.
data.azure.confidenceNumberNoDetection confidence level, from 0.0 to 1.0.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Detect audio language (file upload)
https://api.eu.apyverse.com/apyhub/detect-audio-language/file

QUICKSTART

GUIDE

Quickstart

Upload an audio file to detect its language.

curl -X POST "https://api.eu.apyverse.com/apyhub/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 is an object with language (the detected locale code) and confidence (the detection score 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

Uploads an audio file and returns the detected language information for that file.

Request Body

ParameterTypeMandatoryDescription
fileStringYesAudio file binary (WAV, MP3, etc.).

Response

Returns a JSON object with a data object field, which contains an azure object. Inside azure, the response includes a language string and a confidence number for the detected language locale and its confidence level.

ParameterTypeMandatoryDescription
dataObjectNoWrapper object for the detection result.
data.azureObjectNoAzure language detection result object.
data.azure.languageStringNoDetected language locale code.
data.azure.confidenceNumberNoDetection confidence level (0.0 to 1.0).

Body

Name
Type
Description
bodyREQUIRED
object

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

▣ 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.