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: pick which microphone hears the room from the arrow beside Turn on mic

wquguru170124157bb8
diff --git a/README.en.md b/README.en.md
index a48ff58..c636e0f 100644
--- a/README.en.md
+++ b/README.en.md
@@ -58,7 +58,7 @@ Cicada detects the spoken language within seconds and translates it into your sy
### In-person and hybrid meetings
-In a meeting room, click **Turn on mic** to listen to people around the table. Hybrid meetings use the exact same button: computer audio is marked **Online** and microphone audio is marked **In room**, combined in a single record (on macOS 14 and 15, turning on the mic listens only to the table). When speaker audio bleeds into the microphone, Cicada automatically ducks and deduplicates it so nothing is recorded twice; with headphones on, both sides can talk at once and both are kept. Windows and Linux follow the same rules.
+In a meeting room, click **Turn on mic** to listen to people around the table. Hybrid meetings use the exact same button: computer audio is marked **Online** and microphone audio is marked **In room**, combined in a single record (on macOS 14 and 15, turning on the mic listens only to the table). When speaker audio bleeds into the microphone, Cicada automatically ducks and deduplicates it so nothing is recorded twice; with headphones on, both sides can talk at once and both are kept. Windows and Linux follow the same rules. On the Mac, the small arrow beside the button picks which microphone hears the room (an iPhone or a conference mic, say) without changing the system default.
### Simultaneous interpreting
@@ -177,7 +177,3 @@ See [AGENTS.md](AGENTS.md) for code architecture. The website source is in `site
## License
This project is licensed under [Apache-2.0](LICENSE). The BlackHole 2ch virtual microphone driver is licensed under the GPL; it is not bundled in the installer and is downloaded from its official URL when you click install. The bundled voiceprint model is [WeSpeaker](https://github.com/wenet-e2e/wespeaker)'s ResNet34-LM trained on VoxCeleb (CC BY 4.0), converted to Core ML by `scripts/convert-voiceprint.py`.
-
-## Meeting audio input
-
-Choose a meeting input in Settings → General: an iPhone Continuity microphone, AirPods, or another physical input exposed by macOS. This does not change the system default. Turn the meeting microphone off before switching. Automatic mode still favors room microphones; disconnected inputs use the existing fallback and notice. Continuity requires Apple's supported devices/account/network setup. AirPods primarily capture the wearer's voice.
diff --git a/README.ja.md b/README.ja.md
index aec8ece..26f0086 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -58,7 +58,7 @@ AI サービスをつなぐと、聞き間違えた人名や用語をその場
### 対面・ハイブリッド会議
-会議室では「マイクをオン」をクリックすると、テーブルの周りの声を聞き取れます。オンラインと対面が混ざるハイブリッド会議も同じボタンひとつで対応し、PC の音は「オンライン」、マイクは「会議室」として同じ記録にまとめます(macOS 14 と 15 ではマイクがオンの間は会議室のみを聞き取ります)。スピーカーの音がマイクに入っても自動で回避・重複除外するため二重に記録されず、イヤホン使用時は双方が同時に話しても両方記録されます。Windows と Linux も同じ仕組みです。
+会議室では「マイクをオン」をクリックすると、テーブルの周りの声を聞き取れます。オンラインと対面が混ざるハイブリッド会議も同じボタンひとつで対応し、PC の音は「オンライン」、マイクは「会議室」として同じ記録にまとめます(macOS 14 と 15 ではマイクがオンの間は会議室のみを聞き取ります)。スピーカーの音がマイクに入っても自動で回避・重複除外するため二重に記録されず、イヤホン使用時は双方が同時に話しても両方記録されます。Windows と Linux も同じ仕組みです。Mac ではボタン横の小さな矢印で、会議室を聞くマイク(iPhone や会議用マイクなど)を選べます。システムの既定のマイクは変わりません。
### 同時通訳
@@ -177,7 +177,3 @@ scripts/package.sh # 打包正式版 DMG、zip 和 SHA-256 校验值
## ライセンス
本プロジェクトは [Apache-2.0](LICENSE) ライセンスのもとで公開されています。仮想マイクドライバーの BlackHole 2ch は GPL ライセンスであり、インストーラーには同梱されず、インストールをクリックした際に公式の配布元からダウンロードされます。同梱の声紋モデルは [WeSpeaker](https://github.com/wenet-e2e/wespeaker) が VoxCeleb で学習した ResNet34-LM(CC BY 4.0 ライセンス)で、`scripts/convert-voiceprint.py` によって Core ML に変換されています。
-
-## 会議の音声入力
-
-設定 → 一般で、macOS に表示される iPhone 連係マイク、AirPods、その他の物理入力を選べます。システムの既定マイクは変更しません。切り替え前に会議マイクをオフにしてください。自動選択は会議室マイクを優先し、切断時は既存の代替選択と通知を使います。連係には Apple の対応機器・アカウント・ネットワーク条件が必要です。AirPods は主に装着者の声を収録します。
diff --git a/README.ko.md b/README.ko.md
index 687c9de..03fbdf1 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -58,7 +58,7 @@ AI 서비스를 연결하면 잘못 들은 인명과 용어를 그 자리에서
### 오프라인 및 하이브리드 회의
-회의실에서 "마이크 켜기"를 누르면 테이블에 있는 사람들의 말을 들을 수 있습니다. 온·오프라인 혼합 회의도 이 버튼 하나로 됩니다. 컴퓨터 소리는 "온라인", 마이크는 "현장"으로 하나의 기록에 함께 남깁니다(macOS 14와 15에서는 마이크를 켜면 현장 소리만 듣습니다). 스피커 소리가 마이크로 들어가면 자동으로 피하고 중복을 제거해 두 번 기록하지 않으며, 이어폰을 끼면 양쪽이 동시에 말해도 모두 기록합니다. Windows와 Linux도 규칙이 같습니다.
+회의실에서 "마이크 켜기"를 누르면 테이블에 있는 사람들의 말을 들을 수 있습니다. 온·오프라인 혼합 회의도 이 버튼 하나로 됩니다. 컴퓨터 소리는 "온라인", 마이크는 "현장"으로 하나의 기록에 함께 남깁니다(macOS 14와 15에서는 마이크를 켜면 현장 소리만 듣습니다). 스피커 소리가 마이크로 들어가면 자동으로 피하고 중복을 제거해 두 번 기록하지 않으며, 이어폰을 끼면 양쪽이 동시에 말해도 모두 기록합니다. Windows와 Linux도 규칙이 같습니다. Mac에서는 버튼 옆 작은 화살표로 회의실을 들을 마이크(iPhone이나 회의용 마이크 등)를 고를 수 있으며, 시스템 기본 마이크는 바뀌지 않습니다.
### 동시통역
@@ -177,7 +177,3 @@ scripts/package.sh # 정식 버전 DMG, zip 및 SHA-256 체크섬 패
## 라이선스
이 프로젝트는 [Apache-2.0](LICENSE) 라이선스로 공개되어 있습니다. 가상 마이크 드라이버 BlackHole 2ch는 GPL 라이선스를 따르며 설치 패키지에 포함되지 않고 설치를 누를 때 공식 주소에서 내려받습니다. 포함된 성문 모델은 [WeSpeaker](https://github.com/wenet-e2e/wespeaker)가 VoxCeleb으로 학습한 ResNet34-LM(CC BY 4.0 라이선스)이며 `scripts/convert-voiceprint.py`로 Core ML로 변환했습니다.
-
-## 회의 오디오 입력
-
-설정 → 일반에서 macOS에 표시되는 iPhone 연속성 마이크, AirPods 또는 다른 물리 입력을 선택할 수 있습니다. 시스템 기본 마이크는 변경하지 않습니다. 전환하기 전에 회의 마이크를 끄세요. 자동 선택은 회의실 마이크를 우선하며 연결이 끊기면 기존 대체 선택과 알림을 사용합니다. 연속성은 Apple의 기기·계정·네트워크 조건을 충족해야 합니다. AirPods는 주로 착용자의 목소리를 수음합니다.
diff --git a/README.md b/README.md
index 542cabd..93169d8 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@
### 线下与混合会议
-在会议室里点“打开麦克风”,就能听桌边的人说话。线上线下混合开会也是这一个按钮:电脑声音记为“线上”,麦克风记为“现场”,合在同一份记录里(macOS 14 和 15 打开麦克风时只听桌边)。外放声音传进麦克风时会自动避让并去重,不会记两遍;戴耳机时两边同时说也能记下。Windows 和 Linux 规则相同。
+在会议室里点“打开麦克风”,就能听桌边的人说话。线上线下混合开会也是这一个按钮:电脑声音记为“线上”,麦克风记为“现场”,合在同一份记录里(macOS 14 和 15 打开麦克风时只听桌边)。外放声音传进麦克风时会自动避让并去重,不会记两遍;戴耳机时两边同时说也能记下。Windows 和 Linux 规则相同。在 Mac 上,点按钮旁的小箭头可以换一个麦克风听会议室(比如 iPhone 或会议麦),不改系统默认的麦克风。
### 同声传译
@@ -177,7 +177,3 @@ scripts/package.sh # 打包正式版 DMG、zip 和 SHA-256 校验值
## 开源协议
本项目采用 [Apache-2.0](LICENSE) 协议开源。虚拟麦克风驱动 BlackHole 2ch 采用 GPL 协议,不打包在安装包内,点安装时从其官方地址下载。随附的声纹模型是 [WeSpeaker](https://github.com/wenet-e2e/wespeaker) 在 VoxCeleb 上训练的 ResNet34-LM(CC BY 4.0 协议),由 `scripts/convert-voiceprint.py` 转为 Core ML。
-
-## 会议收音设备
-
-在设置 → 通用中选择会议收音设备,可使用 macOS 提供的 iPhone 连续互通麦克风、AirPods 或其他实体输入,不改变系统默认麦克风。切换前先关闭会议麦克风;自动选择仍优先会议室麦克风。设备断开时沿用自动选择及现有提示。iPhone 连续互通需满足 Apple 的设备、账号和网络条件;AirPods 主要收取佩戴者声音。
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings
index eff8cbf..38761b9 100644
--- a/Resources/en.lproj/Localizable.strings
+++ b/Resources/en.lproj/Localizable.strings
@@ -1395,3 +1395,8 @@
"关掉后只在菜单栏,打开窗口时才出现" = "Off: menu bar only, in the Dock just while a window is open";
"密码:%@" = "Password: %@";
"复制" = "Copy";
+
+/* Mic button: the chevron that picks the room's microphone */
+"选择麦克风" = "Choose microphone";
+"会议室用哪个麦克风" = "Microphone for the room";
+"%@(只听得到戴的人)" = "%@ (hears only the wearer)";
diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings
index f83d1e0..a8710f8 100644
--- a/Resources/ja.lproj/Localizable.strings
+++ b/Resources/ja.lproj/Localizable.strings
@@ -1395,3 +1395,8 @@
"关掉后只在菜单栏,打开窗口时才出现" = "オフ:メニューバーのみ。ウインドウを開いている間だけ Dock に表示";
"密码:%@" = "パスワード:%@";
"复制" = "コピー";
+
+/* Mic button: the chevron that picks the room's microphone */
+"选择麦克风" = "マイクを選択";
+"会议室用哪个麦克风" = "会議室で使うマイク";
+"%@(只听得到戴的人)" = "%@(装着している人の声だけ)";
diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.strings
index cde023b..aa6638b 100644
--- a/Resources/ko.lproj/Localizable.strings
+++ b/Resources/ko.lproj/Localizable.strings
@@ -1395,3 +1395,8 @@
"关掉后只在菜单栏,打开窗口时才出现" = "끄면 메뉴 막대에만 있고, 창을 열 때만 Dock에 나타납니다";
"密码:%@" = "비밀번호: %@";
"复制" = "복사";
+
+/* Mic button: the chevron that picks the room's microphone */
+"选择麦克风" = "마이크 선택";
+"会议室用哪个麦克风" = "회의실에서 쓸 마이크";
+"%@(只听得到戴的人)" = "%@ (착용한 사람 목소리만)";
diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.strings
index ee272df..39ce922 100644
--- a/Resources/zh-Hans.lproj/Localizable.strings
+++ b/Resources/zh-Hans.lproj/Localizable.strings
@@ -1323,11 +1323,3 @@
"导入 %lld 个" = "导入 %lld 个";
/* Notes: a to-do's owner after it */
"待办的负责人 %@" = "(%@)";
-
-/* Live meeting inputs */
-"会议收音设备" = "会议收音设备";
-"先关闭麦克风再切换;可选 iPhone 连续互通或 AirPods" = "先关闭麦克风再切换;可选 iPhone 连续互通或 AirPods";
-"所选麦克风未连接,暂用自动" = "所选麦克风未连接,暂用自动";
-"当前收音" = "当前收音";
-"麦克风未启动" = "麦克风未启动";
-"刷新设备" = "刷新设备";
diff --git a/Sources/Cicada/AppModel.swift b/Sources/Cicada/AppModel.swift
index e4e60b4..67e7da7 100644
--- a/Sources/Cicada/AppModel.swift
+++ b/Sources/Cicada/AppModel.swift
@@ -901,11 +901,18 @@ final class AppModel: ObservableObject {
/// Not kept for the next launch: listening starts by itself, never with the microphone open.
var micOn: Bool { settings.hearsRoom }
- /// The actual pinned live input, rather than a saved preference that may be disconnected.
- var activeMeetingInputName: String? {
+ /// The menu beside 打开麦克风: which microphone hears the room ("" = 自动, as `RoomMicPlan` picks).
+ /// Picking one while the microphone is off is asking to hear the room with it; while it is on,
+ /// only the room side reconnects, and the meeting goes on.
+ func setRoomMic(_ uid: String) {
+ settings.roomMicUID = uid
+ debugLog("room mic chosen: \(uid.isEmpty ? "auto" : uid)")
+ guard micOn else { setMic(true); return }
let engine = settings.hearsBoth ? roomListen : listen
- guard settings.hearsRoom, engine.isRunning, let uid = engine.roomMicUID else { return nil }
- return AudioDevices.inputs().first { $0.uid == uid }?.name
+ if engine.isRunning, engine.roomMicUID != AudioDevices.roomMic(excluding: fakeGoneMics, preferredUID: uid)?.uid {
+ engine.reconnectAudio()
+ }
+ objectWillChange.send()
}
func setMic(_ on: Bool) {
@@ -1806,6 +1813,9 @@ final class AppModel: ObservableObject {
case "roomMicSilent":
// roomMicSilent:<on|off>: the room mic delivers nothing but zeros (from its next start).
RoomMic.simulateSilence = arg != "off"
+ case "roomMic":
+ // roomMic:<uid|auto>: the menu beside 打开麦克风.
+ setRoomMic(arg == "auto" ? "" : arg)
case "roomMicGone":
// roomMicGone[:none]: pretend the room's microphone (or every one) was unplugged.
let uid = (settings.hearsBoth ? roomListen : listen).roomMicUID
diff --git a/Sources/Cicada/DebugControl.swift b/Sources/Cicada/DebugControl.swift
index 398e6b7..c63660c 100644
--- a/Sources/Cicada/DebugControl.swift
+++ b/Sources/Cicada/DebugControl.swift
@@ -96,6 +96,10 @@ extension AppModel {
"music": self.roomListen.echoGate.playingMusic(), "micSilent": self.roomMicSilent,
"micLost": self.roomMicLost ?? "", "micDenied": self.hybridMicDenied, "held": self.heldRoom.count,
"voicedSeconds": self.roomListen.router.stats().voicedTotal,
+ // The microphone it hears now, the one chosen beside 打开麦克风 ("" = 自动) and the choices.
+ "mic": (self.settings.hearsBoth ? self.roomListen : self.listen).roomMicUID ?? "",
+ "micChosen": self.settings.roomMicUID,
+ "mics": AudioDevices.roomMicChoices().map { "\($0.device.uid)=\($0.device.name)" },
] }
all["display"] = { [
"mode": self.settings.displayMode, "notesShown": self.notesShown,
diff --git a/Sources/Cicada/RoomMic.swift b/Sources/Cicada/RoomMic.swift
index af1a082..f9ff594 100644
--- a/Sources/Cicada/RoomMic.swift
+++ b/Sources/Cicada/RoomMic.swift
@@ -21,11 +21,11 @@ enum RoomMicPlan {
var virtual = false
}
- /// The system default, unless it is the virtual mic (同声传译 makes it the default) or a
- /// Bluetooth headset's (AirPods hear the wearer, not the table, and drop to call quality while
- /// their mic is open); then the Mac's own microphone.
+ /// The one chosen beside 打开麦克风 while it is plugged in (a headset too: then the wearer is
+ /// all the user wants). Else the system default, unless it is the virtual mic (同声传译 makes it
+ /// the default) or a Bluetooth headset's (AirPods hear the wearer, not the table, and drop to call
+ /// quality while their mic is open); then the Mac's own microphone.
static func pick(defaultUID: String?, inputs: [Input], preferredUID: String? = nil) -> String? {
- // Automatic mode favors a table mic; an explicit choice may be an AirPods mic.
if let preferred = inputs.first(where: { $0.uid == preferredUID }), !preferred.virtual {
return preferred.uid
}
@@ -97,20 +97,29 @@ extension AudioDevices {
}
/// The microphone `RoomMicPlan` picks among the Mac's inputs right now.
- static var roomMic: OutputDevice? { roomMic(excluding: []) }
+ static var roomMic: OutputDevice? { roomMic() }
+
+ /// `excluding`: inputs to treat as gone (the debug command's pretend unplug). `preferredUID`: the
+ /// one chosen beside 打开麦克风 (`AppSettings.roomMicUID`).
+ static func roomMic(excluding: Set<String> = [], preferredUID: String? = nil) -> OutputDevice? {
+ let all = roomMicInputs(excluding: excluding)
+ let uid = RoomMicPlan.pick(defaultUID: defaultInput?.uid, inputs: all.map(\.plan), preferredUID: preferredUID)
+ return all.first { $0.device.uid == uid }?.device
+ }
+
+ /// The menu beside 打开麦克风: the inputs that can hear the room, the virtual ones left out.
+ static func roomMicChoices(excluding: Set<String> = []) -> [(device: OutputDevice, bluetooth: Bool)] {
+ roomMicInputs(excluding: excluding).filter { !$0.plan.virtual }.map { ($0.device, $0.plan.bluetooth) }
+ }
- /// `excluding`: inputs to treat as gone (the debug command's pretend unplug).
- static func roomMic(excluding: Set<String>, preferredUID: String? = nil) -> OutputDevice? {
- let all = inputs().filter { !excluding.contains($0.uid) }
- let plan = all.map { d -> RoomMicPlan.Input in
+ private static func roomMicInputs(excluding: Set<String>) -> [(device: OutputDevice, plan: RoomMicPlan.Input)] {
+ inputs().filter { !excluding.contains($0.uid) }.map { d in
let t = transport(d.id)
- return .init(uid: d.uid, builtIn: t == kAudioDeviceTransportTypeBuiltIn,
- bluetooth: t == kAudioDeviceTransportTypeBluetooth || t == kAudioDeviceTransportTypeBluetoothLE,
- // The aggregate macOS makes for echo cancellation is no microphone of its own.
- virtual: d.isVirtualMic || d.uid.hasPrefix("CADefaultDeviceAggregate"))
+ return (d, .init(uid: d.uid, builtIn: t == kAudioDeviceTransportTypeBuiltIn,
+ bluetooth: t == kAudioDeviceTransportTypeBluetooth || t == kAudioDeviceTransportTypeBluetoothLE,
+ // The aggregate macOS makes for echo cancellation is no microphone of its own.
+ virtual: d.isVirtualMic || d.uid.hasPrefix("CADefaultDeviceAggregate")))
}
- let uid = RoomMicPlan.pick(defaultUID: defaultInput?.uid, inputs: plan, preferredUID: preferredUID)
- return all.first { $0.uid == uid }
}
}
diff --git a/Sources/Cicada/Settings.swift b/Sources/Cicada/Settings.swift
index aefa5a7..5095882 100644
--- a/Sources/Cicada/Settings.swift
+++ b/Sources/Cicada/Settings.swift
@@ -217,7 +217,7 @@ final class AppSettings: ObservableObject {
@Published var listenSource: String {
didSet { save() }
}
- /// Meeting input UID; empty keeps automatic selection. Does not change the system default.
+ /// The microphone chosen beside 打开麦克风, by UID; empty is 自动. Never the system default's.
@Published var roomMicUID: String {
didSet { save() }
}
diff --git a/Sources/Cicada/SettingsWindow.swift b/Sources/Cicada/SettingsWindow.swift
index e9268ca..6d18ddf 100644
--- a/Sources/Cicada/SettingsWindow.swift
+++ b/Sources/Cicada/SettingsWindow.swift
@@ -717,32 +717,8 @@ struct SettingsView: View {
}
}
- private var meetingInput: some View {
- let inputs = AudioDevices.inputs().filter {
- !$0.isVirtualMic && !$0.uid.hasPrefix("CADefaultDeviceAggregate")
- }
- let chosen = inputs.first { $0.uid == settings.roomMicUID }?.name
- let value = settings.roomMicUID.isEmpty ? L("自动") : chosen ?? L("所选麦克风未连接,暂用自动")
- return SettingsCard {
- SettingsRow(title: L("会议收音设备"),
- detail: L("先关闭麦克风再切换;可选 iPhone 连续互通或 AirPods"),
- divider: false) {
- PillMenu(value: value, options: [("", L("自动"))] + inputs.map { ($0.uid, $0.name) }) {
- guard !model.micOn else { return }
- settings.roomMicUID = $0
- }
- .disabled(model.micOn)
- }
- SettingsRow(title: L("当前收音"),
- detail: model.activeMeetingInputName ?? L("麦克风未启动"), divider: false) {
- SoftButton(L("刷新设备")) { model.refreshOutputs() }
- }
- }
- }
-
private var records: some View {
VStack(alignment: .leading, spacing: 14) {
- meetingInput
SettingsCard {
SettingsRow(title: L("保存会议录音"), detail: L("只存在这台 Mac 上")) {
Toggle("保存会议录音", isOn: $settings.recordAudio)
diff --git a/Sources/Cicada/Views.swift b/Sources/Cicada/Views.swift
index 1823f88..d94a2bd 100644
--- a/Sources/Cicada/Views.swift
+++ b/Sources/Cicada/Views.swift
@@ -447,7 +447,8 @@ extension MenuPanelView {
/// 打开麦克风 / 关闭麦克风, the same switch in the panel and the notes window. In the panel it is
/// the dark button while off (the thing to do) and a quiet one while on; in the notes window's
-/// header it sits beside 结束 like it, tinted while the microphone is on.
+/// header it sits beside 结束 like it, tinted while the microphone is on. Its chevron picks the
+/// microphone, where the user is when the room sounds wrong rather than in Settings.
struct MicButton: View {
@ObservedObject var model: AppModel
@ObservedObject var settings: AppSettings
@@ -455,22 +456,58 @@ struct MicButton: View {
var body: some View {
let on = model.micOn
- Button { model.setMic(!on) } label: {
- HStack(spacing: 5) {
- Image(systemName: on ? "mic.fill" : "mic")
- .font(.system(size: 11, weight: .semibold))
- .foregroundStyle(on ? Palette.accent : (inHeader ? Palette.ink : Color.white))
- Text(on ? L("关闭麦克风") : L("打开麦克风")).font(.system(size: 12, weight: .semibold))
- .foregroundStyle(!on && !inHeader ? Color.white : Palette.ink)
- .lineLimit(1).fixedSize()
- }
- .padding(.horizontal, inHeader ? 10 : 12).frame(height: 28)
- .background(RoundedRectangle(cornerRadius: 7).fill(background(on)))
- .overlay(RoundedRectangle(cornerRadius: 7).stroke(border(on), lineWidth: 1))
- .contentShape(Rectangle())
+ HStack(spacing: 0) {
+ Button { model.setMic(!on) } label: {
+ HStack(spacing: 5) {
+ Image(systemName: on ? "mic.fill" : "mic")
+ .font(.system(size: 11, weight: .semibold))
+ .foregroundStyle(on ? Palette.accent : (inHeader ? Palette.ink : Color.white))
+ Text(on ? L("关闭麦克风") : L("打开麦克风")).font(.system(size: 12, weight: .semibold))
+ .foregroundStyle(ink(on))
+ .lineLimit(1).fixedSize()
+ }
+ .padding(.leading, inHeader ? 10 : 12).padding(.trailing, 7).frame(height: 28)
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ .accessibilityLabel(on ? L("关闭麦克风") : L("打开麦克风"))
+ Rectangle().fill(divider(on)).frame(width: 1, height: 14)
+ chooser(on)
}
- .buttonStyle(.plain)
- .accessibilityLabel(on ? L("关闭麦克风") : L("打开麦克风"))
+ .background(RoundedRectangle(cornerRadius: 7).fill(background(on)))
+ .overlay(RoundedRectangle(cornerRadius: 7).stroke(border(on), lineWidth: 1))
+ }
+
+ /// The room's microphones, with 自动 first naming the one it would take. A chosen one that is
+ /// unplugged shows as 自动 until it is back.
+ private func chooser(_ on: Bool) -> some View {
+ let choices = AudioDevices.roomMicChoices()
+ let chosen = choices.contains { $0.device.uid == settings.roomMicUID } ? settings.roomMicUID : ""
+ let auto = AudioDevices.roomMic()?.name
+ return Menu {
+ Picker(L("会议室用哪个麦克风"), selection: Binding(get: { chosen }, set: { model.setRoomMic($0) })) {
+ Text(auto.map { L("自动(\($0))") } ?? L("自动")).tag("")
+ ForEach(choices, id: \.device.uid) { c in
+ // A headset hears its wearer, not the table: fine for your own notes, so say it.
+ Text(c.bluetooth ? L("\(c.device.name)(只听得到戴的人)") : c.device.name).tag(c.device.uid)
+ }
+ }
+ .pickerStyle(.inline)
+ } label: {
+ Image(systemName: "chevron.down").font(.system(size: 9, weight: .bold))
+ .foregroundStyle(ink(on).opacity(0.75))
+ .frame(width: 24, height: 28).contentShape(Rectangle())
+ }
+ .menuStyle(.button).buttonStyle(.plain).menuIndicator(.hidden).fixedSize()
+ .accessibilityLabel(L("选择麦克风"))
+ .help(L("选择麦克风"))
+ }
+
+ private func ink(_ on: Bool) -> Color { !on && !inHeader ? Color.white : Palette.ink }
+
+ private func divider(_ on: Bool) -> Color {
+ if inHeader { return on ? Palette.accent.opacity(0.25) : Palette.line }
+ return on ? Palette.line : Color.white.opacity(0.25)
}
private func background(_ on: Bool) -> Color {
diff --git a/site/changelog.json b/site/changelog.json
index 06d2934..538d43b 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -1,4 +1,21 @@
[
+ {
+ "version": "1.8.0",
+ "date": null,
+ "title": "开会时就地换麦克风",
+ "summary": "“打开麦克风”旁边多了个小箭头,选哪个麦克风听会议室,不改系统默认。",
+ "image": null,
+ "items": [
+ {
+ "kind": "new",
+ "platforms": [
+ "mac"
+ ],
+ "title": "“打开麦克风”旁边可以选用哪个麦克风。",
+ "text": "以前听会议室只能用系统默认的麦克风,想用 iPhone、会议麦就得去系统设置里改。现在点实时纪要或菜单栏里“打开麦克风”旁边的小箭头就能选,开着麦也能换,会议不中断;选蓝牙耳机会注明只听得到戴的人。选的麦克风拔掉时先用“自动”,下次打开麦克风时它在就还用它。"
+ }
+ ]
+ },
{
"version": "1.7.0",
"date": "2026-11-08",