diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -50,6 +50,7 @@ one short thought per screen, replaced on the next one. | key | what it does | |---|---| +| `Enter` | **keep** — the sentence turns green and is appended to the session log | | `Backspace` / `Delete` / `c` | **cut** — the screen goes red and the half-heard sentence is dropped so you can say it again | | `f` | toggle fullscreen | @@ -62,6 +63,26 @@ Colours alternate — black on white, then white on black — at every sentence (a pause long enough for the recogniser's endpoint detector), so consecutive thoughts read as clearly separate slides. +## Session log (Enter) + +`Enter` turns the sentence on screen green and appends it to a Markdown file, so the +talk can be cut down into a script afterwards: + +```markdown +# lilchinese session 2026-11-19 18:34 + +- 18:34:06 重点呢想谈三个问题首先呢就是这一轮全球金融动荡的表现 — I would like to focus on three issues. First, it is about the manifestations of this round of global financial turmoil +- 18:35:41 我自学中文已经五年了 — I have been studying Chinese for five years +``` + +- Default target is `sessions/session-<YYYYMMDD-HHMMSS>.md` (gitignored); pass + `-log talk.md` for a fixed file. Nothing is created until you keep something. +- The **whole sentence** is logged, not the 9 characters on screen — including the last + syllables: the snapshot waits 450 ms for the model's lookahead to finish decoding. +- The English is a fresh translation of that exact sentence, produced off the audio path, + so a slow translator never delays recognition. Entries are written in order by one worker. +- A double `Enter` within 2 s does not duplicate the line. + ## English subtitles (optional) Pass a local translation model and every phrase gets an English line underneath, @@ -108,6 +129,7 @@ How it behaves, and why: | `-model` | auto-detect `models/` | model directory | | `-browser` | `firefox --kiosk {url}` | how to open the display; `{url}` substituted; empty = don't launch | | `-record` | off | ffmpeg: `x11grab` + `pulse` → h264/aac mp4 | +| `-log` | `sessions/` | session log target: a file, or a directory for a timestamped file | | `-threads` | `2` | onnxruntime threads | | `-addr` | `127.0.0.1:8787` | HTTP/SSE listen address | | `-wav` | off | feed an audio file (paced realtime) instead of the mic | @@ -160,13 +182,14 @@ smaller chunks, noticeably faster to emit, somewhat less accurate. ## Tests ```sh -go test ./... # slide cutting, colour alternation, cut, sticky English, windowing +go test ./... # slide cutting, colour alternation, cut, keep, log format, windowing ``` ## Layout ``` main.go mic → ASR → slide splitting → SSE, recorder, browser launch +log.go session log written by Enter translate.go optional local MT: llama-server supervision, debounce, sticky EN line web/index.html the whole UI (autofit, pop transition, EventSource client) scripts/ fetch-model.sh (ASR), fetch-mt-model.sh (translation) |
