Skip to content

feat: multilingual captions, live translation, terminal UX, and stt-rt-v6 - #10

Merged
e2goon merged 5 commits into
mainfrom
feat/multilingual
Nov 14, 2026
Merged

e2goon merged 5 commits into
mainfrom
feat/multilingual

Conversation

@e2goon

@e2goon e2goon commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

Three commits; squash or keep as you prefer.

Multilingual captions and translation (8b1e27b)

  • Switch to stt-rt-v6 (v5 is removed on 2026-12-15) and send the API key in the Authorization header (the start-request api_key field is deprecated)
  • Fix caption line splitting: periods now split on the next token (Soniox spaces lead tokens), the speaker tag is never left alone on a row, Japanese/Chinese/Thai wrap on word boundaries, Hindi/Arabic/Urdu sentence marks end lines, and a pause over 2 s starts a new line
  • Language identification: per-line language tags, l to filter by language, line and paragraph splits on language change
  • One-way and two-way live translation from settings or --translate; translated lines appear under the speech and are saved in transcripts
  • Script-aware recognition context for every non-Latin language, searchable language picker, --lang, --version, earpop languages
  • Transcript exports: --format txt|srt|vtt|md, --out, latest; transcripts list reads only file edges and shows the recorded length
  • earpop terms for Soniox context terms
  • Do not reconnect on 400/401/402/403; report failed settings saves instead of crashing

Terminal UX (5775ba7)

  • Captions fill the terminal; menus and key help open below running captions
  • Width-aware key hints, ? help, shortcuts accept Korean jamo, c copies the transcript path (pause no longer touches the clipboard)
  • One-row status line with languages and translation
  • ESC on first-run screens; Linux microphone list hides ALSA plugins and marks "System default" by device ID

Reliability and dependencies (934d35d)

  • Reopen a microphone that stops sending frames for 3 s (Bluetooth headsets and hearing aids do this when switching to their microphone profile), start a fresh session to keep timestamps aligned, and give up after 3 tries per minute
  • Close the Soniox session while no microphone is available
  • Capture helper exits when its parent dies
  • Ask for spoken languages on first run; show transcript write failures on screen and at exit
  • Bundle runs React/Ink in production mode; dependency updates; rules-of-hooks lint rule

Behavior changes worth noting in the release

  • transcripts list third column is now the recorded length, not the token count
  • Pausing no longer copies the transcript path (use c)
  • On Linux the default device is listed as "System default"
  • v6 provisional captions arrive about 0.36 s later than v5 in our measurements (one English clip, jp region); no v6 setting changed this

Test plan

  • pnpm check, pnpm lint, pnpm fmt:check, pnpm test (54 tests), pnpm build
  • cargo fmt --check; cargo clippy -D warnings for linux-x64, win32-x64, darwin-arm64
  • cargo check for darwin-x64 (linux-arm64 needs the arm runner for ALSA)
  • pnpm capture:check dry run, npm pack --dry-run
  • Live sessions against Soniox (jp) with recorded clips through a fake capture helper: captions, language tags, one-way and two-way translation, exports, terms
  • Terminal screens rendered at 12 to 50 rows and 30 to 120 columns; first-run ESC flows; Korean jamo shortcuts
  • Stall recovery with a helper that stops after 5 frames; give-up path after 3 tries
  • SIGTERM, SIGHUP, SIGKILL, and closed pty leave no node or capture helper processes
  • Manual test on Linux with a Bluetooth hearing aid microphone
  • Run the "Capture binaries" workflow manually to build macOS, Windows, and Linux arm64 helpers before tagging
  • Smoke test on macOS and Windows

Move to stt-rt-v6 (v5 is removed on 2026-12-15) and send the API key in
the Authorization header; the start-request api_key field is deprecated.

Captions
- Split lines on a period only when the next token starts a new word, since
  Soniox puts spacing on the leading edge of tokens
- Never leave a speaker tag alone on a row; wrap Japanese, Chinese, and Thai
  on word boundaries; end sentences on Hindi, Arabic, and Urdu marks; start a
  new line after a pause of more than two seconds
- Enable language identification: tag lines with their language when more
  than one is in play, split on language changes, and filter with `l`

Languages
- Script-aware recognition context for every non-Latin language, not only
  Korean
- Searchable language picker; defaults follow the system locale plus English
- `--lang`, `--version`, and `earpop languages`

Translation
- One-way or two-way translation from settings or `--translate`
- Translated lines appear under the speech they translate and are saved in
  the transcript

Transcripts and terms
- `--format txt|srt|vtt|md`, `--out`, and `latest` for view and export
- `transcripts list` reads only file edges and shows the recorded length
- `earpop terms` manages words and names sent as Soniox context terms

Reliability
- Do not reconnect on 400, 401, 402, or 403
- Report failed settings saves instead of crashing

Add `pnpm test` (node:test) and a CI workflow for pushes and pull requests.
- Captions fill the terminal; settings, microphone, and key help open
  below the running captions instead of replacing them
- Key hint line keeps the most important keys on narrow terminals;
  `?` lists every key
- Shortcuts accept Korean jamo typed in Hangul mode
- `c` copies the transcript path; pausing no longer overwrites the
  clipboard
- Status line shows languages and translation, stays on one row, and
  truncates the device name first
- ESC works on the region, key, and first microphone screens; a saved
  microphone that is gone no longer hides the list
- Short terminals drop menu spacing and limit list heights
- Speaker colors avoid white and dark blue
- Capture helper hides ALSA plugin devices, marks "System default" by
  device ID, and still opens microphones saved under the old name
Reliability
- Reopen a microphone that stops sending audio for 3 seconds (Bluetooth
  headsets and hearing aids do this when they switch to their microphone
  profile) and start a fresh session so timestamps stay aligned; after
  three tries in a minute, stop and ask for another microphone
- Close the Soniox session while no microphone is available; Soniox may
  bill open streaming sessions even without audio
- The capture helper exits when its parent dies, so a killed earpop never
  leaves the microphone open
- Ask for the spoken languages on first run instead of assuming the
  system locale
- Show transcript write failures on screen and in the exit message

Build and dependencies
- Run the published bundle with React and Ink in production mode
- Update ws, oxlint, oxfmt, @types/node, and Rust crates; keep
  string-width on 8 until Ink moves to 9 so wrapping and rendering agree
- Enable the rules-of-hooks lint rule
@e2goon
e2goon merged commit 3bab901 into main Nov 14, 2026
8 checks passed
@e2goon
e2goon deleted the feat/multilingual branch November 14, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant