知了 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: live notes keep the listening animation until the first notes are actually being written
wquguru599614a36112
diff --git a/Sources/Cicada/NotesViews.swift b/Sources/Cicada/NotesViews.swiftindex 42c694a..eaf7739 100644--- a/Sources/Cicada/NotesViews.swift+++ b/Sources/Cicada/NotesViews.swift@@ -1189,15 +1189,21 @@ struct SkeletonBar: View {}}-/// Listening, nothing said yet: one quiet status row, then the notes' own shape waiting to be+/// Listening, no notes asked for yet: one quiet status row, then the notes' own shape waiting to be/// filled, so the first version lands where the reader is already looking.struct NotesListeningView: View {+ /// Lines heard so far; the first notes request waits for a few of them.+ var heard = 0+var body: some View {VStack(alignment: .leading, spacing: 22) {HStack(spacing: 12) {SoundBars()Text("有人开口后,约半分钟出第一版").font(.system(size: 13)).foregroundStyle(Palette.ink)Spacer(minLength: 0)+ if heard > 0 {+ Text("已听到 \(heard) 句").font(.system(size: 12)).foregroundStyle(Palette.tertiary).fixedSize()+ }}.padding(.horizontal, 14).padding(.vertical, 12).background(RoundedRectangle(cornerRadius: 12).fill(Palette.accentPale.opacity(0.7)))diff --git a/Sources/Cicada/NotesWindow.swift b/Sources/Cicada/NotesWindow.swiftindex 749267e..2cf80bf 100644--- a/Sources/Cicada/NotesWindow.swift+++ b/Sources/Cicada/NotesWindow.swift@@ -787,13 +787,16 @@ struct NotesWindowView: View {notesScroll} else if engine.state == .noKey || engine.state == .invalidKey {Spacer()- } else if live && heard == 0 {+ } else if (live && heard > 0 && engine.state == .updating)+ || (session != nil && engine.generatingID == session?.id) { // nil == nil is not "generating"ScrollView {- NotesListeningView().padding(.horizontal, 24).padding(.vertical, 12)+ NotesGeneratingView(heard: heard).padding(.horizontal, 24).padding(.vertical, 12)}- } else if live || (session != nil && engine.generatingID == session?.id) { // nil == nil is not "generating"+ } else if live {+ // Until a request is actually out: the first one waits for a few lines or 20 s, and+ // audio already playing at the start brings a line within seconds.ScrollView {- NotesGeneratingView(heard: heard).padding(.horizontal, 24).padding(.vertical, 12)+ NotesListeningView(heard: heard).padding(.horizontal, 24).padding(.vertical, 12)}} else {VStack {diff --git a/Sources/Cicada/Views.swift b/Sources/Cicada/Views.swiftindex 5efbd60..11392bc 100644--- a/Sources/Cicada/Views.swift+++ b/Sources/Cicada/Views.swift@@ -1316,8 +1316,10 @@ struct SessionNotesView: View {if let notes, !notes.isEmpty {NotesContentView(notes: SpeakerLabels.named(notes, SpeakerLabels.names(session)), fresh: live ? engine.fresh : [], live: live, document: true,endedAt: session.lines.last?.t, onJump: onJump)- } else if generating || (live && ling.hasKey && !session.lines.isEmpty) {+ } else if generating || (live && ling.hasKey && !session.lines.isEmpty && engine.state == .updating) {NotesGeneratingView(heard: session.lines.count)+ } else if live && ling.hasKey {+ NotesListeningView(heard: session.lines.count)} else {VStack(alignment: .leading, spacing: 10) {Text(generating ? L("正在整理纪要…") : live ? L("纪要会在会议进行中自动生成") : L("这场会议还没有纪要"))