Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

feat(speakers): option to label a speaker on every line

clementchendbff73887aa7
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings
index 6ee937d..32fe63c 100644
--- a/Resources/en.lproj/Localizable.strings
+++ b/Resources/en.lproj/Localizable.strings
@@ -1522,3 +1522,9 @@
/* Retranscribe help */
"用保存的录音重新识别,替换现在的文字记录和纪要;旧记录会先备份" = "Recognize the saved recording again and replace the transcript and notes; the old record is backed up first";
+
+/* Speaker on every line */
+"每句都显示说话人" = "Speaker on every line";
+
+/* Speaker on every line */
+"连续同一个人说话时也重复标出,不再只在换人时标" = "Repeat the tag on every line, not only when the speaker changes";
diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings
index 30d0649..474695a 100644
--- a/Resources/ja.lproj/Localizable.strings
+++ b/Resources/ja.lproj/Localizable.strings
@@ -1522,3 +1522,9 @@
/* Retranscribe help */
"用保存的录音重新识别,替换现在的文字记录和纪要;旧记录会先备份" = "保存した録音で認識し直し、文字起こしと議事録を置き換えます。古い記録は先にバックアップされます";
+
+/* Speaker on every line */
+"每句都显示说话人" = "各行に話者を表示";
+
+/* Speaker on every line */
+"连续同一个人说话时也重复标出,不再只在换人时标" = "話者が変わる時だけでなく、各行に話者を表示します";
diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.strings
index c8ef05c..ccb5840 100644
--- a/Resources/ko.lproj/Localizable.strings
+++ b/Resources/ko.lproj/Localizable.strings
@@ -1522,3 +1522,9 @@
/* Retranscribe help */
"用保存的录音重新识别,替换现在的文字记录和纪要;旧记录会先备份" = "저장된 녹음으로 다시 인식해 텍스트와 회의록을 교체합니다. 이전 기록은 먼저 백업됩니다";
+
+/* Speaker on every line */
+"每句都显示说话人" = "모든 줄에 화자 표시";
+
+/* Speaker on every line */
+"连续同一个人说话时也重复标出,不再只在换人时标" = "화자가 바뀔 때만이 아니라 모든 줄에 화자를 표시합니다";
diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.strings
index ba5c1b8..8770cfe 100644
--- a/Resources/zh-Hans.lproj/Localizable.strings
+++ b/Resources/zh-Hans.lproj/Localizable.strings
@@ -1430,3 +1430,9 @@
/* Retranscribe help */
"用保存的录音重新识别,替换现在的文字记录和纪要;旧记录会先备份" = "用保存的录音重新识别,替换现在的文字记录和纪要;旧记录会先备份";
+
+/* Speaker on every line */
+"每句都显示说话人" = "每句都显示说话人";
+
+/* Speaker on every line */
+"连续同一个人说话时也重复标出,不再只在换人时标" = "连续同一个人说话时也重复标出,不再只在换人时标";
diff --git a/Sources/Cicada/Settings.swift b/Sources/Cicada/Settings.swift
index d1837e9..209f8ca 100644
--- a/Sources/Cicada/Settings.swift
+++ b/Sources/Cicada/Settings.swift
@@ -229,6 +229,12 @@ final class AppSettings: ObservableObject {
didSet { save() }
}
+ /// Repeat the speaker tag on every line instead of only when the speaker changes. Off by
+ /// default: a quiet meeting reads better as runs, but a record used as evidence wants it.
+ @Published var speakerEveryLine: Bool {
+ didSet { save() }
+ }
+
/// Recognise people saved in the local voiceprint library. Enrolling a voice is always an
/// explicit action with its own consent alert; this switch only controls automatic naming.
@Published var speakerMemory: Bool {
@@ -339,6 +345,7 @@ final class AppSettings: ObservableObject {
defaults.set(true, forKey: "speakerVoicesRegular")
}
speakerMemory = defaults.object(forKey: "speakerMemory") as? Bool ?? true
+ speakerEveryLine = defaults.object(forKey: "speakerEveryLine") as? Bool ?? false
}
private func save() {
@@ -392,6 +399,7 @@ final class AppSettings: ObservableObject {
defaults.set(diagnostics, forKey: "diagnostics")
defaults.set(notesCapturable, forKey: "notesCapturable")
defaults.set(speakerVoices, forKey: "speakerVoices")
+ defaults.set(speakerEveryLine, forKey: "speakerEveryLine")
defaults.set(speakerMemory, forKey: "speakerMemory")
defaults.set(fixMisheard, forKey: "fixMisheard")
defaults.set(askNames, forKey: "askNames")
diff --git a/Sources/Cicada/SettingsWindow.swift b/Sources/Cicada/SettingsWindow.swift
index 5ee5c79..fa33568 100644
--- a/Sources/Cicada/SettingsWindow.swift
+++ b/Sources/Cicada/SettingsWindow.swift
@@ -739,6 +739,11 @@ struct SettingsView: View {
Toggle("说话人识别", isOn: $settings.speakerVoices)
.toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)
}
+ SettingsRow(title: L("每句都显示说话人"), detail: L("连续同一个人说话时也重复标出,不再只在换人时标")) {
+ Toggle("每句都显示说话人", isOn: $settings.speakerEveryLine)
+ .toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)
+ .disabled(!settings.speakerVoices)
+ }
SettingsRow(title: L("记住说话人"), detail: L("按本机声纹认出以前见过的人;不会上传声音")) {
Toggle("记住说话人", isOn: $settings.speakerMemory)
.toggleStyle(.switch).labelsHidden().controlSize(.small).tint(Palette.ink)
diff --git a/Sources/Cicada/Views.swift b/Sources/Cicada/Views.swift
index cddfa13..fb74cd8 100644
--- a/Sources/Cicada/Views.swift
+++ b/Sources/Cicada/Views.swift
@@ -1338,7 +1338,7 @@ struct MainWindowView: View {
let starts = SpeakerLabels.runStarts(s.lines, speakers)
ForEach(s.lines) { l in
quoteRow(l, speaker: speakers[l.id], picked: quoteJump.map { t in l.id == pickedLine(s, t)?.id } ?? false,
- label: starts.contains(l.id), voices: !speakers.isEmpty).id(l.id)
+ label: settings.speakerEveryLine || starts.contains(l.id), voices: !speakers.isEmpty).id(l.id)
}
}
.environment(\.speakerNames, SpeakerLabels.names(s))
@@ -1412,7 +1412,7 @@ struct MainWindowView: View {
.padding(.bottom, 10)
}
ForEach(s.lines) { l in
- lineRow(l, speaker: speakers[l.id], label: speakers.isEmpty || starts.contains(l.id), voices: !speakers.isEmpty, place: both, in: s,
+ lineRow(l, speaker: speakers[l.id], label: speakers.isEmpty || settings.speakerEveryLine || starts.contains(l.id), voices: !speakers.isEmpty, place: both, in: s,
current: l.id == playingLine)
.contextMenu {
Button(L("改这句…")) { editingStart = l.shown; editingLine = l.id }