Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(calls): support multiple languages for call transcriptions (#6093)
Will Hutchinson8d8f05d4c42d
diff --git a/services/transcription/requirements.txt b/services/transcription/requirements.txtindex bf9d28c183..d98ef6ba34 100644--- a/services/transcription/requirements.txt+++ b/services/transcription/requirements.txt@@ -2,3 +2,4 @@ python-dotenvlivekit-agents[silero]==1.5.7httpxresemblyzer==0.1.4+setuptools==80.10.2 # resemblyzer's webrtcvad dependency imports pkg_resourcesdiff --git a/services/transcription/test_transcriber.py b/services/transcription/test_transcriber.pynew file mode 100644index 0000000000..60a775e28f--- /dev/null+++ b/services/transcription/test_transcriber.py@@ -0,0 +1,36 @@+import unittest+from unittest.mock import patch, sentinel++import transcriber+++class TranscriberConfigurationTest(unittest.TestCase):+ def test_configures_multilingual_deepgram_transcription(self):+ with (+ patch.object(+ transcriber.inference,+ "STT",+ return_value=sentinel.stt,+ ) as create_stt,+ patch.object(transcriber.Agent, "__init__", return_value=None) as init_agent,+ ):+ transcriber.Transcriber(+ participant_identity="participant-id",+ channel_id="channel-id",+ http_client=sentinel.http_client,+ )++ create_stt.assert_called_once()+ args, kwargs = create_stt.call_args+ self.assertEqual(args, ("deepgram/nova-3",))+ self.assertEqual(kwargs["language"], "multi")+ self.assertTrue(kwargs["extra_kwargs"]["diarize"])+ self.assertNotIn("detect_language", kwargs["extra_kwargs"])+ init_agent.assert_called_once_with(+ instructions="Transcribe user speech.",+ stt=sentinel.stt,+ )+++if __name__ == "__main__":+ unittest.main()diff --git a/services/transcription/transcriber.py b/services/transcription/transcriber.pyindex 928ab6a1d7..5e7a862302 100644--- a/services/transcription/transcriber.py+++ b/services/transcription/transcriber.py@@ -161,7 +161,7 @@ class Transcriber(Agent):instructions="Transcribe user speech.",stt=inference.STT("deepgram/nova-3",- language="en-US",+ language="multi",extra_kwargs={# ms of silence before Deepgram finalizes an utterance.# Library default is 25ms, which cuts hesitant speakers mid-thought.