Skip to content

Languages

Automatic language detection, explicit language codes, the rules the API enforces, the full list of accepted codes, and which model transcribes what.

Open .md

Sandchest detects the language of your audio by default. You can also pin it, hint it, or require a confidence floor. This page covers each mode, the exact validation rules, and the codes the API accepts.

Detection is the default#

Omit both language_code and language_detection and Sandchest detects the language:

JSON
{ "audio_url": "https://example.com/meeting.mp3" }

The completed transcript reports what it found:

JSON
{
  "language_code": "de",
  "language_confidence": 0.97,
  "language_detection": true
}

language_confidence is between 0 and 1 and comes from the genuine transcript — Sandchest never fabricates a language for audio it could not read. Detection needs speech: a file with no spoken audio fails with {"error":"language_detection cannot be performed on files with no spoken audio."} on the transcript, rather than guessing.

Pinning a language#

When you already know the language, say so. It skips detection and avoids a wrong guess on short or noisy clips.

JSON
{ "audio_url": "https://example.com/meeting.mp3", "language_code": "es" }

The response then carries language_detection: false and the language_code you asked for.

Hinting and fallbacks#

language_detection_options narrows the search or names a safety net.

JSON
{
  "audio_url": "https://example.com/support-call.mp3",
  "language_detection": true,
  "language_confidence_threshold": 0.6,
  "language_detection_options": {
    "expected_languages": ["en", "fr", "de"],
    "fallback_language": "en"
  }
}
FieldWhat it does
expected_languagesRestrict detection to these codes. ["all"] means no restriction.
fallback_languageUse this code when detection is not confident. "auto" leaves it unrestricted.
language_confidence_threshold0–1. Fail rather than proceed below this confidence.

The rules#

The API enforces four rules and gives you the exact reason each time.

SituationHTTPBody
No language_code, and language_detection: false400{"error":"Either `language_detection` must be set to True, or one of `language_code` or `language_codes` must must be specified."}
A language_code and language_detection: true400{"error":"`language_detection` is not available when `language_code` is specified."}
language_confidence_threshold with detection off400{"error":"language_confidence_threshold requires language_detection."}
fallback_language not in expected_languages400{"error":"fallback_language must be in expected_languages or auto."}

That last rule is satisfied when any of these is true: expected_languages is absent, expected_languages is ["all"], fallback_language is "auto", or expected_languages contains the fallback. When it is omitted, the fallback is compared as en. English locale codes fold together for this comparison — en_au, en_uk and en_us all count as en — while de_ch stays distinct from de.

Models#

ModelCoversWhen it runs
nvidia/parakeet-tdt-0.6b-v2EnglishExplicit English requests, and a refinement pass over uncertain detected-English audio
nvidia/parakeet-tdt-0.6b-v325 languages, listed belowAutomatic detection and every non-English request

Both models stay warm, so neither routing decision costs you a cold start. The transcript's speech_model_used names whichever one produced it. Self-hosted deployments choose their own models with SANDCHEST_MODEL and SANDCHEST_MULTILINGUAL_MODEL — see Self-hosting.

The multilingual model decodes these 25 languages:

CodeLanguageCodeLanguage
bgBulgarianhrCroatian
csCzechdaDanish
nlDutchenEnglish
etEstonianfiFinnish
frFrenchdeGerman
elGreekhuHungarian
itItalianlvLatvian
ltLithuanianmtMaltese
plPolishptPortuguese
roRomanianskSlovak
slSlovenianesSpanish
svSwedishruRussian
ukUkrainian

Self-hosted deployments have a second option: the worker can be built with an optional Whisper engine and started with SANDCHEST_INFERENCE_ENGINE=whisper, which covers the whole accepted code list below. Parakeet is the default engine and the one behind the hosted service. See Self-hosting.

Accepted language codes#

These 103 codes pass validation on language_code and inside language_detection_options.expected_languages. Anything else is rejected with {"error":"The request contains an unsupported option or an invalid option value."}.

CodeLanguageCodeLanguage
enEnglishesSpanish
frFrenchdeGerman
itItalianptPortuguese
nlDutchhiHindi
jaJapanesezhChinese
fiFinnishkoKorean
plPolishruRussian
trTurkishukUkrainian
viVietnameseafAfrikaans
sqAlbanianamAmharic
arArabichyArmenian
asAssameseazAzerbaijani
baBashkireuBasque
beBelarusianbnBangla
bsBosnianbrBreton
bgBulgarianmyBurmese
caCatalanhrCroatian
csCzechdaDanish
etEstonianfoFaroese
glGaliciankaGeorgian
elGreekguGujarati
htHaitian CreolehaHausa
hawHawaiianheHebrew
huHungarianisIcelandic
idIndonesianjwJavanese
knKannadakkKazakh
kmKhmerloLao
laLatinlvLatvian
lnLingalaltLithuanian
lbLuxembourgishmkMacedonian
mgMalagasymsMalay
mlMalayalammtMaltese
miMāorimrMarathi
mnMongolianneNepali
noNorwegiannnNorwegian Nynorsk
ocOccitanpaPunjabi
psPashtofaPersian
roRomaniansaSanskrit
srSerbiansnShona
sdSindhisiSinhala
skSlovakslSlovenian
soSomalisuSundanese
swSwahilisvSwedish
tlTagalogtgTajik
taTamilttTatar
teTeluguthThai
boTibetantkTurkmen
urUrduuzUzbek
cyWelshyiYiddish
yoYorubaen_auAustralian English
en_ukEnglish (United Kingdom)en_usAmerican English
de_chSwiss High German

Verify#

Detect the language of a file and read back what was found:

shell
curl -sS "https://stt-api.sandchest.com/v2/transcript/$ID" \
  -H "Authorization: $SANDCHEST_API_KEY" \
  | jq '{status, language_detection, language_code, language_confidence, speech_model_used}'
expected output
{
  "status": "completed",
  "language_detection": true,
  "language_code": "en",
  "language_confidence": 0.99,
  "speech_model_used": "nvidia/parakeet-tdt-0.6b-v3"
}

Detected-English audio may report either model: detection runs on the multilingual model, and an uncertain English result is refined on the English one. Whichever finished the job is the one named in speech_model_used.

Next#

Webhooks — stop polling and get told when a transcript is done.