知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.
Swift androidlinuxlive-captionsmacosmeeting-notesmenubar-appsimultaneous-interpretationspeech-recognitionsubtitlesswiftswiftuitranslationwindows
feat(linux): what you say with interpreting on is marked Interpreted in the notes, records and export
wqugurud3d94589c21d
diff --git a/linux/cicada/app/notes_window.py b/linux/cicada/app/notes_window.pyindex 351f634..134e9ee 100644--- a/linux/cicada/app/notes_window.py+++ b/linux/cicada/app/notes_window.py@@ -539,7 +539,7 @@ class NotesWindow(Gtk.Window):row = ui.vbox(2)top = ui.hbox(8)if l.speaker == "me":- top.pack_start(ui.text(L("你"), 11, "accent", bold=True, wrap=False, ellipsize=False), False, False, 0)+ top.pack_start(ui.me_tag(), False, False, 0)elif l.id in nums:n = nums[l.id]top.pack_start(ui.text(speakers.label(n, names), 11, "spk%d" % ((n - 1) % 4 + 1), bold=True, wrap=False, ellipsize=False), False, False, 0)@@ -805,8 +805,9 @@ class NotesWindow(Gtk.Window):returnfrom ..core.support import TARGETSnames = {c: n for n, c in TARGETS}- stage = {"hearing": L("正在听你说…"), "interpreting": L("正在翻译…"),- "speaking": L("正在说") + " · " + names.get(sp.target, sp.target)}.get(sp.stage, L("同声传译"))+ # Marked 同传 while on, as the Mac's live labels (theirs end in spaces for the text after them).+ stage = {"hearing": L("同传 · 你在说… ").rstrip(), "interpreting": L("同传 · 翻译中… ").rstrip(),+ "speaking": L("同传") + " · " + L("正在说") + " · " + names.get(sp.target, sp.target)}.get(sp.stage, L("同声传译"))top = ui.hbox(8)mic = ui.icon("audio-input-microphone-symbolic", 14)ui.classes(mic, "accent" if sp.active else "secondary")@@ -817,7 +818,7 @@ class NotesWindow(Gtk.Window):original, translation = sp.lastif not self.subtitles:box.pack_start(ui.text(LF("你说:%@", original), 11, "secondary", width_chars=34, lang=sp.source), False, False, 0)- box.pack_start(ui.text(LF("对方听到:%@", translation), 13 if not self.subtitles else 15, "ink", bold=True,+ box.pack_start(ui.text(LF("线上听到:%@", translation), 13 if not self.subtitles else 15, "ink", bold=True,width_chars=34 if not self.subtitles else 70, lang=sp.target), False, False, 0)if sp.problem:box.pack_start(ui.text(sp.problem, 11, "warn", width_chars=34), False, False, 0)diff --git a/linux/cicada/app/onboarding.py b/linux/cicada/app/onboarding.pyindex 16bedb2..8ebdfde 100644--- a/linux/cicada/app/onboarding.py+++ b/linux/cicada/app/onboarding.py@@ -693,8 +693,8 @@ class Onboarding(Gtk.Window):on = self.speak_setup if self.speak_setup is not None else app.settings.speakEnabledlang = dict((c, n) for n, c in TARGETS).get(app.settings.speak_from_code, app.settings.speak_from_code)head = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=24)- texts = ui.vbox(8, ui.text(L("开会时要说外语吗?"), 26, "heading", bold=True, width_chars=24),- ui.text(LF("点一下“开始说”或按快捷键说%@,对方听到翻译后的语音。", lang), 14, "secondary", width_chars=50))+ texts = ui.vbox(8, ui.text(L("线上开会时要说外语吗?"), 26, "heading", bold=True, width_chars=24),+ ui.text(LF("点一下“开始说”或按快捷键说%@,线上的人听到翻译后的语音。", lang), 14, "secondary", width_chars=50))head.pack_start(texts, True, True, 0)if on:head.pack_end(self._keycaps(), False, False, 0)diff --git a/linux/cicada/app/records_window.py b/linux/cicada/app/records_window.pyindex 9673b11..f17ce1b 100644--- a/linux/cicada/app/records_window.py+++ b/linux/cicada/app/records_window.py@@ -1090,9 +1090,11 @@ class RecordsWindow(Gtk.Window):return speakers.speaker_name(l, self._nums, self._shown), "secondary"def _speaker_label(self, l):+ if l.speaker == "me":+ return ui.me_tag()text, cls = self._who(l)lbl = ui.text(text, 11, cls, bold=True, wrap=False)- if l.speaker == "me" or not self._vnums:+ if not self._vnums:return lbl# A click on whose line it is: say it was someone else's (这句是谁说的).b = Gtk.Button()diff --git a/linux/cicada/app/ui.py b/linux/cicada/app/ui.pyindex 9ed195e..6de87c9 100644--- a/linux/cicada/app/ui.py+++ b/linux/cicada/app/ui.py@@ -160,6 +160,8 @@ button.iconbtn.on { background-color: #F3F4F6; color: #15171C; }.placetag { border-radius: 4px; border: 1px solid #E4E6EA; }.placetag.room { background-color: #F2F3F5; border-color: #F2F3F5; }.placetag label { color: #5A5F6B; }+.metag { border-radius: 4px; border: 1px solid rgba(232,85,43,0.45); }+.metag label { color: #B33A14; }.badge { background-color: #FDEEE8; border-radius: 5px; padding: 0 6px; color: #B33A14; }.softcard { background-color: #F5F6F8; border-radius: 12px; }.summarycard { background-color: #F5F6F8; border-radius: 12px; }@@ -298,6 +300,7 @@ button.pillkeep label { color: #15171C; }.panel.dark .placetag { border-color: #44474F; }.panel.dark .placetag.room { background-color: #34363D; border-color: #34363D; }.panel.dark .placetag label { color: #A3A7B1; }+.panel.dark .metag label { color: #F08A6C; }.panel.dark .link { color: #F08A6C; }.panel.dark .badge { background-color: rgba(232,85,43,0.18); color: #F08A6C; }.panel.dark button.iconbtn:hover { background-color: rgba(255,255,255,0.08); }@@ -736,6 +739,22 @@ def place_tag(line) -> Gtk.Widget:return c+def me_tag() -> Gtk.Widget:+ """My own line (the Mac's MeTag): said through 同声传译, so what the other side heard was its+ translation. 你 in the accent, then an outlined 同传 pill."""+ pill = text(L("同传"), 10, "", wrap=False, ellipsize=False)+ pad(pill, 1, 5) # a margin: GTK 3 ignores CSS padding on an EventBox+ p = panel(pill, "metag")+ p.set_valign(Gtk.Align.CENTER)+ box = hbox(5)+ box.set_halign(Gtk.Align.START) # the tooltip covers the tag, not the row+ box.pack_start(text(L("你"), 11, "accent", bold=True, wrap=False, ellipsize=False), False, False, 0)+ box.pack_start(p, False, False, 0)+ # Linux turns it on and off (开始说, the shortcut), it has no key to hold: not the Mac's tooltip.+ box.set_tooltip_text(L("同声传译时说的,对方听到的是译文"))+ return box++def chip(s: str, now: bool = False) -> Gtk.Widget:l = text(s, 11, "", bold=True, wrap=False, ellipsize=False)if now:diff --git a/linux/cicada/core/speakers.py b/linux/cicada/core/speakers.pyindex f7b136e..93f087c 100644--- a/linux/cicada/core/speakers.py+++ b/linux/cicada/core/speakers.py@@ -245,9 +245,10 @@ def label(number: int, shown: dict) -> str:def speaker_name(line, nums: dict, shown: dict) -> str:- """你, a speaker, 对方 (no voices told apart) or 未识别 (a voice not on show) (TranscriptExport.speakerName)."""+ """你 · 同传 (said through 同声传译), a speaker, 对方 (no voices told apart) or 未识别 (a voice not on+ show) (TranscriptExport.speakerName)."""if line.speaker == "me":- return strings.L("你")+ return strings.L("你 · 同传")if line.id in nums:return label(nums[line.id], shown)return strings.L("对方") if not nums else strings.L("未识别")diff --git a/linux/strings/en.lproj/Linux.strings b/linux/strings/en.lproj/Linux.stringsindex f475e58..8c2dfd1 100644--- a/linux/strings/en.lproj/Linux.strings+++ b/linux/strings/en.lproj/Linux.strings@@ -59,7 +59,6 @@"没能建好知了麦克风" = "Couldn't set up the Cicada microphone";"停止说" = "Stop speaking";"开始说" = "Start speaking";-"正在听你说…" = "Listening to you…";"知了 · 给会议的声音" = "Cicada · Voice for the meeting";"知了 麦克风" = "Cicada Microphone";"开始 / 停止说的快捷键" = "Start / stop speaking shortcut";@@ -69,14 +68,15 @@"这种语言还没有可用的声音" = "No voice is available for this language yet";"对方在说话时说的,没有说出去" = "Said while they were talking, so not sent";"你说:%@" = "You said: %@";-"对方听到:%@" = "They hear: %@";+"线上听到:%@" = "People online hear: %@";+"同声传译时说的,对方听到的是译文" = "Said while interpreting; they heard the translation";"戴着耳机" = "Wearing headphones";"和对方同时说的话也会传出去" = "What you say while they talk goes out too";"按声音标出说话人 1、2…,只在这台电脑上处理" = "Labels lines Speaker 1, 2… by voice, on this computer only";"这个版本缺少声纹组件,暂时用不了" = "This build lacks the voiceprint component, so this is unavailable";/* Onboarding and 结束会议 (canvas 知了 Linux · 补齐 Mac); the last two override the Mac's, which say Mac. */"接上 Ling" = "Connect Ling";-"点一下“开始说”或按快捷键说%@,对方听到翻译后的语音。" = "Click “Start speaking” or press the shortcut and speak %@; they hear it translated.";+"点一下“开始说”或按快捷键说%@,线上的人听到翻译后的语音。" = "Click “Start speaking” or press the shortcut and speak %@; people online hear it translated.";"约 1 分钟,会建一个“知了 麦克风”,不用装驱动" = "About a minute; adds a “Cicada Microphone”, no driver to install";"已建好" = "Ready";"已添加" = "Added";diff --git a/linux/strings/ja.lproj/Linux.strings b/linux/strings/ja.lproj/Linux.stringsindex 1c323d5..4c841eb 100644--- a/linux/strings/ja.lproj/Linux.strings+++ b/linux/strings/ja.lproj/Linux.strings@@ -59,7 +59,6 @@"没能建好知了麦克风" = "知了マイクを作成できませんでした";"停止说" = "話すのをやめる";"开始说" = "話し始める";-"正在听你说…" = "あなたの声を聞き取り中…";"知了 · 给会议的声音" = "知了 · 会議向けの音声";"知了 麦克风" = "知了 マイク";"开始 / 停止说的快捷键" = "話す開始 / 停止のショートカット";@@ -69,14 +68,15 @@"这种语言还没有可用的声音" = "この言語で使える音声はまだありません";"对方在说话时说的,没有说出去" = "相手が話している間の発言なので、送っていません";"你说:%@" = "あなた:%@";-"对方听到:%@" = "相手に届く:%@";+"线上听到:%@" = "オンラインの相手に届く:%@";+"同声传译时说的,对方听到的是译文" = "同時通訳中に話した文。相手には翻訳が届きました";"戴着耳机" = "ヘッドホンを使用中";"和对方同时说的话也会传出去" = "相手が話している間の発言も送ります";"按声音标出说话人 1、2…,只在这台电脑上处理" = "声で話者 1、2… を区別します。処理はこのコンピュータ内だけ";"这个版本缺少声纹组件,暂时用不了" = "このビルドには声紋コンポーネントがないため使えません";/* Onboarding and 结束会议 (canvas 知了 Linux · 补齐 Mac); the last two override the Mac's, which say Mac. */"接上 Ling" = "Ling に接続";-"点一下“开始说”或按快捷键说%@,对方听到翻译后的语音。" = "「話す」をクリックするかショートカットを押して%@で話すと、相手には翻訳された音声が届きます。";+"点一下“开始说”或按快捷键说%@,线上的人听到翻译后的语音。" = "「話す」をクリックするかショートカットを押して%@で話すと、オンラインの相手には翻訳された音声が届きます。";"约 1 分钟,会建一个“知了 麦克风”,不用装驱动" = "約 1 分。「知了 マイク」を作ります。ドライバーは不要です";"已建好" = "作成済み";"已添加" = "追加済み";diff --git a/linux/strings/ko.lproj/Linux.strings b/linux/strings/ko.lproj/Linux.stringsindex edd1e49..39f2937 100644--- a/linux/strings/ko.lproj/Linux.strings+++ b/linux/strings/ko.lproj/Linux.strings@@ -59,7 +59,6 @@"没能建好知了麦克风" = "知了 마이크를 만들지 못했습니다";"停止说" = "말하기 중지";"开始说" = "말하기 시작";-"正在听你说…" = "말씀을 듣는 중…";"知了 · 给会议的声音" = "知了 · 회의용 음성";"知了 麦克风" = "知了 마이크";"开始 / 停止说的快捷键" = "말하기 시작 / 중지 단축키";@@ -69,14 +68,15 @@"这种语言还没有可用的声音" = "이 언어에서 사용할 수 있는 음성이 아직 없습니다";"对方在说话时说的,没有说出去" = "상대방이 말하는 중이라 보내지 않았어요";"你说:%@" = "내 말: %@";-"对方听到:%@" = "상대가 듣는 말: %@";+"线上听到:%@" = "온라인 참석자가 듣는 말: %@";+"同声传译时说的,对方听到的是译文" = "동시통역 중에 말한 문장, 상대는 번역을 들었습니다";"戴着耳机" = "헤드폰 사용 중";"和对方同时说的话也会传出去" = "상대방이 말하는 중에 한 말도 보내요";"按声音标出说话人 1、2…,只在这台电脑上处理" = "목소리로 화자 1, 2…를 구분해요. 이 컴퓨터에서만 처리해요";"这个版本缺少声纹组件,暂时用不了" = "이 빌드에는 성문 구성 요소가 없어 사용할 수 없어요";/* Onboarding and 结束会议 (canvas 知了 Linux · 补齐 Mac); the last two override the Mac's, which say Mac. */"接上 Ling" = "Ling 연결";-"点一下“开始说”或按快捷键说%@,对方听到翻译后的语音。" = "“말하기”를 누르거나 단축키를 눌러 %@로 말하면 상대는 번역된 음성을 듣습니다.";+"点一下“开始说”或按快捷键说%@,线上的人听到翻译后的语音。" = "“말하기”를 누르거나 단축키를 눌러 %@로 말하면 온라인 참석자는 번역된 음성을 듣습니다.";"约 1 分钟,会建一个“知了 麦克风”,不用装驱动" = "약 1분. ‘知了 마이크’를 만듭니다. 드라이버 설치는 필요 없습니다";"已建好" = "준비됨";"已添加" = "추가됨";diff --git a/linux/tests/test_core.py b/linux/tests/test_core.pyindex e06c51d..e48dbfd 100644--- a/linux/tests/test_core.py+++ b/linux/tests/test_core.py@@ -1230,7 +1230,7 @@ class Speaking(Base):"# %s\n\n%s · 24 分钟\n\n" % (session_store.display_title(s), when) +"## 纪要\n\n定了周五。\n\n### 00:00 上线时间\n\n讨论日期\n\n- 周五\n\n**为什么推迟?**\n\n- 测试:还没跑完\n\n""### 待办\n\n- [ ] 发说明(你)\n\n### 人名和术语\n\n- **Ling** 模型\n\n## 文字记录\n\n"- "**[00:01] 对方** \nHi\n> 你好\n\n**[00:03] 你** \n我们周五上线\n> We launch on Friday\n\n",+ "**[00:01] 对方** \nHi\n> 你好\n\n**[00:03] 你 · 同传** \n我们周五上线\n> We launch on Friday\n\n",session_store.markdown(s))s.sourceFile = "call.m4a"self.assertIn("**[00:01]** \nHi\n", session_store.markdown(s), "an imported file names nobody")