知了 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): saying yes to a fixed name fixes the rest of the meeting heard the same way at once, not only with the next line
wqugurubd14ca118a7b
diff --git a/linux/cicada/core/live_fixes.py b/linux/cicada/core/live_fixes.pyindex 33e5bfb..cdd73c9 100644--- a/linux/cicada/core/live_fixes.py+++ b/linux/cicada/core/live_fixes.py@@ -176,7 +176,9 @@ class LiveFixes:with self._gate:touched = [l for l in self.store.lines(sid)if any(f.ask is True and correction.core(f.from_, f.to) == c for f in l.fixes or [])]- self._remember(sid, [l.id for l in touched])+ ids = {l.id for l in touched}+ others = [l for l in self.store.lines(sid) if c[0] in l.src and l.id not in ids] if yes else []+ self._remember(sid, [l.id for l in touched + others])for l in touched:fixes = [f.copy() for f in l.fixes]for f in fixes:@@ -189,6 +191,9 @@ class LiveFixes:self._set(fixes, l.id, sid)if yes:self.vocabulary.confirm(c[0], c[1])+ # The rest of the meeting heard the same way follows now, not with the next line.+ for l in others:+ self.apply_known(l.id, sid)else:self._refused.add(_pair(*c))Log.d("fix answered %s" % ("yes" if yes else "no"))diff --git a/linux/tests/test_fixes.py b/linux/tests/test_fixes.pyindex 7ef0b86..006e56b 100644--- a/linux/tests/test_fixes.py+++ b/linux/tests/test_fixes.py@@ -328,6 +328,14 @@ class Live(Base):fx.received("但质压这种", [Edit("质压", "质押", 0.9)])self.assertEqual(store.line(sid, "l0").shown, "但质压这种")+ def test_yes_fixes_the_rest_of_the_meeting_at_once(self):+ fx, store, sid = self.setup(["最近那个开布特提了", "开布特那边也说了"])+ fx.received("最近那个开布特提了", [Edit("开布特", "Curve", 0.9)])+ fx.answer(fx.pending(sid)[0][1], True, sid)+ self.assertEqual(store.line(sid, "l1").shown, "Curve那边也说了")+ fx.undo()+ self.assertEqual(store.line(sid, "l1").shown, "开布特那边也说了")+def test_toast_says_what_was_done(self):fx, store, sid = self.setup(["但质压这种"])fx.received("但质压这种", [Edit("质压", "质押", 0.9)])