Skip to content

All five course notebooks run, and the tables can be checked - #59

Merged
sw005320 merged 4 commits into
masterfrom
course/run-more-of-them
Sep 20, 2026
Merged

sw005320 merged 4 commits into
masterfrom
course/run-more-of-them

Conversation

@sw005320

@sw005320 sw005320 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

All five course notebooks run, each on its own workflow, every Sunday.

The PR started as four of five with the fifth stopped by a licence. It is five
now, and the last one needs a decision from a reader rather than from me — the
second bullet under Samples below.

neural_codec — three missing packages, not a broken scorer

I said VERSA's scorer "exits without writing its output". It does not. It
refuses the config and says exactly why:

scorer.py: error: Invalid score configuration:
- score_config[0] (signal_metric): missing optional dependencies: ci_sdr, fast_bss_eval, mir_eval.
  Install them or remove this metric from the config

signal_metric wants VERSA's optional extras. Nothing to remove — the notebook
asks for the three packages, and the scorer produces its sdr, sir, sar,
si_snr and ci_sdr as intended. My earlier run only "worked" because that
environment happened to have fast_bss_eval from espnet[enh].

speech_translation — nothing was wrong with it

It was "not tried" because the numpy==1.23.5 / tensorflow==2.12.0 pins made
trying pointless. With those gone it runs: SimulEval, ParallelWaveGAN,
pysndfile and all.

speech_enhancement — samples the repository cannot carry

Both of its recordings came from Google Drive copies of licensed corpora.
Neither can be committed here, so each is now something the notebook fetches
or builds itself.

CHiME-4. The real noisy sample is ped.wav from the challenge's own
data page, which
publishes a few recordings to listen to. The corpus is LDC2017S24 and built
on WSJ0. The page's sample is one channel where the corpus has six; the
enhancement in the notebook is single-channel either way, so the demonstration
is unchanged.

wsj0-2mix → Libri2Mix. The separation half used a mixture from wsj0-2mix,
which is built on WSJ0 and came from Drive. Libri2Mix is built on LibriSpeech,
which is CC BY 4.0, so it uses the real thing instead: mixture
7729-102255-0031_2094-142345-0028 of the Libri2Mix test set, built in the
notebook from its two sources the way LibriMix builds it — the gains the
official metadata gives for that pair, resampled to 8 kHz, truncated to the
shorter source (min mode). The model moved with the data, and so did the ASR
after it.

Having both sources is what makes it worth doing. The notebook now scores the
separation instead of only playing it:

speaker 1:   3.24 dB in the mixture ->  16.21 dB separated
speaker 2:  -3.28 dB in the mixture ->  12.88 dB separated

Mix Speech to Text:  HE CONTINUED ON HIS GROUND AND SIR HOWDY HUNDRED HE OF WET COLLARED TO HIS LATE ERRAND CARRYING TWO AROUND
Separated Speech 1:  HE CONTINUED HIS PRETENDED SEARCH AND TO GIVE COLOR TO HIS ERRAND MADE TO ARREST
Separated Speech 2:  YOU KNOW NO NO TOTTY HAD AT HER FEET WET SAID MISSUS POYSER CARRYING AWAY HER IRON

Two and ten characters from the references, against a mixture that comes out
as nonsense.

Five models in the organisation could not be loaded

The Libri2Mix model did not load at all:

size mismatch for separator.tcn.network.3.weight: copying a param with shape
torch.Size([1024, 128, 1]) from checkpoint, the shape in current model is
torch.Size([1])

espnet's TCN gained a non-linearity before the mask convolution in May 2023
(02b9cc722c9). The layer kept the old layout as its default, but
TCNSeparator — what a config builds — defaults to prelu, so every TCN
checkpoint older than that stopped loading. Five models in the espnet
organisation were affected, and their configs now record the layout their
weights were trained with; each was loaded and run before its config was
uploaded. (A sixth, Wangyou_Zhang_chime4_enh_train_enh_conv_tasnet_raw,
already carried the key — someone had hit this before.)

Two more, YushiUeda_librimix_diar_enh_2_3_spk and its _lmf sibling, are
broken by something else: they were trained by a joint diarization and
enhancement task that current espnet does not have, and they fail before the
separator is built. They are untouched.

I did not change espnet's default. No egs2 config sets
pre_mask_nonlinear, so flipping it would change what a new training run
builds, which is a maintainer's call rather than mine.

The tables are checked now, not written

check_layout.py held only Demos/. The same rules hold for the course too: a
workflow that exists and names the notebook, a badge in the notebook and in
every README that lists it, a pinned release, and no dead notebook links. The
pre-commit trigger covers the READMEs and the workflows rather than only the
notebooks — a README edited on its own is exactly how the course table came to
claim four of five on a day when all five ran.

Also here: device="cuda" if ... else "cpu" if ... else "cpu" in two notebooks,
left by an earlier edit of mine, and two __pycache__ directories that were
committed and are now ignored.

Checked

  • speech_enhancement.ipynb run end to end locally, RESULT ok, with both
    substituted samples and no gdown.
  • The five per-notebook workflows run on this PR — that is the check that
    matters, and the badges follow it.
  • tools/check_layout.py clean, tests/ 23 passed.

🤖 Generated with Claude Code

neural_codec and speech_translation join text_to_speech, so four of the
five course notebooks are checked every Sunday and one is not.

neural_codec was not VERSA's scorer failing. The scorer refused its
config and said why: signal_metric wants ci_sdr, fast_bss_eval and
mir_eval, which are VERSA's optional extras. They are three packages, and
the notebook now asks for them - nothing to remove, and a better error
than I gave it credit for.

speech_translation needed nothing. It was "not tried" because the numpy
and TensorFlow pins made trying it pointless; with those gone it runs,
SimulEval and ParallelWaveGAN and pysndfile and all.

speech_enhancement is the one that stays. Its sample is
M05_440C0213_PED_REAL.wav, a CHiME-4 recording pulled from a Google Drive
link. CHiME-4 audio is distributed only through the LDC, as LDC2017S24,
and is built on WSJ0 - chimechallenge.org says so on its own download
page. So the fix is not a better download: that file cannot be committed
here, and the Drive copy it uses is itself a redistribution of licensed
audio. What the notebook needs is a noisy sample this repository may
carry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mergify

mergify Bot commented Sep 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

The fifth, `speech_enhancement`, was stopped by two recordings fetched from
Google Drive copies of licensed corpora. Neither could be committed here, so
each is now something the notebook fetches itself:

- the CHiME-4 sample is `ped.wav` from the challenge's own data page, which
  publishes a few recordings to listen to. The corpus is LDC2017S24 and built
  on WSJ0; the page's sample is one channel where the corpus has six, and the
  enhancement here is single-channel either way.
- the wsj0-2mix mixture is now built at runtime the way wsj0-2mix builds its
  own - two ESPnet test recordings of different speakers, summed at equal
  level. It is a different mixture from the course's, and an easier one.

It runs end to end, so it gets a workflow and a badge like the other four,
and the READMEs stop saying four of five.

The tables are now checked rather than written. check_layout.py held only
Demos/; the same rules - a workflow that exists and names the notebook, a
badge in the notebook and in every README that lists it, a pinned release -
now hold for the course too, and the pre-commit trigger covers the READMEs
and the workflows instead of only the notebooks. A README edited on its own
is exactly how the course table came to claim four of five when all five ran.

Also here: `device="cuda" if ... else "cpu" if ... else "cpu"` in two
notebooks, left by an earlier edit, and two __pycache__ directories that
were committed and are now ignored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sw005320 sw005320 changed the title Three of the four course notebooks run after all All five course notebooks run, and the tables can be checked Sep 20, 2026
Shinji Watanabe and others added 2 commits September 20, 2026 12:19
speech_translation.ipynb installed it and the install is what broke on a
clean runner - pysndfile compiles against libsndfile's headers, which an
ubuntu-latest image does not carry. Nothing imports it: no module in the
environment references it and no distribution declares it. It ran here only
because this laptop has libsndfile.

The notebook that CI could not install is the one nobody had installed from
scratch since the course.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The separation section mixed two ESPnet test recordings by hand, because
wsj0-2mix is built on WSJ0 and cannot be published. Libri2Mix is built on
LibriSpeech, which is CC BY 4.0, so this uses the real thing instead:
mixture 7729-102255-0031_2094-142345-0028 of the Libri2Mix test set, built
here from its two sources the way LibriMix builds it - the gains the official
metadata gives for that pair, resampled to 8 kHz, truncated to the shorter
source.

The model moved with the data: espnet/anogkongda_librimix_enh_train_raw, a
Conv-TasNet trained on Libri2Mix, and the ASR after it is a LibriSpeech
transformer, since that is where both recordings come from.

Having the two sources is the point. The separation is now scored rather than
only listened to, by the notebook itself:

    speaker 1:   3.24 dB in the mixture ->  16.21 dB separated
    speaker 2:  -3.28 dB in the mixture ->  12.88 dB separated

    Mix Speech to Text:  HE CONTINUED ON HIS GROUND AND SIR HOWDY HUNDRED HE
                         OF WET COLLARED TO HIS LATE ERRAND CARRYING TWO AROUND
    Separated Speech 1:  HE CONTINUED HIS PRETENDED SEARCH AND TO GIVE COLOR
                         TO HIS ERRAND MADE TO ARREST
    Separated Speech 2:  YOU KNOW NO NO TOTTY HAD AT HER FEET WET SAID MISSUS
                         POYSER CARRYING AWAY HER IRON

Two and ten characters from the references, against a mixture that comes out
as nonsense.

That model could not be loaded at all until today: a TCN checkpoint from
before May 2023 cannot be built by current espnet, because TCNSeparator
defaults to a layout its weights predate. Its config on the Hub now records
the layout it was trained with, and so do four others in the organisation
that were unloadable for the same reason. The two source recordings are
published beside it, so this notebook needs neither the corpus nor a Drive
link.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sw005320
sw005320 merged commit ae28ea8 into master Sep 20, 2026
16 checks passed
@sw005320
sw005320 deleted the course/run-more-of-them branch September 20, 2026 18:11
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