Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(audio): localize transcript echo labels
cyh26d598c4798f
diff --git a/core/audio_asr.py b/core/audio_asr.pyindex 418cfc0a3..74a3080ff 100644--- a/core/audio_asr.py+++ b/core/audio_asr.py@@ -230,12 +230,17 @@ def append_audio_transcripts_to_message(message: str, transcripts: list[AudioTrareturn f"{message}\n\n{block}"-def format_audio_transcript_echo(transcripts: list[AudioTranscript]) -> str:+def format_audio_transcript_echo(+ transcripts: list[AudioTranscript],+ *,+ single_label: str,+ multiple_label: str,+) -> str:if not transcripts:return ""if len(transcripts) == 1:- return f"Voice transcript:\n{transcripts[0].text.strip()}"- lines = ["Voice transcripts:"]+ return f"{single_label}\n{transcripts[0].text.strip()}"+ lines = [multiple_label]for transcript in transcripts:name = transcript.attachment_name or Path(transcript.local_path).namelines.append(f"- {name}: {transcript.text.strip()}")diff --git a/core/handlers/message_handler.py b/core/handlers/message_handler.pyindex e39462d2d..3f7703cab 100644--- a/core/handlers/message_handler.py+++ b/core/handlers/message_handler.py@@ -341,7 +341,11 @@ class MessageHandler(BaseHandler):audio_asr_config = getattr(self.config, "audio_asr", None)if not getattr(audio_asr_config, "echo_transcript", True):return- echo = format_audio_transcript_echo(transcripts)+ echo = format_audio_transcript_echo(+ transcripts,+ single_label=self._t("audio.transcriptEchoSingle"),+ multiple_label=self._t("audio.transcriptEchoMultiple"),+ )if not echo:returntry:diff --git a/tests/test_audio_asr.py b/tests/test_audio_asr.pyindex d52da14cb..18b09a5d6 100644--- a/tests/test_audio_asr.py+++ b/tests/test_audio_asr.py@@ -57,7 +57,14 @@ class AudioAsrServiceTests(unittest.TestCase):append_audio_transcripts_to_message("please handle", transcripts),"please handle\n\n[Audio Transcripts]\n- voice.m4a: hello world",)- self.assertEqual(format_audio_transcript_echo(transcripts), "Voice transcript:\nhello world")+ self.assertEqual(+ format_audio_transcript_echo(+ transcripts,+ single_label="Voice transcript:",+ multiple_label="Voice transcripts:",+ ),+ "Voice transcript:\nhello world",+ )class _AttachmentIMClient:@@ -98,9 +105,11 @@ class _FakeAudioAsrService:class MessageHandlerAudioAsrTests(unittest.IsolatedAsyncioTestCase):- async def _run_turn(self, *, asr_service, echo_transcript=True):+ async def _run_turn(self, *, asr_service, echo_transcript=True, language="en"):controller = _StubController(platform="slack", ack_mode="message", typing_result=True)controller.config.audio_asr = AudioAsrConfig(enabled=True, echo_transcript=echo_transcript)+ controller.config.language = language+ controller._get_lang = lambda: controller.config.languagecontroller.im_client = _AttachmentIMClient()controller.audio_asr_service = asr_servicehandler = MessageHandler(controller)@@ -159,6 +168,14 @@ class MessageHandlerAudioAsrTests(unittest.IsolatedAsyncioTestCase):self.assertIn("hello from audio", request.message)self.assertFalse(any("Voice transcript" in message for message in controller.im_client.sent_messages))+ async def test_audio_asr_echo_uses_configured_language(self):+ transcript = AudioTranscript("voice.m4a", "/tmp/voice.m4a", "你好")+ asr_service = _FakeAudioAsrService(result=[transcript])++ controller = await self._run_turn(asr_service=asr_service, language="zh")++ self.assertIn("语音转写:\n你好", controller.im_client.sent_messages)+if __name__ == "__main__":unittest.main()diff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex 07d08c707..1bbc92f53 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -71,6 +71,10 @@"visibilityHidden": "hidden","messageTypeStatus": "{name} messages are now {action}"},+ "audio": {+ "transcriptEchoSingle": "Voice transcript:",+ "transcriptEchoMultiple": "Voice transcripts:"+ },"discord": {"settingsSubtitle": "Adjust message visibility, mention behavior, and language.","routingSubtitle": "Select backend and model settings for this channel.",diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex 13a294376..590153b91 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -71,6 +71,10 @@"visibilityHidden": "隐藏","messageTypeStatus": "{name} 消息已设为 {action}"},+ "audio": {+ "transcriptEchoSingle": "语音转写:",+ "transcriptEchoMultiple": "语音转写:"+ },"discord": {"settingsSubtitle": "调整消息可见性、@提及策略与语言。","routingSubtitle": "为该频道选择后端与模型配置。",