Skip to content

feat(translate): Phase 0 phone audio spike, FLORES scoring, English voices - #145

Merged
Ezo-mas merged 1 commit into
mainfrom
feat/translate-p0-phone-spike
Nov 25, 2026
Merged

Ezo-mas merged 1 commit into
mainfrom
feat/translate-p0-phone-spike

Conversation

@Ezo-mas

@Ezo-mas Ezo-mas commented Nov 25, 2026

Copy link
Copy Markdown
Member

Phase 0 harness for the Translate track (docs/translate/PHASE0.md). Benchmarks only: nothing under backend/ or frontend/ changes.

What's in it

  • benchmarks/translate/phone_spike/ (P0.5): clip encoder (bundled ffmpeg), a key-protected Starlette server that broadcasts Silero Russian clips on a sermon-like schedule over a WebSocket, a test page with three players (audio element, MediaSource, Web Audio), a Resume button + Media Session handlers, and a summary of the event log. Run notes in its README.
  • benchmarks/translate/flores_bench.py (P0.3): fetch FLORES+ devtest and score mt_bench runs with BLEU, chrF++ and COMET-22.
  • benchmarks/translate/tts_bench.py: --lang en and a Kokoro-82M engine for the English voice bake-off.

Results (outputs stay in gitignored results/translate/)

Phones: MediaSource + AAC is the only player that keeps playing with the screen locked on both iPhone and Android (element and Web Audio get suspended). It needs two things, now in the spike: fill gaps with 1 s of silence, and send audio inside the socket. Without them it wedged after ~5.5 min locked on iPhone. With them: iPhone (iOS 27.2) 10 min locked in Safari and Chrome, and 11 min in Low Power Mode, every clip played. Android is emulator only (Android 14): passes with battery saver and forced deep Doze, fails only when Chrome's battery use is set to "Restricted". No real Android phone tested yet.

FLORES devtest (1,012 sentences, GPU, EuroLLM IQ3_XS):

Row Target BLEU chrF++ COMET-22
A OPUS en 34.5 58.8 0.860
D EuroLLM en 34.6 59.2 0.873
B OPUS ru 20.9 46.5 0.869
D EuroLLM ru 21.9 48.1 0.887
E pivot ru 22.8 48.5 0.874

English passes. No Russian row beats B by 2 chrF++ (the brief's threshold); COMET ranks D first, and the human sermon ratings remain the deciding evidence. EuroLLM shows FLORES contamination signs.

English voices (CPU, 4 threads): Kokoro RTF p95 0.27-0.33, first audio 1.3-1.5 s; on GPU 0.04 / 0.09 s (+1 GB VRAM). Supertonic RTF 0.19, first audio 0.84 s. Listening sheet built, not rated yet.

Checks

ruff check, ruff format --check, mypy (backend + benchmarks) clean; pytest backend/tests: 2296 passed, 5 skipped (POSIX process groups x3, macOS Quartz, macOS AVFoundation); benchmarks/translate tests: 28 passed.

…oices

- phone_spike/: P0.5 harness. Clip encoder (bundled ffmpeg, MP3/AAC/fMP4 plus a
  1 s silence clip), a key-protected Starlette server that broadcasts clips on a
  sermon-like schedule over a WebSocket (optionally inline as base64), a test
  page with three players (audio element, MediaSource, Web Audio), a Resume
  button and Media Session handlers, and a summary of the per-event log.
  The MediaSource player fills gaps with silence and nudges a stalled element;
  without that it wedged after ~5.5 min with the iPhone locked.
- flores_bench.py: fetch FLORES+ devtest (lit/eng/rus) and score mt_bench runs
  with BLEU, chrF++ and COMET-22.
- tts_bench.py: --lang en (English sentence rule) and a Kokoro-82M engine;
  results go under BL_RESULTS when set.
@Ezo-mas
Ezo-mas merged commit 6ad1ae5 into main Nov 25, 2026
3 checks passed
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