知了 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
feat: when an AI service has trouble, the notes window says in one line what is waiting and what still works, with Use Ling one click away
wquguru1e59953cef2c
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.stringsindex 020cd3d..d1aa2f4 100644--- a/Resources/en.lproj/Localizable.strings+++ b/Resources/en.lproj/Localizable.strings@@ -263,7 +263,7 @@/* CloudHearing */"key 已失效,到设置 › AI 服务里重填" = "The key stopped working. Enter a new one in Settings › AI Service";"请先在设置 › AI 服务里填入 Ling key" = "Enter a Ling key in Settings › AI Service first";-"%@ 暂时连不上,正在重试" = "Can't reach %@. Retrying";+"字幕和纪要等 %@ 恢复 · 连上后自动继续" = "Subtitles and notes wait for %@ · they resume once it's back";/* Diagnostics */"%@ %@ 诊断 %@" = "%1$@ %2$@ diagnostics %3$@";@@ -415,7 +415,7 @@"识别出错,%lld 秒后重试" = "Recognition error; retrying in %lld s";"听不出是哪种语言,到菜单栏里选一下" = "Can't tell the language. Pick one from the menu bar";"正在识别语言…" = "Detecting language…";-"%@ 暂时连不上,先用本机识别" = "Can't reach %@; recognizing on this Mac for now";+"%@ 连不上 · 字幕改用本机识别" = "Can't reach %@ · subtitles use this Mac's recognition";"翻译暂不可用" = "Translation unavailable for now";/* ListenPill */@@ -491,12 +491,16 @@"现在结束" = "End now";/* NotesWindow */-"key 已失效(被删或额度用完),纪要暂停在 %@。" = "The key stopped working (deleted or out of credit). Notes paused at %@.";-"key 已失效(被删或额度用完),换个 key 就能开始写纪要。" = "The key stopped working (deleted or out of credit). Change it to start the notes.";-"%@ 很忙,纪要稍后补上。字幕照常。" = "%@ is busy; notes will catch up. Subtitles go on.";-"连不上 %@,纪要暂停在 %@,连上后自动继续。" = "Can't reach %1$@. Notes paused at %2$@ and resume once it's back.";-"连不上 %@,连上后开始写纪要。" = "Can't reach %@. Notes start once it's back.";-"这轮没整理好,下一轮会自动重试。" = "This round failed; the next one will retry.";+"key 失效了 · 纪要停在 %@" = "Key no longer works · notes stopped at %@";+"key 失效了 · 纪要等新的 key" = "Key no longer works · notes wait for a new key";+"换 key" = "Change Key";+"%@ 很忙 · 纪要稍后补上,字幕照常" = "%@ is busy · notes catch up later, subtitles carry on";+"连不上 %@ · 缺本地网络权限" = "Can't reach %@ · Local Network not allowed";+"去开启" = "Turn On";+"纪要等 %@ 恢复 · 停在 %@,字幕照常" = "Notes wait for %1$@ · stopped at %2$@, subtitles carry on";+"纪要等 %@ 恢复 · 字幕照常" = "Notes wait for %@ · subtitles carry on";+"改用 Ling" = "Use Ling";+"这轮纪要没写好 · 下轮自动补上" = "This round of notes didn't work · the next one catches up";"电脑声音照常在记" = "The Mac's audio is still being recorded";"在会议室里开会?" = "Meeting in the room?";"电脑里 1 分钟没放出声音" = "Nothing has played on this Mac for a minute";@@ -607,7 +611,6 @@"识别语音" = "Recognize speech";"打开“听写”,允许“语音识别”" = "Turn on Dictation and allow Speech Recognition";"已打开" = "On";-"去开启" = "Turn On";"重新打开" = "Reopen";"放一段会议试试" = "Try a meeting";"一段 9 秒的英文会议,字幕会跟着声音实时出来。" = "A 9-second meeting in English. Subtitles appear as they talk.";@@ -848,7 +851,7 @@/* SpeakEngine */"无法准备语音识别:%@" = "Can't prepare speech recognition: %@";"语音识别仍在准备中,请再按一次" = "Speech recognition is still getting ready; press again";-"翻译失败,这句话未发送" = "Translation failed; this sentence wasn't sent";+"这句没翻译成 · 没有说出去" = "This line wasn't translated · nothing was said";/* SpeakTest */"语音识别还没准备好,请稍后再试" = "Speech recognition isn't ready yet; try again shortly";diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.stringsindex 9b21bf2..82bc194 100644--- a/Resources/ja.lproj/Localizable.strings+++ b/Resources/ja.lproj/Localizable.strings@@ -263,7 +263,7 @@/* CloudHearing */"key 已失效,到设置 › AI 服务里重填" = "キーが無効になりました。設定 › AI サービスで入力し直してください";"请先在设置 › AI 服务里填入 Ling key" = "先に「設定 › AI サービス」で Ling key を入力してください";-"%@ 暂时连不上,正在重试" = "%@ に接続できません。再試行しています";+"字幕和纪要等 %@ 恢复 · 连上后自动继续" = "字幕とメモは %@ の復旧待ち · つながれば自動で再開";/* Diagnostics */"%@ %@ 诊断 %@" = "%1$@ %2$@ 診断 %3$@";@@ -415,7 +415,7 @@"识别出错,%lld 秒后重试" = "認識エラー。%lld秒後に再試行します";"听不出是哪种语言,到菜单栏里选一下" = "言語を判別できません。メニューバーで選んでください";"正在识别语言…" = "言語を検出中…";-"%@ 暂时连不上,先用本机识别" = "%@ に接続できません。ひとまずこの Mac で認識します";+"%@ 连不上 · 字幕改用本机识别" = "%@ に接続できません · 字幕はこの Mac の認識に切り替え";"翻译暂不可用" = "現在翻訳を利用できません";/* ListenPill */@@ -491,12 +491,16 @@"现在结束" = "今すぐ終了";/* NotesWindow */-"key 已失效(被删或额度用完),纪要暂停在 %@。" = "キーが無効になりました(削除または残高切れ)。メモは %@ で一時停止中です。";-"key 已失效(被删或额度用完),换个 key 就能开始写纪要。" = "キーが無効になりました(削除または残高切れ)。キーを変えるとメモを書き始めます。";-"%@ 很忙,纪要稍后补上。字幕照常。" = "%@ が混み合っています。メモは後で追いつきます。字幕はそのまま。";-"连不上 %@,纪要暂停在 %@,连上后自动继续。" = "%1$@ に接続できません。メモは %2$@ で一時停止中、つながると自動で再開します。";-"连不上 %@,连上后开始写纪要。" = "%@ に接続できません。つながるとメモを書き始めます。";-"这轮没整理好,下一轮会自动重试。" = "今回の整理に失敗しました。次回自動で再試行します。";+"key 失效了 · 纪要停在 %@" = "key が無効です · メモは %@ で停止";+"key 失效了 · 纪要等新的 key" = "key が無効です · メモは新しい key 待ち";+"换 key" = "key を変更";+"%@ 很忙 · 纪要稍后补上,字幕照常" = "%@ が混雑中 · メモはあとで追いつき、字幕はそのまま";+"连不上 %@ · 缺本地网络权限" = "%@ に接続できません · ローカルネットワークが未許可";+"去开启" = "オンにする";+"纪要等 %@ 恢复 · 停在 %@,字幕照常" = "メモは %1$@ の復旧待ち · %2$@ で停止、字幕はそのまま";+"纪要等 %@ 恢复 · 字幕照常" = "メモは %@ の復旧待ち · 字幕はそのまま";+"改用 Ling" = "Ling に切り替え";+"这轮纪要没写好 · 下轮自动补上" = "今回のメモはまとまらず · 次の回で自動で補います";"电脑声音照常在记" = "Mac の音声はそのまま記録中";"在会议室里开会?" = "会議室で会議中?";"电脑里 1 分钟没放出声音" = "1 分間 Mac から音が出ていません";@@ -607,7 +611,6 @@"识别语音" = "音声を認識";"打开“听写”,允许“语音识别”" = "「音声入力」をオンにして「音声認識」を許可";"已打开" = "オン";-"去开启" = "オンにする";"重新打开" = "開き直す";"放一段会议试试" = "会議を流してみる";"一段 9 秒的英文会议,字幕会跟着声音实时出来。" = "9 秒の英語の会議です。話すそばから字幕が出ます。";@@ -848,7 +851,7 @@/* SpeakEngine */"无法准备语音识别:%@" = "音声認識を準備できません: %@";"语音识别仍在准备中,请再按一次" = "音声認識はまだ準備中です。もう一度押してください";-"翻译失败,这句话未发送" = "翻訳に失敗したため、この文は送信されませんでした";+"这句没翻译成 · 没有说出去" = "この文は翻訳できず · 発話していません";/* SpeakTest */"语音识别还没准备好,请稍后再试" = "音声認識の準備がまだです。少し待ってから再試行してください";diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.stringsindex 434a150..94aa04b 100644--- a/Resources/ko.lproj/Localizable.strings+++ b/Resources/ko.lproj/Localizable.strings@@ -263,7 +263,7 @@/* CloudHearing */"key 已失效,到设置 › AI 服务里重填" = "키가 더 이상 작동하지 않습니다. 설정 › AI 서비스에서 다시 입력하세요";"请先在设置 › AI 服务里填入 Ling key" = "먼저 설정 › AI 서비스에서 Ling key를 입력하세요";-"%@ 暂时连不上,正在重试" = "%@에 연결할 수 없습니다. 다시 시도하는 중";+"字幕和纪要等 %@ 恢复 · 连上后自动继续" = "자막과 노트는 %@ 복구 대기 · 연결되면 자동으로 계속";/* Diagnostics */"%@ %@ 诊断 %@" = "%1$@ %2$@ 진단 %3$@";@@ -415,7 +415,7 @@"识别出错,%lld 秒后重试" = "인식 오류, %lld초 후 다시 시도합니다";"听不出是哪种语言,到菜单栏里选一下" = "언어를 알 수 없어요. 메뉴 막대에서 골라 주세요";"正在识别语言…" = "언어 감지 중…";-"%@ 暂时连不上,先用本机识别" = "%@에 연결할 수 없어 우선 이 Mac에서 인식합니다";+"%@ 连不上 · 字幕改用本机识别" = "%@에 연결할 수 없음 · 자막은 이 Mac의 인식으로 전환";"翻译暂不可用" = "번역을 일시적으로 사용할 수 없음";/* ListenPill */@@ -491,12 +491,16 @@"现在结束" = "지금 끝내기";/* NotesWindow */-"key 已失效(被删或额度用完),纪要暂停在 %@。" = "key가 만료되었습니다(삭제 또는 잔액 소진). 노트가 %@에서 멈췄습니다.";-"key 已失效(被删或额度用完),换个 key 就能开始写纪要。" = "key가 만료되었습니다(삭제 또는 잔액 소진). key를 바꾸면 노트를 쓰기 시작합니다.";-"%@ 很忙,纪要稍后补上。字幕照常。" = "%@가 붐빕니다. 노트는 나중에 채워집니다. 자막은 그대로입니다.";-"连不上 %@,纪要暂停在 %@,连上后自动继续。" = "%1$@에 연결할 수 없습니다. 노트가 %2$@에서 멈췄고, 연결되면 자동으로 이어집니다.";-"连不上 %@,连上后开始写纪要。" = "%@에 연결할 수 없습니다. 연결되면 노트를 쓰기 시작합니다.";-"这轮没整理好,下一轮会自动重试。" = "이번에는 정리하지 못했습니다. 다음 차례에 자동으로 다시 시도합니다.";+"key 失效了 · 纪要停在 %@" = "key가 무효입니다 · 노트는 %@에서 멈춤";+"key 失效了 · 纪要等新的 key" = "key가 무효입니다 · 노트는 새 key 대기";+"换 key" = "key 변경";+"%@ 很忙 · 纪要稍后补上,字幕照常" = "%@ 혼잡 · 노트는 나중에 채우고 자막은 계속";+"连不上 %@ · 缺本地网络权限" = "%@에 연결할 수 없음 · 로컬 네트워크 권한 없음";+"去开启" = "켜기";+"纪要等 %@ 恢复 · 停在 %@,字幕照常" = "노트는 %1$@ 복구 대기 · %2$@에서 멈춤, 자막은 계속";+"纪要等 %@ 恢复 · 字幕照常" = "노트는 %@ 복구 대기 · 자막은 계속";+"改用 Ling" = "Ling으로 전환";+"这轮纪要没写好 · 下轮自动补上" = "이번 노트는 정리되지 않음 · 다음 회차에 자동으로 보완";"电脑声音照常在记" = "Mac 소리는 계속 기록 중";"在会议室里开会?" = "회의실에서 회의 중인가요?";"电脑里 1 分钟没放出声音" = "1분 동안 Mac에서 소리가 나지 않았어요";@@ -607,7 +611,6 @@"识别语音" = "음성 인식";"打开“听写”,允许“语音识别”" = "‘받아쓰기’를 켜고 ‘음성 인식’을 허용";"已打开" = "켜짐";-"去开启" = "켜기";"重新打开" = "다시 열기";"放一段会议试试" = "회의를 틀어 보세요";"一段 9 秒的英文会议,字幕会跟着声音实时出来。" = "9초짜리 영어 회의예요. 말하는 대로 자막이 나와요.";@@ -848,7 +851,7 @@/* SpeakEngine */"无法准备语音识别:%@" = "음성 인식을 준비할 수 없습니다: %@";"语音识别仍在准备中,请再按一次" = "음성 인식을 준비하는 중입니다. 다시 눌러 주세요";-"翻译失败,这句话未发送" = "번역에 실패하여 이 문장은 전송되지 않았습니다";+"这句没翻译成 · 没有说出去" = "이 문장은 번역되지 않음 · 말하지 않았습니다";/* SpeakTest */"语音识别还没准备好,请稍后再试" = "음성 인식이 아직 준비되지 않았습니다. 잠시 후 다시 시도하세요";diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.stringsindex 085d084..ad05127 100644--- a/Resources/zh-Hans.lproj/Localizable.strings+++ b/Resources/zh-Hans.lproj/Localizable.strings@@ -263,7 +263,7 @@/* CloudHearing */"key 已失效,到设置 › AI 服务里重填" = "key 已失效,到设置 › AI 服务里重填";"请先在设置 › AI 服务里填入 Ling key" = "请先在设置 › AI 服务里填入 Ling key";-"%@ 暂时连不上,正在重试" = "%@ 暂时连不上,正在重试";+"字幕和纪要等 %@ 恢复 · 连上后自动继续" = "字幕和纪要等 %@ 恢复 · 连上后自动继续";/* Diagnostics */"%@ %@ 诊断 %@" = "%@ %@ 诊断 %@";@@ -415,7 +415,7 @@"识别出错,%lld 秒后重试" = "识别出错,%lld 秒后重试";"听不出是哪种语言,到菜单栏里选一下" = "听不出是哪种语言,到菜单栏里选一下";"正在识别语言…" = "正在识别语言…";-"%@ 暂时连不上,先用本机识别" = "%@ 暂时连不上,先用本机识别";+"%@ 连不上 · 字幕改用本机识别" = "%@ 连不上 · 字幕改用本机识别";"翻译暂不可用" = "翻译暂不可用";/* ListenPill */@@ -491,12 +491,16 @@"现在结束" = "现在结束";/* NotesWindow */-"key 已失效(被删或额度用完),纪要暂停在 %@。" = "key 已失效(被删或额度用完),纪要暂停在 %@。";-"key 已失效(被删或额度用完),换个 key 就能开始写纪要。" = "key 已失效(被删或额度用完),换个 key 就能开始写纪要。";-"%@ 很忙,纪要稍后补上。字幕照常。" = "%@ 很忙,纪要稍后补上。字幕照常。";-"连不上 %@,纪要暂停在 %@,连上后自动继续。" = "连不上 %@,纪要暂停在 %@,连上后自动继续。";-"连不上 %@,连上后开始写纪要。" = "连不上 %@,连上后开始写纪要。";-"这轮没整理好,下一轮会自动重试。" = "这轮没整理好,下一轮会自动重试。";+"key 失效了 · 纪要停在 %@" = "key 失效了 · 纪要停在 %@";+"key 失效了 · 纪要等新的 key" = "key 失效了 · 纪要等新的 key";+"换 key" = "换 key";+"%@ 很忙 · 纪要稍后补上,字幕照常" = "%@ 很忙 · 纪要稍后补上,字幕照常";+"连不上 %@ · 缺本地网络权限" = "连不上 %@ · 缺本地网络权限";+"去开启" = "去开启";+"纪要等 %@ 恢复 · 停在 %@,字幕照常" = "纪要等 %@ 恢复 · 停在 %@,字幕照常";+"纪要等 %@ 恢复 · 字幕照常" = "纪要等 %@ 恢复 · 字幕照常";+"改用 Ling" = "改用 Ling";+"这轮纪要没写好 · 下轮自动补上" = "这轮纪要没写好 · 下轮自动补上";"电脑声音照常在记" = "电脑声音照常在记";"在会议室里开会?" = "在会议室里开会?";"电脑里 1 分钟没放出声音" = "电脑里 1 分钟没放出声音";@@ -607,7 +611,6 @@"识别语音" = "识别语音";"打开“听写”,允许“语音识别”" = "打开“听写”,允许“语音识别”";"已打开" = "已打开";-"去开启" = "去开启";"重新打开" = "重新打开";"放一段会议试试" = "放一段会议试试";"一段 9 秒的英文会议,字幕会跟着声音实时出来。" = "一段 9 秒的英文会议,字幕会跟着声音实时出来。";@@ -848,7 +851,7 @@/* SpeakEngine */"无法准备语音识别:%@" = "无法准备语音识别:%@";"语音识别仍在准备中,请再按一次" = "语音识别仍在准备中,请再按一次";-"翻译失败,这句话未发送" = "翻译失败,这句话未发送";+"这句没翻译成 · 没有说出去" = "这句没翻译成 · 没有说出去";/* SpeakTest */"语音识别还没准备好,请稍后再试" = "语音识别还没准备好,请稍后再试";diff --git a/Sources/Cicada/AppModel.swift b/Sources/Cicada/AppModel.swiftindex 5b4771f..c1aa283 100644--- a/Sources/Cicada/AppModel.swift+++ b/Sources/Cicada/AppModel.swift@@ -1120,6 +1120,16 @@ final class AppModel: ObservableObject {Task { await ling.setKey(key) }}+ /// "改用 Ling" where another service is out of reach: only when a Ling key is already saved,+ /// so the one click works without a trip to the settings.+ var canSwitchToLing: Bool { settings.provider.id != .ling && AIKey.read("ling") != nil }++ func switchToLing() {+ guard canSwitchToLing else { return }+ settings.aiProvider = AIProvider.Kind.ling.rawValue+ applyAIService()+ }+/// Settings changed the AI service, its address or a model: voices follow, the key is checked again.func applyAIService() {let c = settings.aiConfig@@ -1927,6 +1937,8 @@ final class AppModel: ObservableObject {// aiCustomBase:<url>, aiCustomVoiceBase:<url|"">, aiCustomVoice:<name>, aiCustomHearModel:<name>,// aiCustomHearBase:<url|"">, aiCustomRecognize:on|off.case "aiProvider": settings.aiProvider = AIProvider.named(arg).id.rawValue; applyAIService()+ // switchToLing: the 改用 Ling on a status line (logs why when it isn't offered).+ case "switchToLing": debugLog("switchToLing offered=\(canSwitchToLing)"); switchToLing()case "aiTextModel":if settings.provider.id == .ling { settings.aiModel = arg } else { settings.aiModels[settings.aiProvider] = arg }applyAIService()diff --git a/Sources/Cicada/CloudHearing.swift b/Sources/Cicada/CloudHearing.swiftindex cc61102..ac38b25 100644--- a/Sources/Cicada/CloudHearing.swift+++ b/Sources/Cicada/CloudHearing.swift@@ -32,7 +32,7 @@ enum CloudHearing {case .invalidKey?: L("key 已失效,到设置 › AI 服务里重填")case .noKey?: L("请先在设置 › AI 服务里填入 Ling key")case .http(let code)? where code >= 500: L("\(service) 暂时出错(HTTP \(code)),稍后再试。")- default: L("\(service) 暂时连不上,正在重试")+ default: L("字幕和纪要等 \(service) 恢复 · 连上后自动继续")}}diff --git a/Sources/Cicada/ListenEngine.swift b/Sources/Cicada/ListenEngine.swiftindex e33b5bc..c9685e0 100644--- a/Sources/Cicada/ListenEngine.swift+++ b/Sources/Cicada/ListenEngine.swift@@ -1148,7 +1148,7 @@ final class ListenEngine {self.serverFellBack = trueif self.cloudReplaced?.lang == nil { self.cloudReplaced = (self.activeLang, false) }self.stopCloud()- self.setStatus(L("\(self.cloudService ?? "AI") 暂时连不上,先用本机识别"))+ self.setStatus(L("\(self.cloudService ?? "AI") 连不上 · 字幕改用本机识别"))} else if !Recognition.cloudOnly { self.stopCloud() }// Nothing to go back to on an Intel Mac: say why it's quiet, and keep trying.else { self.setStatus(CloudHearing.trouble(error, service: self.cloudService ?? "AI")) }diff --git a/Sources/Cicada/NotesWindow.swift b/Sources/Cicada/NotesWindow.swiftindex abfd919..8961f9b 100644--- a/Sources/Cicada/NotesWindow.swift+++ b/Sources/Cicada/NotesWindow.swift@@ -674,23 +674,31 @@ struct NotesWindowView: View {case .noKey where session?.lines.isEmpty == false || live:keyEntrycase .invalidKey:- notice(lastCovered > 0 ? L("key 已失效(被删或额度用完),纪要暂停在 \(NotesEngine.clock(lastCovered))。")- : L("key 已失效(被删或额度用完),换个 key 就能开始写纪要。"), tint: Palette.errorPale) {- SoftButton(L("更换 key"), dark: true) { model.openSettings(.ai) }- }+ StatusLine(tone: .needsYou, text: lastCovered > 0 ? L("key 失效了 · 纪要停在 \(NotesEngine.clock(lastCovered))")+ : L("key 失效了 · 纪要等新的 key"),+ action: (L("换 key"), { model.openSettings(.ai) }))// The rest is about a round of the meeting going on now: a record opened later has none.case .rateLimited where live:- notice(L("\(serviceLabel) 很忙,纪要稍后补上。字幕照常。"), tint: Palette.warnPale) { EmptyView() }+ StatusLine(tone: .waiting, text: L("\(serviceLabel) 很忙 · 纪要稍后补上,字幕照常"))// Both: the notes' own request failed, and the service doesn't answer anything. Notes that// only timed out while translations still came back aren't "can't reach"; the next round retries.- case .unreachable where live && model.ling.aiCheck.failure?.reason == .unreachable:- // The network or the proxy, not the notes: say which, and that it picks up by itself.- notice(lastCovered > 0 ? L("连不上 \(serviceLabel),纪要暂停在 \(NotesEngine.clock(lastCovered)),连上后自动继续。")- : L("连不上 \(serviceLabel),连上后开始写纪要。"), tint: Palette.errorPale) {- SoftButton(L("设置")) { model.openSettings(.ai) }+ // The retry that follows (`updating`) hangs as long as a timeout: the line stays meanwhile.+ case .unreachable where live && model.ling.aiCheck.failure?.reason == .unreachable,+ .updating where live && model.ling.aiCheck.failure?.reason == .unreachable:+ if model.ling.aiCheck.localNetworkDenied {+ StatusLine(tone: .needsYou, text: L("连不上 \(serviceLabel) · 缺本地网络权限"),+ action: (L("去开启"), { model.openLocalNetworkSettings() }))+ } else {+ // The network or the proxy, not the notes: it picks up by itself. Where the service+ // also hears the meeting (Intel) the subtitles wait too.+ StatusLine(tone: .waiting, text: Recognition.cloudOnly+ ? L("字幕和纪要等 \(serviceLabel) 恢复 · 连上后自动继续")+ : lastCovered > 0 ? L("纪要等 \(serviceLabel) 恢复 · 停在 \(NotesEngine.clock(lastCovered)),字幕照常")+ : L("纪要等 \(serviceLabel) 恢复 · 字幕照常"),+ action: model.canSwitchToLing ? (L("改用 Ling"), { model.switchToLing() }) : nil)}case .failed where live:- notice(L("这轮没整理好,下一轮会自动重试。"), tint: Palette.fill) { EmptyView() }+ StatusLine(tone: .info, text: L("这轮纪要没写好 · 下轮自动补上"))default:EmptyView()}@@ -750,14 +758,6 @@ struct NotesWindowView: View {return s.lines[engine.notes.covered - 1].t}- private func notice<Trailing: View>(_ text: String, tint: Color, @ViewBuilder trailing: () -> Trailing) -> some View {- HStack(spacing: 10) {- Text(text).font(.system(size: 12)).lineSpacing(2).frame(maxWidth: .infinity, alignment: .leading)- trailing()- }- .padding(12)- .background(RoundedRectangle(cornerRadius: 12).fill(tint))- }/// Without a key, finished sentences rely on Google too: when it can't be reached and nothing/// stands in, the key panel says so, since a key is the fix (Ling needs no proxy in China).diff --git a/Sources/Cicada/SpeakEngine.swift b/Sources/Cicada/SpeakEngine.swiftindex d1768a7..da2f1a6 100644--- a/Sources/Cicada/SpeakEngine.swift+++ b/Sources/Cicada/SpeakEngine.swift@@ -504,7 +504,7 @@ final class SpeakEngine {debugLog("speak: translation failed, nothing sent")if probe == nil { onTiming?(timing(voice: nil)) }phase = .idle- onLive?(.idle, text, L("翻译失败,这句话未发送"))+ onLive?(.idle, text, L("这句没翻译成 · 没有说出去"))probe?.finish()return}diff --git a/Sources/Cicada/Views.swift b/Sources/Cicada/Views.swiftindex 88281fd..efcbf38 100644--- a/Sources/Cicada/Views.swift+++ b/Sources/Cicada/Views.swift@@ -31,6 +31,39 @@ enum Palette {static let placeholder = Color(red: 0.722, green: 0.741, blue: 0.776)}+/// A service in trouble, said the same way wherever it shows: a dot, what waits for what · what+/// still works, and at most one action. Colour sits in the dot only, so a passing wait doesn't+/// read as a fault: yellow waits and comes back by itself, red needs you, grey is just so you know.+struct StatusLine: View {+ enum Tone { case waiting, needsYou, info }+ let tone: Tone+ let text: String+ var action: (title: String, run: () -> Void)? = nil++ /// #C98A00: the warn ink is too dark to tell from the text at 6 pt.+ static let waitingDot = Color(red: 0.788, green: 0.541, blue: 0.0)++ var body: some View {+ HStack(spacing: 8) {+ Circle().fill(tone == .waiting ? Self.waitingDot : tone == .needsYou ? Palette.error : Palette.tertiary)+ .frame(width: 6, height: 6)+ Text(text).font(.system(size: 12)).foregroundStyle(Palette.secondary)+ .fixedSize(horizontal: false, vertical: true)+ .frame(maxWidth: .infinity, alignment: .leading)+ if let action {+ Button(action: action.run) {+ Text(action.title).font(.system(size: 12, weight: .semibold)).foregroundStyle(Palette.ink)+ .padding(.vertical, 4).contentShape(Rectangle())+ }+ .buttonStyle(.plain).fixedSize()+ }+ }+ .padding(.horizontal, 12).padding(.vertical, 7)+ .frame(minHeight: 36)+ .background(RoundedRectangle(cornerRadius: 10).fill(Palette.fill))+ }+}+struct LogoTile: View {var size: CGFloat = 34var body: some View { BrandMark(size: size) }diff --git a/site/changelog.json b/site/changelog.jsonindex 51aebbf..e8248a5 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -120,6 +120,14 @@"title": "会议结束后的“改用 English 重新整理”按钮,英文名两边有空格了。","text": "原来挤成“改用English重新整理”;中文名照旧不加空格。"},+ {+ "kind": "improved",+ "platforms": [+ "mac"+ ],+ "title": "AI 服务出问题时,纪要窗口只用一行说清在等谁、什么照常。",+ "text": "黄点是在等、会自己恢复,红点是要你动手;自己的服务连不上而存过 Ling key 时,点“改用 Ling”纪要马上接着写。说话同传没说出去的一句,也说明是因为没翻译成。"+ },{"kind": "fixed","platforms": [