How to specify language codes
The language_code parameter tells the STT model which language to expect in the audio. Using the correct language code improves transcription accuracy.
Supported Languages (Saaras v4)
Saaras v4 supports 22 Indian languages with BCP-47 format codes and additionally recognizes Global English alongside Indian English (en-IN):
Automatic Language Detection
To enable automatic language detection, pass unknown as the language_code parameter. The model will detect the language from the audio.
Best Practice: Always specify the language code when you know the language of the audio. This improves accuracy and reduces processing time. Use unknown only when the language is truly unknown.
Example Code
The examples below use saaras:v4, which supports the 22 Indian languages and also recognizes Global English alongside Indian English. It also supports keyterm prompting.
With Language Code
Auto Detection
keyterms is supported only on saaras:v4. Up to 50 terms, 64 characters each. See Keyterm Prompting.