Call recorder: let workspaces set the expected languages and language mode for transcription
Scope & Context
Call Recorder sends Gladia language_config: { code_switching: true } with no languages list (logic-functions/constants/recall-async-transcript-providers.ts). Gladia's recommended parameters warn against exactly this: "Do not enable code_switching with an empty languages list. When no languages are specified, the language detector evaluates every utterance against 100+ supported languages, which leads to frequent misdetections." They recommend constraining detection to the 3-5 languages you expect: https://docs.gladia.io/chapters/pre-recorded-stt/recommended-parameters
There is no way to set this outside the request. The Recall dashboard only stores the Gladia API key, and Gladia has no account-level language default.
Current behavior
Calls held mostly in one language, with phrases from another mixed in, come back with utterances tagged in unrelated languages and part of the speech missing.
We re-transcribed five recorded calls (about four hours in total, each mostly in Romanian with English phrases mixed in) through Gladia's pre-recorded API with different language_config values, using a single-language run as the reference:
language_config |
Words captured vs the single-language run | Words tagged outside the two expected languages | English-tagged words where the single-language run heard Romanian |
|---|---|---|---|
code_switching: true, no languages (Call Recorder today) |
79–84% | 5–22% | 44–67% |
code_switching: true, languages: ["ro", "en"] |
79–86% | 0% | 47–73% |
code_switching: false, languages: ["ro", "en"] |
100% (picked Romanian on all five) | 0% | none |
With switching on, short utterances are misdetected and then transcribed as plausible text in the wrong language, and some speech is dropped. With one language per call, English phrases inside the call are still transcribed as English (for example "more or less the same thing"). For comparison, Recall.ai transcription with language_code: "auto" captured about 80% of the words on the two calls Recall still held.
Expected behavior
Two Call Recorder settings:
- Expected languages, for example
CALL_RECORDER_TRANSCRIPT_LANGUAGESholding ISO 639-1 codes such asro,en. Empty keeps today's behavior. - Language mode, for example
CALL_RECORDER_TRANSCRIPT_LANGUAGE_MODE:one-per-call: Gladiacode_switching: falsewith the listedlanguages, so it detects one of them and transcribes the whole call in it.switch-within-call: Gladiacode_switching: true, limited to the listedlanguages. This is today's behavior when no languages are listed, so it can stay the default.
- Recall.ai transcription:
language_codeset when exactly one language is listed,autootherwise.
A setting rather than a new fixed behavior, because one-per-call decides from the start of the audio (per Gladia's docs) and a call held evenly in two languages may still need switch-within-call.
If this shape works for you, we can build it and open the PR.
Source: twentyhq/twenty