知了 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: Settings › Word list edits in place: change a spelling, add or remove a misheard form, undo a delete, see counts before pasting
wqugurud7db66fdd81c
diff --git a/README.en.md b/README.en.mdindex 4e8e0ec..809710d 100644--- a/README.en.md+++ b/README.en.md@@ -50,7 +50,7 @@ All four share one version number and one meeting record format; downloads are oWhile the meeting runs, the notes window organizes a summary, topics and key points, conclusions, to-dos, a fishbone diagram, and a glossary of names and terms, and every conclusion or to-do clicks straight back to the supporting lines in the bilingual transcript. Cicada unifies names and terms across the notes and remembers misrecognized spellings, so `⌘F` searches both the canonical spelling and the variants. When the AI service has a problem only you can fix (key, credit, model), the notes window says so and the menu bar icon gets an orange dot; when **Turn on mic** can't get the microphone, the notes window, the subtitle bar and the menu bar icon all say so.-Misheard names and terms are fixed as you go (needs an AI service): sound-alike mistakes are fixed right away, and a name it hasn't seen is asked about once in the notes window, then fixed from then on. Fixed words are underlined with dots; point at the paragraph to see what was heard, or revert it. Paste the spellings you use into Settings › Word list.+Misheard names and terms are fixed as you go (needs an AI service): sound-alike mistakes are fixed right away, and a name it hasn't seen is asked about once in the notes window, then fixed from then on. Fixed words are underlined with dots; point at the paragraph to see what was heard, or revert it. Paste the spellings you use into Settings › Word list, and edit them in place. After the meeting, Edit line… in the meeting record fixes a word everywhere it was misheard, and every fix can be undone.### Live subtitles and language detectiondiff --git a/README.ja.md b/README.ja.mdindex 45b4fe3..eca67c6 100644--- a/README.ja.md+++ b/README.ja.md@@ -52,7 +52,7 @@ Cicada は、Zoom、Teams、Feishu の通話から、X スペース、Discord会議の進行中、メモのウィンドウには、要約、トピックと要点、結論、ToDo、フィッシュボーン図、人名と用語の用語集が整理され、各結論や ToDo をクリックすると、二か国語の書き起こしの根拠となる行に直接戻れます。Cicada はメモ全体で人名と用語を統一し、誤って認識された表記を覚えているので、`⌘F` では正規の表記とその揺れの両方を検索できます。AI サービスにあなたにしか直せない問題(キー、残高、モデル)があるときは、メモのウィンドウが知らせ、メニューバーのアイコンにオレンジの点が付きます。マイクをオンにしたのにマイクが使えないときは、メモのウィンドウ、字幕バー、メニューバーのアイコンのすべてで知らせます。-聞き間違えた人名や用語はその場で直します(AI サービスが必要)。発音の近い誤りはすぐ直し、初めての名前はメモウィンドウで一度だけ確認し、「はい」と答えるとそれ以降は自動で直します。直した語には点線が付き、その段落を指すと元の認識結果を見たり元に戻したりできます。よく使う表記は設定の「単語リスト」にまとめて貼り付けられます。+聞き間違えた人名や用語はその場で直します(AI サービスが必要)。発音の近い誤りはすぐ直し、初めての名前はメモウィンドウで一度だけ確認し、「はい」と答えるとそれ以降は自動で直します。直した語には点線が付き、その段落を指すと元の認識結果を見たり元に戻したりできます。よく使う表記は設定の「単語リスト」にまとめて貼り付け、その場で直せます。会議のあとは記録の「この行を修正…」で、同じ聞き間違いを会議全体でまとめて直せます。どの修正も元に戻せます。### リアルタイムの字幕と言語の検出diff --git a/README.ko.md b/README.ko.mdindex 1d02611..00294ed 100644--- a/README.ko.md+++ b/README.ko.md@@ -50,7 +50,7 @@ Zoom, Teams, Feishu 회의부터 X Spaces, Discord 스테이지, YouTube 라이회의가 진행되는 동안 회의록 창에서 요약, 안건 및 요점, 결론, 할 일, 피시본 다이어그램, 인명·용어집을 실시간으로 정리합니다. 결론이나 할 일을 클릭하면 이중 언어 기록의 해당 발언으로 바로 이동합니다. 회의록 전체에서 인명과 용어 표기를 통일하고 잘못 인식된 표기도 기억하므로, `⌘F`로 검색하면 표준 표기와 오인식된 변형을 함께 찾아줍니다. AI 서비스에 내가 직접 고쳐야 하는 문제(키, 잔액, 모델)가 생기면 회의록 창이 알려 주고 메뉴 막대 아이콘에 주황색 점이 붙습니다. 마이크를 켰는데 마이크를 쓸 수 없을 때는 회의록 창, 자막 바, 메뉴 막대 아이콘 모두에서 알려 줍니다.-잘못 들은 이름과 용어를 그 자리에서 고칩니다(AI 서비스 필요). 발음이 비슷한 오류는 바로 고치고, 처음 보는 이름은 회의록 창에서 한 번 물어본 뒤 ‘네’라고 하면 그다음부터 자동으로 고칩니다. 고친 단어에는 점선이 표시되고, 그 단락을 가리키면 원래 인식된 내용을 보거나 되돌릴 수 있습니다. 자주 쓰는 표기는 설정의 ‘단어 목록’에 한꺼번에 붙여 넣을 수 있습니다.+잘못 들은 이름과 용어를 그 자리에서 고칩니다(AI 서비스 필요). 발음이 비슷한 오류는 바로 고치고, 처음 보는 이름은 회의록 창에서 한 번 물어본 뒤 ‘네’라고 하면 그다음부터 자동으로 고칩니다. 고친 단어에는 점선이 표시되고, 그 단락을 가리키면 원래 인식된 내용을 보거나 되돌릴 수 있습니다. 자주 쓰는 표기는 설정의 ‘단어 목록’에 한꺼번에 붙여 넣고 그 자리에서 고칠 수 있습니다. 회의 후에는 기록에서 ‘이 줄 고치기…’로 같은 오류를 회의 전체에서 한 번에 고칠 수 있고, 모든 수정은 되돌릴 수 있습니다.### 실시간 자막 및 언어 감지diff --git a/README.md b/README.mdindex 8862f52..13601aa 100644--- a/README.md+++ b/README.md@@ -48,7 +48,7 @@开会时纪要窗口边听边整理总结、议题要点、结论、待办、鱼骨图和人名术语表,点一下结论或待办就能跳回双语文字记录里的原话。纪要会统一文中人名和术语的写法并记下听错的变体,按 `⌘F` 搜索时能连同识别错的写法一起搜出来。AI 服务出了只有你能修的问题(key、余额、模型)时,纪要窗口会说明,菜单栏图标多一个橙点;打开了麦克风却没拿到麦克风权限时,纪要窗口、字幕条和菜单栏图标都会提示。-听错的人名和术语会当场改对(需要 AI 服务):读音相近的错字直接改,没见过的名字先在纪要窗口问你一次,答“对”以后就自动改;改过的词带虚线,指着那段话能看到原来听成什么,也能改回。常用的写法可以在设置的“词表”里一次贴进来。+听错的人名和术语会当场改对(需要 AI 服务):读音相近的错字直接改,没见过的名字先在纪要窗口问你一次,答“对”以后就自动改;改过的词带虚线,指着那段话能看到原来听成什么,也能改回。常用的写法可以在设置的“词表”里一次贴进来,词表里的写法和听错的形式都能就地改。会后在会议记录里也能自己改:选“改这句…”,整场同样听错的地方一起改;每次改动都可以撤销。### 实时字幕与语言识别diff --git a/Sources/Cicada/WordListSettings.swift b/Sources/Cicada/WordListSettings.swiftindex 815f57a..67c73e2 100644--- a/Sources/Cicada/WordListSettings.swift+++ b/Sources/Cicada/WordListSettings.swift@@ -1,7 +1,8 @@import SwiftUI/// 设置 › 词表: the switches for 改正听错的词, and the word list itself (`Vocabulary`): each word,-/// what it has been heard as, where it came from and how often it fixed a line.+/// what it has been heard as, where it came from and how often it fixed a line. Everything is+/// edited in place; changes count from the next sentence on.struct WordListSettings: View {@ObservedObject var model: AppModel@ObservedObject var settings: AppSettings@@ -9,19 +10,27 @@ struct WordListSettings: View {@ObservedObject var ling: LingClient@State private var importing = false@State private var query = ""+ /// A deleted word, shown in its place with 撤销 for a few seconds.+ @State private var deleted: (term: Vocabulary.Term, index: Int)?+ @State private var deletedAt = Date.distantPastvar body: some View {VStack(alignment: .leading, spacing: 14) {SettingsCard {SettingsRow(title: L("会中改正听错的词"),detail: ling.usable ? L("走 \(ling.provider.name),只发文字") : L("接上 AI 服务后才会改")) {- Toggle("会中改正听错的词", isOn: $settings.fixMisheard)- .toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)+ if ling.usable {+ Toggle("会中改正听错的词", isOn: $settings.fixMisheard)+ .toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)+ } else {+ Button(L("去设置")) { model.settingsSection = .ai }+ .buttonStyle(.plain).font(.system(size: 12, weight: .medium)).foregroundStyle(Palette.link)+ }}SettingsRow(title: L("没见过的名字和专称先问我"), detail: L("关掉就只改词表里的词和同音错字"), divider: false) {Toggle("没见过的名字和专称先问我", isOn: $settings.askNames).toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)- .disabled(!settings.fixMisheard)+ .disabled(!settings.fixMisheard || !ling.usable)}}@@ -38,15 +47,25 @@ struct WordListSettings: View {}.padding(.top, 4)- if vocabulary.terms.isEmpty {+ if vocabulary.terms.isEmpty && deleted == nil {Text("还没有词。把常用的人名、产品名贴进来,会中就照这些写法改").font(.system(size: 12)).foregroundStyle(Palette.tertiary).frame(maxWidth: .infinity, alignment: .leading).padding(.vertical, 6)} else {SettingsCard {+ if let d = deleted {+ HStack(spacing: 10) {+ (Text("已删除") + Text(verbatim: " ") + Text(d.term.word).bold()).font(.system(size: 13)).foregroundStyle(Palette.secondary)+ Spacer()+ Button(L("撤销")) { vocabulary.insert(d.term, at: d.index); deleted = nil }+ .buttonStyle(.plain).font(.system(size: 12, weight: .semibold)).foregroundStyle(Palette.link)+ }+ .padding(.horizontal, 16).frame(minHeight: 40)+ Divider().padding(.leading, 16)+ }let list = shownForEach(Array(list.enumerated()), id: \.element.word) { i, t in- WordRow(term: t, divider: i < list.count - 1) { vocabulary.remove(t.word) }+ WordRow(term: t, vocabulary: vocabulary, divider: i < list.count - 1) { remove(t) }}}}@@ -56,7 +75,16 @@ struct WordListSettings: View {.sheet(isPresented: $importing) { WordImportSheet(vocabulary: vocabulary) }}- /// Most recently useful first, then the rest by when they were added.+ private func remove(_ t: Vocabulary.Term) {+ let index = vocabulary.terms.firstIndex(of: t) ?? 0+ vocabulary.remove(t.word)+ deleted = (t, index)+ let at = Date()+ deletedAt = at+ DispatchQueue.main.asyncAfter(deadline: .now() + 8) { if deletedAt == at { deleted = nil } }+ }++ /// Most recently useful first, then the rest newest first.private var shown: [Vocabulary.Term] {let q = Vocabulary.key(query)let all = vocabulary.terms.reversed().sorted { ($0.used ?? .distantPast) > ($1.used ?? .distantPast) }@@ -67,20 +95,45 @@ struct WordListSettings: View {private struct WordRow: View {let term: Vocabulary.Term+ @ObservedObject var vocabulary: Vocabularylet divider: Boollet onRemove: () -> Void@State private var hovering = false+ @State private var editing = false+ @State private var word = ""+ @State private var newHeard = ""+ /// A heard form typed here that another word already has: whose it should be.+ @State private var conflict: (heard: String, owner: String)?+ @FocusState private var wordFocused: Boolvar body: some View {VStack(spacing: 0) {HStack(alignment: .center, spacing: 12) {- Text(term.word).font(.system(size: 13, weight: .semibold)).foregroundStyle(Palette.ink)- .frame(width: 140, alignment: .leading).lineLimit(1)+ if editing {+ TextField("", text: $word).textFieldStyle(.roundedBorder).controlSize(.small)+ .font(.system(size: 13, weight: .semibold)).frame(width: 140)+ .focused($wordFocused)+ .onSubmit { vocabulary.rename(term.word, to: word); editing = false }+ .onExitCommand { editing = false }+ .onChange(of: wordFocused) { _, f in if !f && editing { vocabulary.rename(term.word, to: word); editing = false } }+ } else {+ Button { word = term.word; editing = true; wordFocused = true } label: {+ Text(term.word).font(.system(size: 13, weight: .semibold)).foregroundStyle(Palette.ink)+ .lineLimit(1).frame(width: 140, alignment: .leading).contentShape(Rectangle())+ }+ .buttonStyle(.plain).help(L("点一下改写法"))+ }FlowLayout(spacing: 4) {ForEach(term.heard, id: \.self) { h in- Text(h).font(.system(size: 11)).foregroundStyle(Palette.secondary)+ HeardChip(text: h) { vocabulary.forget(heard: h, word: term.word) }+ }+ // Only while pointed at (or typed in): hidden, it would still take room and wrap the forms.+ if hovering || !newHeard.isEmpty {+ TextField("加一个容易听错的词", text: $newHeard)+ .textFieldStyle(.plain).font(.system(size: 11)).frame(width: 110).padding(.horizontal, 6).padding(.vertical, 2)- .background(RoundedRectangle(cornerRadius: 5).fill(Palette.fill))+ .overlay(RoundedRectangle(cornerRadius: 5).strokeBorder(style: StrokeStyle(lineWidth: 1, dash: [3, 2])).foregroundStyle(Color(white: 0.78)))+ .onSubmit(addHeard)}}.frame(maxWidth: .infinity, alignment: .leading)@@ -96,14 +149,60 @@ private struct WordRow: View {.buttonStyle(.plain).help(L("从词表里删掉")).opacity(hovering ? 1 : 0.35)}.padding(.horizontal, 16).frame(minHeight: 40)+ if let c = conflict {+ HStack(spacing: 10) {+ Text("“\(c.heard)”已经记在 \(c.owner) 下").font(.system(size: 12)).foregroundStyle(Palette.ink)+ Spacer()+ SoftButton(L("改给 \(term.word)"), dark: true) {+ vocabulary.forget(heard: c.heard, word: c.owner)+ vocabulary.confirm(heard: c.heard, word: term.word, source: term.source)+ conflict = nil+ }+ SoftButton(L("两个都留")) { vocabulary.confirm(heard: c.heard, word: term.word, source: term.source); conflict = nil }+ }+ .padding(.horizontal, 16).padding(.bottom, 10)+ }if divider { Divider().padding(.leading, 16) }}.onHover { hovering = $0 }}++ private func addHeard() {+ let h = newHeard.trimmingCharacters(in: .whitespaces)+ newHeard = ""+ guard !h.isEmpty, h.count <= 40 else { return }+ if let owner = vocabulary.owners(ofHeard: h, except: term.word).first {+ conflict = (h, owner)+ } else {+ vocabulary.confirm(heard: h, word: term.word, source: term.source)+ }+ }+}++/// One heard form; pointing at it shows × to take it off.+private struct HeardChip: View {+ let text: String+ let onRemove: () -> Void+ @State private var hovering = false++ var body: some View {+ HStack(spacing: 3) {+ Text(text).font(.system(size: 11)).foregroundStyle(Palette.secondary)+ if hovering {+ Button(action: onRemove) {+ Image(systemName: "xmark").font(.system(size: 8, weight: .bold)).foregroundStyle(Palette.tertiary)+ }+ .buttonStyle(.plain).accessibilityLabel(L("删掉这个听错的词"))+ }+ }+ .padding(.horizontal, 6).padding(.vertical, 2)+ .background(RoundedRectangle(cornerRadius: 5).fill(Palette.fill))+ .onHover { hovering = $0 }+ }}-/// 粘贴导入: many words at once, each line one word, heard forms after "=". Lines that can't be-/// taken are reported by number; the rest go in.+/// 粘贴导入: many words at once, each line one word, heard forms after "=". The counts follow+/// what is pasted, and the button says how many go in.private struct WordImportSheet: View {@ObservedObject var vocabulary: Vocabulary@Environment(\.dismiss) private var dismiss@@ -111,6 +210,8 @@ private struct WordImportSheet: View {@State private var result: Vocabulary.ImportResult?var body: some View {+ let preview = vocabulary.preview(text)+ let n = preview.added + preview.updatedVStack(alignment: .leading, spacing: 12) {Text("粘贴导入").font(.system(size: 15, weight: .bold)).foregroundStyle(Palette.ink)Text("一行一个。常被听错的词,写在 = 后面").font(.system(size: 12)).foregroundStyle(Palette.secondary)@@ -128,23 +229,26 @@ private struct WordImportSheet: View {.overlay(RoundedRectangle(cornerRadius: 8).stroke(Palette.line, lineWidth: 1))if let r = result {VStack(alignment: .leading, spacing: 4) {- Text("新增 \(r.added) · 更新 \(r.updated) · 跳过 \(r.skipped.count)")+ Text("新增 \(r.added) · 补充听成 \(r.updated) · 跳过 \(r.skipped.count)").font(.system(size: 12, weight: .medium)).foregroundStyle(Palette.ink)if !r.skipped.isEmpty {Text("第 \(r.skipped.map(String.init).joined(separator: "、")) 行没加进去:超过 40 个字").font(.system(size: 11)).foregroundStyle(Palette.accentInk)}}+ } else if !text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {+ Text("新增 \(preview.added) · 补充听成 \(preview.updated) · 跳过 \(preview.skipped.count)")+ .font(.system(size: 12)).foregroundStyle(Palette.secondary)}HStack {Spacer()SoftButton(result == nil ? L("取消") : L("完成")) { dismiss() }if result == nil {- SoftButton(L("导入"), dark: true) {+ SoftButton(L("导入 \(n) 个"), dark: true) {result = vocabulary.importText(text)text = ""}- .disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)+ .disabled(n == 0)}}}diff --git a/site/changelog.json b/site/changelog.jsonindex 9f97438..8623a12 100644--- a/site/changelog.json+++ b/site/changelog.json@@ -37,6 +37,14 @@],"title": "会议记录里可以自己改听错的词:右键或指着一句选“改这句…”,整场同样听错的地方一起改,并记进词表。","text": "会议结束后,文字记录顶部会逐个问还没确认的改法(对 / 不对 / 改成…)。每次改动、改回、确认之后都有“撤销”。每句说完十几秒后知了会带着后面几句再看一遍,补上漏改的、撤掉改错的,但你确认过、改过的地方不会被动。纪要窗口的“这样改对吗?”可以先按 × 放一放,留到会后再问;人名和术语里能看到每个词改了几处,点一下就跳到那几句。"+ },+ {+ "kind": "improved",+ "platforms": [+ "mac"+ ],+ "title": "词表里的写法和听错的形式都能就地改,删掉的词可以撤销,粘贴导入前先显示会新增几个。",+ "text": "点写法就能改;指着一行,在后面敲一个新的听错形式就加上,指着已有的点 × 去掉。一个听错形式已经属于别的词时,会问你改给哪个,或者两个都留(之后遇到它每次都问)。没接 AI 服务时开关旁边有“去设置”。"}]},