知了 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(linux): a custom AI service whose key fails is named by its address in the tray, notification and notes window
wquguru9458abb39fa4
diff --git a/linux/cicada/app/aicheck_view.py b/linux/cicada/app/aicheck_view.pyindex 2c2c1b8..adeb32b 100644--- a/linux/cicada/app/aicheck_view.py+++ b/linux/cicada/app/aicheck_view.py@@ -97,7 +97,7 @@ def steps_widget(app, change_key, recheck_in_step: bool = True, width_chars: intif st.kind == aicheck.BUSY_STATE:ui.classes(w, "busy")texts.pack_start(w, False, False, 0)- line = r.proxy_line(ling.service_name, host)+ line = r.proxy_line(ling.service_label, host)if line:texts.pack_start(ui.panel(ui.pad(ui.text(line, 12, "", width_chars=width_chars), 7, 10), "proxybox"), False, False, 0)acts = actions(app, change_key, recheck_in_step) if st.kind == aicheck.FAIL else []@@ -145,7 +145,7 @@ def strip_words(app):r = ling.check_resultif not ling.has_key or not r.needs_user:return None- name = ling.service_name+ name = ling.service_labelf = r.failureif f is None:return r.balance_line(name), L("用完后纪要会停下")@@ -164,7 +164,7 @@ def blocking(app) -> str | None:if not ling.has_key:return Nonec = ling.config()- return problem.title(ling.check_result.reason, ling.service_name, c.text_model, c.hear_model)+ return problem.title(ling.check_result.reason, ling.service_label, c.text_model, c.hear_model)def blocking_detail(app) -> str:diff --git a/linux/cicada/app/main.py b/linux/cicada/app/main.pyindex 0472cc6..0a686ec 100644--- a/linux/cicada/app/main.py+++ b/linux/cicada/app/main.py@@ -197,7 +197,7 @@ class Controller:kind = self.notices.tick(time.time(), self.listen.listening, reason, shown)if kind is not None:from .aicheck_view import blocking, blocking_detail- name = self.ling.service_name+ name = self.ling.service_labeltitle = blocking(self) if kind == "blocking" else LF("连不上 %@", name)n = Gio.Notification.new(title or L("AI 服务的设置要改一下"))n.set_body(blocking_detail(self) if kind == "blocking" else self.ling.message() or "")diff --git a/linux/cicada/app/notes_window.py b/linux/cicada/app/notes_window.pyindex ae61404..0f729fd 100644--- a/linux/cicada/app/notes_window.py+++ b/linux/cicada/app/notes_window.py@@ -936,7 +936,7 @@ class NotesWindow(Gtk.Window):reason = self._reason()ling = self.app.ling# Who the line names: a custom service by its address, which says more than 这个服务.- name = ling.service_host if ling.provider.id == "custom" and ling.service_host else ling.service_name+ name = ling.service_label# All but the key are about a round of the meeting going on now: a record opened later has none.live = self.app.listen.listeningstatus = engine.statusdiff --git a/linux/cicada/core/ling.py b/linux/cicada/core/ling.pyindex 5bde2c9..be36cf2 100644--- a/linux/cicada/core/ling.py+++ b/linux/cicada/core/ling.py@@ -358,6 +358,13 @@ class LingClient:p = self.providerreturn p.name if p.id != "custom" else strings.L("这个服务")+ @property+ def service_label(self) -> str:+ """Who a status line names: a custom service by its address, which says more than 这个服务+ and reads right in "The … key doesn't work"."""+ host = self.service_host+ return host if self.provider.id == "custom" and host else self.service_name+@propertydef service_host(self) -> str:c = self.config()@@ -374,7 +381,7 @@ class LingClient:c = self.config()f = self.check_result.failurehost = self.hear_host if f is not None and f[0] == "hear" else self.service_host- return self.check_result.message(self.service_name, host, c.text_model, c.hear_model)+ return self.check_result.message(self.service_label, host, c.text_model, c.hear_model)def _classify(self, e: LingError, at: str, audio: bool = False):"""aicheck.classify, except that a hear model at an address of its own that can't be reached