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: while listening to the Room, Cicada offers to hear the Mac too when a meeting app is in a call

wquguru388d40504f91
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings
index 4f19947..940fe21 100644
--- a/Resources/en.lproj/Localizable.strings
+++ b/Resources/en.lproj/Localizable.strings
@@ -949,6 +949,10 @@
"电脑里 1 分钟没放出声音" = "Nothing has played on this Mac for a minute";
"改听会议室" = "Listen to the room";
"不是" = "No";
+"线上也有人?" = "Anyone online too?";
+"%@ 正在通话" = "%@ is in a call";
+"也听电脑" = "Hear the Mac too";
+"不用" = "No thanks";
"后台转写 %@ · %lld%%" = "Transcribing %@ · %lld%%";
"后台转写 %@ · %lld%%,还有 %lld 个" = "Transcribing %@ · %lld%%, %lld more";
"屏幕上不出字幕,文字记录照常保存" = "Nothing on screen; the transcript is still saved";
diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings
index 306c823..445db99 100644
--- a/Resources/ja.lproj/Localizable.strings
+++ b/Resources/ja.lproj/Localizable.strings
@@ -949,6 +949,10 @@
"电脑里 1 分钟没放出声音" = "1 分間 Mac から音が出ていません";
"改听会议室" = "会議室を聞く";
"不是" = "いいえ";
+"线上也有人?" = "オンラインの参加者も?";
+"%@ 正在通话" = "%@ で通話中";
+"也听电脑" = "Mac も聞く";
+"不用" = "いいえ";
"后台转写 %@ · %lld%%" = "%@ を文字起こし中 · %lld%%";
"后台转写 %@ · %lld%%,还有 %lld 个" = "%@ を文字起こし中 · %lld%%、残り %lld 件";
"屏幕上不出字幕,文字记录照常保存" = "画面には何も出しません。文字起こしは保存されます";
diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.strings
index 6d1e5ff..242c1aa 100644
--- a/Resources/ko.lproj/Localizable.strings
+++ b/Resources/ko.lproj/Localizable.strings
@@ -949,6 +949,10 @@
"电脑里 1 分钟没放出声音" = "1분 동안 Mac에서 소리가 나지 않았어요";
"改听会议室" = "회의실 듣기";
"不是" = "아니요";
+"线上也有人?" = "온라인 참석자도 있나요?";
+"%@ 正在通话" = "%@ 통화 중";
+"也听电脑" = "Mac도 듣기";
+"不用" = "괜찮아요";
"后台转写 %@ · %lld%%" = "%@ 받아쓰는 중 · %lld%%";
"后台转写 %@ · %lld%%,还有 %lld 个" = "%@ 받아쓰는 중 · %lld%%, %lld개 남음";
"屏幕上不出字幕,文字记录照常保存" = "화면에는 표시하지 않고, 대화 기록은 그대로 저장됩니다";
diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.strings
index 4fca3c3..b104697 100644
--- a/Resources/zh-Hans.lproj/Localizable.strings
+++ b/Resources/zh-Hans.lproj/Localizable.strings
@@ -949,6 +949,10 @@
"电脑里 1 分钟没放出声音" = "电脑里 1 分钟没放出声音";
"改听会议室" = "改听会议室";
"不是" = "不是";
+"线上也有人?" = "线上也有人?";
+"%@ 正在通话" = "%@ 正在通话";
+"也听电脑" = "也听电脑";
+"不用" = "不用";
"后台转写 %@ · %lld%%" = "后台转写 %@ · %lld%%";
"后台转写 %@ · %lld%%,还有 %lld 个" = "后台转写 %@ · %lld%%,还有 %lld 个";
"屏幕上不出字幕,文字记录照常保存" = "屏幕上不出字幕,文字记录照常保存";
diff --git a/Sources/Cicada/AppModel.swift b/Sources/Cicada/AppModel.swift
index c71cbeb..327ba86 100644
--- a/Sources/Cicada/AppModel.swift
+++ b/Sources/Cicada/AppModel.swift
@@ -81,8 +81,15 @@ final class AppModel: ObservableObject {
@Published var identifyingLanguage = false
/// 在会议室里开会? in the panel: the Mac has played nothing for a minute of listening.
@Published var roomPrompt = false
+ /// 线上也有人? in the panel: the meeting app on this Mac in a call while listening to the room
+ /// alone; its name for the grey line.
+ @Published var onlinePrompt: String?
+ private var callCheck: (at: Date, name: String?) = (.distantPast, nil)
/// Answered (or 听哪里 changed) in this meeting: not asked again until the next one.
var roomPromptDismissed = false
+ /// 线上也有人? answered this meeting. Its own flag: picking 会议室 by hand answers the question
+ /// above, but a call starting afterwards is still worth asking about.
+ var onlinePromptDismissed = false
/// Why the model 听不出 needed couldn't be had, when that is so.
@Published var modelProblem: ModelProblem?
/// That model was the one to start with and there is none to fall back on: nothing is listening.
@@ -307,12 +314,32 @@ final class AppModel: ObservableObject {
applyToggleKey()
refreshOutputs()
let watch = Timer(timeInterval: 2, repeats: true) { [weak self] _ in
- MainActor.assumeIsolated { self?.watchEnd() }
+ MainActor.assumeIsolated {
+ self?.watchEnd()
+ self?.updateOnlinePrompt()
+ }
}
endTimer = watch
RunLoop.main.add(watch, forMode: .common)
}
+ /// 线上也有人?: from refresh, and from the 2-second watch, since a quiet room may change nothing
+ /// in the engine for a while after a call starts.
+ private func updateOnlinePrompt() {
+ let roomOnly = listen.isRunning && settings.listensToRoom
+ var call: String?
+ if roomOnly, !onlinePromptDismissed, !Recognition.legacy {
+ // refresh runs on every engine change; asking Core Audio who reads the mic is not free.
+ if Date().timeIntervalSince(callCheck.at) >= 2 {
+ callCheck = (Date(), (fakeCalls ?? MicUsers.currentCalls()).sorted { $0.key < $1.key }.first?.value)
+ }
+ call = callCheck.name
+ }
+ let ask = RoomPrompt.asksOnline(roomOnly: roomOnly, bothAvailable: !Recognition.legacy,
+ answered: onlinePromptDismissed, inCall: call != nil) ? call : nil
+ if ask != onlinePrompt { onlinePrompt = ask }
+ }
+
func pickLanguage(_ lang: Lang) { listen.pickLanguage(lang) }
func retryModel() { listen.retryModel() }
func startCloud() { listen.startCloud(); refresh() }
@@ -365,6 +392,7 @@ final class AppModel: ObservableObject {
let roomAsk = listen.isRunning && RoomPrompt.shows(silent: listen.macSilent, answered: roomPromptDismissed,
inCall: listen.macSilent && !(fakeCalls ?? MicUsers.currentCalls()).isEmpty)
if roomAsk != roomPrompt { roomPrompt = roomAsk }
+ updateOnlinePrompt()
if listen.modelProblem != modelProblem { modelProblem = listen.modelProblem }
if listen.blockedByModel != modelBlocked { modelBlocked = listen.blockedByModel }
let notInstalled = !ask.isEmpty && listen.mismatch && ask.allSatisfy { !listen.candidates.contains($0) }
@@ -543,6 +571,7 @@ final class AppModel: ObservableObject {
liveRoom = ("", "", .distantPast)
speechHeard = false
roomPromptDismissed = false
+ onlinePromptDismissed = false
meetingSubtitles = nil
autoEnded = false
endWatch = MeetingEndWatch(config: endConfig, start: Date())
@@ -775,6 +804,13 @@ final class AppModel: ObservableObject {
if room { listenSourceSelection = "room" } else { refresh() }
}
+ /// 也听电脑 / 不用 on the 线上也有人? strip.
+ func answerOnlinePrompt(_ both: Bool) {
+ debugLog("online prompt answered: \(both ? "both" : "no")")
+ onlinePromptDismissed = true
+ if both { listenSourceSelection = "both" } else { refresh() }
+ }
+
/// The room mic hears silence from the talk key going down until the translation has been
/// read out, and a moment after, so neither your voice nor the Mac's comes back as the room.
private func muteRoomWhileSpeaking(_ phase: SpeakEngine.Phase) {
@@ -1503,6 +1539,8 @@ final class AppModel: ObservableObject {
case "source": sourceSelection = arg
case "listenSource": listenSourceSelection = arg
case "roomPrompt": answerRoomPrompt(arg == "room")
+ case "onlinePrompt":
+ if arg == "state" { debugLog("online prompt: \(onlinePrompt ?? "hidden")") } else { answerOnlinePrompt(arg == "both") }
case "open": openMainWindow?()
case "panel": showPanel?()
case "onboarding":
diff --git a/Sources/Cicada/RoomMic.swift b/Sources/Cicada/RoomMic.swift
index 76f07b4..9677d6f 100644
--- a/Sources/Cicada/RoomMic.swift
+++ b/Sources/Cicada/RoomMic.swift
@@ -86,6 +86,14 @@ enum RoomPrompt {
static func shows(silent: Bool, answered: Bool, inCall: Bool) -> Bool {
silent && !answered && !inCall
}
+
+ /// 线上也有人?: listening to the room alone while a meeting app on this Mac is in a call, so
+ /// people online are likely speaking through it. Only where the Mac and the room can be heard
+ /// together (not macOS 14/15), and once a meeting, like the question above. The call is the
+ /// sign, not the Mac's audio: in 会议室 the Mac's audio isn't listened to at all.
+ static func asksOnline(roomOnly: Bool, bothAvailable: Bool, answered: Bool, inCall: Bool) -> Bool {
+ roomOnly && bothAvailable && !answered && inCall
+ }
}
extension AudioDevices {
diff --git a/Sources/Cicada/Views.swift b/Sources/Cicada/Views.swift
index 56105f1..68270a9 100644
--- a/Sources/Cicada/Views.swift
+++ b/Sources/Cicada/Views.swift
@@ -188,6 +188,7 @@ struct MenuPanelView: View {
// In subtitle-bar mode this is where the bar sends you to pick.
if model.running { LanguageNotice(model: model) }
if model.roomPrompt { roomPromptStrip }
+ if let app = model.onlinePrompt { onlinePromptStrip(app) }
AIServiceStrip(model: model, ling: model.ling)
// Right under the header: below the settings it was easy to miss.
UpdateBanner(updates: model.updates, model: model)
@@ -312,6 +313,25 @@ extension MenuPanelView {
}
}
+extension MenuPanelView {
+ /// 线上也有人?: listening to the room while a meeting app here is in a call. Asked once a meeting.
+ func onlinePromptStrip(_ app: String) -> some View {
+ VStack(alignment: .leading, spacing: 10) {
+ VStack(alignment: .leading, spacing: 2) {
+ Text("线上也有人?").font(.system(size: 13, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text(L("\(app) 正在通话")).font(.system(size: 11)).foregroundStyle(Palette.secondary)
+ }
+ HStack(spacing: 8) {
+ SoftButton(L("也听电脑"), dark: true) { model.answerOnlinePrompt(true) }
+ SoftButton(L("不用")) { model.answerOnlinePrompt(false) }
+ Spacer(minLength: 0)
+ }
+ }
+ .padding(12).frame(maxWidth: .infinity, alignment: .leading)
+ .background(RoundedRectangle(cornerRadius: 11).fill(Palette.accentPale))
+ }
+}
+
/// Under the panel's status: the file being transcribed in the background, if any.
struct PanelImportLine: View {
@ObservedObject var importer: FileImporter
diff --git a/site/changelog.json b/site/changelog.json
index bc32441..8b2a568 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -69,6 +69,14 @@
],
"title": "电脑和会议室的会议里,每句话标出是“现场”还是“线上”。",
"text": "实时纪要和会议记录里都有;会议列表用麦克风和显示器两个图标标出这种会议,详情顶部写“电脑和会议室”。"
+ },
+ {
+ "kind": "new",
+ "platforms": [
+ "mac"
+ ],
+ "title": "听会议室时会议软件开始通话,知了会问要不要也听电脑。",
+ "text": "点“也听电脑”就改成电脑和会议室,同一场会议接着记;一场只问一次,macOS 14/15 不问。"
}
]
},