知了 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: show at most 8 names and terms in the notes, misheard ones first
wqugurubc79c5fdef7c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 219c4c8..3697619 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,7 @@ the release workflow publishes it as the release notes.## Unreleased+- Changed: 人名和术语 in the notes shows at most 8, the names speech recognition got wrong first (with how they were heard), and 展开全部 N 个 for the rest. Ling is asked to keep it to 10 and leave out what everyone knows (Apple, NASDAQ) unless it was misheard; all of them still help the translation.- Fixed: in a long meeting the live notes window's 文字记录 no longer goes white or flickers. It used to lay out a whole topic's lines (up to a hundred) at once and redraw them for every new word being spoken, and following the newest line could scroll past what was drawn; now only the lines on screen are drawn, and the line being spoken redraws on its own.- Fixed: with 说话人识别 on, Ling no longer names a voice from a line someone else said. A name now counts only when its line was said by that voice or within two lines of it ("Okay, Amos, thank you" right after Amos spoke), so "I'm Christina…" from an advert break no longer names the anchor; names guessed this way before are checked again and dropped. Well-known people's names are spelt as the news spells them ("Amos Hochstein", not "Hockstein"), in the names and in the notes.- Fixed: a sentence cut in two by a short pause is joined back into one line and translated again as a whole, instead of two lines with half translations ("…at this" → "在这个"). Lines join when the second follows within 1.5 s, from the same voice, and the first doesn't end a sentence; the subtitle shows the joined sentence too.diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.stringsindex f19821f..b7cd5d7 100644--- a/Resources/en.lproj/Localizable.strings+++ b/Resources/en.lproj/Localizable.strings@@ -321,6 +321,7 @@"自动" = "Auto";"打开语言设置" = "Open language settings";"收起" = "Hide";+"展开全部 %lld 个" = "Show all %lld";"这场会议" = "This meeting";"只改这一场,默认值在 设置 › 语言" = "Changes only this meeting; defaults are in Settings › Language";"还没听出来" = "Not detected yet";diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.stringsindex 626d762..92361c6 100644--- a/Resources/ja.lproj/Localizable.strings+++ b/Resources/ja.lproj/Localizable.strings@@ -321,6 +321,7 @@"自动" = "自動";"打开语言设置" = "言語設定を開く";"收起" = "たたむ";+"展开全部 %lld 个" = "すべて表示(%lld 件)";"这场会议" = "この会議";"只改这一场,默认值在 设置 › 语言" = "この会議だけ変更します。既定値は 設定 › 言語";"还没听出来" = "未検出";diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.stringsindex 021d829..e4d1479 100644--- a/Resources/ko.lproj/Localizable.strings+++ b/Resources/ko.lproj/Localizable.strings@@ -321,6 +321,7 @@"自动" = "자동";"打开语言设置" = "언어 설정 열기";"收起" = "접기";+"展开全部 %lld 个" = "모두 보기 (%lld개)";"这场会议" = "이 회의";"只改这一场,默认值在 设置 › 语言" = "이 회의만 변경됩니다. 기본값은 설정 › 언어에 있습니다";"还没听出来" = "아직 감지 못함";diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.stringsindex e924284..b8b7332 100644--- a/Resources/zh-Hans.lproj/Localizable.strings+++ b/Resources/zh-Hans.lproj/Localizable.strings@@ -321,6 +321,7 @@"自动" = "自动";"打开语言设置" = "打开语言设置";"收起" = "收起";+"展开全部 %lld 个" = "展开全部 %lld 个";"这场会议" = "这场会议";"只改这一场,默认值在 设置 › 语言" = "只改这一场,默认值在 设置 › 语言";"还没听出来" = "还没听出来";diff --git a/Sources/LiveSubs/Notes.swift b/Sources/LiveSubs/Notes.swiftindex 61e1063..eb106d1 100644--- a/Sources/LiveSubs/Notes.swift+++ b/Sources/LiveSubs/Notes.swift@@ -63,6 +63,11 @@ struct NoteTerm: Codable, Equatable, Identifiable {var note: Stringvar heard: [String]var id: String { name }++ /// Corrected spellings first: what a reader can't work out alone.+ static func ordered(_ terms: [NoteTerm]) -> [NoteTerm] {+ terms.filter { !$0.heard.isEmpty } + terms.filter { $0.heard.isEmpty }+ }}// MARK: - Engine@@ -367,7 +372,7 @@ final class NotesEngine: ObservableObject {- At most 5 conclusions and only real to-dos (often none).- Add a fishbone only to a topic that discusses causes, reasons or factors (3-5 branches); otherwise null.- Every topic, point, branch, conclusion and to-do needs evidence: the ids of the lines that say it. Never state anything the transcript does not say.- - terms: at most 10 people, places or jargon words that matter. name is the correct spelling in the transcript's language (no translation in brackets); heard lists only the wrong forms the transcript used; note is a few words.+ - terms: at most 10 in total, replacing less useful ones rather than adding: first names the transcript misspells (heard), then the people, places and jargon a reader would not know. Leave out what everyone knows (a famous company, index or politician) unless it was misheard. name is the correct spelling in the transcript's language (no translation in brackets); heard lists only the wrong forms the transcript used; note is a few words.- Write the meeting title and every summary, title, point, branch, conclusion and to-do in \(language), even when the transcript is in another language. Only term names keep the transcript's spelling.- Write about what was said, never about the transcript or recognition quality.- Use empty arrays when there is nothing. No markdown, no text outside the JSON.@@ -475,6 +480,8 @@ final class NotesEngine: ObservableObject {let heard = (t["heard"] as? [Any] ?? []).map(str).filter { !$0.isEmpty && $0 != name }return name.isEmpty ? nil : NoteTerm(name: name, note: str(t["note"]), heard: heard)}+ // The model keeps every term it ever had: bound the glossary, keeping the misheard ones.+ if n.terms.count > 20 { n.terms = Array(NoteTerm.ordered(n.terms).prefix(20)) }return n.isEmpty ? nil : n}}diff --git a/Sources/LiveSubs/NotesViews.swift b/Sources/LiveSubs/NotesViews.swiftindex 762c596..5debee4 100644--- a/Sources/LiveSubs/NotesViews.swift+++ b/Sources/LiveSubs/NotesViews.swift@@ -82,16 +82,7 @@ struct NotesContentView: View {if !notes.terms.isEmpty {VStack(alignment: .leading, spacing: 10) {title(L("人名和术语"))- FlowLayout(spacing: 6) {- ForEach(notes.terms) { t in- (Text(t.name).bold() + Text(t.note.isEmpty ? "" : " \(t.note)")- + Text(t.heard.isEmpty ? "" : L(" · 原识别 \(t.heard.prefix(2).joined(separator: "、"))"))- .foregroundColor(Palette.tertiary))- .font(.system(size: 12))- .padding(.horizontal, 9).padding(.vertical, 5)- .background(RoundedRectangle(cornerRadius: 7).fill(Palette.fill))- }- }+ TermChips(terms: notes.terms, showHeard: true)}}}@@ -191,14 +182,7 @@ private struct DocumentNotesView: View {if !notes.terms.isEmpty {VStack(alignment: .leading, spacing: 10) {Text("人名和术语").font(.system(size: 12, weight: .medium)).foregroundStyle(Palette.tertiary)- FlowLayout(spacing: 6) {- ForEach(notes.terms) { t in- (Text(t.name).bold() + Text(t.note.isEmpty ? "" : " \(t.note)"))- .font(.system(size: 12))- .padding(.horizontal, 9).padding(.vertical, 5)- .background(RoundedRectangle(cornerRadius: 7).fill(Palette.fill))- }- }+ TermChips(terms: notes.terms, showHeard: false)}}}@@ -909,6 +893,35 @@ struct Tag: View {}}+/// 人名和术语: the corrected spellings first (what the reader can't work out alone), at most+/// `shown` until asked for the rest. All of them still go to the translation glossary.+struct TermChips: View {+ static let shown = 8+ let terms: [NoteTerm]+ var showHeard = true+ @State private var all = false++ var body: some View {+ let list = NoteTerm.ordered(terms)+ let extra = list.count - Self.shown+ FlowLayout(spacing: 6) {+ ForEach(all || extra <= 0 ? list : Array(list.prefix(Self.shown))) { t in+ (Text(t.name).bold() + Text(t.note.isEmpty ? "" : " \(t.note)")+ + Text(!showHeard || t.heard.isEmpty ? "" : L(" · 原识别 \(t.heard.prefix(2).joined(separator: "、"))"))+ .foregroundColor(Palette.tertiary))+ .font(.system(size: 12))+ .padding(.horizontal, 9).padding(.vertical, 5)+ .background(RoundedRectangle(cornerRadius: 7).fill(Palette.fill))+ }+ if extra > 0 {+ Button(all ? L("收起") : L("展开全部 \(list.count) 个")) { all.toggle() }+ .buttonStyle(.plain).font(.system(size: 12)).foregroundStyle(Palette.secondary)+ .padding(.horizontal, 6).padding(.vertical, 5)+ }+ }+ }+}+struct FramedList<Content: View>: View {@ViewBuilder var content: Contentvar body: some View {diff --git a/site/changelog.json b/site/changelog.jsonindex d316cc9..2702021 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -6,6 +6,11 @@"summary": "打开同声传译时,系统麦克风自动换成虚拟麦克风,Chrome 里的会议网页不用再手动设置;关掉或退出时自动换回。","image": null,"items": [+ {+ "kind": "changed",+ "title": "人名和术语不再一长串。",+ "text": "纪要里最多先显示 8 个,识别错、被纠正过的名字排在前面,其余点“展开全部”再看;人人都知道的公司、指数不再列出来,除非被听错了。所有名字仍然用来帮助翻译。"+ },{"kind": "fixed","title": "长会议里,文字记录不再白屏、闪烁。",