知了 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 with AirPods as the microphone no longer quits Cicada
wquguru5e0a421f799c
diff --git a/.claude/skills/room-test/SKILL.md b/.claude/skills/audio-test/SKILL.mdsimilarity index 100%rename from .claude/skills/room-test/SKILL.mdrename to .claude/skills/audio-test/SKILL.mddiff --git a/.claude/skills/room-test/scripts/audio.swift b/.claude/skills/audio-test/scripts/audio.swiftsimilarity index 100%rename from .claude/skills/room-test/scripts/audio.swiftrename to .claude/skills/audio-test/scripts/audio.swiftdiff --git a/.claude/skills/room-test/scripts/clips.py b/.claude/skills/audio-test/scripts/clips.pysimilarity index 100%rename from .claude/skills/room-test/scripts/clips.pyrename to .claude/skills/audio-test/scripts/clips.pydiff --git a/.claude/skills/room-test/scripts/round.sh b/.claude/skills/audio-test/scripts/room-round.shsimilarity index 100%rename from .claude/skills/room-test/scripts/round.shrename to .claude/skills/audio-test/scripts/room-round.shdiff --git a/Sources/Cicada/SpeakEngine.swift b/Sources/Cicada/SpeakEngine.swiftindex 29a0050..d980b0a 100644--- a/Sources/Cicada/SpeakEngine.swift+++ b/Sources/Cicada/SpeakEngine.swift@@ -102,7 +102,7 @@ final class SpeakEngine {let settings: AppSettingsprivate(set) var phase: Phase = .idle- private let mic = AVAudioEngine()+ private var mic = AVAudioEngine()/// The mic with echo cancellation, shared with 电脑和会议室's room (`VoiceMic`): used when/// `echoCancel` is on, or whenever the room already has it running.private let voiceMic: VoiceMic@@ -364,6 +364,11 @@ final class SpeakEngine {// A unit left over (toggled off mid-press, a virtual mic) would starve the plain mic; one the// room is using stays (the talk key is then on another mic).if !voiceMic.inUse { voiceMic.release() }+ // A fresh engine each press: one kept from the last press still reports the input's old+ // format after the device changed it (AirPods drop to call quality when their mic opens),+ // and installing a tap in that format raises an exception that ends the app.+ if mic.isRunning { mic.inputNode.removeTap(onBus: 0); mic.stop() }+ mic = AVAudioEngine()let inputNode = mic.inputNodeAudioDevices.pinInput(mic, to: inputDevice?())// Pinning can leave the client format at BlackHole's rate/channels. A tap must use