From c862a2a43df54fde93f8562d44efc3e80acb231e Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:12:14 +0530 Subject: [PATCH] Switch call recorder post-call transcription to Gladia with code switching (#23532) ## What Switches the Call Recorder app's post-meeting transcription provider from Recall.ai's built-in transcription (`recallai_async`) to Gladia (`gladia_v2_async`), with code switching enabled so mixed-language calls transcribe correctly. ## Changes - `create_transcript` requests now send `provider: { gladia_v2_async: { language_config: { code_switching: true } } }` instead of `recallai_async` with `language_code: 'auto'`. Gladia auto-detects the spoken language by default, and code switching re-detects it per utterance for calls that mix languages. - The provider payload is extracted into a `RECALL_ASYNC_TRANSCRIPT_PROVIDER` constant so a future provider-selection variable can slot in without touching the request code. - SETUP.md documents the new operational requirement: a Gladia API key must be added in the Recall.ai dashboard (Transcription > Gladia) for each region in use, otherwise transcripts fail. CleanShot 2026-07-30 at 15 00
27@2x tested on twenty dev recall workspace Review in cubic --- packages/twenty-apps/public/call-recorder/SETUP.md | 1 + .../constants/recall-async-transcript-provider.ts | 5 +++++ .../recall-api/__tests__/recall-bot-api.test.ts | 4 +++- .../recall-api/create-async-recall-transcript.util.ts | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 packages/twenty-apps/public/call-recorder/src/logic-functions/constants/recall-async-transcript-provider.ts diff --git a/packages/twenty-apps/public/call-recorder/SETUP.md b/packages/twenty-apps/public/call-recorder/SETUP.md index 614285ba99..5cf8ab2881 100644 --- a/packages/twenty-apps/public/call-recorder/SETUP.md +++ b/packages/twenty-apps/public/call-recorder/SETUP.md @@ -16,6 +16,7 @@ and to receive recordings back. Two things must be configured: update, and cancel bots. 2. A **webhook** from Recall.ai back to your deployment, so the app learns when a recording is ready and can ingest it. +3. A **Gladia API key** in the Recall.ai dashboard (**Transcription → Gladia**, per region) — transcripts fail without it. ## Server variables diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/recall-async-transcript-provider.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/recall-async-transcript-provider.ts new file mode 100644 index 0000000000..3924ff0333 --- /dev/null +++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/recall-async-transcript-provider.ts @@ -0,0 +1,5 @@ +export const RECALL_ASYNC_TRANSCRIPT_PROVIDER = { + gladia_v2_async: { + language_config: { code_switching: true }, + }, +} as const; diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/__tests__/recall-bot-api.test.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/__tests__/recall-bot-api.test.ts index 4239e73b5b..7072e14cd5 100644 --- a/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/__tests__/recall-bot-api.test.ts +++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/__tests__/recall-bot-api.test.ts @@ -568,7 +568,9 @@ describe('recall bot api', () => { expect.objectContaining({ method: 'POST' }), ); expect(JSON.parse(fetchMock.mock.calls[0][1].body)).toEqual({ - provider: { recallai_async: { language_code: 'auto' } }, + provider: { + gladia_v2_async: { language_config: { code_switching: true } }, + }, diarization: { use_separate_streams_when_available: true }, }); }); diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/create-async-recall-transcript.util.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/create-async-recall-transcript.util.ts index 388887f0d2..8b748970b9 100644 --- a/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/create-async-recall-transcript.util.ts +++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/recall-api/create-async-recall-transcript.util.ts @@ -1,5 +1,6 @@ import { isString } from '@sniptt/guards'; +import { RECALL_ASYNC_TRANSCRIPT_PROVIDER } from 'src/logic-functions/constants/recall-async-transcript-provider'; import { type RecallBotOperationFailure } from 'src/logic-functions/types/recall-bot-operation-result.type'; import { getRecallApiConfig } from 'src/logic-functions/recall-api/get-recall-api-config.util'; import { recallBotApiRequest } from 'src/logic-functions/recall-api/recall-bot-api-request.util'; @@ -24,7 +25,7 @@ export const createAsyncRecallTranscript = async ({ path: `/recording/${externalRecordingId}/create_transcript/`, method: 'POST', body: { - provider: { recallai_async: { language_code: 'auto' } }, + provider: RECALL_ASYNC_TRANSCRIPT_PROVIDER, diarization: { use_separate_streams_when_available: true }, }, maxAttempts: 1,