知了 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
fix(windows): if VB-Cable goes away while you hold the talk key, Cicada says nothing was sent instead of Sent to meeting, and keeps the line out of the record
wquguru8cabc92ebbe4
diff --git a/site/changelog.json b/site/changelog.jsonindex 79e2afb..e24767b 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -24,6 +24,14 @@],"title": "同声传译说出去的话在字幕、会议记录和导出里标成“同传”;Mac 上译文只送给线上的人,不再从扬声器放给屋里。","text": "按住说话键说的那句,字幕条上写“同传 · 你在说…”,会议记录里写“你 同传”,导出的记录也带上“同传”。屋里的人已经听到你的原话,扬声器再念一遍译文只会叠在一起,所以 Mac 的同声传译只送进虚拟麦克风;没装虚拟麦克风时按键会提示,不会改从扬声器放。Mac 上打开麦克风时,桌边只在你按住说话键的那几秒暂停收音,不再等译文念完。Android 的面对面照旧由手机念出译文。"+ },+ {+ "kind": "fixed",+ "platforms": [+ "windows"+ ],+ "title": "按住说话键途中 VB-Cable 没了时,提示“没有虚拟麦克风 · 没有说出去”,不再显示“对方已听到”,也不把这句记进记录。",+ "text": "译文没有地方放时什么声音都不出,也不会改从扬声器放。"}]},diff --git a/windows/src/Cicada.Core/Speak.cs b/windows/src/Cicada.Core/Speak.csindex f92614b..3aec24b 100644--- a/windows/src/Cicada.Core/Speak.cs+++ b/windows/src/Cicada.Core/Speak.cs@@ -10,6 +10,8 @@ public interface ISpeechSinkvoid Begin(int rate);void Write(byte[] pcm);Task End();+ /// Whether there is somewhere to play: the virtual mic can go away between the press and the voice.+ bool Ready => true;}/// Windows' own voice, for when the AI service's can't speak: 16-bit mono PCM, or null.@@ -183,6 +185,8 @@ public sealed class SpeakEngine// Ming didn't translate it: the text translator gets one try; failing that, silence.if (text is null && heard.Lang != to) text = await translator.Translate(heard.Original, heard.Lang, to, Translator.Kind.Sentence, Priority.Speak);if (string.IsNullOrWhiteSpace(text)) return Fail(Strings.L("这句没翻译成 · 没有说出去"));+ // The virtual mic went away during the press: no voice at all, and never the speakers.+ if (!sink.Ready) return Fail(Strings.L("没有虚拟麦克风 · 没有说出去"));var translatedAt = DateTime.UtcNow;Heard = text;State = Phase.Speaking;diff --git a/windows/src/Cicada/Wasapi.cs b/windows/src/Cicada/Wasapi.csindex 3c1e5c3..b6148f0 100644--- a/windows/src/Cicada/Wasapi.cs+++ b/windows/src/Cicada/Wasapi.cs@@ -269,6 +269,8 @@ sealed class DeviceSpeaker : ISpeechSinkpublic DeviceSpeaker(Func<Endpoints.Device?> device) { this.device = device; }+ public bool Ready => device() is not null;+public void Begin(int rate){this.rate = rate;