知了 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: Cicada no longer quits when a speech model starts downloading as listening begins
wquguru91e1cda8cc24
diff --git a/Sources/Cicada/Recognition.swift b/Sources/Cicada/Recognition.swiftindex c4144da..f535426 100644--- a/Sources/Cicada/Recognition.swift+++ b/Sources/Cicada/Recognition.swift@@ -179,14 +179,17 @@ enum Recognition {}/// Fetches the model for `locale` when it isn't on the Mac; `progress` is called once a- /// download starts. Throws when this Mac can't recognize the language.- static func install(_ locale: String, progress: (Progress) -> Void = { _ in }) async throws {+ /// download starts, on the main actor: every caller sets UI state there, and from the+ /// cooperative pool it redrew the menu bar panel off the main thread, which ended the app+ /// (`TSMGetInputSourceProperty` asserts the main queue). Throws when this Mac can't recognize+ /// the language.+ static func install(_ locale: String, progress: @MainActor (Progress) -> Void = { _ in }) async throws {if host != nil || cloudOnly { return }if !legacy, #available(macOS 26, *) {let t = Analyzer.module(locale)if await AssetInventory.status(forModules: [t]) == .unsupported { throw unsupported(locale) }if let request = try await AssetInventory.assetInstallationRequest(supporting: [t]) {- progress(request.progress)+ await progress(request.progress)try await request.downloadAndInstall()}returndiff --git a/site/changelog.json b/site/changelog.jsonindex 9b2be1c..2d36177 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -30,6 +30,14 @@"title": "装好 VB-Cable 后电脑不会再没声了。","text": "Windows 有时会把新装的 CABLE Input 设成默认播放设备,视频和会议就都听不到了。现在知了装完会自动改回原来的扬声器;之前装过的,启动时会提醒一次,点一下就能恢复,“设置 › 同声传译”里也有“恢复声音”。"},+ {+ "kind": "fixed",+ "platforms": [+ "mac"+ ],+ "title": "开始听时正好要下载语音模型,知了不会再退出。",+ "text": "第一次听某种语言、或者打开麦克风时要先下载语音模型,偶尔会让知了直接退出。现在下载照常进行,菜单栏里显示下载进度。"+ },{"kind": "fixed","platforms": [