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: show the subtitles first in the onboarding with a two-person sample meeting

wqugurue4e59baaae6a
diff --git a/AGENTS.md b/AGENTS.md
index ba2b16a..b4bf060 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -4,7 +4,7 @@ Cicada (知了, formerly Live Subs): a macOS menu bar app that turns what the Ma
## Scope
-- Surfaces: menu bar panel, live notes window (default) or subtitle bar while listening, main window (meeting records), settings, four-step onboarding (permissions, Ling key, sample video, speaking). A request that fits none of them gets pushed back before any UI is added.
+- Surfaces: menu bar panel, live notes window (default) or subtitle bar while listening, main window (meeting records), settings, four-step onboarding (system audio, sample meeting, Ling key, speaking if wanted). A request that fits none of them gets pushed back before any UI is added.
- Nothing the user does needs the Terminal.
- Listening: Core Audio process tap → on-device language detection and `SpeechAnalyzer` → translation. Speaking: hold right ⌥ or a shortcut → mic → Ming (with a Ling key) or on-device + translation → voice → BlackHole 2ch virtual mic.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e802e1..177317a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ the release workflow publishes it as the release notes.
- New: turning on 同声传译 switches the Mac's system microphone to BlackHole 2ch and switches it back when 同声传译 is turned off or Cicada quits, so a meeting page in Chrome (or any app left on the default microphone) hears the translation with no setup. Cicada itself keeps recording from your real microphone (Settings › 同声传译 › 系统麦克风 lets you pin one). If Cicada didn't get to switch back (it crashed), or AirPods or something else took over the system mic while you were speaking, the menu bar panel says so with a 还原 / 换回 button; the panel's ⋯ menu also has 同声传译设置…, 试一句 and 还原系统麦克风. The switch can be turned off in Settings.
- Changed: the installer window explains the first-open warning. While the developer certificate is pending, macOS says Apple can't verify Cicada; the window, now a little taller, says this is expected and shows the three screens to click through in miniature, each with the button ringed: 完成 (not 移到废纸篓), 隐私与安全性 in System Settings, then 仍要打开 under 安全性.
- New: 共享屏幕时让对方看到 lets screen recordings capture the live notes window, for demos and tutorials. It is off by default; turn it on in Settings › 显示, the menu bar panel, or 显示 › 共享屏幕时对方可见 in the app menu. macOS has one switch for recording and screen sharing, so while it is on people also see the notes when you share your screen: the notes window shows a breathing record mark next to its status the whole time, and clicking it turns the setting off. In a narrow English window, the title and the status line no longer break onto two lines.
+- Changed: the first-run guide shows the subtitles before asking for anything else. It now goes 听声音 → 看效果 → 接 Ling → 同声传译, each step named under the progress bar. Step 1 asks only for system audio and moves on by itself once it's on; the microphone is asked for when you set up 同声传译. The sample, now a short two-person meeting voiced by Ming and drawn as a call whose subtitles never cover the speakers, comes before the Ling key, with a note that the same subtitles become notes once Ling is connected. Skipping the key (先不接) first shows what works without it (subtitles, the bilingual transcript, 同声传译 with the Mac's voices) and what waits for Ling, and that past meetings can still get notes later. The 同声传译 step starts with a yes/no, so the virtual mic checklist only appears for those who want it. A last page points to the menu bar icon before the records window opens.
- Fixed: in English, the menu bar panel cut off its status ("English (detecting…) → …") and the interpreting languages, and Settings › 同声传译 left "· Change" alone on a second line. The panel now wraps the status and puts the languages on their own line when they don't fit.
- Fixed: while you hold the talk key and speak Chinese, the subtitle bar shows your words as you say them, about a second behind. It used to show nothing for roughly ten seconds, so a short sentence only appeared after the key was released.
diff --git a/README.md b/README.md
index 79d50f3..60101d3 100644
--- a/README.md
+++ b/README.md
@@ -105,7 +105,7 @@ Requires **macOS 26 or later** on **Apple silicon**.
Download `Cicada-<version>-macOS-AppleSilicon.dmg` from [Releases](https://github.com/wquguru/cicada/releases/latest) or [the website](https://cicada.indaloop.app), open it and drag **Cicada** into **Applications**. Builds are ad-hoc signed and not notarized yet (see [roadmap](#roadmap)), so if macOS blocks the first launch, open **System Settings › Privacy & Security** and click **Open Anyway**. Each release includes `checksums.txt`; verify with `shasum -a 256 Cicada-*.dmg`.
-The first-launch guide walks you through permissions, your Ling key (or skip it for now), a sample video and, if you want, the virtual microphone. Later updates show as an orange dot on the menu bar icon; one click installs them and keeps your permissions.
+The first-launch guide asks for one permission, plays a short sample meeting, then helps you connect your Ling key (or skip it for now) and, only if you want interpreting, set up the virtual microphone. Later updates show as an orange dot on the menu bar icon; one click installs them and keeps your permissions.
## Usage
diff --git a/README.zh-CN.md b/README.zh-CN.md
index c68773e..d57c864 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -104,7 +104,7 @@
从 [Releases 页面](https://github.com/wquguru/cicada/releases/latest) 或 [官网](https://cicada.indaloop.app) 下载 `Cicada-<版本>-macOS-AppleSilicon.dmg`,打开后把知了拖进“应用程序”。应用目前是本地签名,还没有苹果公证(见[路线图](#路线图)),第一次打开被拦下时,去“系统设置 › 隐私与安全性”点“仍要打开”。下载页同时提供 `checksums.txt`,可以用 `shasum -a 256 Cicada-*.dmg` 核对。
-打开后跟着新手引导开启权限、粘贴 Ling key(也可以先跳过)、看示例视频、按需安装虚拟麦克风。之后有新版本时菜单栏图标会出现橙点,点一下就能更新,权限不丢。
+打开后跟着新手引导开一个权限、听一段示例会议、接上 Ling key(也可以先跳过),要用同声传译时再装虚拟麦克风。之后有新版本时菜单栏图标会出现橙点,点一下就能更新,权限不丢。
## 使用方法
diff --git a/Resources/sample/sample.m4a b/Resources/sample/sample.m4a
index e0af067..848f4c4 100644
Binary files a/Resources/sample/sample.m4a and b/Resources/sample/sample.m4a differ
diff --git a/Resources/sample/sample.mp4 b/Resources/sample/sample.mp4
deleted file mode 100644
index 182df05..0000000
Binary files a/Resources/sample/sample.mp4 and /dev/null differ
diff --git a/Sources/LiveSubs/AppModel.swift b/Sources/LiveSubs/AppModel.swift
index b4586f3..1f2c729 100644
--- a/Sources/LiveSubs/AppModel.swift
+++ b/Sources/LiveSubs/AppModel.swift
@@ -63,6 +63,11 @@ final class AppModel: ObservableObject {
@Published var liveSource = ""
@Published var liveTranslation = ""
@Published var onboardingStep = 1
+ /// Step 3 is showing what skipping the key leaves out (debug: `onboarding:3,skip`).
+ @Published var onboardingKeySkip = false
+ /// Step 4's yes/no (false) or checklist (true); nil follows whether speaking is on
+ /// (debug: `onboarding:4,ask` / `onboarding:4,setup`).
+ @Published var onboardingSpeakSetup: Bool?
/// Debug: which meeting and tab the main window shows ("<id>" or "<id>,transcript").
@Published var mainShow: String?
/// Hold right ⌥ is chosen but "输入监控" isn't allowed yet.
@@ -888,7 +893,13 @@ final class AppModel: ObservableObject {
case "stop": stop()
case "open": openMainWindow?()
case "panel": showPanel?()
- case "onboarding": onboardingStep = Int(arg) ?? 1; openOnboarding?()
+ case "onboarding":
+ // onboarding:<step>[,skip|setup]: the step, optionally in its second state.
+ let p = arg.split(separator: ",").map(String.init)
+ onboardingStep = min(max(Int(p.first ?? "") ?? 1, 1), OnboardingView.done)
+ onboardingKeySkip = p.contains("skip")
+ onboardingSpeakSetup = p.contains("setup") ? true : p.contains("ask") ? false : nil
+ openOnboarding?()
case "step": onboardingStep = Int(arg) ?? 1
case "samplePlay": ensureListening(); sample.play()
case "micVerify": installer.install(verifyOnly: true)
diff --git a/Sources/LiveSubs/Onboarding.swift b/Sources/LiveSubs/Onboarding.swift
index eb4ec15..d3636a5 100644
--- a/Sources/LiveSubs/Onboarding.swift
+++ b/Sources/LiveSubs/Onboarding.swift
@@ -1,6 +1,5 @@
import AppKit
import AVFoundation
-import AVKit
import SwiftUI
// MARK: - Brand mark (logo B: a cicada's eyes and wings peeking over a white subtitle card)
@@ -163,40 +162,41 @@ enum BrandImage {
// MARK: - Sample clip
-/// Plays the bundled 7-second sample. The picture shows in the onboarding card;
-/// the sound is played by a separate `afplay` process, because the app leaves
-/// its own audio out of what it listens to.
+/// Plays the bundled sample, a short meeting voiced by Ming (`scripts/make-sample.sh`), through a
+/// separate `afplay` process, because the app leaves its own audio out of what it listens to.
+/// The onboarding card draws the call itself and lights whoever is talking.
@MainActor
final class SamplePlayer: ObservableObject {
+ static let duration = 8.8
+ /// Who talks when in sample.m4a (0 Emma, 1 George), in seconds; re-measure after regenerating.
+ static let turns: [(speaker: Int, start: Double, end: Double)] = [(0, 0.25, 2.34), (1, 2.56, 6.97), (0, 7.17, 8.45)]
+
@Published private(set) var playing = false
- @Published private(set) var progress = 0.0
- let player: AVPlayer?
+ /// Played since the card appeared: its subtitles stay up after the clip ends, as the last
+ /// translation lands a moment later.
+ @Published private(set) var played = false
+ @Published private(set) var elapsed = 0.0
private var audio: Process?
private var timer: Timer?
private var started = Date()
- private let duration = 7.4
- init() {
- if let url = Bundle.main.url(forResource: "sample", withExtension: "mp4") {
- player = AVPlayer(url: url)
- player?.isMuted = true
- } else {
- player = nil
- }
+ var progress: Double { min(1, elapsed / Self.duration) }
+ var speaker: Int? {
+ guard playing else { return nil }
+ return Self.turns.first { elapsed >= $0.start && elapsed < $0.end }?.speaker
}
func play() {
guard !playing, let audioURL = Bundle.main.url(forResource: "sample", withExtension: "m4a") else { return }
- player?.seek(to: .zero)
- player?.play()
let p = Process()
p.executableURL = URL(fileURLWithPath: "/usr/bin/afplay")
p.arguments = [audioURL.path]
try? p.run()
audio = p
playing = true
+ played = true
started = Date()
- progress = 0
+ elapsed = 0
timer?.invalidate()
let t = Timer(timeInterval: 0.1, repeats: true) { [weak self] _ in
MainActor.assumeIsolated { self?.tick() }
@@ -206,8 +206,8 @@ final class SamplePlayer: ObservableObject {
}
private func tick() {
- progress = min(1, Date().timeIntervalSince(started) / duration)
- if progress >= 1 { stop() }
+ elapsed = Date().timeIntervalSince(started)
+ if elapsed >= Self.duration { stop() }
}
func stop() {
@@ -215,21 +215,124 @@ final class SamplePlayer: ObservableObject {
timer = nil
if audio?.isRunning == true { audio?.terminate() }
audio = nil
- player?.pause()
playing = false
}
+
+ /// Back to the untouched card, when the guide leaves the step.
+ func reset() {
+ stop()
+ played = false
+ elapsed = 0
+ }
}
-struct PlayerSurface: NSViewRepresentable {
- let player: AVPlayer?
- func makeNSView(context: Context) -> AVPlayerView {
- let v = AVPlayerView()
- v.controlsStyle = .none
- v.videoGravity = .resizeAspectFill
- v.player = player
- return v
+/// Step 2's card: a two-person call drawn in place of a video. The call sits in the top part and
+/// the bottom strip is kept for the subtitles, so they never cover a face; before the first play
+/// the play button holds that strip, where the eye should land.
+struct SampleCallCard: View {
+ @ObservedObject var sample: SamplePlayer
+ let liveSource: String
+ let liveTranslation: String
+ let play: () -> Void
+
+ var body: some View {
+ VStack(spacing: 0) {
+ HStack(spacing: 8) {
+ Text(verbatim: "LIVE").font(.system(size: 10, weight: .bold)).foregroundStyle(.white)
+ .padding(.horizontal, 6).padding(.vertical, 1)
+ .background(RoundedRectangle(cornerRadius: 4).fill(Palette.accent))
+ Text(verbatim: "Launch sync").font(.system(size: 12)).foregroundStyle(.white.opacity(0.6))
+ Spacer()
+ if sample.played && !sample.playing {
+ Button(action: play) {
+ Label("重播", systemImage: "arrow.counterclockwise").font(.system(size: 11))
+ .foregroundStyle(.white.opacity(0.85))
+ .padding(.horizontal, 8).padding(.vertical, 2)
+ .background(RoundedRectangle(cornerRadius: 6).fill(.white.opacity(0.12)))
+ }
+ .buttonStyle(.plain)
+ }
+ }
+ .frame(height: 18)
+ HStack(spacing: 12) {
+ tile(0, "Emma", Color(red: 0.36, green: 0.39, blue: 0.47))
+ tile(1, "George", Color(red: 0.42, green: 0.36, blue: 0.31))
+ }
+ .padding(.top, 8)
+ Spacer(minLength: 0)
+ Group {
+ if sample.played { subtitle } else { playButton }
+ }
+ .frame(height: 58)
+ }
+ .padding(.horizontal, 16).padding(.vertical, 14)
+ .frame(maxWidth: .infinity)
+ .frame(height: 210)
+ .background(Color(red: 0.1, green: 0.11, blue: 0.13))
+ .overlay(alignment: .topLeading) {
+ if sample.playing {
+ GeometryReader { g in
+ Rectangle().fill(Palette.accent).frame(width: g.size.width * sample.progress, height: 3)
+ }
+ .frame(height: 3)
+ }
+ }
+ .clipShape(RoundedRectangle(cornerRadius: 18))
+ .animation(.easeOut(duration: 0.15), value: sample.speaker)
+ }
+
+ private func tile(_ index: Int, _ name: String, _ avatar: Color) -> some View {
+ let speaking = sample.speaker == index
+ return ZStack {
+ RoundedRectangle(cornerRadius: 12).fill(Color(red: 0.15, green: 0.16, blue: 0.19))
+ RoundedRectangle(cornerRadius: 12)
+ .strokeBorder(speaking ? Palette.accent : Color(red: 0.18, green: 0.19, blue: 0.22), lineWidth: 2)
+ Circle().fill(avatar).frame(width: 42, height: 42)
+ .overlay(Text(verbatim: String(name.prefix(1))).font(.system(size: 18, weight: .bold)).foregroundStyle(.white))
+ Text(verbatim: name).font(.system(size: 11)).foregroundStyle(.white.opacity(0.9))
+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomLeading)
+ .padding(.horizontal, 9).padding(.vertical, 6)
+ if speaking {
+ HStack(alignment: .bottom, spacing: 2) {
+ ForEach([6.0, 11, 8], id: \.self) { h in
+ RoundedRectangle(cornerRadius: 1.5).fill(Palette.accent).frame(width: 3, height: h)
+ }
+ }
+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomTrailing)
+ .padding(8)
+ }
+ }
+ .frame(width: 168, height: 88)
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(Text(verbatim: name))
+ }
+
+ private var playButton: some View {
+ Button(action: play) {
+ HStack(spacing: 8) {
+ Image(systemName: "play.fill").font(.system(size: 12))
+ Text("播放示例 · 0:09").font(.system(size: 14, weight: .semibold))
+ }
+ .foregroundStyle(Palette.ink)
+ .padding(.horizontal, 22).frame(height: 44)
+ .background(Capsule().fill(Color.white))
+ .contentShape(Capsule())
+ }
+ .buttonStyle(.plain)
+ }
+
+ private var subtitle: some View {
+ VStack(spacing: 3) {
+ Text(liveSource.isEmpty ? L("正在听…") : liveSource)
+ .font(.system(size: 12)).foregroundStyle(.white.opacity(0.65)).lineLimit(1).truncationMode(.head)
+ Text(liveTranslation)
+ .font(.system(size: 17, weight: .semibold)).foregroundStyle(.white).lineLimit(1).truncationMode(.head)
+ }
+ .multilineTextAlignment(.center)
+ .padding(.horizontal, 18)
+ .frame(maxWidth: 600, maxHeight: .infinity)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Color(white: 0.03, opacity: 0.92)))
}
- func updateNSView(_ nsView: AVPlayerView, context: Context) {}
}
// MARK: - Onboarding
@@ -244,9 +347,12 @@ struct OnboardingView: View {
nonmutating set { model.onboardingStep = newValue }
}
var onFinish: () -> Void
- /// Permissions, Ling key, sample video, speaking.
+ /// System audio, sample video, Ling key, speaking; then a closing page (step 5) outside the count.
+ /// The video comes before the key so people see the subtitles before being sent to sign up anywhere.
static let steps = 4
+ static let done = 5
+ private var stepNames: [String] { [L("听声音"), L("看效果"), L("接 Ling"), L("同声传译")] }
var body: some View {
VStack(alignment: .leading, spacing: 0) {
@@ -255,12 +361,13 @@ struct OnboardingView: View {
Group {
switch step {
case 1: permissions
- case 2: OnboardingKeyStep(ling: model.ling, settings: settings)
- case 3: tryIt
- default: speaking
+ case 2: tryIt
+ case 3: OnboardingKeyStep(ling: model.ling, settings: settings, skipping: $model.onboardingKeySkip)
+ case 4: speaking
+ default: closing
}
}
- .padding(.top, 28)
+ .padding(.top, step == Self.done ? 28 : 24)
Spacer(minLength: 0)
footer
}
@@ -268,58 +375,101 @@ struct OnboardingView: View {
.padding(.bottom, 36)
.frame(width: 860, height: 640)
.background(Color(red: 0.965, green: 0.969, blue: 0.976))
- .onChange(of: step) { _, _ in sample.stop() }
+ .onChange(of: step) { _, _ in sample.reset() }
+ // Only the moment it turns on moves on by itself: when it was already on (the guide
+ // reopened from Settings), step 1 stays put with a plain 继续.
+ .onChange(of: model.systemAudioOK) { was, now in
+ guard !was, now, step == 1 else { return }
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.6) {
+ MainActor.assumeIsolated { if step == 1 { step = 2 } }
+ }
+ }
}
// MARK: Header / footer
- private var header: some View {
- HStack(spacing: 14) {
+ @ViewBuilder private var header: some View {
+ if step == Self.done {
BrandMark(size: 34)
- HStack(spacing: 6) {
- ForEach(1...Self.steps, id: \.self) { i in
- Capsule().fill(i <= step ? Palette.ink : Color(white: 0.87)).frame(height: 4)
+ } else {
+ HStack(alignment: .top, spacing: 14) {
+ BrandMark(size: 34)
+ HStack(alignment: .top, spacing: 6) {
+ ForEach(1...Self.steps, id: \.self) { i in
+ VStack(alignment: .leading, spacing: 7) {
+ Capsule().fill(i <= step ? Palette.ink : Color(white: 0.87)).frame(height: 4)
+ Text(stepNames[i - 1])
+ .font(.system(size: 11, weight: i == step ? .semibold : .regular))
+ .foregroundStyle(i == step ? Palette.ink : Palette.tertiary)
+ .lineLimit(1)
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
}
+ .padding(.top, 8)
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(L("第 \(step) 步,共 \(Self.steps) 步:\(stepNames[step - 1])"))
}
- Text("\(step) / \(Self.steps)").font(.system(size: 12)).foregroundStyle(Palette.secondary)
}
}
- private var footer: some View {
- HStack {
- if step == 1 {
- Button("以后再说") { step = 2 }.buttonStyle(.plain).foregroundStyle(Palette.secondary)
- } else {
- Button("上一步") { step -= 1 }.buttonStyle(.plain).foregroundStyle(Palette.secondary)
+ @ViewBuilder private var footer: some View {
+ HStack(spacing: 16) {
+ // In the checklist, 先不用了 replaces 上一步, but only when speaking was turned on right here:
+ // someone re-running the guide with it already on shouldn't have it switched off.
+ if step > 1 && !(step == 4 && model.onboardingSpeakSetup == true) {
+ Button("上一步") {
+ model.onboardingKeySkip = false
+ step -= 1
+ }
+ .buttonStyle(.plain).foregroundStyle(Palette.secondary)
}
Spacer()
- if step == 2 {
- OnboardingKeyFooter(ling: model.ling, skip: { step = 3 }, next: { step = 3 })
- } else if step == 1 && !model.systemAudioOK {
- Text("先打开“听电脑里的声音”")
+ switch step {
+ case 1 where !model.systemAudioOK:
+ Text("打开后自动继续")
.font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.secondary)
.padding(.horizontal, 24).frame(height: 44)
.background(RoundedRectangle(cornerRadius: 12).fill(Color(white: 0.87)))
- } else {
- Button {
- if step < Self.steps { step += 1 } else { onFinish() }
- } label: {
- HStack(spacing: 8) {
- Text(step < Self.steps ? L("继续") : L("开始使用"))
- if step < Self.steps { Image(systemName: "arrow.right") }
+ case 3:
+ OnboardingKeyFooter(ling: model.ling, skipping: $model.onboardingKeySkip, next: { step = 4 })
+ case 4 where !speakSetupShown:
+ // The two cards above are the choice; nothing to confirm here.
+ EmptyView()
+ case 4:
+ if model.onboardingSpeakSetup == true {
+ Button("先不用了") {
+ model.onboardingSpeakSetup = false
+ model.enableSpeaking(false)
}
- .font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
- .padding(.horizontal, 28).frame(height: 44)
- .background(RoundedRectangle(cornerRadius: 12).fill(Palette.ink))
- .contentShape(Rectangle())
+ .buttonStyle(.plain).foregroundStyle(Palette.secondary)
}
- .buttonStyle(.plain)
- .keyboardShortcut(.defaultAction)
+ primaryButton(L("完成"), arrow: false) { step = Self.done }
+ case Self.done:
+ primaryButton(L("开始使用"), arrow: false) { onFinish() }
+ default:
+ primaryButton(L("继续"), arrow: true) { step += 1 }
}
}
+ .frame(height: 44)
.font(.system(size: 13))
}
+ private func primaryButton(_ text: String, arrow: Bool, _ action: @escaping () -> Void) -> some View {
+ Button(action: action) {
+ HStack(spacing: 8) {
+ Text(text)
+ if arrow { Image(systemName: "arrow.right") }
+ }
+ .font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
+ .padding(.horizontal, 28).frame(height: 44)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Palette.ink))
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ .keyboardShortcut(.defaultAction)
+ }
+
private func title(_ text: String, _ sub: String) -> some View {
VStack(alignment: .leading, spacing: 8) {
Text(text).font(.system(size: 26, weight: .bold)).foregroundStyle(Palette.ink)
@@ -327,22 +477,13 @@ struct OnboardingView: View {
}
}
- private func row<Trailing: View>(icon: String, tint: Color = Palette.ground, iconColor: Color = Palette.ink,
- title: String, tag: String? = nil, tagAccent: Bool = false, detail: String,
+ private func row<Trailing: View>(icon: String, title: String, detail: String,
@ViewBuilder trailing: () -> Trailing) -> some View {
HStack(spacing: 16) {
- RoundedRectangle(cornerRadius: 12).fill(tint).frame(width: 44, height: 44)
- .overlay(Image(systemName: icon).font(.system(size: 18)).foregroundStyle(iconColor))
+ RoundedRectangle(cornerRadius: 12).fill(Palette.ground).frame(width: 44, height: 44)
+ .overlay(Image(systemName: icon).font(.system(size: 18)).foregroundStyle(Palette.ink))
VStack(alignment: .leading, spacing: 4) {
- HStack(spacing: 8) {
- Text(title).font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.ink)
- if let tag {
- Text(tag).font(.system(size: 11, weight: .semibold))
- .foregroundStyle(tagAccent ? Palette.accentInk : Palette.secondary)
- .padding(.horizontal, 7).padding(.vertical, 2)
- .background(Capsule().fill(tagAccent ? Palette.accentPale : Color(white: 0.94)))
- }
- }
+ Text(title).font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.ink)
Text(detail).font(.system(size: 13)).foregroundStyle(Palette.secondary)
}
Spacer()
@@ -376,90 +517,43 @@ struct OnboardingView: View {
.buttonStyle(.plain)
}
- private var card: some ShapeStyle { Color.white }
+ private func whiteCard<Content: View>(@ViewBuilder _ content: () -> Content) -> some View {
+ content()
+ .background(RoundedRectangle(cornerRadius: 18).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 18).stroke(Palette.line, lineWidth: 1))
+ }
- // MARK: Step 1
+ // MARK: Step 1: system audio only (the microphone is asked for in step 4, if at all)
private var permissions: some View {
VStack(alignment: .leading, spacing: 24) {
- title(L("先打开两个开关"), L("去系统设置打开,回来会自动识别。"))
- VStack(spacing: 0) {
- row(icon: "speaker.wave.2", title: L("听电脑里的声音"), tag: L("必需"), tagAccent: true, detail: L("用于生成字幕,不会录制屏幕画面")) {
+ title(L("让知了听到电脑里的声音"), L("字幕和纪要都从这里来。去系统设置打开,回来会自动识别。"))
+ whiteCard {
+ row(icon: "speaker.wave.2", title: L("听电脑里的声音"), detail: L("只听声音,不录屏幕画面")) {
if model.systemAudioOK { done(L("已打开")) } else { primary(L("去开启")) { model.requestSystemAudio() } }
}
- Divider().padding(.horizontal, 22)
- row(icon: "mic", title: L("麦克风"), tag: L("可选"), detail: L("仅在同声传译时使用")) {
- switch model.micStatus {
- case .authorized: done(L("已允许"))
- case .notDetermined: secondary(L("允许")) { model.requestMicrophone() }
- default: secondary(L("去打开")) { model.openMicrophoneSettings() }
- }
- }
}
- .background(RoundedRectangle(cornerRadius: 18).fill(Color.white))
- .overlay(RoundedRectangle(cornerRadius: 18).stroke(Palette.line, lineWidth: 1))
Label("声音只在本机识别", systemImage: "lock")
.font(.system(size: 12)).foregroundStyle(Palette.secondary)
}
}
- // MARK: Step 3
+ // MARK: Step 2: the sample meeting
private var tryIt: some View {
- VStack(alignment: .leading, spacing: 22) {
- title(L("放一段视频试试"), L("点击播放,看看实时字幕效果。"))
- ZStack {
- PlayerSurface(player: sample.player)
- if !sample.playing {
- Color.black.opacity(0.35)
- Button { model.ensureListening(); sample.play() } label: {
- Circle().fill(Color.white).frame(width: 64, height: 64)
- .overlay(Image(systemName: "play.fill").font(.system(size: 22)).foregroundStyle(Palette.ink).offset(x: 2))
- }
- .buttonStyle(.plain)
- .accessibilityLabel(L("播放示例视频"))
- VStack {
- Spacer()
- HStack {
- Spacer()
- Text("示例 · 0:07").font(.system(size: 12)).foregroundStyle(.white.opacity(0.85))
- .padding(.horizontal, 8).padding(.vertical, 3)
- .background(RoundedRectangle(cornerRadius: 6).fill(.black.opacity(0.5)))
- }
- }
- .padding(12)
- }
- if sample.playing || !model.liveTranslation.isEmpty {
- VStack {
- GeometryReader { g in
- Rectangle().fill(Palette.accent).frame(width: g.size.width * sample.progress, height: 3)
- }
- .frame(height: 3)
- Spacer()
- VStack(spacing: 4) {
- Text(model.liveSource.isEmpty ? L("正在听…") : model.liveSource)
- .font(.system(size: 13)).foregroundStyle(.white.opacity(0.65)).lineLimit(1).truncationMode(.head)
- Text(model.liveTranslation)
- .font(.system(size: 19, weight: .semibold)).foregroundStyle(.white).lineLimit(2).truncationMode(.head)
- }
- .multilineTextAlignment(.center)
- .padding(.horizontal, 20).padding(.vertical, 12)
- .frame(maxWidth: .infinity)
- .background(RoundedRectangle(cornerRadius: 14).fill(Color(white: 0.05, opacity: 0.9)))
- .padding(.horizontal, 40).padding(.bottom, 18)
- }
- }
+ VStack(alignment: .leading, spacing: 18) {
+ title(L("放一段会议试试"), L("一段 9 秒的英文会议,字幕会跟着声音实时出来。"))
+ SampleCallCard(sample: sample, liveSource: model.liveSource, liveTranslation: model.liveTranslation) {
+ model.ensureListening()
+ sample.play()
}
- .frame(height: 230)
- .clipShape(RoundedRectangle(cornerRadius: 18))
- .background(RoundedRectangle(cornerRadius: 18).fill(Color(red: 0.1, green: 0.11, blue: 0.13)))
HStack(spacing: 12) {
ChoiceRow(label: L("听到"), value: heardName, badge: nil, options: sourceOptions) { model.sourceSelection = $0 }
ChoiceRow(label: L("翻译成"), value: targetName(model.listen.resolvedTarget),
badge: settings.target == "system" ? L("跟随系统") : nil, options: targetOptions) { model.targetSelection = $0 }
}
- Text("字幕条可任意拖动,拖拽右下角可调整大小。").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ OnboardingNotesTeaser(ling: model.ling)
}
}
@@ -474,78 +568,123 @@ struct OnboardingView: View {
[("system", L("跟随系统"))] + targetLanguages.map { ($0.code, $0.name) }
}
- // MARK: Step 4
+ // MARK: Step 4: speaking, only for those who want it
+
+ /// The checklist shows once speaking is on (or was already on); before that, a yes/no.
+ private var speakSetupShown: Bool { model.onboardingSpeakSetup ?? settings.speakEnabled }
private var speaking: some View {
VStack(alignment: .leading, spacing: 22) {
HStack(alignment: .top, spacing: 24) {
- title(L("想让对方听懂你?"), L("按住说\(settings.speakFromLang.name),对方听到翻译后的语音。"))
+ title(L("开会时要说外语吗?"), L("按住一个键说\(settings.speakFromLang.name),对方听到翻译后的语音。"))
Spacer()
- VStack(alignment: .trailing, spacing: 6) {
- HStack(alignment: .bottom, spacing: 6) {
- if settings.talkKey.isRightOption {
- key("⌥", L("右侧 option"), width: 96)
- } else {
- ForEach(Array(settings.talkKey.keys.enumerated()), id: \.offset) {
- key($0.element, "", width: $0.element.count > 2 ? 96 : 52)
- }
+ if speakSetupShown { talkKeyHint }
+ }
+ if speakSetupShown { speakChecklist } else { speakChoice }
+ }
+ }
+
+ private var speakChoice: some View {
+ HStack(spacing: 14) {
+ choiceCard(L("要,现在设置"), L("约 2 分钟,会装一个虚拟麦克风")) {
+ model.onboardingSpeakSetup = true
+ model.enableSpeaking(true)
+ }
+ choiceCard(L("先不用"), L("以后在设置 › 同声传译里打开")) { step = Self.done }
+ }
+ .padding(.top, 6)
+ }
+
+ private func choiceCard(_ title: String, _ detail: String, _ action: @escaping () -> Void) -> some View {
+ Button(action: action) {
+ VStack(alignment: .leading, spacing: 8) {
+ Text(title).font(.system(size: 16, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text(detail).font(.system(size: 13)).foregroundStyle(Palette.secondary)
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .padding(22)
+ .background(RoundedRectangle(cornerRadius: 16).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 16).stroke(Palette.line, lineWidth: 1))
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ }
+
+ private var speakChecklist: some View {
+ VStack(alignment: .leading, spacing: 14) {
+ whiteCard {
+ VStack(spacing: 0) {
+ HStack(spacing: 16) {
+ VStack(alignment: .leading, spacing: 2) {
+ Text("麦克风").font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text("只在按住说话键时录音").font(.system(size: 11)).foregroundStyle(Palette.tertiary)
+ }
+ Spacer()
+ switch model.micStatus {
+ case .authorized: done(L("已允许"))
+ case .notDetermined: primary(L("允许")) { model.requestMicrophone() }
+ default: primary(L("去打开")) { model.openMicrophoneSettings() }
}
}
- Text("可在设置中更改").font(.system(size: 11)).foregroundStyle(Palette.tertiary)
- }
- }
- VStack(spacing: 0) {
- MicSetupCard(installer: installer, deviceName: model.virtualMic?.name)
- .padding(.horizontal, 6).padding(.vertical, 4)
- Divider().padding(.horizontal, 22)
- HStack(spacing: 16) {
- Text("按住说话").font(.system(size: 14, weight: .semibold))
- Spacer()
- Toggle("按住说话", isOn: Binding(get: { settings.speakEnabled }, set: { model.enableSpeaking($0) }))
- .toggleStyle(.switch).labelsHidden().tint(Palette.ink)
- }
- .padding(.horizontal, 22).padding(.vertical, 14)
- if settings.speakEnabled && model.talkNeedsPermission {
+ .padding(.horizontal, 22).padding(.vertical, 14)
Divider().padding(.horizontal, 22)
- TalkKeyPermissionRow(model: model).padding(.horizontal, 6).padding(.vertical, 4)
+ MicSetupCard(installer: installer, deviceName: model.virtualMic?.name)
+ .padding(.horizontal, 6).padding(.vertical, 4)
+ if settings.speakEnabled && model.talkNeedsPermission {
+ Divider().padding(.horizontal, 22)
+ TalkKeyPermissionRow(model: model).padding(.horizontal, 6).padding(.vertical, 4)
+ }
}
}
- .background(RoundedRectangle(cornerRadius: 18).fill(Color.white))
- .overlay(RoundedRectangle(cornerRadius: 18).stroke(Palette.line, lineWidth: 1))
+ meetingAppStatus
+ }
+ }
- // Turns green by itself once a meeting app reads the virtual mic.
- if model.virtualMic != nil && installer.passed {
- if let user = model.micUsers.first(where: { $0.state == .virtualMic }) {
- HStack(spacing: 10) {
- Image(systemName: "checkmark.circle.fill").foregroundStyle(Palette.ok)
- Text("\(user.name)已选虚拟麦克风,对方能听到译文").font(.system(size: 13)).foregroundStyle(Palette.ok)
- }
- .padding(.horizontal, 16).padding(.vertical, 12)
- .frame(maxWidth: .infinity, alignment: .leading)
- .background(RoundedRectangle(cornerRadius: 12).fill(Palette.okPale))
- } else if case .switched = model.systemMicState {
- // Apps on the default mic already hear it; only ones set to a specific mic need a change.
- HStack(spacing: 10) {
- Image(systemName: "checkmark.circle.fill").foregroundStyle(Palette.ok)
- Text("系统麦克风已换成 \(model.virtualMic?.name ?? "BlackHole 2ch"),用默认麦克风的会议软件不用再选")
- .font(.system(size: 13)).foregroundStyle(Palette.ok)
- }
- .padding(.horizontal, 16).padding(.vertical, 12)
- .frame(maxWidth: .infinity, alignment: .leading)
- .background(RoundedRectangle(cornerRadius: 12).fill(Palette.okPale))
+ private var talkKeyHint: some View {
+ VStack(alignment: .trailing, spacing: 6) {
+ HStack(alignment: .bottom, spacing: 6) {
+ if settings.talkKey.isRightOption {
+ key("⌥", L("右侧 option"), width: 96)
} else {
- HStack(spacing: 10) {
- (Text("最后一步:在会议软件中,将麦克风选为 ") + Text(model.virtualMic?.name ?? "BlackHole 2ch").bold())
- .font(.system(size: 13)).foregroundStyle(Palette.ink)
- Spacer(minLength: 8)
- Text("等你选好…").font(.system(size: 12)).foregroundStyle(Palette.tertiary)
+ ForEach(Array(settings.talkKey.keys.enumerated()), id: \.offset) {
+ key($0.element, "", width: $0.element.count > 2 ? 96 : 52)
}
- .padding(.horizontal, 16).padding(.vertical, 12)
- .frame(maxWidth: .infinity, alignment: .leading)
- .background(RoundedRectangle(cornerRadius: 12).fill(Palette.accentPale))
}
}
+ Text("可在设置中更改").font(.system(size: 11)).foregroundStyle(Palette.tertiary)
+ }
+ }
+
+ // Turns green by itself once a meeting app reads the virtual mic.
+ @ViewBuilder private var meetingAppStatus: some View {
+ if model.virtualMic != nil && installer.passed {
+ if let user = model.micUsers.first(where: { $0.state == .virtualMic }) {
+ statusLine(ok: true, Text("\(user.name)已选虚拟麦克风,对方能听到译文"))
+ } else if case .switched = model.systemMicState {
+ // Apps on the default mic already hear it; only ones set to a specific mic need a change.
+ statusLine(ok: true, Text("系统麦克风已换成 \(model.virtualMic?.name ?? "BlackHole 2ch"),用默认麦克风的会议软件不用再选"))
+ } else {
+ HStack(spacing: 10) {
+ (Text("最后一步:在会议软件中,将麦克风选为 ") + Text(model.virtualMic?.name ?? "BlackHole 2ch").bold())
+ .font(.system(size: 13)).foregroundStyle(Palette.ink)
+ Spacer(minLength: 8)
+ Text("等你选好…").font(.system(size: 12)).foregroundStyle(Palette.tertiary)
+ }
+ .padding(.horizontal, 16).padding(.vertical, 12)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Palette.accentPale))
+ }
+ }
+ }
+
+ private func statusLine(ok: Bool, _ text: Text) -> some View {
+ HStack(spacing: 10) {
+ Image(systemName: "checkmark.circle.fill").foregroundStyle(Palette.ok)
+ text.font(.system(size: 13)).foregroundStyle(Palette.ok)
}
+ .padding(.horizontal, 16).padding(.vertical, 12)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Palette.okPale))
}
private func key(_ top: String, _ bottom: String, width: CGFloat) -> some View {
@@ -563,4 +702,98 @@ struct OnboardingView: View {
RoundedRectangle(cornerRadius: 10).fill(Color(white: 0.84)).frame(height: 3).padding(.horizontal, 1)
}
}
+
+ // MARK: Closing: where the app lives from now on
+
+ private var closing: some View {
+ VStack(alignment: .leading, spacing: 24) {
+ title(L("好了,知了在菜单栏"), L("接下来会打开会议记录窗口,之后从右上角的图标找到它。"))
+ menuBarSketch
+ HStack(alignment: .top, spacing: 12) {
+ tip(L("开会时点它"), L("开始听,出字幕和纪要"))
+ if settings.speakEnabled {
+ tip(settings.talkKey.isRightOption ? L("按住右 ⌥ 说话") : L("按住 \(settings.talkKey.display) 说话"),
+ L("对方听到翻译后的语音"))
+ }
+ tip(L("会后看记录"), L("每场会都存在会议记录里"))
+ }
+ }
+ }
+
+ /// A slice of the menu bar with the app's icon ringed: where to look once this window is gone.
+ private var menuBarSketch: some View {
+ VStack(spacing: 0) {
+ HStack(spacing: 18) {
+ Spacer()
+ ForEach(["magnifyingglass", "wifi"], id: \.self) {
+ Image(systemName: $0).font(.system(size: 12)).foregroundStyle(Palette.tertiary)
+ }
+ BrandMark(size: 20)
+ .padding(3)
+ .background(RoundedRectangle(cornerRadius: 8).fill(Palette.accentPale))
+ .overlay(RoundedRectangle(cornerRadius: 8).stroke(Palette.accent, lineWidth: 1.5))
+ // Hangs below the bar, centred under the icon.
+ .overlay(alignment: .top) {
+ VStack(spacing: 4) {
+ Image(systemName: "arrow.up").font(.system(size: 14, weight: .semibold))
+ Text("就是它").font(.system(size: 13, weight: .semibold))
+ }
+ .foregroundStyle(Palette.accentInk)
+ .fixedSize()
+ .offset(y: 42)
+ }
+ Image(systemName: "battery.75percent").font(.system(size: 13)).foregroundStyle(Palette.tertiary)
+ Text(Date.now, format: .dateTime.weekday().hour().minute())
+ .font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ }
+ .padding(.horizontal, 18).frame(height: 36)
+ .background(Color(white: 0.93))
+ .zIndex(1)
+ Color.white.frame(height: 64)
+ }
+ .clipShape(RoundedRectangle(cornerRadius: 16))
+ .background(RoundedRectangle(cornerRadius: 16).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 16).stroke(Palette.line, lineWidth: 1))
+ .accessibilityHidden(true)
+ }
+
+ private func tip(_ title: String, _ detail: String) -> some View {
+ VStack(alignment: .leading, spacing: 4) {
+ Text(title).font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text(detail).font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .padding(16)
+ .background(RoundedRectangle(cornerRadius: 14).fill(Color.white))
+ }
+}
+
+/// Under the sample video: without a key, a hint that the same words become notes (the next step);
+/// with one, where the subtitle bar can go.
+struct OnboardingNotesTeaser: View {
+ @ObservedObject var ling: LingClient
+
+ var body: some View {
+ if ling.hasKey {
+ Text("字幕条可任意拖动,拖拽右下角可调整大小。").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ } else {
+ HStack(spacing: 16) {
+ VStack(alignment: .leading, spacing: 6) {
+ ForEach([1.0, 0.8, 0.9], id: \.self) { w in
+ Capsule().fill(Color(white: 0.87)).frame(width: 110 * w, height: 6)
+ }
+ }
+ .frame(width: 110, alignment: .leading)
+ .accessibilityHidden(true)
+ VStack(alignment: .leading, spacing: 2) {
+ Text("开会时,这些字幕还能整理成纪要").font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text("下一步接上 Ling 就有").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ }
+ Spacer(minLength: 0)
+ }
+ .padding(.horizontal, 18).padding(.vertical, 12)
+ .background(RoundedRectangle(cornerRadius: 14).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 14).stroke(Palette.line, lineWidth: 1))
+ }
+ }
}
diff --git a/Sources/LiveSubs/OnboardingKey.swift b/Sources/LiveSubs/OnboardingKey.swift
index 4fea6ec..cecda5b 100644
--- a/Sources/LiveSubs/OnboardingKey.swift
+++ b/Sources/LiveSubs/OnboardingKey.swift
@@ -1,11 +1,14 @@
import AppKit
import SwiftUI
-/// Onboarding step 2: connect a Ling key. Notes, Ling translation and Ming voices all need it, so it
-/// sits right after the permissions; "稍后在设置里填" skips it (the notes window asks again later).
+/// Onboarding step 3: connect a Ling key. Notes, Ling translation and Ming voices all need it, but it
+/// comes after the sample video, once people have seen what the app does. Skipping is allowed: "先不接"
+/// first shows what still works and what waits for a key (the notes window asks again later).
struct OnboardingKeyStep: View {
@ObservedObject var ling: LingClient
@ObservedObject var settings: AppSettings
+ /// "先不接" was clicked: the card shows what skipping leaves out until 回去接上 or 好,先这样.
+ @Binding var skipping: Bool
@State private var draft = ""
@State private var clipboardEmpty = false
@@ -18,13 +21,15 @@ struct OnboardingKeyStep: View {
Text("纪要、更准的翻译和自然的同传语音都靠它,约 1 分钟。")
.font(.system(size: 14)).foregroundStyle(Palette.secondary)
}
- if case .ok = ling.keyState { connected } else { entry }
- HStack(spacing: 10) {
- Text("Ling 每月赠送 ¥10 额度").font(.system(size: 12, weight: .semibold)).foregroundStyle(Palette.accentInk)
- .padding(.horizontal, 9).padding(.vertical, 3)
- .background(Capsule().fill(Palette.accentPale))
- Text("约够 10–50 小时会议 · 不填也能用实时字幕和会议记录")
- .font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ if case .ok = ling.keyState { connected } else if skipping { withoutKey } else { entry }
+ if !skipping {
+ HStack(spacing: 10) {
+ Text("Ling 每月赠送 ¥10 额度").font(.system(size: 12, weight: .semibold)).foregroundStyle(Palette.accentInk)
+ .padding(.horizontal, 9).padding(.vertical, 3)
+ .background(Capsule().fill(Palette.accentPale))
+ Text("约够 10–50 小时会议")
+ .font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ }
}
}
}
@@ -36,7 +41,7 @@ struct OnboardingKeyStep: View {
HStack(spacing: 14) {
number(1)
VStack(alignment: .leading, spacing: 2) {
- Text("在 Ling 开放平台创建令牌").font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.ink)
+ Text("在 Ling 开放平台创建 key").font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.ink)
Text("注册或登录后点“创建令牌”").font(.system(size: 12)).foregroundStyle(Palette.tertiary)
}
Spacer()
@@ -92,7 +97,7 @@ struct OnboardingKeyStep: View {
case .checking, .unchecked:
line(Palette.accent, L("正在检查…"), Palette.secondary)
case .invalid:
- line(Palette.error, L("Ling 提示此令牌无效,请检查是否复制完整,或重新创建一个"), Palette.accentInk)
+ line(Palette.error, L("这个 key 无效,请检查是否复制完整,或重新创建一个"), Palette.accentInk)
case .unreachable(let why):
line(Palette.error, why, Palette.accentInk)
default:
@@ -129,13 +134,48 @@ struct OnboardingKeyStep: View {
benefit(L("更准的翻译"), L("人名、术语前后一致"))
benefit(L("自然人声"), L("同传约 2 秒出声"))
}
- Text("下一步放示例视频,字幕和纪要会一起出现。").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ Text("开会时,纪要会跟着字幕一起更新。").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ }
+ .padding(22)
+ .background(RoundedRectangle(cornerRadius: 16).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 16).stroke(Palette.line, lineWidth: 1))
+ }
+
+ // MARK: Skipping
+
+ /// Honest about both sides, so skipping is a choice rather than a dead end.
+ private var withoutKey: some View {
+ VStack(alignment: .leading, spacing: 16) {
+ Text("先不接也行,基础功能照常能用").font(.system(size: 16, weight: .semibold)).foregroundStyle(Palette.ink)
+ HStack(alignment: .top, spacing: 10) {
+ column(L("现在可用"), [L("实时翻译字幕"), L("双语文字记录"), L("同声传译(系统语音)")],
+ head: Palette.secondary, fill: Palette.ground, check: true)
+ column(L("接上 Ling 才有"), [L("实时纪要和会后总结"), L("人名、术语前后一致"), L("自然人声,约 2 秒出声")],
+ head: Palette.accentInk, fill: Palette.accentPale, check: false)
+ }
+ Text("随时可在纪要窗口或设置里接上,开完的会也能补出纪要。")
+ .font(.system(size: 12)).foregroundStyle(Palette.secondary)
}
.padding(22)
.background(RoundedRectangle(cornerRadius: 16).fill(Color.white))
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Palette.line, lineWidth: 1))
}
+ private func column(_ title: String, _ items: [String], head: Color, fill: Color, check: Bool) -> some View {
+ VStack(alignment: .leading, spacing: 8) {
+ Text(title).font(.system(size: 12, weight: .semibold)).foregroundStyle(head)
+ ForEach(items, id: \.self) { item in
+ HStack(spacing: 6) {
+ if check { Image(systemName: "checkmark").font(.system(size: 10, weight: .bold)).foregroundStyle(Palette.ink) }
+ Text(item).font(.system(size: 14)).foregroundStyle(Palette.ink)
+ }
+ }
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .padding(14)
+ .background(RoundedRectangle(cornerRadius: 12).fill(fill))
+ }
+
// MARK: Pieces
private func number(_ n: Int) -> some View {
@@ -178,33 +218,50 @@ struct OnboardingKeyStep: View {
}
}
-/// Step 2's 继续: it waits for a working key (the full experience needs one); skipping is the quieter choice.
+/// Step 3's footer. 继续 waits for a working key; "先不接" turns the card into what skipping leaves out,
+/// and only "好,先这样" there moves on without one.
struct OnboardingKeyFooter: View {
@ObservedObject var ling: LingClient
- var skip: () -> Void
+ @Binding var skipping: Bool
var next: () -> Void
var body: some View {
HStack(spacing: 16) {
if case .ok = ling.keyState {
- Button(action: next) {
- HStack(spacing: 8) { Text("继续"); Image(systemName: "arrow.right") }
- .font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
- .padding(.horizontal, 28).frame(height: 44)
- .background(RoundedRectangle(cornerRadius: 12).fill(Palette.ink))
+ primary(L("继续"), arrow: true, action: next)
+ } else if skipping {
+ Button { skipping = false } label: {
+ Text("回去接上")
+ .font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.ink)
+ .padding(.horizontal, 20).frame(height: 44)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Color.white))
+ .overlay(RoundedRectangle(cornerRadius: 12).stroke(Color(white: 0.84), lineWidth: 1))
.contentShape(Rectangle())
}
.buttonStyle(.plain)
- .keyboardShortcut(.defaultAction)
+ primary(L("好,先这样"), arrow: false) { skipping = false; next() }
} else {
- Button("稍后在设置里填", action: skip).buttonStyle(.plain).foregroundStyle(Palette.secondary)
- HStack(spacing: 8) { Text("继续"); Image(systemName: "arrow.right") }
- .font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
- .padding(.horizontal, 28).frame(height: 44)
- .background(RoundedRectangle(cornerRadius: 12).fill(Color(white: 0.8)))
- .accessibilityElement(children: .combine)
- .accessibilityHint(Text("先连接 Ling"))
+ Button("先不接") { skipping = true }.buttonStyle(.plain).foregroundStyle(Palette.secondary)
+ Text("接上后继续")
+ .font(.system(size: 14, weight: .semibold)).foregroundStyle(Palette.secondary)
+ .padding(.horizontal, 24).frame(height: 44)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Color(white: 0.87)))
+ }
+ }
+ }
+
+ private func primary(_ text: String, arrow: Bool, action: @escaping () -> Void) -> some View {
+ Button(action: action) {
+ HStack(spacing: 8) {
+ Text(text)
+ if arrow { Image(systemName: "arrow.right") }
}
+ .font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
+ .padding(.horizontal, 28).frame(height: 44)
+ .background(RoundedRectangle(cornerRadius: 12).fill(Palette.ink))
+ .contentShape(Rectangle())
}
+ .buttonStyle(.plain)
+ .keyboardShortcut(.defaultAction)
}
}
diff --git a/scripts/build.sh b/scripts/build.sh
index d81c983..e6f887c 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -17,7 +17,7 @@ mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp "$BIN/LiveSubs" "$APP/Contents/MacOS/Cicada"
cp Resources/Info.plist "$APP/Contents/Info.plist"
-cp Resources/sample/sample.mp4 Resources/sample/sample.m4a "$APP/Contents/Resources/"
+cp Resources/sample/sample.m4a "$APP/Contents/Resources/"
cp -R Resources/*.lproj "$APP/Contents/Resources/"
# Traditional Chinese systems get the Chinese UI rather than English (there is no zh-Hant translation).
cp -R Resources/zh-Hans.lproj "$APP/Contents/Resources/zh-Hant.lproj"
diff --git a/scripts/make-frame.swift b/scripts/make-frame.swift
deleted file mode 100644
index e59ada3..0000000
--- a/scripts/make-frame.swift
+++ /dev/null
@@ -1,18 +0,0 @@
-import AppKit
-let w = 1920, h = 1080
-let rep = NSBitmapImageRep(bitmapDataPlanes: nil, pixelsWide: w, pixelsHigh: h, bitsPerSample: 8, samplesPerPixel: 4,
- hasAlpha: true, isPlanar: false, colorSpaceName: .deviceRGB, bytesPerRow: 0, bitsPerPixel: 0)!
-NSGraphicsContext.saveGraphicsState()
-NSGraphicsContext.current = NSGraphicsContext(bitmapImageRep: rep)
-NSColor(srgbRed: 0.10, green: 0.11, blue: 0.13, alpha: 1).setFill(); NSRect(x: 0, y: 0, width: w, height: h).fill()
-NSColor(srgbRed: 0.23, green: 0.25, blue: 0.29, alpha: 1).setFill()
-NSBezierPath(ovalIn: NSRect(x: 560, y: 400, width: 280, height: 280)).fill()
-let accent = NSColor(srgbRed: 0.91, green: 0.33, blue: 0.17, alpha: 1)
-accent.setStroke(); let ring = NSBezierPath(ovalIn: NSRect(x: 548, y: 388, width: 304, height: 304)); ring.lineWidth = 10; ring.stroke()
-("M" as NSString).draw(at: NSPoint(x: 648, y: 470), withAttributes: [.font: NSFont.systemFont(ofSize: 130, weight: .semibold), .foregroundColor: NSColor.white])
-("Mia" as NSString).draw(at: NSPoint(x: 920, y: 580), withAttributes: [.font: NSFont.systemFont(ofSize: 72, weight: .bold), .foregroundColor: NSColor.white])
-("Live stream · English" as NSString).draw(at: NSPoint(x: 922, y: 500), withAttributes: [.font: NSFont.systemFont(ofSize: 40), .foregroundColor: NSColor(white: 0.7, alpha: 1)])
-accent.setFill(); NSBezierPath(roundedRect: NSRect(x: 80, y: 960, width: 150, height: 56), xRadius: 28, yRadius: 28).fill()
-("LIVE" as NSString).draw(at: NSPoint(x: 112, y: 968), withAttributes: [.font: NSFont.systemFont(ofSize: 34, weight: .bold), .foregroundColor: NSColor.white])
-NSGraphicsContext.restoreGraphicsState()
-try! rep.representation(using: .png, properties: [:])!.write(to: URL(fileURLWithPath: CommandLine.arguments[1]))
diff --git a/scripts/make-sample.sh b/scripts/make-sample.sh
index 6c2d50a..0e88a82 100755
--- a/scripts/make-sample.sh
+++ b/scripts/make-sample.sh
@@ -1,17 +1,45 @@
#!/bin/bash
-# Builds the onboarding sample: Resources/sample/sample.mp4 (muted video track for display)
-# and Resources/sample/sample.m4a (the speech, played by a helper process so the app's
-# own system-audio capture hears it — the app excludes its own process).
+# Builds the onboarding sample, Resources/sample/sample.m4a: a short meeting voiced by Ming with
+# the Ling key in Application Support. The app plays it through afplay so its own system-audio
+# capture hears it (the app excludes its own process). Ming's output varies a little between runs:
+# after regenerating, re-measure the turns (silencedetect below) into `SamplePlayer.turns`.
set -euo pipefail
cd "$(dirname "$0")/.."
+KEY_FILE="$HOME/Library/Application Support/LiveSubs/ling-api-key"
+[ -f "$KEY_FILE" ] || KEY_FILE="$HOME/Library/Application Support/LiveSubs Dev/ling-api-key"
T=$(mktemp -d)
-say -v 'Eddy (English (US))' -r 175 -o "$T/speech.aiff" \
- "Hi everyone, welcome to the live stream. Today we're talking about real time translation on the Mac."
-swift scripts/make-frame.swift "$T/frame.png"
-DUR=$(afinfo "$T/speech.aiff" | awk '/estimated duration/{print $3}')
-ffmpeg -y -loglevel error -i "$T/speech.aiff" -c:a aac -b:a 64k Resources/sample/sample.m4a
-ffmpeg -y -loglevel error -loop 1 -framerate 25 -t "$DUR" -i "$T/frame.png" \
- -vf "zoompan=z='min(zoom+0.0006,1.06)':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1:s=960x540:fps=25,format=yuv420p" \
- -c:v libx264 -preset slow -crf 30 -an -movflags +faststart Resources/sample/sample.mp4
-rm -rf "$T"
-ls -la Resources/sample/sample.*
+trap 'rm -rf "$T"' EXIT
+
+say() { # out voice text
+ python3 -I - "$1" "$2" "$3" "$KEY_FILE" <<'PY'
+import sys, json, base64, urllib.request
+out, voice, text, key_file = sys.argv[1:]
+key = open(key_file).read().strip()
+body = {"model": "Ming-3.0-tts-0.5B", "input": text, "voice": voice, "response_format": "pcm",
+ "sample_rate": 24000, "stream": True, "stream_format": "sse",
+ "instructions": "Speak fast and casually, like a colleague in a real meeting, natural rhythm."}
+req = urllib.request.Request("https://api.ant-ling.com/v1/audio/speech", data=json.dumps(body).encode(),
+ headers={"Authorization": "Bearer " + key, "Content-Type": "application/json"})
+pcm = b""
+with urllib.request.urlopen(req, timeout=60) as r:
+ for line in r:
+ line = line.decode().strip()
+ if not line.startswith("data:"): continue
+ try: o = json.loads(line[5:])
+ except ValueError: continue
+ if o.get("type") == "speech.audio.done": break
+ if o.get("audio"): pcm += base64.b64decode(o["audio"])
+open(out, "wb").write(pcm)
+PY
+}
+say "$T/1.pcm" US_Emma "Okay, so where are we on the launch?"
+say "$T/2.pcm" UK_George "Uh, I think we can ship March third, if design signs off by Friday."
+say "$T/3.pcm" US_Emma "Great, let's lock that in."
+
+TRIM="silenceremove=start_periods=1:start_threshold=-45dB,areverse,silenceremove=start_periods=1:start_threshold=-45dB,areverse"
+PCM="-f s16le -ar 24000 -ac 1"
+ffmpeg -y -loglevel error $PCM -i "$T/1.pcm" $PCM -i "$T/2.pcm" $PCM -i "$T/3.pcm" -filter_complex \
+ "[0]$TRIM,adelay=250,apad=pad_dur=0.22[a];[1]$TRIM,apad=pad_dur=0.2[b];[2]$TRIM,apad=pad_dur=0.35[c];[a][b][c]concat=n=3:v=0:a=1,loudnorm=I=-16:TP=-1.5,aresample=22050" \
+ -c:a aac -b:a 64k Resources/sample/sample.m4a
+ffmpeg -i Resources/sample/sample.m4a -af silencedetect=n=-40dB:d=0.12 -f null - 2>&1 | grep -o 'silence_[a-z]*: [0-9.]*' || true
+ls -la Resources/sample/sample.m4a
diff --git a/site/changelog.json b/site/changelog.json
index 5fba30a..7c2d844 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -31,6 +31,11 @@
"title": "安装窗口讲清楚首次打开的提示。",
"text": "开发者证书还在申请中,第一次打开会提示 Apple 无法验证。安装窗口里现在写明这是正常的,并用三张小图标出要点的按钮:点完成(别点移到废纸篓),在系统设置里选隐私与安全性,再在安全性一栏点仍要打开。"
},
+ {
+ "kind": "changed",
+ "title": "首次引导先让你看到字幕,再谈 Ling key。",
+ "text": "引导改成听声音、看效果、接 Ling、同声传译四步,进度条下写着每步的名字。第一步只要一个“听电脑里的声音”权限,打开后自动进入下一步;麦克风等到设置同声传译时再问。示例换成了一段 Ming 配音的两人会议,画成会议通话的样子,字幕不再挡住说话的人,并挪到了 Ling key 前面,看完就知道这些字幕开会时还能整理成纪要。不想现在接 Ling 也行:点“先不接”会先列出不接也能用的(实时字幕、双语文字记录、用系统语音的同声传译)和接上才有的,开完的会以后也能补出纪要。同声传译一步先问要不要,只有选“要”才展开虚拟麦克风的设置。最后一页指给你看菜单栏里的图标。"
+ },
{
"kind": "fixed",
"title": "英文界面不再截断。",
diff --git a/site/i18n/en.json b/site/i18n/en.json
index bdb06fc..0383487 100644
--- a/site/i18n/en.json
+++ b/site/i18n/en.json
@@ -127,13 +127,13 @@
"s3_h": "Open Cicada and follow the guide",
"s3_p": "The first-run guide takes you through three things:",
"s3_li1": "Let Cicada hear your Mac’s audio",
- "s3_li2": "Paste your Ling key",
- "s3_li3": "Play the sample video and watch subtitles and notes appear",
+ "s3_li2": "Play the sample meeting and watch live subtitles appear",
+ "s3_li3": "Connect your Ling key for notes and sharper translation",
"s3_after": "After that, Cicada starts on its own whenever a video or call plays.",
- "shot_perm_alt": "Cicada first-run step 1: hear the Mac’s audio (required) and microphone (optional)",
- "shot_key_alt": "Cicada first-run step 2: create a token on the Ling platform, copy the sk- key, then paste and check",
+ "shot_perm_alt": "Cicada first-run step 1: let it hear the Mac’s audio (sound only, never the screen)",
+ "shot_key_alt": "Cicada first-run step 3: create a key on the Ling platform, copy the sk- key, then paste and check",
"shot_perm_cap": "Guide 1/4: let Cicada hear your Mac",
- "shot_key_cap": "Guide 2/4: paste your Ling key",
+ "shot_key_cap": "Guide 3/4: connect your Ling key",
"later_h": "Turn on when you need it",
"later1_h": "Interpreting",
"later1_p": "Hold right ⌥ and talk; the meeting hears you translated. The first time, Cicada walks you through installing a virtual microphone.",
diff --git a/site/i18n/ja.json b/site/i18n/ja.json
index 550f007..fd4c694 100644
--- a/site/i18n/ja.json
+++ b/site/i18n/ja.json
@@ -127,13 +127,13 @@
"s3_h": "Cicada を開いてガイドに沿って進める",
"s3_p": "初回起動時のガイドで、次の 3 つを済ませます:",
"s3_li1": "Mac の音声を聞く許可を出す",
- "s3_li2": "Ling キーを貼り付ける",
- "s3_li3": "サンプル動画を再生して、字幕と議事メモを確認する",
+ "s3_li2": "サンプルの会議を再生して、リアルタイム字幕を確認する",
+ "s3_li3": "Ling キーをつないで、議事メモとより正確な翻訳を使う",
"s3_after": "あとは動画や会議の音が流れれば、Cicada が自動で始まります。",
- "shot_perm_alt": "Cicada 初回ガイド ステップ 1:Mac の音声を聞く(必須)とマイク(任意)の許可",
- "shot_key_alt": "Cicada 初回ガイド ステップ 2:Ling プラットフォームでトークンを作成し、sk- で始まるキーを貼り付けて確認",
+ "shot_perm_alt": "Cicada 初回ガイド ステップ 1:Mac の音声を聞く許可(音だけで、画面は録画しません)",
+ "shot_key_alt": "Cicada 初回ガイド ステップ 3:Ling プラットフォームで key を作成し、sk- で始まる key を貼り付けて確認",
"shot_perm_cap": "ガイド 1/4:Mac の音声を聞く許可",
- "shot_key_cap": "ガイド 2/4:Ling キーを貼り付け",
+ "shot_key_cap": "ガイド 3/4:Ling キーをつなぐ",
"later_h": "必要なときにオンに",
"later1_h": "同時通訳",
"later1_p": "右 ⌥ を押しながら話すと、会議の相手には翻訳された音声が聞こえます。初めて使うときは、仮想マイクのインストールを Cicada が案内します。",
diff --git a/site/i18n/ko.json b/site/i18n/ko.json
index 21ad31f..80d9263 100644
--- a/site/i18n/ko.json
+++ b/site/i18n/ko.json
@@ -127,13 +127,13 @@
"s3_h": "Cicada를 열고 가이드 따라가기",
"s3_p": "첫 실행 가이드가 다음 세 가지를 안내합니다:",
"s3_li1": "Mac의 소리를 들을 수 있도록 허용",
- "s3_li2": "Ling 키 붙여넣기",
- "s3_li3": "샘플 영상을 재생해 자막과 회의록 확인",
+ "s3_li2": "샘플 회의를 재생해 실시간 자막 확인",
+ "s3_li3": "Ling 키를 연결해 회의록과 더 정확한 번역 사용",
"s3_after": "이후에는 영상이나 회의 소리가 나면 Cicada가 자동으로 시작합니다.",
- "shot_perm_alt": "Cicada 첫 실행 가이드 1단계: Mac 소리 듣기(필수)와 마이크(선택) 권한",
- "shot_key_alt": "Cicada 첫 실행 가이드 2단계: Ling 플랫폼에서 토큰을 만들고 sk- 키를 붙여넣어 확인",
+ "shot_perm_alt": "Cicada 첫 실행 가이드 1단계: Mac 소리 듣기 허용(소리만, 화면은 녹화하지 않음)",
+ "shot_key_alt": "Cicada 첫 실행 가이드 3단계: Ling 플랫폼에서 key를 만들고 sk- 키를 붙여넣어 확인",
"shot_perm_cap": "가이드 1/4: Mac 소리 듣기 허용",
- "shot_key_cap": "가이드 2/4: Ling 키 붙여넣기",
+ "shot_key_cap": "가이드 3/4: Ling 키 연결",
"later_h": "필요할 때 켜기",
"later1_h": "동시통역",
"later1_p": "오른쪽 ⌥를 누른 채 말하면 회의 상대에게 번역된 음성이 들립니다. 처음 쓸 때 Cicada가 가상 마이크 설치를 안내합니다.",
diff --git a/site/i18n/zh.json b/site/i18n/zh.json
index 1a2d57a..ec9111b 100644
--- a/site/i18n/zh.json
+++ b/site/i18n/zh.json
@@ -127,13 +127,13 @@
"s3_h": "打开知了,跟着引导走完",
"s3_p": "首次打开会有引导,带你做完三件事:",
"s3_li1": "允许知了听电脑里的声音",
- "s3_li2": "粘贴 Ling key",
- "s3_li3": "播放示例视频,看到字幕和纪要",
+ "s3_li2": "播放示例会议,看到实时字幕",
+ "s3_li3": "接上 Ling key,纪要和更准的翻译就有了",
"s3_after": "之后放任何视频或开会,知了都会自动开始。",
- "shot_perm_alt": "知了首次引导第一步:听电脑里的声音(必需)和麦克风(可选)两项权限",
- "shot_key_alt": "知了首次引导第二步:在 Ling 开放平台创建令牌,复制 sk- 开头的 key 后粘贴并检查",
+ "shot_perm_alt": "知了首次引导第一步:允许听电脑里的声音,只听声音,不录屏幕画面",
+ "shot_key_alt": "知了首次引导第三步:在 Ling 开放平台创建 key,复制 sk- 开头的 key 后粘贴并检查",
"shot_perm_cap": "引导 1/4:允许听电脑里的声音",
- "shot_key_cap": "引导 2/4:粘贴 Ling key",
+ "shot_key_cap": "引导 3/4:接上 Ling key",
"later_h": "需要时再开启",
"later1_h": "同声传译",
"later1_p": "按住右侧 ⌥ 说话,对方在会议里听到翻译后的语音。第一次打开时,知了会带你装好虚拟麦克风。",
diff --git a/site/img/start/en-key.jpg b/site/img/start/en-key.jpg
index 34dd0a9..76df03a 100644
Binary files a/site/img/start/en-key.jpg and b/site/img/start/en-key.jpg differ
diff --git a/site/img/start/en-permissions.jpg b/site/img/start/en-permissions.jpg
index aea5b10..4e058ac 100644
Binary files a/site/img/start/en-permissions.jpg and b/site/img/start/en-permissions.jpg differ
diff --git a/site/img/start/ja-key.jpg b/site/img/start/ja-key.jpg
index 9cf8ee0..a00fdc6 100644
Binary files a/site/img/start/ja-key.jpg and b/site/img/start/ja-key.jpg differ
diff --git a/site/img/start/ja-permissions.jpg b/site/img/start/ja-permissions.jpg
index 84f5d30..105ca1c 100644
Binary files a/site/img/start/ja-permissions.jpg and b/site/img/start/ja-permissions.jpg differ
diff --git a/site/img/start/ko-key.jpg b/site/img/start/ko-key.jpg
index fa01eb7..1b5dddb 100644
Binary files a/site/img/start/ko-key.jpg and b/site/img/start/ko-key.jpg differ
diff --git a/site/img/start/ko-permissions.jpg b/site/img/start/ko-permissions.jpg
index fa26d15..ac3eed7 100644
Binary files a/site/img/start/ko-permissions.jpg and b/site/img/start/ko-permissions.jpg differ
diff --git a/site/img/start/zh-key.jpg b/site/img/start/zh-key.jpg
index 2dbb7ec..e43ac67 100644
Binary files a/site/img/start/zh-key.jpg and b/site/img/start/zh-key.jpg differ
diff --git a/site/img/start/zh-permissions.jpg b/site/img/start/zh-permissions.jpg
index c22a494..5faff72 100644
Binary files a/site/img/start/zh-permissions.jpg and b/site/img/start/zh-permissions.jpg differ
diff --git a/tools/README.md b/tools/README.md
index dd447b4..5e7cdab 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -17,7 +17,7 @@
- 试一句:`speakTest:sample`(Mac 读一句示例)或 `speakTest:voice`(再发 `speakTestBegin` / `speakTestEnd` 当作按住、松开),结果以 `speak test:` 写进日志;`speakTestState`、`speakTestRender:<png>`、`speakTestClose`
- 多开:两边都设 `CICADA_DEBUG_CHANNEL=x`(`open -n --env CICADA_DEBUG_CHANNEL=x build/Cicada.app`),命令只发给这一份,日志在 `/tmp/livesubs-dev-debug-x.log`
- 导出:`export:<目录>`
- - 新手引导与窗口:`onboarding:<步骤>`、`samplePlay`、`closeWindow:<main|settings|onboarding>`、`settings:<overlay|language|speak|records|ai|diagnostics>`、`about`
+ - 新手引导与窗口:`onboarding:<步骤>[,skip|ask|setup]`(1–5,5 是收尾页;skip 是第 3 步点了“先不接”,ask / setup 是第 4 步的二选一 / 清单)、`samplePlay`、`closeWindow:<main|settings|onboarding>`、`settings:<overlay|language|speak|records|ai|diagnostics>`、`about`
- 显示与字幕:`display:<notes|bar|none>`、`subtitles:<both|translation|original>`、`meetingSubtitles:<…>`、`overlayState`、`overlayToggle`、`overlayAuto[:off]`、`hideAfter:<秒>`
- 纪要:`notesLang:<mine|source>`、`meetingNotesLang:<…>`、`notesRegenerate:<id>=<mine|source>`、`notesWindow[:x,y,w,h]`、`notesClose`、`notesFrame`、`notesNow`、`notesState`、`notesShow:<id>`、`notesReplay:<id>`、`notesCapturable[:off]`
- 结束会议:`endSim:<应用名>[,…]` 假装这些会议应用在通话(`endSim:` 全部挂断,`endSim:off` 回到真实情况),`endTimes:<静默秒>,<倒计时秒>,<挂断宽限秒>` 缩短等待(`endTimes:` 回到设置),`endKeep` 等于点“继续记录”,`endState` 写进日志