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.

docs: the room-test skill becomes audio-test, with 同声传译's scenarios and pass line beside the room mic's

wquguru6312257d9301
diff --git a/.claude/skills/audio-test/SKILL.md b/.claude/skills/audio-test/SKILL.md
index ada4a37..b8f6189 100644
--- a/.claude/skills/audio-test/SKILL.md
+++ b/.claude/skills/audio-test/SKILL.md
@@ -1,52 +1,40 @@
---
-name: room-test
-description: Measure Cicada's room microphone for real on the Mac — echo from the speakers, people at the table talking in the gaps and over the online side, music, headphones — with an ESP32 speaker standing in for a person at the table, and score each round. Use after any change to 打开麦克风, the room mic, EchoGate / EchoMatch, voice activity or the room recognizer, or for "测回声", "测会议室麦克风", "混合会议实测", "抢话测试".
+name: audio-test
+description: Test Cicada with real sound on the Mac — a scripted meeting from the speakers, a person in the room played by an ESP32 speaker next to the mic, the talk key held from the shell — and score each round against a pass line. Use after any change to the room mic (打开麦克风, EchoGate, EchoMatch), 同声传译 (the talk key, its mic, echo cancellation, the virtual mic), voice activity or recognition from a mic; or for "实测", "测回声", "测同声传译", "混合会议实测", "抢话测试".
---
-# Room test
+# Audio test
-How the 打开麦克风 change (cb7762c) was measured. The Mac is the reference; Windows and Linux VMs have no speakers or mic, so their rounds are UI and state only (`cicadactl mic on`, `roomechosim`).
+Real sound through real speakers and mics, on the Mac (the reference). The Windows and Linux VMs have no speakers or mic: their rounds are UI and state only (`cicadactl mic on`, `roomechosim`). One file per feature under `references/`: read the one for what changed.
-## The rig
-
-- **Online side:** `mac.wav` (five English sentences, 10 s apart) from the MacBook's speakers, through `afplay`.
-- **Table side:** `table.wav` (six Chinese sentences: three in the Mac's gaps, three over its speech) from the M5Stack StopWatch's speaker: `~/workshop/15.experiment/m5-stopwatch/tablevoice/tv.py play <wav> --at <utc>` (prints START/END). Different languages, so each record line says which side it came from.
-- **Where:** the ESP32 about 10 cm from the MacBook Pro's mics, which sit under the left speaker grille near the hinge (by Esc), speaker facing it, not on the right grille. At 30 cm it reaches only −22 dB peak and half the table lines are lost to level alone. Its volume is already the ceiling (255).
-- The ESP32 belongs to the `esp32-stopwatch-meeting-mic-test` session: message it before using the port (one `tv.py` at a time) and when done. Flashing it is that session's user's call.
-- `scripts/clips.py` writes the clips (and `music.wav`); `scripts/audio.swift` sets the output device and the mic's input level; `scripts/round.sh` runs one round and scores it. Both are built into `$WORK` on first use.
-
-## Before the first round
-
-- `ListAgents`: tell the sessions on this repo you hold the dev build, the speakers and the mic; nobody else rebuilds or drives `build/Cicada.app` until you say so. Build it yourself and check the panel's `main @ <commit>` line is yours.
-- Nothing else makes sound: quit the release Cicada (`osascript -e 'quit app id "com.wquguru.cicada"'`; if it hangs, `kill -TERM`), shut simulators (`xcrun simctl shutdown all`). `pmset -g assertions | grep -i audio` lists who plays or records. Ask before closing anything the user may be using.
-- `audio list`: output must be the MacBook speakers and the MacBook mic's level about 0.5. **AirPods take the output when they connect** (and the clips then play in the user's ears): `round.sh` forces the output every round; check it again after any pause, and ask the user before playing out loud.
-- The terminal has no microphone permission: `ffmpeg -f avfoundation` records zeros. Judge the mic only through the app (`hybridState`, the record).
+| Feature | Reference | Script |
+|---|---|---|
+| 打开麦克风: echo, people at the table, music, headphones | `references/room.md` | `scripts/room-round.sh` |
+| 同声传译: what I say, with the meeting playing | `references/speak.md` | `scripts/speak-round.sh` |
-## Rounds
+## The cast
-`scripts/round.sh <label> [mac|music|none] [volume]`, env `OUT` (`BlackHole` = headphones: nothing reaches the room), `ECHO` (`roomEcho`, default off), `GATE`, `TABLE`. Each round is about 75 s and prints, for example:
+- **The online side:** clips from the MacBook speakers (`afplay`), English, Samantha.
+- **A person in the room** (someone at the table, or me holding the talk key): an M5Stack StopWatch's speaker about 10 cm from the MacBook Pro's mics, which sit under the left speaker grille near the hinge (by Esc), facing it, not on the right grille. `~/workshop/15.experiment/m5-stopwatch/tablevoice/tv.py play <wav> [--at <utc>]` (START/END on stdout, blocks until END). Chinese, Tingting, so every record line says which side it came from. At 30 cm it reaches only −22 dB and half the lines are lost to level alone; its volume is already the ceiling.
+- **What the meeting app hears:** BlackHole 2ch, the virtual mic. `lsctl speakOut:<file.m4a>` keeps a copy of each voice sent.
+- **The talk key:** `lsctl talkDown` / `talkUp`, with the real mic.
-```
-== speakers56: mac=5 room=3 echo_dropped=0 english_room=0 table: 空100% 抢0% 空75% 抢0% 抢20% 空100%
- echo=true [during=7.8s p80=0.0943 quiet=4.8s floor=0.0043]
-```
+The ESP32 belongs to the `esp32-stopwatch-meeting-mic-test` session: message it before using the port (one `tv.py` at a time) and when done. Flashing it is that session's user's call.
-`english_room` is online speech that got into the room's record (echo). `空` is a table sentence in a gap, `抢` one over the online side, with the share of its characters found. `echo=` is what EchoGate measured: speakers about ×20 at 56 %, ×6 at 25 %, headphones about ×1.
+Scripts: `clips.py` writes every clip into `$WORK` (default `$TMPDIR/cicada-room-test`), `audio.swift` sets the output device and an input's level (`audio list`), the round scripts build both on first use, drive the dev build with `tools/lsctl`, and score from the meeting record and `/tmp/livesubs-dev-debug.log`.
-The pass line (2026-11-06, MacBook Pro 14):
+## Before the first round
-| Round | Command | Pass |
-|---|---|---|
-| Speakers 25 / 56 / 100 % | `round.sh s25 mac 25` … | `english_room` 0; gaps ≥ 75 % |
-| Music | `round.sh music music 56` | table ≥ 60 % (gaps and over) |
-| Headphones | `OUT=BlackHole round.sh hp mac 56` | `echo=false`; over ≥ 90 % |
-| Then speakers again | `round.sh s56b mac 56` | `english_room` 0 (the measurement starts over) |
-| Table alone | `round.sh alone none` | 6/6 |
+- `ListAgents`: tell the sessions on this repo you hold the dev build, the speakers and the mic, and ask who used it last; nobody else rebuilds or drives `build/Cicada.app` until you say so. Build it yourself and check the panel's `main @ <commit>` line is yours.
+- Nothing else makes sound: quit the release Cicada (`osascript -e 'quit app id "com.wquguru.cicada"'`; if it hangs, `kill -TERM`), shut simulators (`xcrun simctl shutdown all`). `pmset -g assertions | grep -i audio` lists who plays or records. Ask before closing what the user may be using.
+- `audio list`: output the MacBook speakers, the MacBook mic's level about 0.5. **AirPods take the output when they connect** and the clips then play in the user's ears: the scripts force the output every round; ask the user before playing out loud.
+- The terminal has no microphone permission: `ffmpeg -f avfoundation` records zeros. Judge the mic through the app only.
+- 同声传译 needs a working AI service (`lsctl aiState`); the dev build's service is the user's setting: switch it only for the test and put it back.
-Lines over the online side are lost on speakers by design (the gate). Run a round twice before believing a single bad cell: the ESP32 is quiet and one round varies.
+## Designing a new scenario
-Also: `lsctl roomMicSilent:on` then `mic:on` shows 麦克风没声音 after about 10 s (log `room mic: silent since it started`, then `still silent`); `roomEchoSim:<on|off|real>` fixes the measurement for UI work.
+Write it down as a conversation before scripting it: who says what, when, from where (speakers, ESP32, nobody), and which key is held. Give each side its own language, one sentence per row with its time. Then the pass line: what must appear in which part of the record (`speaker` "me" or "them", `via` "room"), what must not (the other side's language), and a number for each. Run a round twice before believing a single bad cell: the ESP32 is quiet and rounds vary. Add the scenario and its numbers to the feature's reference.
## After
-`lsctl mic:off`, `stop`, `roomEcho:off`, `roomGate:on`, `roomMicSilent:off`; output back to what the user had; volume back; tell the ESP32 session and the repo's sessions you're done. Put the numbers in the commit message.
+`lsctl mic:off`, `stop`, `speakOff` if you turned it on, `roomEcho:off`, `roomGate:on`, `speakVP:on` (the default), `speakMic:` (the user's), `roomMicSilent:off`, the AI service back; output and volume back to what the user had; tell the ESP32 session and the repo's sessions you're done. Put the numbers in the commit message.
diff --git a/.claude/skills/audio-test/references/room.md b/.claude/skills/audio-test/references/room.md
new file mode 100644
index 0000000..4648e7b
--- /dev/null
+++ b/.claude/skills/audio-test/references/room.md
@@ -0,0 +1,36 @@
+# 打开麦克风: the room mic
+
+What cb7762c was measured with. `scripts/room-round.sh <label> [mac|music|none] [volume]`, env `OUT` (`BlackHole` = headphones: nothing reaches the room), `ECHO` (`roomEcho`, default off), `GATE`, `TABLE`. About 75 s a round.
+
+## The conversation (clips.py, one 52 s timeline)
+
+| Time | From | Says |
+|---|---|---|
+| 0, 10, 20, 30, 40 s | speakers (online) | five English sentences, about 4 s each (`mac.wav`) |
+| 6, 25, 47 s | ESP32 (table) | 我同意这个数字。 / 设计那个岗位很急。 / 周四之前我会回复。 — in the online side's gaps |
+| 11, 31, 41 s | ESP32 (table) | 等一下,企业版具体涨了多少? / 好的,没问题。 / 导出功能我们下周排期。 — over the online side |
+
+`music` plays `music.wav` (chords and a beat, no words) instead of the online side; `none` plays nothing.
+
+## Reading a round
+
+```
+== speakers56: mac=5 room=3 echo_dropped=0 english_room=0 table: 空100% 抢0% 空75% 抢0% 抢20% 空100%
+ echo=true [during=7.8s p80=0.0943 quiet=4.8s floor=0.0043]
+```
+
+`english_room` is online speech that got into the room's lines (echo). `空` a table sentence in a gap, `抢` one over the online side, with the share of its characters found. `echo=` is EchoGate's measurement: MacBook speakers about ×20 at 56 %, ×6 at 25 %, AirPods and BlackHole about ×1.
+
+## Pass line (2026-11-06, MacBook Pro 14)
+
+| Round | Command | Pass |
+|---|---|---|
+| Speakers 25 / 56 / 100 % | `room-round.sh s25 mac 25` … | `english_room` 0; gaps ≥ 75 % |
+| Music | `room-round.sh music music 56` | table ≥ 60 % (gaps and over) |
+| Headphones | `OUT=BlackHole room-round.sh hp mac 56` | `echo=false`; over ≥ 90 % |
+| Then speakers again | `room-round.sh s56b mac 56` | `english_room` 0 (the measurement starts over) |
+| Table alone | `room-round.sh alone none` | 6/6 |
+
+Lines over the online side are lost on speakers by design (the gate). With macOS echo cancellation (`ECHO=on`) echo was 0 too but gaps fell to 0–25 %: why it is off.
+
+Also: `lsctl roomMicSilent:on` then `mic:on` shows 麦克风没声音 after about 10 s (log `room mic: silent since it started`, then `still silent`); `roomEchoSim:<on|off|real>` fixes the measurement for UI work.
diff --git a/.claude/skills/audio-test/references/speak.md b/.claude/skills/audio-test/references/speak.md
new file mode 100644
index 0000000..78bc0ba
--- /dev/null
+++ b/.claude/skills/audio-test/references/speak.md
@@ -0,0 +1,42 @@
+# 同声传译: what I say into the meeting
+
+What 279d045, 08f316b and 7106021 were measured with. `scripts/speak-round.sh <label> [quiet|meeting|silent] [volume]`, env `VP` (`speakVP`, default on as in the app), `MIC` (打开麦克风 during the round), `SPEAKMIC` (the talk key's mic, default the MacBook's), `OUT`. Three presses, about 50 s a round. It needs a working AI service (`lsctl aiState`; Ling speaks with Ming).
+
+## The conversation
+
+| Press | Key held for | ESP32 (me, 10 cm from the mic) | Speakers |
+|---|---|---|---|
+| 1 | about 4 s | 我们下周三之前可以把测试做完。 | `quiet`: nothing; `meeting`: `meeting.wav`, English without a break, through all three presses |
+| 2 | about 4 s | 价格方面我需要先和财务确认一下。 | same |
+| 3 | about 4 s | 这个问题我会后发邮件给大家。 | same |
+
+`silent` holds the key the same way with nobody speaking (and the meeting playing, or at volume 0 for a quiet room). `MIC=on` adds the room mic: my sentences must not show up as room lines, since the room mic hears silence while I hold the key and while the translation is read out.
+
+## Reading a round
+
+```
+== meeting: presses=3 sent=3 failed=0 me_lines=3 mine_heard: 86% 100% 100% english_in_mine=0 voiced=3 skipped_silent=0 in_room_lines: 0% 0% 0%
+ release→text 2.97s, text→translation 0.00s
+ voice: 8 chunks to BlackHole 2ch, first audio 4.12s after release
+ me| 我们下周三之前可以把这个任务做完。 => We can finish this task by next Wednesday.
+```
+
+`mine_heard` is how much of each of my sentences is in what was sent; `english_in_mine` the meeting's words in it (its echo, interpreted as me). `voiced` counts the voices that reached BlackHole (`spoke … chunks`); `skipped_silent` the presses PressSpeech found nobody speaking in. Ming answers recognition and translation together: `text→translation` is 0 and `release→text` is the whole call.
+
+## Pass line (2026-11-06, MacBook Pro 14, speakers at 56 %)
+
+| Round | Command | Pass |
+|---|---|---|
+| Quiet | `speak-round.sh quiet quiet 56` | sent 3; mine ≥ 90 %; voiced 3 |
+| Meeting playing | `speak-round.sh meeting meeting 56` | mine ≥ 80 %; `english_in_mine` 0 and no meeting content in the `me|` lines |
+| Silent, meeting playing | `speak-round.sh sm silent 56` | sent 0 |
+| Silent, quiet room | `speak-round.sh sq silent 0` | sent 0 (see below) |
+| Room mic on | `MIC=on speak-round.sh mm meeting 56` | as meeting; `in_room_lines` 0 % |
+
+What it found: with the plain mic (`VP=off`) the meeting's English came back from the speakers and Ming interpreted it as me — my sentences 50/27/23 %, the meeting sent back into itself, and a silent press sent the meeting back 3 of 3 times. Through echo cancellation: 86–100 %, none of the meeting. A silent press in a quiet room came back as 嗯 → "Hmm." until PressSpeech and the filler check.
+
+## Open
+
+- **Sounds that aren't speech.** In a quiet room a silent press with typing nearby went out as "The sound of typing on a computer keyboard." (Ming described the sound). The on-device recognizer can't vote it down: it heard 0 characters of a real sentence too.
+- **Voice output stalls.** Now and then a sentence's voice to BlackHole stops until the next one's stall check rebuilds the output (`voice output stalled … rebuilt`): seen with echo cancellation on and off, once a sentence going out 8 s late. Count `voiced` against `sent`.
+- **Not measured yet:** a real voice; AirPods as the talk mic (only that it no longer crashes); Windows and Linux (no audio in the VMs).
diff --git a/.claude/skills/audio-test/scripts/clips.py b/.claude/skills/audio-test/scripts/clips.py
index ec70b86..896b5b8 100755
--- a/.claude/skills/audio-test/scripts/clips.py
+++ b/.claude/skills/audio-test/scripts/clips.py
@@ -6,6 +6,11 @@
three over the Mac's speech (11, 31, 41 s)
music.wav chords and a beat, no words: what the Mac plays instead of mac.wav in the music round
+For 同声传译 (speak-round.sh):
+ me1.wav … me3.wav what "I" say, one sentence each (Tingting), for the ESP32 while the talk key is held
+ meeting.wav the online side talking without a break (Samantha, the five sentences twice), from
+ the speakers while I talk: its echo must not be what gets interpreted
+
Different languages on the two sides, so every line in the record says where it came from.
Usage: clips.py <folder>"""
import array, math, os, random, subprocess, sys, wave
@@ -17,6 +22,7 @@ MAC = ["Revenue grew twelve percent compared to last quarter, mostly from enterp
"The offsite budget needs approval by Friday, so send comments soon."]
TABLE = ["我同意这个数字。", "等一下,企业版具体涨了多少?", "设计那个岗位很急。", "好的,没问题。", "导出功能我们下周排期。", "周四之前我会回复。"]
TABLE_AT = [6, 11, 25, 31, 41, 47]
+ME = ["我们下周三之前可以把测试做完。", "价格方面我需要先和财务确认一下。", "这个问题我会后发邮件给大家。"]
RATE, LENGTH = 16000, 52
@@ -59,6 +65,14 @@ if __name__ == "__main__":
tmp = os.path.join(folder, "piece.wav")
write(os.path.join(folder, "mac.wav"), [(say("Samantha", s, tmp), i * 10) for i, s in enumerate(MAC)])
write(os.path.join(folder, "table.wav"), [(say("Tingting", s, tmp), at) for s, at in zip(TABLE, TABLE_AT)])
- os.remove(tmp)
write(os.path.join(folder, "music.wav"), [(music(), 0)])
+ for i, sentence in enumerate(ME, 1):
+ say("Tingting", sentence, os.path.join(folder, "me%d.wav" % i))
+ talk, at = [], 0.0
+ for sentence in MAC * 2:
+ samples = say("Samantha", sentence, tmp)
+ talk.append((samples, at))
+ at += len(samples) / RATE + 0.3
+ write(os.path.join(folder, "meeting.wav"), talk)
+ os.remove(tmp)
print("clips in", folder)
diff --git a/.claude/skills/audio-test/scripts/room-round.sh b/.claude/skills/audio-test/scripts/room-round.sh
index a98a8c4..dd41249 100755
--- a/.claude/skills/audio-test/scripts/room-round.sh
+++ b/.claude/skills/audio-test/scripts/room-round.sh
@@ -1,6 +1,6 @@
#!/bin/zsh
# One room-test round on the Mac dev build, scored. Usage:
-# round.sh <label> [mac|music|none] [volume 0-100]
+# room-round.sh <label> [mac|music|none] [volume 0-100]
# Env: OUT (output device name part, default "MacBook Pro Speakers"; "BlackHole" stands in for
# headphones), ECHO (roomEcho on|off, default off), GATE (roomGate on|off, default on),
# TABLE (on|off: play table.wav on the ESP32, default on), WORK (clips and tools, default
diff --git a/.claude/skills/audio-test/scripts/speak-round.sh b/.claude/skills/audio-test/scripts/speak-round.sh
new file mode 100755
index 0000000..dffd7ec
--- /dev/null
+++ b/.claude/skills/audio-test/scripts/speak-round.sh
@@ -0,0 +1,73 @@
+#!/bin/zsh
+# One 同声传译 round on the Mac dev build, scored. The ESP32 says "my" three sentences near the mic
+# while the talk key is held (lsctl talkDown / talkUp), one press each. Usage:
+# speak-round.sh <label> [quiet|meeting|silent] [volume 0-100]
+# quiet the Mac plays nothing
+# meeting the Mac plays meeting.wav (English, no breaks) from the speakers through every press
+# silent meeting.wav plays and the key is held, but nobody says anything
+# Env: VP (speakVP on|off: the talk key's mic through echo cancellation, default on as in the app), MIC
+# (打开麦克风 on|off during the round, default off), SPEAKMIC (the talk key's mic, a name part; default the
+# MacBook's: with AirPods as the system input the talk key would hear them), OUT, WORK (as room-round.sh).
+# Prints per press what was heard and sent, whether the meeting's English got into what I said,
+# what reached the room's lines with MIC on, and the time from release to the translation.
+set -e
+here=${0:A:h}
+repo=${here:h:h:h:h}
+label=${1:?label}; mode=${2:-quiet}; vol=${3:-56}
+OUT=${OUT:-MacBook Pro Speakers}; VP=${VP:-on}; MIC=${MIC:-off}; SPEAKMIC=${SPEAKMIC:-MacBook Pro Microphone}
+WORK=${WORK:-${TMPDIR:-/tmp}/cicada-room-test}
+TV=~/workshop/15.experiment/m5-stopwatch/tablevoice/tv.py
+LOG=/tmp/livesubs-dev-debug.log
+ctl=$repo/tools/lsctl
+mkdir -p $WORK
+[[ -x $WORK/audio ]] || swiftc -O $here/audio.swift -o $WORK/audio
+[[ -f $WORK/me1.wav ]] || python3 $here/clips.py $WORK >/dev/null
+[[ -x $ctl ]] || swiftc -O $repo/tools/lsctl.swift -o $ctl
+
+$WORK/audio out "$OUT" >/dev/null
+osascript -e "set volume output volume $vol"
+$ctl mic:off; $ctl stop; sleep 1
+$ctl speakVP:$VP; $ctl speakMic:$SPEAKMIC; $ctl speakOn
+from=$(($(wc -l < $LOG) + 1))
+if [[ $MIC == on ]]; then $ctl mic:on; else $ctl start:user; fi
+sleep 3
+[[ $mode == quiet ]] || { afplay $WORK/meeting.wav & }
+sleep 2
+for i in 1 2 3; do
+ rm -f $WORK/voice-$i.m4a
+ $ctl speakOut:$WORK/voice-$i.m4a
+ $ctl talkDown; sleep 0.4
+ if [[ $mode == silent ]]; then sleep 3.2; else python3 $TV play $WORK/me$i.wav >/dev/null; fi
+ sleep 0.8; $ctl talkUp
+ sleep 8
+done
+$ctl speakOut:
+wait
+$ctl mic:off; $ctl stop; sleep 3
+session=$(ls -td ~/Library/Application\ Support/LiveSubs\ Dev/Sessions/* | head -1)
+tail -n +$from $LOG > $WORK/speak.log
+python3 - "$session" "$label" "$WORK" <<'PY'
+import json, os, re, sys
+session, label, work = sys.argv[1:]
+me = ["我们下周三之前可以把测试做完", "价格方面我需要先和财务确认一下", "这个问题我会后发邮件给大家"]
+path = session + "/session.json"
+lines = json.load(open(path))["lines"] if os.path.exists(path) else []
+mine = [l for l in lines if l.get("speaker") == "me"]
+room = "".join(l["src"] for l in lines if l.get("via") == "room")
+log = open(os.path.join(work, "speak.log")).read()
+sent = len(re.findall(r"speak: via=", log))
+failed = log.count("translation failed, nothing sent")
+times = [(float(a), float(b)) for a, b in re.findall(r"recognize ([\d.]+) s translate ([\d.]+) s", log)]
+spoke = re.findall(r"spoke \S+ (\d+) chunks to (.+?) first audio ([\d.]+) s", log)
+nothing = log.count("nothing said in the press")
+def share(text, ref): return sum(c in text for c in ref) / len(ref)
+heard = "".join(l["src"] for l in mine)
+english = sum(c.isascii() and c.isalpha() for c in heard)
+cells = " ".join("%d%%" % round(100 * share(heard, m)) for m in me)
+leak = " ".join("%d%%" % round(100 * share(room, m)) for m in me)
+print(f"== {label}: presses=3 sent={sent} failed={failed} me_lines={len(mine)} mine_heard: {cells} english_in_mine={english} "
+ f"voiced={len(spoke)} skipped_silent={nothing} in_room_lines: {leak}")
+for a, b in times: print(f" release→text {a:.2f}s, text→translation {b:.2f}s")
+for n, dev, first in spoke: print(f" voice: {n} chunks to {dev}, first audio {first}s after release")
+for l in mine: print(f" me| {l['src'][:60]} => {(l.get('dst') or '')[:70]}")
+PY
diff --git a/AGENTS.md b/AGENTS.md
index d6735fd..e4c2409 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -48,7 +48,7 @@ scripts/deploy-site.sh # build and deploy the site (cicada.indal
- Run the app and check the behaviour, not just the build; check the English UI too.
- Drive the dev build with `tools/lsctl` (commands and testing tips in `tools/README.md`; the source of truth is `AppModel.debugCommand`). Use `afplay Resources/sample/sample.m4a` or `say -o` clips as input and read `/tmp/livesubs-dev-debug.log`.
-- Room mic and echo: `.claude/skills/room-test` (ESP32 as the table). A real voice, the BlackHole install, Input Monitoring and a Mac without permissions need a person.
+- Real sound (room mic, 同声传译): `.claude/skills/audio-test`. A real voice, the BlackHole install, Input Monitoring and a Mac without permissions need a person.
## Conventions
diff --git a/tools/README.md b/tools/README.md
index 07cfb18..bfdedbb 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -7,14 +7,14 @@
- `lsctl <命令>`:通过分布式通知 `com.wquguru.cicada.debug` 遥控 App。
- 开关字幕:`start` / `stop`(`start:user` 当作用户点了开始听,纪要窗口立即出现;`start` 当作自动开始,等到有人说话)
- - 麦克风:`mic:<on|off>` 等于点“打开麦克风”/“关闭麦克风”(没在听时打开会开始听;旧的 `listenSource:<system|room|both>` 也还能用),`hybridState` 把两边的状态写进日志,含 `echo=` 和测量值(扬声器传到麦克风没有)、`music=`、`micSilent=`;`roomEcho:on` / `roomGate:off` 下一场会议用系统回声消除 / 不在电脑放人声时关麦克风,单独试每道防线,日志 `hybrid: room line dropped as an echo` / `kept`、`room echo: speakers reach the mic` / `none`;`roomEchoSim:<on|off|real>` 假装测出(或没测出)回声;`roomMicSilent:<on|off>` 让麦克风从下次打开起只给 0(日志 `room mic: silent since it started`,再 `still silent`,纪要窗口出“麦克风没声音”);`voiceMicRun:<on|off>` 只开回声消除单元看它对别的声音有没有影响;念译文时 `room mic muted` / `open`;`micDeniedSim:<on|off>` 让麦克风当作被拒(纪要窗口顶部提示、字幕条橙色标签、菜单栏橙点,纪要窗口收起 10 秒后发一次通知,日志 `problem:` 和 `menu bar: badge=`)。实测回声和桌边的话:`.claude/skills/room-test`
+ - 麦克风:`mic:<on|off>` 等于点“打开麦克风”/“关闭麦克风”(没在听时打开会开始听;旧的 `listenSource:<system|room|both>` 也还能用),`hybridState` 把两边的状态写进日志,含 `echo=` 和测量值(扬声器传到麦克风没有)、`music=`、`micSilent=`;`roomEcho:on` / `roomGate:off` 下一场会议用系统回声消除 / 不在电脑放人声时关麦克风,单独试每道防线,日志 `hybrid: room line dropped as an echo` / `kept`、`room echo: speakers reach the mic` / `none`;`roomEchoSim:<on|off|real>` 假装测出(或没测出)回声;`roomMicSilent:<on|off>` 让麦克风从下次打开起只给 0(日志 `room mic: silent since it started`,再 `still silent`,纪要窗口出“麦克风没声音”);`voiceMicRun:<on|off>` 只开回声消除单元看它对别的声音有没有影响;念译文时 `room mic muted` / `open`;`micDeniedSim:<on|off>` 让麦克风当作被拒(纪要窗口顶部提示、字幕条橙色标签、菜单栏橙点,纪要窗口收起 10 秒后发一次通知,日志 `problem:` 和 `menu bar: badge=`)。实测回声、桌边的话和同声传译:`.claude/skills/audio-test`
- 打开界面:`open`(主窗口)、`panel`(菜单栏面板)、`settings[:speak]`(设置,可指定栏目)
- 虚拟麦克风:`micTest` 试音(往虚拟麦克风播一句再听回来,结果写进日志),`micNext` 做清单里的下一步
- 会议软件的麦克风:`micUsers` 把每个读麦克风的进程和列表写进日志,`micGuide:<bundle id 或名字>` 打开怎么改,`micGuideRender:<bundle id>=<png>`
- 快捷键:`talkKey:right` 或 `talkKey:<keyCode>:<Carbon 修饰键>` 换说话键(被拒的原因写进日志),`toggleKey:…` 同理,`shortcuts` 把当前状态写进日志
- 字幕条:`frame` 把位置写进日志,`place:x,y,宽,字号` 摆到指定位置
- 系统麦克风:`sysMic` 把状态、默认输入、要换回的麦克风和知了实际在录的麦克风写进日志,`sysMicSet:<设备名片段>` 假装别人改了系统麦克风,`sysMicRestore` 还原,`sysMicSwitch` 换成虚拟麦克风,`sysMicAuto:<on|off>`,`speakMic:<设备名片段>` 固定知了用的麦克风(留空 = 自动)。会改本机的系统麦克风:测完 `sysMicRestore` 或退出 App
- - 说话同传:`speakOn` / `speakOff` 开关,`speakAsk[:off]` 面板里第一次打开时的确认卡,`speakConfirmed:<on|off>` 是否已确认过,`speakFile:<音频>` 把文件按实时速度当作麦克风输入,`speakOut:<路径>` 把译文语音另存一份,`speakOutput:<设备名片段>` 改输出设备(留空 = 虚拟麦克风),`speakVP:<on|off>` 按键说话时用带回声消除的麦克风(默认关;日志 `voice mic: ready`、`speak: mic with echo cancellation`)
+ - 说话同传:`speakOn` / `speakOff` 开关,`speakAsk[:off]` 面板里第一次打开时的确认卡,`speakConfirmed:<on|off>` 是否已确认过,`speakFile:<音频>` 把文件按实时速度当作麦克风输入,`speakOut:<路径>` 把译文语音另存一份,`speakOutput:<设备名片段>` 改输出设备(留空 = 虚拟麦克风),`speakVP:<on|off>` 按键说话时用不用带回声消除的麦克风(默认开;日志 `voice mic: ready`、`speak: mic with echo cancellation`),`talkDown` / `talkUp` 用真麦克风按住、松开说话键(日志 `speak: on-device heard … Ming …`、没人说话时 `nothing said in the press`)
- 试一句:`speakTest:sample`(Mac 读一句示例)或 `speakTest:voice`(再发 `speakTestBegin` / `speakTestEnd` 当作按住、松开),结果以 `speak test:` 写进日志;`speakTestState`、`speakTestRender:<png>`、`speakTestClose`
- 识别引擎:`recognizer:legacy` 在 macOS 26 上改用 14 / 15 的识别(`SFSpeechRecognizer`,第一次会要“语音识别”权限),`recognizer:cloud` 像 Intel Mac 那样全部交给 Ling 听(没有 key 就听不了),`recognizer:auto` 换回;下一次开始听起生效(或启动时 `open --env CICADA_RECOGNIZER=legacy`),日志里 `transcriber started recognizer=…`
- 多开:两边都设 `CICADA_DEBUG_CHANNEL=x`(`open -n --env CICADA_DEBUG_CHANNEL=x build/Cicada.app`),命令只发给这一份,日志在 `/tmp/livesubs-dev-debug-x.log`