A demo for forced alignment - #61
Conversation
The support matrix in espnet's README has two empty rows, and this is one of the four holes: alignment has a command and an MCP tool, and nowhere to see it work. `ForcedAligner` on OWSM-CTC, on CPU: where each utterance falls, the time and probability of every token inside it, the waveform with the boundaries drawn, and what the score is for - a caption that does not belong to the audio scores 0.000 beside three that score 0.99, which is what alignment- score filtering does at scale. The last section is the trap this notebook found by running: the text has to be written the way the model writes it. This recording's own reference transcript is in capitals, and OWSM's vocabulary has none, so the same four lines become 79 tokens instead of 24 and score 0.0000 while still landing in roughly the right place. Named s2t_align_demo.ipynb for the naming rule in Demos/README.md, which check_layout.py enforces: <task>_<variant>_demo.ipynb, and alignment is a variant of s2t here rather than a task of its own. Pins espnet==202610.post2, which is being cut now (espnet#6791): espnet2.bin.align is in no release yet, so CI is red until it ships. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Tick the box to add this pull request to the merge queue (same as
|
|
One thing changed under this notebook while it was being written: espnet#6790 makes the aligner itself say when the text is spelled a way the model's vocabulary does not have. If that lands in 202610.post2, the last cell will print four warnings beside the four zeros — which is the lesson of the section, stated twice. The notebook needs no change either way. |
The align notebook's job failed on
ERROR: Could not find a version that satisfies the requirement
espnet==202610.post2
which is true and nobody here can fix: espnet2.bin.align merged the day
after v.202610.post1 was tagged, and the release that carries it is still
open as espnet#6791. The notebook is correct, and the check says the demo
is broken.
A workflow can now say it is waiting: `allow_unreleased_pin: true` makes
the run stop after installing the harness, with the release named in the
job summary. Without it, a pin PyPI does not have is still an error - a
typo should not pass quietly - and espnet is still never installed from
git, which is the rule that makes a green run mean what it says.
The line goes when 202610.post2 is published, and its absence is what
turns this notebook's badge back into a real one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Fixed, and the job is green: run 35649098071. with this in the job summary:
The failure was true and unfixable from here —
Both branches checked under bash before pushing: |
The support matrix going into espnet's README (espnet#6778) has two rows with holes in them; alignment is one, and this fills its notebook column.
ForcedAligneronespnet/owsm_ctc_v4_1B, on CPU, in six steps:0.000beside three that score0.99. That is alignment-score filtering, which is how OWSM v4 cleaned its training dataThe last one is a trap the notebook found by being run, and it is worth naming here. This recording's own reference transcript is in capitals:
OWSM's vocabulary has no capitalised words, so each breaks into letters —
▁T H E ▁ SA L …, 79 tokens for the four lines instead of 24 — and the mean probability collapses while the boundaries stay roughly right. A reader who starts from the reference transcript would conclude the aligner is broken. The notebook shows it, and espnet#6790 puts it inSegment.score's docstring.Name.
s2t_align_demo.ipynb, notalign_demo.ipynb:Demos/README.mdstates<task>_<variant>_demo.ipynbwith<task>one of the ESPnet task names, andtools/check_layout.pyfails otherwise. Alignment is a variant ofs2there rather than a task of its own.Verified with
tools/run_notebook.py, against espnet master:RESULT ok, 16 cells.CI will be red until the release ships. The notebook pins
espnet==202610.post2, becauseespnet2.bin.alignis in no release —v.202610.post1was tagged the day beforeespnet alignmerged. The bump is espnet#6791; the moment it is published this goes green with no change here.🤖 Generated with Claude Code