diff options
| author | wuhei <wuhei@users.noreply.github.com> | 2026-11-19 18:36:43 +0100 |
|---|---|---|
| committer | wuhei <wuhei@users.noreply.github.com> | 2026-11-19 18:36:43 +0100 |
| commit | b457d19d9b2c634570300d0f73087e18b4ec4a4a (patch) | |
| tree | 36e066cbe7abb486cb215ba9ccab6ba1550bb315 /README.md | |
| parent | f5181ead5b0969fc1806fb714097b17b8d62d53b (diff) | |
| download | lilchinese-b457d19d9b2c634570300d0f73087e18b4ec4a4a.tar.gz | |
Enter keeps the sentence: green on screen, appended to a session log
- Enter (kiosk) turns the sentence green and appends it to a Markdown session log,
default sessions/session-<timestamp>.md, -log to override. Written lazily, so a
run that kept nothing leaves no file.
- logs the whole sentence rather than the 9 characters on screen; the snapshot waits
450ms so the model's lookahead has decoded the final syllables
- the English in the log is a fresh translation of that sentence, done on a single
ordered worker off the audio path, so it never delays recognition
- green clears with the next sentence, like the red cut screen
- double Enter within 2s does not duplicate a line
- tests: keep state, sentence selection, log format and dedupe
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) |
