Handle audio with multi language speaker
Gladia supports multi-language (code-switching) transcription in both real-time (live) and asynchronous (pre-recorded) scenarios. Hereβs how to configure it properly depending on your use case, and what differences to expect.
Language Detection Options
You can configure transcription languages with the language_config parameter:
{ "language_config": { "languages": ["en", "fr", "de"], "code_switching": true } }
Languages β either leave empty (all supported languages) or provide a specific set. Here is the list of supported languages.
If you already know which languages will be spoken, always provide them. This drastically improves accuracy and reduces false detections.
Code-switching β true (switch dynamically between languages) or false (stick to one language). It is set at false by default.
If a single WebSocket session or file contains multiple languages, set the parameter code_switching=true.
Asynchronous reference: Pre-recorded init API
Real-time reference: Live init API