summaryrefslogtreecommitdiff
path: root/README.md
AgeCommit message (Collapse)Author
5 daysEnter keeps the sentence: green on screen, appended to a session logwuhei
- 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
5 dayscut screen, per-sentence colour alternation, no one-character last framewuhei
- Backspace/Delete/c in the kiosk: the screen goes red, the recogniser is reset and the in-progress sentence is dropped, so a misheard sentence can be said again. It returns to the normal colours as soon as the retake is heard. Under -record the red frame also marks the retake in the video. - colours alternate black-on-white / white-on-black at each sentence boundary. - slide cutting no longer leaves a stub: a length break needs -preview characters to remain, so '我自学中文已经五年了。' shows as one phrase instead of '了'. - translation window default 40 chars (was 28): fragments cut mid-clause were producing odd English. - tests for slide cutting, colour flip, cut, and the sticky English line
5 daysenglish subtitles from a local translation modelwuhei
Optional second line under the Chinese, translated on the machine: - -translate-model spawns llama-server (free port, /health wait, SIGTERM on exit) and uses Hy-MT2-1.8B (Tencent Hunyuan MT) — a dedicated zh→en model, 30 tok/s on CPU, so a phrase lands in 0.5-0.8s - -translate points at an already running OpenAI-compatible endpoint (ollama, LM Studio, llama-server) - the English line is sticky rather than tied to the 9 characters on screen: no LLM can keep up with a slide that lives 0.3s, so the translation lags by about one model call and never blanks between phrases - -translate-window (28 chars) trades context for latency; translations cached - phrase text is debounced 200ms and coalesced latest-wins so growth does not queue up dozens of requests - display reserves the English line only when translation is enabled, so the Chinese layout is unchanged without it; autofit now fits both lines
5 dayslilchinese: local streaming Chinese ASR rendered as fullscreen Takahashi slideswuhei
parec mic -> sherpa-onnx streaming zipformer (zh, int8, offline) -> slide splitter -> SSE -> Firefox kiosk. No cloud, no Web Speech API. - 20ms audio reads, ~35ms capture-to-paint overhead, 320ms model lookahead - slides break on punctuation or at -chars; short tails don't blank a full slide - autofit font (Noto Sans CJK SC Black), 90ms slam transition, SSE reconnect - -record captures screen+mic via ffmpeg x11grab+pulse, finalized on Ctrl+C - -wav plays a file through the pipeline for testing