Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

feat(windows): what you say with the talk key is marked Interpreted in the notes, records and export

wqugurud2033ea91f45
diff --git a/windows/src/Cicada.Core/SessionStore.cs b/windows/src/Cicada.Core/SessionStore.cs
index a0eac87..e025b56 100644
--- a/windows/src/Cicada.Core/SessionStore.cs
+++ b/windows/src/Cicada.Core/SessionStore.cs
@@ -247,7 +247,8 @@ public sealed class SessionStore
var names = SpeakerLabels.Names(s);
foreach (var l in s.Lines.OrderBy(x => x.T))
{
- var who = l.Speaker == "me" ? Strings.L("你") : numbers.TryGetValue(l.Id, out var num) ? names.GetValueOrDefault(num) ?? Strings.LF("说话人 %lld", num) : null;
+ // Your own lines (the talk key) say so: what the meeting heard was their translation (同传).
+ var who = l.Speaker == "me" ? Strings.L("你 · 同传") : numbers.TryGetValue(l.Id, out var num) ? names.GetValueOrDefault(num) ?? Strings.LF("说话人 %lld", num) : null;
b.AppendLine($"**{Languages.Clock(l.T)}**{(who is null ? "" : $" {who}:")} {l.Src} ");
if (!string.IsNullOrEmpty(l.Dst) && l.Dst != l.Src) b.AppendLine($"{l.Dst}");
b.AppendLine();
diff --git a/windows/src/Cicada/MainWindow.cs b/windows/src/Cicada/MainWindow.cs
index f3a0be8..cf72754 100644
--- a/windows/src/Cicada/MainWindow.cs
+++ b/windows/src/Cicada/MainWindow.cs
@@ -258,7 +258,7 @@ sealed class MainWindow : Window
(ling.Config.IsLing ? L("接上 Ling") : LF("接上 %@", ling.Config.Name), broken ?? (key ? L("key 已加密存在这台电脑上") : L("识别、翻译和纪要都靠它,约 1 分钟")), key),
(L("听一下电脑里的声音"), L("放一段测试声音,看音量条动起来"), audio),
(L("看看效果"), L("一段 9 秒的英文会议,字幕和纪要一句句出来"), sample),
- (L("同声传译"), LF("按住%@说话,对方听到翻译后的声音", PushToTalk.Label), false),
+ (L("同声传译"), LF("按住%@说话,线上的人听到翻译后的声音", PushToTalk.Label), false),
];
var list = new StackPanel();
for (int i = 0; i < steps.Length; i++)
diff --git a/windows/src/Cicada/NotesWindow.cs b/windows/src/Cicada/NotesWindow.cs
index 8f272c0..891d2ad 100644
--- a/windows/src/Cicada/NotesWindow.cs
+++ b/windows/src/Cicada/NotesWindow.cs
@@ -378,7 +378,7 @@ sealed class NotesWindow : Window
{
var lines = app.Store.Get(listen.SessionId!)?.Lines ?? [];
var number = app.Settings.SpeakerVoices && line.Speaker == "them" && SpeakerLabels.Numbers(lines).TryGetValue(line.Id, out var n) ? n : (int?)null;
- var who = line.Speaker == "me" ? L("你") : number is { } k ? LF("说话人 %lld", k) : Ui.SpokenName(line.SrcLang);
+ var who = line.Speaker == "me" ? L("你 · 同传") : number is { } k ? LF("说话人 %lld", k) : Ui.SpokenName(line.SrcLang);
var whoRow = Ui.Row(8, Ui.Text(who, 12, NightAccent, wrap: false));
whoRow.Children.Add(Gap(Ui.Text(listen.Listening && listen.Pending > 0 ? L("正在说") : Languages.Clock(line.T), 12, Palette.NightText, wrap: false), 8));
stack.Children.Add(whoRow);
@@ -614,7 +614,7 @@ sealed class NotesWindow : Window
}
var head = Ui.Row(8, time);
if (place) head.Children.Insert(0, PlaceTag(l));
- if (who is not null) head.Children.Insert(0, Ui.Text(who, 12, ink ?? Palette.Secondary, wrap: false));
+ if (who is not null) head.Children.Insert(0, l.Speaker == "me" ? MeTag(who, ink) : Ui.Text(who, 12, ink ?? Palette.Secondary, wrap: false));
for (int i = 1; i < head.Children.Count; i++) ((FrameworkElement)head.Children[i]).Margin = new Thickness(i == 1 && place && who is not null ? 6 : 8, 0, 0, 0);
text.Children.Add(head);
var translated = !string.IsNullOrEmpty(l.Dst) && l.Dst != l.Src;
@@ -623,6 +623,20 @@ sealed class NotesWindow : Window
return text;
}
+ /// Your own line (SpeakerViews.swift › MeTag): said with the talk key, so what the other side
+ /// heard was its translation; 你 and an outlined 同传.
+ static FrameworkElement MeTag(string who, Brush? ink)
+ {
+ var tag = Ui.Row(5, Ui.Text(who, 12, ink ?? Palette.AccentText, FontWeights.SemiBold, wrap: false), new Border
+ {
+ BorderBrush = new SolidColorBrush(Color.FromArgb(0x73, 0xE8, 0x55, 0x2B)), BorderThickness = new Thickness(1),
+ CornerRadius = new CornerRadius(4), Padding = new Thickness(5, 0, 5, 1), VerticalAlignment = VerticalAlignment.Center,
+ Child = Ui.Text(L("同传"), 10, Palette.AccentText, wrap: false),
+ });
+ tag.ToolTip = L("按住说话键说的,对方听到的是译文");
+ return tag;
+ }
+
/// 现场 / 线上 (SpeakerViews.swift › PlaceTag): the room's filled, the PC's outlined.
internal static FrameworkElement PlaceTag(TranscriptLine l)
{
@@ -697,7 +711,7 @@ sealed class NotesWindow : Window
else
{
var number = app.Settings.SpeakerVoices && line.Speaker == "them" && SpeakerLabels.Numbers(session!.Lines).TryGetValue(line.Id, out var n) ? n : (int?)null;
- var who = line.Speaker == "me" ? L("你") : number is { } k ? LF("说话人 %lld", k) : null;
+ var who = line.Speaker == "me" ? L("你 · 同传") : number is { } k ? LF("说话人 %lld", k) : null;
var top = new TextBlock { FontFamily = Palette.Font, FontSize = 13, TextTrimming = TextTrimming.CharacterEllipsis, Foreground = Palette.NightText };
if (who is not null) top.Inlines.Add(new System.Windows.Documents.Run(who + " ") { Foreground = NightAccent });
if (line.Dst is not null && line.Dst != line.Src) top.Inlines.Add(new System.Windows.Documents.Run(line.Src));
diff --git a/windows/src/Cicada/Onboarding.cs b/windows/src/Cicada/Onboarding.cs
index 46f29d7..e96836f 100644
--- a/windows/src/Cicada/Onboarding.cs
+++ b/windows/src/Cicada/Onboarding.cs
@@ -601,7 +601,7 @@ sealed class Onboarding : Window
Numbered(Disc(3), L("按住说一句试试"), L("松开后约 2 秒,对方就会听到译文"), key, tried is Border ? null : tried),
},
});
- return Page(L("要让对方听懂你说的话吗?"), LF("按住%@说话,对方在会议里听到翻译后的声音。不需要可以跳过。", PushToTalk.Label), card);
+ return Page(L("线上开会时要说外语吗?"), LF("按住%@说话,线上的人听到翻译后的声音。不需要可以跳过。", PushToTalk.Label), card);
}
void SpeakChanged() => Dispatcher.BeginInvoke(() => { if (step == 3 && IsLoaded) page.Content = SpeakStep(); });
diff --git a/windows/src/Cicada/SettingsWindow.cs b/windows/src/Cicada/SettingsWindow.cs
index 91c8e3f..65da47d 100644
--- a/windows/src/Cicada/SettingsWindow.cs
+++ b/windows/src/Cicada/SettingsWindow.cs
@@ -267,11 +267,11 @@ sealed class SettingsWindow : Window
var mine = Languages.Sources.FirstOrDefault(x => x.Code == Languages.FromSystem(System.Globalization.CultureInfo.CurrentUICulture.Name))?.Name ?? "";
yield return Label(L("说话"));
yield return Group(
- Card(null, L("按住说话"), LF("按住%@说话,对方听到的是翻译后的声音", PushToTalk.Label), Ui.Keycap(PushToTalk.Label, big: true)),
+ Card(null, L("按住说话"), LF("按住%@说话,线上的人听到的是翻译后的声音", PushToTalk.Label), Ui.Keycap(PushToTalk.Label, big: true)),
Card(null, L("我说的语言"), null, Ui.Choice([("system", LF("跟随系统(%@)", mine)), .. Languages.Sources.Select(x => (x.Code, x.Name))], s.SpeakFrom, v => { s.SpeakFrom = v; Save(); Render(); })),
- Card(null, L("对方听到的语言"), s.SpeakTo == "room" ? LF("现在是 %@", Ui.TargetName(target)) : null,
+ Card(null, L("线上的人听到的语言"), s.SpeakTo == "room" ? LF("现在是 %@", Ui.TargetName(target)) : null,
Ui.Choice([("room", L("对方说的语言")), .. Languages.Targets.Select(t => (t.Code, t.Name))], s.SpeakTo, v => { s.SpeakTo = v; Save(); Render(); })),
- Card(null, LF("对方听到的声音(%@)", Ui.TargetName(target)), null, voice));
+ Card(null, LF("线上的人听到的声音(%@)", Ui.TargetName(target)), null, voice));
yield return Label(L("麦克风"));
yield return Group(
Card(null, L("译文送进会议"), cable ? L("在会议软件里把麦克风选成 CABLE Output") : L("需要装免费的 VB-Cable;装的时候 Windows 会请你确认"), cableControl));
diff --git a/windows/src/Cicada/Strings/en.lproj/Windows.strings b/windows/src/Cicada/Strings/en.lproj/Windows.strings
index e1ef296..0fcdc9d 100644
--- a/windows/src/Cicada/Strings/en.lproj/Windows.strings
+++ b/windows/src/Cicada/Strings/en.lproj/Windows.strings
@@ -43,8 +43,8 @@
"安装没有完成,可以重启电脑后再试。" = "Installation didn't finish. Restart your PC and try again.";
"对方会听到%@" = "Others will hear %@";
"对方可见" = "Visible to others";
-"对方听到的声音(%@)" = "Voice others hear (%@)";
-"对方听到的语言" = "Language others hear";
+"线上的人听到的声音(%@)" = "Voice people online hear (%@)";
+"线上的人听到的语言" = "Language people online hear";
"对方已听到" = "Sent to meeting";
"就绪 · Ling 已连接" = "Ready · Connected to Ling";
"屏幕共享里看不到" = "Hidden from screen sharing";
@@ -59,7 +59,7 @@
"打开文件夹" = "Open folder";
"打开设置" = "Settings";
"按住%@说话" = "Hold %@ to speak";
-"按住%@说话,对方听到的是翻译后的声音" = "Hold %@ to speak. Others hear the translated voice.";
+"按住%@说话,线上的人听到的是翻译后的声音" = "Hold %@ to speak. People online hear the translated voice.";
"按声音标出说话人 1、2…,只在这台电脑上处理" = "Labels lines Speaker 1, 2… by voice, on this PC only";
"换成字幕条" = "Switch to subtitle bar";
"换成纪要" = "Switch to notes";
@@ -148,8 +148,7 @@
"Teams、Zoom、腾讯会议都在“音频设置”里" = "In Teams, Zoom and Tencent Meeting it's under audio settings";
"按住说一句试试" = "Hold it and say something";
"松开后约 2 秒,对方就会听到译文" = "About 2 seconds after you let go, the room hears the translation";
-"要让对方听懂你说的话吗?" = "Want the room to understand you?";
-"按住%@说话,对方在会议里听到翻译后的声音。不需要可以跳过。" = "Hold %@ and speak; the meeting hears you translated. Skip it if you don't need it.";
+"按住%@说话,线上的人听到翻译后的声音。不需要可以跳过。" = "Hold %@ and speak; people online hear you translated. Skip it if you don't need it.";
"打开任务栏设置" = "Open taskbar settings";
"拖不动?在任务栏设置里打开“知了”" = "Can't drag it? Turn on Cicada in taskbar settings";
"在哪儿都能用" = "Works from anywhere";
@@ -165,7 +164,6 @@
"VB-Cable 已装好" = "VB-Cable installed";
"译文送进会议" = "Send the translation into the meeting";
"没在听" = "Not listening";
-"对方听得到" = "The room can hear you";
"去设置" = "Settings";
"听电脑里的声音" = "Hear this PC's audio";
"让知了听到电脑里的声音" = "Let Cicada hear your PC";
@@ -223,7 +221,7 @@
"听一下电脑里的声音" = "Check your PC's sound";
"放一段测试声音,看音量条动起来" = "Play a test sound and watch the meter move";
"一段 9 秒的英文会议,字幕和纪要一句句出来" = "A 9-second English meeting, with subtitles and notes as they come";
-"按住%@说话,对方听到翻译后的声音" = "Hold %@ to speak; they hear the translation";
+"按住%@说话,线上的人听到翻译后的声音" = "Hold %@ to speak; people online hear the translation";
"可选" = "Optional";
"继续设置" = "Continue setup";
"还差 %@ 步" = "%@ to go";
diff --git a/windows/src/Cicada/Strings/ja.lproj/Windows.strings b/windows/src/Cicada/Strings/ja.lproj/Windows.strings
index 8ac8d9a..80801a7 100644
--- a/windows/src/Cicada/Strings/ja.lproj/Windows.strings
+++ b/windows/src/Cicada/Strings/ja.lproj/Windows.strings
@@ -43,8 +43,8 @@
"安装没有完成,可以重启电脑后再试。" = "インストールが完了しませんでした。PC を再起動してからもう一度お試しください。";
"对方会听到%@" = "相手には%@で聞こえます";
"对方可见" = "相手に表示中";
-"对方听到的声音(%@)" = "相手に聞こえる声(%@)";
-"对方听到的语言" = "相手に聞こえる言語";
+"线上的人听到的声音(%@)" = "オンラインの相手に聞こえる声(%@)";
+"线上的人听到的语言" = "オンラインの相手に聞こえる言語";
"对方已听到" = "相手に届きました";
"就绪 · Ling 已连接" = "準備完了 · Ling 接続済み";
"屏幕共享里看不到" = "画面共有には映りません";
@@ -59,7 +59,7 @@
"打开文件夹" = "フォルダーを開く";
"打开设置" = "設定";
"按住%@说话" = "%@ を押しながら話す";
-"按住%@说话,对方听到的是翻译后的声音" = "%@ を押しながら話すと、相手には翻訳された声が届きます";
+"按住%@说话,线上的人听到的是翻译后的声音" = "%@ を押しながら話すと、オンラインの相手には翻訳された声が届きます";
"按声音标出说话人 1、2…,只在这台电脑上处理" = "声で話者 1、2… を表示します。処理はこの PC の中だけです";
"换成字幕条" = "字幕バーに切り替え";
"换成纪要" = "メモに切り替え";
@@ -148,8 +148,7 @@
"Teams、Zoom、腾讯会议都在“音频设置”里" = "Teams、Zoom、Tencent Meeting では「オーディオ設定」にあります";
"按住说一句试试" = "押しながら話してみる";
"松开后约 2 秒,对方就会听到译文" = "離して約2秒で、相手に翻訳が聞こえます";
-"要让对方听懂你说的话吗?" = "相手にあなたの言葉を伝えますか?";
-"按住%@说话,对方在会议里听到翻译后的声音。不需要可以跳过。" = "%@ を押しながら話すと、会議では翻訳された声が流れます。不要ならスキップできます。";
+"按住%@说话,线上的人听到翻译后的声音。不需要可以跳过。" = "%@ を押しながら話すと、オンラインの相手には翻訳された声が届きます。不要ならスキップできます。";
"打开任务栏设置" = "タスクバーの設定を開く";
"拖不动?在任务栏设置里打开“知了”" = "ドラッグできない?タスクバーの設定で Cicada をオンに";
"在哪儿都能用" = "どこからでも";
@@ -165,7 +164,6 @@
"VB-Cable 已装好" = "VB-Cable 導入済み";
"译文送进会议" = "翻訳を会議に流す";
"没在听" = "聞いていません";
-"对方听得到" = "相手に聞こえます";
"去设置" = "設定へ";
"听电脑里的声音" = "PC の音声を聞く";
"让知了听到电脑里的声音" = "Cicada に PC の音を聞かせる";
@@ -223,7 +221,7 @@
"听一下电脑里的声音" = "PC の音を確認";
"放一段测试声音,看音量条动起来" = "テスト音を流してメーターが動くか確認";
"一段 9 秒的英文会议,字幕和纪要一句句出来" = "9 秒の英語の会議で、字幕とメモが出てくる様子を確認";
-"按住%@说话,对方听到翻译后的声音" = "%@ を押しながら話すと、相手には翻訳された音声が届きます";
+"按住%@说话,线上的人听到翻译后的声音" = "%@ を押しながら話すと、オンラインの相手には翻訳された音声が届きます";
"可选" = "任意";
"继续设置" = "設定を続ける";
"还差 %@ 步" = "あと %@ ステップ";
diff --git a/windows/src/Cicada/Strings/ko.lproj/Windows.strings b/windows/src/Cicada/Strings/ko.lproj/Windows.strings
index 18757bc..4c1e221 100644
--- a/windows/src/Cicada/Strings/ko.lproj/Windows.strings
+++ b/windows/src/Cicada/Strings/ko.lproj/Windows.strings
@@ -43,8 +43,8 @@
"安装没有完成,可以重启电脑后再试。" = "설치가 완료되지 않았습니다. PC를 다시 시작한 후 다시 시도해 보세요.";
"对方会听到%@" = "상대방에게 %@(으)로 들립니다";
"对方可见" = "상대방에게 보임";
-"对方听到的声音(%@)" = "상대방에게 들리는 목소리(%@)";
-"对方听到的语言" = "상대방에게 들리는 언어";
+"线上的人听到的声音(%@)" = "온라인 참석자에게 들리는 목소리(%@)";
+"线上的人听到的语言" = "온라인 참석자에게 들리는 언어";
"对方已听到" = "상대방에게 전달됨";
"就绪 · Ling 已连接" = "준비됨 · Ling 연결됨";
"屏幕共享里看不到" = "화면 공유에 표시되지 않음";
@@ -59,7 +59,7 @@
"打开文件夹" = "폴더 열기";
"打开设置" = "설정";
"按住%@说话" = "%@ 키를 누른 채 말하기";
-"按住%@说话,对方听到的是翻译后的声音" = "%@ 키를 누른 채 말하면 상대방에게는 번역된 목소리가 들립니다";
+"按住%@说话,线上的人听到的是翻译后的声音" = "%@ 키를 누른 채 말하면 온라인 참석자에게는 번역된 목소리가 들립니다";
"按声音标出说话人 1、2…,只在这台电脑上处理" = "목소리로 화자 1, 2…를 표시해요. 이 PC에서만 처리해요";
"换成字幕条" = "자막 바로 전환";
"换成纪要" = "회의록으로 전환";
@@ -148,8 +148,7 @@
"Teams、Zoom、腾讯会议都在“音频设置”里" = "Teams, Zoom, Tencent Meeting 모두 '오디오 설정'에 있어요";
"按住说一句试试" = "누른 채로 한마디 해 보세요";
"松开后约 2 秒,对方就会听到译文" = "떼고 약 2초 뒤 상대가 번역을 들어요";
-"要让对方听懂你说的话吗?" = "상대가 내 말을 알아듣게 할까요?";
-"按住%@说话,对方在会议里听到翻译后的声音。不需要可以跳过。" = "%@ 키를 누른 채 말하면 회의에서는 번역된 목소리가 들려요. 필요 없으면 건너뛰세요.";
+"按住%@说话,线上的人听到翻译后的声音。不需要可以跳过。" = "%@ 키를 누른 채 말하면 온라인 참석자에게 번역된 목소리가 들려요. 필요 없으면 건너뛰세요.";
"打开任务栏设置" = "작업 표시줄 설정 열기";
"拖不动?在任务栏设置里打开“知了”" = "드래그가 안 되나요? 작업 표시줄 설정에서 Cicada를 켜세요";
"在哪儿都能用" = "어디서나";
@@ -165,7 +164,6 @@
"VB-Cable 已装好" = "VB-Cable 설치됨";
"译文送进会议" = "번역을 회의로 보내기";
"没在听" = "듣고 있지 않음";
-"对方听得到" = "상대에게 들려요";
"去设置" = "설정으로";
"听电脑里的声音" = "PC 소리 듣기";
"让知了听到电脑里的声音" = "Cicada가 PC 소리를 듣게 하세요";
@@ -223,7 +221,7 @@
"听一下电脑里的声音" = "PC 소리 확인하기";
"放一段测试声音,看音量条动起来" = "테스트 소리를 틀고 미터가 움직이는지 확인";
"一段 9 秒的英文会议,字幕和纪要一句句出来" = "9초짜리 영어 회의로 자막과 회의록이 나오는 모습을 확인";
-"按住%@说话,对方听到翻译后的声音" = "%@ 키를 누르고 말하면 상대는 번역된 음성을 들어요";
+"按住%@说话,线上的人听到翻译后的声音" = "%@ 키를 누르고 말하면 온라인 참석자는 번역된 음성을 들어요";
"可选" = "선택";
"继续设置" = "설정 계속하기";
"还差 %@ 步" = "%@단계 남음";
diff --git a/windows/src/Cicada/TrayFlyout.cs b/windows/src/Cicada/TrayFlyout.cs
index d8e341b..4cdde39 100644
--- a/windows/src/Cicada/TrayFlyout.cs
+++ b/windows/src/Cicada/TrayFlyout.cs
@@ -173,7 +173,7 @@ sealed class TrayFlyout : Window
stack.Children.Add(Rule());
var cable = Endpoints.Cable() is not null;
var speakState = s.Speak && cable && app.Ling.HasKey
- ? (UIElement)Ui.Text(L("对方听得到"), 12, Palette.Success, wrap: false)
+ ? (UIElement)Ui.Text(L("线上的人听得到你"), 12, Palette.Success, wrap: false)
: Ui.LinkText(s.Speak ? L("去设置") : L("打开"), () => Do(app.ShowSettings), 12);
stack.Children.Add(Ui.Spread(Ui.Text(L("同声传译"), 14, Palette.Ink, Palette.Strong, wrap: false), speakState));
var talk = Ui.Row(12, Ui.Keycap(PushToTalk.Label, big: false), Ui.Stack(1,
diff --git a/windows/tests/Cicada.Tests/Program.cs b/windows/tests/Cicada.Tests/Program.cs
index e36b051..d46b79f 100644
--- a/windows/tests/Cicada.Tests/Program.cs
+++ b/windows/tests/Cicada.Tests/Program.cs
@@ -296,6 +296,17 @@ static class Tests
Check(SessionStore.Markdown(s).Split('\n')[0].TrimEnd() == "# 我的会", "the export is headed by the shown title");
}
+ public static void ExportMarksTalkKeyLinesAsInterpreted()
+ {
+ // TranscriptExport.speakerName on the Mac: a "me" line was said with the talk key (同传).
+ var s = new Session { Title = "会议 1月1日 10:00", StartedAt = DateTimeOffset.Now, Lines =
+ [new TranscriptLine { Id = "h1-1", T = 1, Src = "Can we ship?", Dst = "能发布吗?", SrcLang = "en", DstLang = "zh-CN" },
+ new TranscriptLine { Id = "m1", T = 5, Speaker = "me", Src = "可以", Dst = "Yes", SrcLang = "zh-CN", DstLang = "en" }] };
+ var md = SessionStore.Markdown(s);
+ Check(md.Contains("你 · 同传: 可以"), "my line says it was interpreted");
+ Check(md.Split('\n').Count(x => x.Contains("同传")) == 1, "only my line");
+ }
+
public static void KeepsTheMacsImportAndRoomFields()
{
// A Mac record of an imported room recording (a line by the room mic), plus a key no version knows yet.
@@ -1368,6 +1379,7 @@ static class Tests
public void Begin(int rate) => Rate = rate;
public void Write(byte[] pcm) => Chunks.Add(pcm);
public Task End() => Task.CompletedTask;
+ public bool Ready { get; init; } = true;
}
sealed class NoVoice : ISystemVoice
@@ -1440,6 +1452,14 @@ static class Tests
var e2 = Speaker(Client(echo), voice2, new AppSettings { SpeakFrom = "zh-CN" });
Check(await e2.Speak(Wav.Bytes(Tone(1)), quiet) is null, "no translation, nothing said");
Check(quiet.Chunks.Count == 0 && voice2.Calls == 0 && e2.State == SpeakEngine.Phase.Failed, "and no voice at all");
+
+ // The virtual mic went away during the press: nothing is played anywhere (never the speakers).
+ var gone = new Sink { Ready = false };
+ var voice3 = new NoVoice();
+ var e3 = Speaker(Client(fake), voice3, new AppSettings { SpeakFrom = "zh-CN" });
+ Check(await e3.Speak(Wav.Bytes(Tone(1)), gone) is null, "no virtual mic, nothing said");
+ Check(gone.Chunks.Count == 0 && voice3.Calls == 0 && e3.State == SpeakEngine.Phase.Failed, "and no voice at all");
+ Equal("没有虚拟麦克风 · 没有说出去", e3.Problem, "the bar says why");
}
finally { LingClient.Spacing = old; }
}