Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ seeded and reproducible from a single command.
[nyra forced aligner](https://huggingface.co/nyralabs/nyra_forced_aligner_en) ·
[PocketSphinx](https://github.com/cmusphinx/pocketsphinx) ·
[Qwen3-ForcedAligner](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B) ·
[rumblex](https://github.com/EdwardGlockner/rumblex) ·
[stable-ts](https://github.com/jianfch/stable-ts) ·
[TorchAudio-FA](https://github.com/pytorch/audio) ·
[UnitY2](https://github.com/facebookresearch/seamless_communication) ·
Expand Down
3 changes: 2 additions & 1 deletion evals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mismatch, since a `.so` is loaded once per process.
|---|---|
| bfa, charsiu, maps | `<tool>/repo/env` |
| mfa | `<tool>/repo/mamba` (micromamba) |
| crisperwhisper, falcon, fusealign_hub, granite_speech_plus, nemo_fa, neufa, nyra_fa, parakeet_tdt, pocketsphinx, qwen3_asr, qwen3_fa, stable_ts, torchaudio_fa, unity2, whisper3, whisper_ts, whisperx | `<tool>/venv` |
| crisperwhisper, falcon, fusealign_hub, granite_speech_plus, nemo_fa, neufa, nyra_fa, parakeet_tdt, pocketsphinx, qwen3_asr, qwen3_fa, rumblex, stable_ts, torchaudio_fa, unity2, whisper3, whisper_ts, whisperx | `<tool>/venv` |
| crisperwhisper_fa | shares `timestamp_asrs/crisperwhisper/venv`, the same package |
| mms_fa, torchaudio_asr | share `aligners/torchaudio_fa/venv`, the same package |
| whisperx_asr | shares `aligners/whisperx/venv` |
Expand Down Expand Up @@ -305,6 +305,7 @@ pass on an environment you built.
| `nyra_fa` | nyra-forced-aligner, MIT | nyralabs/nyra_forced_aligner_en, nyra health Non-Commercial Research License | noncommercial weights |
| `pocketsphinx` | cmusphinx/pocketsphinx, BSD-style | the bundled en-us model and CMUdict, BSD-style | none |
| `qwen3_fa` | qwen-asr, Apache-2.0 | Qwen/Qwen3-ForcedAligner-0.6B, Apache-2.0 | none |
| `rumblex` | rumblex, Apache-2.0 | Reson8/Rumble-2-Flash, Apache-2.0 | none |
| `stable_ts` | jianfch/stable-ts, MIT | Whisper base, MIT | none |
| `torchaudio_fa` | torchaudio, BSD-2-Clause | WAV2VEC2_ASR_BASE_960H, MIT | mode B uses phonemizer and espeak-ng, GPL-3.0 or later |
| `unity2` | seamless_communication, MIT | unity2_aligner, MIT, with a tokenizer from facebook/seamless-streaming, CC BY-NC 4.0 | noncommercial tokenizer, and the unit extractor's licence is not stated |
Expand Down
17 changes: 17 additions & 0 deletions evals/aligners/rumblex/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# rumblex -- WORD-LEVEL ONLY. It aligns the reference transcript to the CTC
# head of an ASR checkpoint (Reson8/Rumble-2-Flash), which has no phone tier,
# so it appears in the word tables and is absent from every phone table by
# construction, not by omission.
#
# Installed in its OWN venv (evals/aligners/rumblex/venv), like every tool
# here. rumblex needs transformers >= 5.21.
name: rumblex
adapter: rumblex
enabled: true
modes: [A] # from text; no gold-phone mode
granularity: [word]
emits_confidence: true
params:
venv: venv
model: Reson8/Rumble-2-Flash
device: cuda
46 changes: 46 additions & 0 deletions evals/aligners/rumblex/download_and_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
# Copyright 2026 Olewave, LLC
# SPDX-License-Identifier: Apache-2.0

# rumblex for FA-Bench -- in a PRIVATE venv.
#
# https://github.com/EdwardGlockner/rumblex
# https://huggingface.co/Reson8/Rumble-2-Flash
#
# A FORCED ALIGNER here, not an ASR: `rumblex.align` takes audio and a reference
# transcript and places the words with the checkpoint's CTC head. That is why
# it lives in evals/aligners/ and not evals/timestamp_asrs/.
#
# Own venv, not the shared .venv: rumblex needs transformers >= 5.21 for the
# Rumble-2-Flash model class.
#
# TORCH BUILD: the same pin as the other recipes (see qwen3_fa's for why cu128).
# rumblex itself only asks for torch >= 2.6. These pins were checked on CPU
# only, with the +cpu wheel; the cu128 build has not been run with rumblex.
set -euo pipefail
HERE=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
MODEL=${MODEL:-Reson8/Rumble-2-Flash}

# Re-runnable: reuse a venv that already has an interpreter.
[ -x "$HERE/venv/bin/python" ] || uv venv "$HERE/venv" --python 3.12
uv pip install --python "$HERE/venv/bin/python" \
torch==2.8.0 torchaudio==2.8.0 \
--index-url https://download.pytorch.org/whl/cu128 \
--extra-index-url https://pypi.org/simple
# rumblex VERSION PINNED. Not below 0.5.0: earlier releases put word ends too
# early when the transcript has no punctuation, as Buckeye's has not. 0.6.0
# adds the learned start and end correction, which moves every word time.
# Bump deliberately + re-run the sweep.
uv pip install --python "$HERE/venv/bin/python" rumblex==0.6.0

# uv venvs have no pip of their own; ask uv, not the venv.
uv pip freeze --python "$HERE/venv/bin/python" > "$HERE/requirements.lock"

"$HERE/venv/bin/python" - <<PY
import torch
import rumblex
print("rumblex", rumblex.__version__, "| torch", torch.__version__, "cuda", torch.cuda.is_available())
print("fetching $MODEL ...")
rumblex.load_model("$MODEL", device="cpu")
print("rumblex ok")
PY
71 changes: 71 additions & 0 deletions evals/aligners/rumblex/worker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python3
# Copyright 2026 Olewave, LLC
# SPDX-License-Identifier: Apache-2.0

"""rumblex forced alignment in its OWN interpreter.

Protocol (fabench/aligners/subprocess_aligner.py):

in : {"item_id":…, "audio_path":…, "transcript":…}
out: {"item_id":…, "words":[[text, start, end, conf], …]}

`rumblex.align` runs the encoder of the ASR checkpoint and force-aligns the
given transcript to the checkpoint's CTC head. Nothing is decoded, so the words
that come back are the words that went in, one for one, split at spaces.

The audio is read here with soundfile and handed over as an array. Given a
path, rumblex decodes it with ffmpeg, which the benchmark box would then need
on PATH for this one tool.

The model is loaded ONCE for the batch; per-utterance subprocessing would pay
that load every time.
"""
from __future__ import annotations

import json
import sys

import numpy as np
import soundfile as sf


def load_audio(path: str) -> tuple[np.ndarray, int]:
"""Mono float32 at the file's own rate. rumblex resamples to 16 kHz itself."""
x, sr = sf.read(path, dtype="float32", always_2d=False)
if x.ndim > 1:
x = x.mean(axis=1)
return np.ascontiguousarray(x, dtype=np.float32), int(sr)


def main(argv: list[str]) -> int:
jobs_path, model_id = argv[0], argv[1]
device = argv[2] if len(argv) > 2 else "cuda"

import rumblex
import torch

# startswith, as in the other workers: the cell runners pass "cuda:0".
device = device if (device.startswith("cuda")
and torch.cuda.is_available()) else "cpu"
model = rumblex.load_model(model_id, device=device)

with open(jobs_path) as f:
for line in f:
line = line.strip()
if not line:
continue
job = json.loads(line)
rec = {"item_id": job["item_id"]}
try:
x, sr = load_audio(job["audio_path"])
result = rumblex.align(x, job.get("transcript", ""), model, sr=sr)
rec["words"] = [[w.word, w.start, w.end, w.score]
for seg in result.segments for w in seg.words]
except Exception as e:
rec["error"] = f"{type(e).__name__}: {e}"
print(json.dumps(rec), flush=True)
return 0


if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))
1 change: 1 addition & 0 deletions evals/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ aligners:
- { name: charsiu, enabled: false } # frame-classification, own venv
- { name: bfa, enabled: false } # Bayesian FA, own venv
- { name: whisperx, enabled: false } # wav2vec2 alignment head, own venv
- { name: rumblex, enabled: false } # Rumble-2-Flash CTC head, own venv
- { name: olign, enabled: false } # hosted API, needs a service token from Olewave
5 changes: 5 additions & 0 deletions evals/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def __getitem__(self, key: str) -> str:
"stable_ts": "stable-ts",
"torchaudio_fa": "TorchAudio",
"whisperx": "WhisperX",
# The package writes its name in lower case.
"rumblex": "rumblex",
}


Expand Down Expand Up @@ -212,6 +214,9 @@ def __getitem__(self, key: str) -> str:
"nemo_fa": "ctc",
"nemo_fa_conformer": "ctc",
"whisperx": "ctc", # wav2vec2 phoneme CTC for the ALIGNMENT stage
# Viterbi over the auxiliary CTC head of Rumble-2-Flash. The ASR decoder
# never runs here; what places the boundary is the CTC path.
"rumblex": "ctc",
# NOT attention, despite the upstream naming. The whole aligner is four
# nn.Conv1d layers with ReLU and dropout over text and unit embeddings,
# then a negative L2 distance between every frame and every token,
Expand Down
2 changes: 2 additions & 0 deletions fabench/aligners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"torchaudio_fa": "fabench.aligners.torchaudio_fa:TorchaudioFA",
"charsiu": "fabench.aligners.charsiu:Charsiu",
"whisperx": "fabench.aligners.whisperx:WhisperX",
# An ASR checkpoint's own CTC head (Reson8/Rumble-2-Flash), word level only.
"rumblex": "fabench.aligners.rumblex:Rumblex",
"mfa": "fabench.aligners.mfa:MFA",
"bfa": "fabench.aligners.bfa:BFA",
"maps": "fabench.aligners.maps:MAPS",
Expand Down
33 changes: 33 additions & 0 deletions fabench/aligners/rumblex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# rumblex aligner

[rumblex](https://github.com/EdwardGlockner/rumblex) word alignment. The
encoder of `Reson8/Rumble-2-Flash` and the CTC head that ships with that
checkpoint, driven on the reference transcript (`rumblex.align`). **Word
only**, with no phones, so it appears only in the word-level tables and never
in the phone tables.

The head shares the ASR decoder's subword vocabulary and the encoder emits 13
frames a second, so the raw CTC path is on an 80 ms grid. rumblex then places
each word's start and end inside its frame with a small linear map on the
encoder states around it, fitted on LibriSpeech against Montreal Forced
Aligner times (43 KB, shipped in the package). The confidence is the lowest
CTC probability among a word's tokens.

- **Modes.** A. **Granularity.** Word. **Confidence.** Yes.

## Install

```bash
evals/aligners/rumblex/download_and_install.sh # its own venv, pinned
```

## Config

```yaml
- name: rumblex
adapter: rumblex
enabled: true
modes: [A]
granularity: [word]
params: { model: Reson8/Rumble-2-Flash, device: cuda }
```
7 changes: 7 additions & 0 deletions fabench/aligners/rumblex/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2026 Olewave, LLC
# SPDX-License-Identifier: Apache-2.0

"""rumblex aligner subpackage — adapter in adapter.py, docs in README.md."""
from fabench.aligners.rumblex.adapter import Rumblex

__all__ = ["Rumblex"]
31 changes: 31 additions & 0 deletions fabench/aligners/rumblex/adapter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2026 Olewave, LLC
# SPDX-License-Identifier: Apache-2.0

"""rumblex forced alignment -- an ASR model's own CTC head, word level only.

rumblex (https://github.com/EdwardGlockner/rumblex) runs the encoder of
Reson8/Rumble-2-Flash and force-aligns the reference transcript to the
auxiliary CTC head that ships with the checkpoint (`rumblex.align`). There is
no second alignment model. The head shares the decoder's subword vocabulary and
the encoder emits 13 frames a second, so boundaries sit on an 80 ms grid that
rumblex then refines with a small linear map on the encoder states.

Runs in its OWN interpreter (fabench/aligners/subprocess_aligner.py).

Word level only: the head has no phone tier, so rumblex appears in the WBE
tables and never in the phone ones.
"""
from __future__ import annotations

from fabench.aligners.subprocess_aligner import SubprocessAligner


class Rumblex(SubprocessAligner):
name = "rumblex"
source = "orthographic"
granularity = ("word",)
default_model = "Reson8/Rumble-2-Flash"

def _extra_argv(self) -> list[str]:
"""worker.py <jobs> <model> <device>."""
return [str(self.params.get("device", "cuda"))]
5 changes: 4 additions & 1 deletion fabench/aligners/test/test_aligners.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ def test_supports_mode_granularity():
wx = get_adapter(_spec("whisperx", "whisperx", granularity=["word"]))
assert wx.supports("A", "word")
assert not wx.supports("B", "phone") # word-only
rx = get_adapter(_spec("rumblex", "rumblex", granularity=["word"]))
assert rx.name == "rumblex" and rx.supports("A", "word")
assert not rx.supports("A", "phone") # word-only


@pytest.mark.parametrize("adapter", ["whisperx"])
@pytest.mark.parametrize("adapter", ["whisperx", "rumblex"])
def test_gated_adapters_fail_with_actionable_error(adapter):
# deps absent in a clean env -> actionable AlignerError on load.
a = get_adapter(_spec(adapter, adapter))
Expand Down
Loading