知了 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(windows): the bar shown while you hold the talk key is marked Interpreted too, as in the notes and records
wquguru0eac772bab10
diff --git a/site/changelog.json b/site/changelog.jsonindex e35df44..5e9a9ed 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -80,6 +80,14 @@],"title": "按住说话键说的话很长时,底部提示条右边的“正在说给对方听…”“对方已听到”不再被挤出边外。","text": "长句子会换行,状态始终留在提示条右边。"+ },+ {+ "kind": "improved",+ "platforms": [+ "windows"+ ],+ "title": "按住说话键时,屏幕底部的提示条也标上“同传”,和纪要、会议记录里一样。",+ "text": "从“正在听你说”到“对方已听到”,提示条上都带着“同传”,一眼看出对方听到的是译文。"}]},diff --git a/windows/src/Cicada/SpeakBar.cs b/windows/src/Cicada/SpeakBar.csindex 1bca0ae..a0c55f7 100644--- a/windows/src/Cicada/SpeakBar.cs+++ b/windows/src/Cicada/SpeakBar.cs@@ -47,17 +47,17 @@ sealed class SpeakBar : Windowswitch (s.State){case SpeakEngine.Phase.Recording:- content = Ui.Row(12, Key(true), Wave(), Ui.Text(L("正在听你说 · 松开发送"), 14, Brushes.White, FontWeights.Bold, wrap: false), target);+ content = Ui.Row(12, Key(true), Interpreted(), Wave(), Ui.Text(L("正在听你说 · 松开发送"), 14, Brushes.White, FontWeights.Bold, wrap: false), target);break;case SpeakEngine.Phase.Translating:- content = Ui.Row(12, Key(false), Ui.Text(L("正在翻译…"), 14, Brushes.White, FontWeights.Bold, wrap: false), target);+ content = Ui.Row(12, Key(false), Interpreted(), Ui.Text(L("正在翻译…"), 14, Brushes.White, FontWeights.Bold, wrap: false), target);break;case SpeakEngine.Phase.Speaking or SpeakEngine.Phase.Idle when s.Heard is not null:var said = new StackPanel { VerticalAlignment = VerticalAlignment.Center, MaxWidth = 480 };if (s.Said is not null) said.Children.Add(Ui.Text(s.Said, 12, Palette.NightText));said.Children.Add(Gap(Ui.Text(s.Heard!, 15, Brushes.White, FontWeights.Bold), s.Said is null ? 0 : 2));var done = Ui.Text(s.State == SpeakEngine.Phase.Speaking ? L("正在说给对方听…") : L("对方已听到"), 12, Palette.NightText, wrap: false);- content = Fill(Key(false), said, done);+ content = Fill(Ui.Row(12, Key(false), Interpreted()), said, done);if (s.State == SpeakEngine.Phase.Idle) hide.Start();break;case SpeakEngine.Phase.Failed:@@ -83,6 +83,15 @@ sealed class SpeakBar : WindowChild = Ui.Text(PushToTalk.Label, 13, Brushes.White, FontWeights.Bold, wrap: false),};+ /// 同传, outlined like the notes' MeTag: what goes out is the translation, as the Mac's subtitle+ /// bar says with 同传 · 你在说….+ static FrameworkElement Interpreted() => new Border+ {+ BorderBrush = new SolidColorBrush(Color.FromArgb(0x99, 0xFF, 0x8A, 0x5C)), BorderThickness = new Thickness(1),+ CornerRadius = new CornerRadius(4), Padding = new Thickness(5, 0, 5, 1), VerticalAlignment = VerticalAlignment.Center,+ Child = Ui.Text(L("同传"), 11, new SolidColorBrush(Color.FromRgb(0xFF, 0x8A, 0x5C)), wrap: false),+ };+/// A still level mark: an animated one would redraw this software-rendered window every frame.static FrameworkElement Wave(){