知了 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: holding the talk key without a virtual mic says so in the subtitle bar or notes window instead of doing nothing
wquguruf9371fcafddb
diff --git a/Sources/Cicada/AppModel.swift b/Sources/Cicada/AppModel.swiftindex 8a59d97..06b05c4 100644--- a/Sources/Cicada/AppModel.swift+++ b/Sources/Cicada/AppModel.swift@@ -312,7 +312,7 @@ final class AppModel: ObservableObject {listen.roomDevice = roomMicroomListen.roomDevice = roomMicapplyVoice()- speak.onStatus = { [weak self] text in self?.status = text }+ speak.onStatus = { [weak self] text in self?.speakNotice(text) }speak.onLive = { [weak self] phase, src, dst inguard let self else { return }self.muteRoomWhileSpeaking(phase)@@ -914,6 +914,21 @@ final class AppModel: ObservableObject {objectWillChange.send()}+ /// Why a press of the talk key went nowhere (no virtual mic, 只听会议室): shown where the eyes+ /// are while it is held, the subtitle bar or the notes window's caption, since nothing shows `status`.+ private func speakNotice(_ text: String) {+ status = text+ debugLog("speak: notice \(text)")+ if speakTester.busy { return }+ if settings.displayMode == "bar" {+ if !overlay.isShown { overlay.show() }+ overlay.setSpeaking(.init(phase: .idle, source: "", translation: text))+ } else if running {+ liveSource = ""+ liveTranslation = text+ }+ }+/// The room mic hears silence while the talk key is down, and a moment after, so your voice/// doesn't come back as the room. The translation goes into the virtual mic, never the speakers,/// so the room is heard again while it is translated and read out.diff --git a/Sources/Cicada/Overlay.swift b/Sources/Cicada/Overlay.swiftindex 5b0510f..128af27 100644--- a/Sources/Cicada/Overlay.swift+++ b/Sources/Cicada/Overlay.swift@@ -602,7 +602,8 @@ final class OverlayView: NSView {switch s.phase {case .listening: label = L("同传 · 你在说… ") + s.sourcecase .translating: label = L("同传 · 翻译中… ") + s.source- case .speaking, .idle: label = L("同传 · 你:") + s.source+ // A notice with nothing said (no virtual mic): just the tag over it.+ case .speaking, .idle: label = s.source.isEmpty ? L("同传") : L("同传 · 你:") + s.source}draw(label, font: srcFont(fs), color: orange.withAlphaComponent(0.8), maxLines: 1)draw(s.translation, font: speakFont(fs), color: orange, maxLines: 2)diff --git a/site/changelog.json b/site/changelog.jsonindex 713a08c..8e15164 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -40,6 +40,14 @@],"title": "深色模式下的主题图标里,知了的眼睛不再黑白颠倒。","text": "深色模式下系统会把图标染成浅色,原来的空心眼睛就成了黑眼珠;现在眼白填满、瞳孔和高光照着彩色图标画。"+ },+ {+ "kind": "fixed",+ "platforms": [+ "mac"+ ],+ "title": "没装虚拟麦克风时按住说话键,字幕条或纪要窗口会提示“还没装虚拟麦克风,线上的人听不到你”,不再按了没反应。",+ "text": "同声传译的译文只送进虚拟麦克风;没装时按键原本只把提示写在一个看不到的地方。"}]},