Skip to content

The open alternative to Salesforce, designed for AI.

Switch call recorder post-call transcription to Gladia with code switching (#23532)

nitinc862a2a43df5
diff --git a/packages/twenty-apps/public/call-recorder/SETUP.md b/packages/twenty-apps/public/call-recorder/SETUP.md
index 614285ba99f..5cf8ab28818 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 00000000000..3924ff0333c
--- /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 4239e73b5bb..7072e14cd5f 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 388887f0d20..8b748970b91 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,