Languages
Supported languages, language selection, and automatic language detection
In multilingual environments such as customer support centers handling calls in multiple languages, media companies processing international content, or platforms accepting user-generated audio, you can't always know the language of an audio file before processing it. Sending audio with the wrong language code produces poor or failed transcripts. Aldea supports explicit language selection and automatic detection to handle both known and unknown language scenarios.
Supported languages
Aldea supports both English and Spanish transcription:
| Language | Code | Aliases |
|---|---|---|
| English | en | en-US |
| Spanish | es | es-ES |
Language codes follow the BCP-47 format.
Setting the language
When you know the language of your audio, pass the language query parameter (or its alias lang) in the transcription request:
curl -X POST "https://api.aldea.ai/v1/listen?language=es" \
-H "Authorization: Bearer YOUR_ALDEA_API_KEY" \
--data-binary @audio.wav# WebSocket URL with language parameter
wss://api.aldea.ai/v1/listen?language=es&interim_results=trueWhen no language parameter is provided, the API defaults to English.
Automatic language detection
When you don't know the language of your audio files, enable automatic detection. Aldea analyzes the audio's acoustic features and phonetic patterns to identify the spoken language, then routes the audio through the corresponding transcription model. For Aldea APIs to identify the spoken language automatically, set detect_language=true as follows:
curl -X POST "https://api.aldea.ai/v1/listen?detect_language=true" \
-H "Authorization: Bearer YOUR_ALDEA_API_KEY" \
--data-binary @audio.wavYou can also pass language=auto as a shorthand:
curl -X POST "https://api.aldea.ai/v1/listen?language=auto" \
-H "Authorization: Bearer YOUR_ALDEA_API_KEY" \
--data-binary @audio.wavWhen language detection is enabled, the response includes a detected_language field so your application can act on the result. For example, routing a support ticket to an agent who speaks the detected language.
{
"results": {
"channels": [{
"detected_language": "es",
"alternatives": [{
"transcript": "Hola, ¿cómo estás?",
"confidence": 0.91
}]
}]
}
}