Scan your whole stack
Are you using jointrecalign?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.4
jointrecalign was last scanned on 1 Dec 2026 at version 0.1.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.4 LATEST | 1 Dec 2026 | No rules fired |
| 0.1.3 | 26 Nov 2026 | No rules fired |
| 0.1.2 | 9 Nov 2026 | No rules fired |
| 0.1.1 | 28 Oct 2026 | Not shown |
| 0.1.0 | 28 Oct 2026 | Not shown |
Findings for v0.1.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Joint phone recognition and phone alignment for French speech, with one wav2vec2 model. A CTC head transcribes the speech into phones. A cross-attention aligner, trained in the same network, places each phone in time, with optional silences. The same model gives the phone sequence and its segmentation, at 10 ms resolution.
This repository has the code to train the models from scratch and to transcribe recordings into Praat TextGrids (phones, boundaries, pauses and the model's top-5 candidates for each phone), with no transcript needed.
Phoneticians: start with the step-by-step guide: install with two commands, then transcribe a corpus with one command (with an optional HTML report of the plots), or from Praat.
Training runs in three stages. Each stage starts from the previous one.
| Stage | Model | Starts from | Frame | Recipe |
|---|---|---|---|---|
| 1 | CTC 20 ms: wav2vec2 phone recogniser | LeBenchmark/wav2vec2-FR-7K-large | 20 ms | recipes/1_ctc_20ms.sh |
| 2 | CTC 10 ms: same, last conv layer with stride 1 | CTC 20 ms | 10 ms | recipes/2_ctc_10ms.sh |
| 3 | Joint aligner 10 ms + latent silence | CTC 10 ms | 10 ms | recipes/3_aligner_10ms_sil.sh |
Stage 3 has two variants. They differ in how strongly the alignment losses train the encoder:
ALPHA=0.1 (default) and ALPHA=1.0.
Wav2Vec2ForCTC fine-tuned with CTC on phone sequences. The conv front-end is frozen, and the
epoch with the best validation phone error rate (PER) is kept.
Stage 2 changes the stride of the last conv layer from 2 to 1. Frames are then 10 ms instead of 20 ms. Every pretrained weight still loads, and the model is fine-tuned again at the new rate.
jointrecalign.model.Wav2Vec2ForCTCPoolContrastive, built on the CTC 10 ms model:
waveform ─► wav2vec2 encoder ─┬─► CTC head ──────────────────────────► phones (L_CTC)
│
├─► ConvBank (kernels 1,5,9) ─► queries ┐
│ ├─► attention energy (L_FS)
└─► phone keys ─────────────────────────┘ │
(CTC-posterior × Gaussian window ▼
pooling of encoder frames) masked reconstruction (L_m)
[SIL] p1 p2 [SIL] p3 … [SIL]. They are optional
and all share one learned key.jointrecalign/sil_fs.py).ALPHA (--encoder_alpha, --lm_encoder_alpha), ramped in
between steps 2000 and 5000.At inference the model aligns its own CTC decode, so it needs no transcription.
Python ≥ 3.10. A CUDA GPU for training; transcription also runs on CPU.
To transcribe recordings only, see the step-by-step guide (no Python knowledge needed), or, in an existing Python environment:
pip install JointRecAlign
(pip install git+https://github.com/Imenbaa/Joint_fr_phoneme_recognition_alignment.git installs the
latest code from GitHub instead of the latest release.)
The model runs on PyTorch, and the PyTorch build that pip installs depends on the computer:
| Computer | pip installs | To do |
|---|---|---|
| Linux with an NVIDIA GPU | the CUDA build | nothing |
| Linux without an NVIDIA GPU | the CUDA build (about 5 GB of NVIDIA libraries it does not use) | install the CPU build first: pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu |
| Windows with an NVIDIA GPU | the CPU build (the GPU stays unused) | install a CUDA build first, with the command for your setup from pytorch.org |
| macOS, Windows without an NVIDIA GPU | the right build | nothing |
When torch is already installed, pip install JointRecAlign keeps it. With uv,
uv pip install --torch-backend auto JointRecAlign chooses the build that matches the computer
(GUIDE.md does the same with uv tool install).
The held-out alignment scores of train_aligner.py also need pip install "JointRecAlign[eval]"
(librosa, pandas), which requirements.txt covers.
Both install the JointRecAlign command.
To train, clone the repository:
git clone https://github.com/Imenbaa/Joint_fr_phoneme_recognition_alignment.git
cd Joint_fr_phoneme_recognition_alignment
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt # versions used to train the models
pip install -e . # the jointrecalign package
The scripts at the repository root (train_ctc.py, train_aligner.py,
transcribe.py) also run from the repository root without pip install -e ..
pip install -e . also installs the JointRecAlign command.
JointRecAlign (or python transcribe.py from the repository root) gives, for each
recording, the phones the model hears, their boundaries, the pauses, and the model's five best
candidates for each phone. It runs on GPU or CPU.
JointRecAlign validate recordings_folder/ # check the audio files (no model)
JointRecAlign transcribe recordings_folder/ [-o out/] # check, then transcribe
JointRecAlign transcribe recordings_folder/ --report # + one HTML page per recording, index.html
JointRecAlign transcribe recordings_folder/ --reference textgrids/ # + comparison with reference TextGrids
JointRecAlign align recordings_folder/ --phones phones_folder/ # forced alignment of your phones
JointRecAlign install-praat-plugin # a "JointRecAlign: transcribe..." button for Sounds in Praat
transcribe checks every file first (readable, at least 0.5 s, not silent; warnings for a
sampling rate under 16 kHz, several channels, clipping, very low level, two recordings that
would write the same result files), skips the files that cannot be transcribed, goes on when
one fails, and ends with a summary, also written to JointRecAlign.log. The exit code is 1 when
a recording was not transcribed.
The model (aligner_10ms_sil_alpha0.1.zip,
1.2 GB, release v0.1.0,
licence CC BY-NC 4.0) is downloaded and checked the first time (or with JointRecAlign download)
into a cache folder: ~/.cache/JointRecAlign (Linux), ~/Library/Caches/JointRecAlign (macOS),
%LOCALAPPDATA%\JointRecAlign (Windows); JOINTRECALIGN_HOME changes it. Any stage-3 checkpoint
you train yourself (joint aligner with latent silence, see Training) works with
--model, e.g. --model $WORK_DIR/aligner_10ms_sil_alpha0.1/checkpoint-43000.
Audio: WAV, FLAC, MP3, OGG or AIFF, any sampling rate, mono or stereo (resampled to 16 kHz and downmixed). A folder means every audio file in it. A recording that cannot be read is reported and the others are still transcribed.
For each recording, in a folder JointRecAlign/ next to the recording (or in -o), and
JointRecAlign.log:
| file | content |
|---|---|
<name>.TextGrid |
Praat interval tiers, all covering the whole recording |
<name>.csv |
one row per phone: start, end, phone, then top1, p1 ... top5, p5 |
<name>.html |
with --report: waveform, spectrogram, phones and pauses, the aligner's attention with the alignment path, the CTC posteriors of every phone, the five candidates of each phone coloured by probability, on one time axis that scrolls and zooms; self-contained, no server (index.html lists the recordings) |
| tier | label of each interval |
|---|---|
phones |
the recognised phone (empty between phones) |
confidence |
probability of that phone |
top2 ... top5 |
the next candidates, as symbol probability (e.g. p 0.050) |
pauses |
SIL on every pause the model detected |
| option | meaning |
|---|---|
-o folder |
where the results go (default: JointRecAlign/ next to each recording) |
--report |
also the HTML pages (about 3.5 MB per minute of audio) |
--copy_audio |
with --report: copy each recording into <results>/audio/, so the pages still play it after the results folder is moved or copied to another computer |
--model folder |
another model (default: the released one, downloaded the first time) |
--symbols ipa (default) / model |
ipa writes the nasal vowels and œ in IPA (ɑ̃ ɛ̃ ɔ̃ œ); model keeps the model's one-character codes (@ 1 § 9) |
--phone_map map.json |
your own labels, applied last, e.g. {"ə": "ø"} for a corpus that writes the schwa ø |
--max_chunk 10 |
longest piece of audio the model sees at once, in seconds |
--vocab_path |
phone vocabulary (default: vocab.json in the checkpoint) |
--device cuda / cpu |
default: cuda when available |
Forced alignment. align takes the phones from --phones folder: <name>.TextGrid (a phone
tier, --phones_tier; its times are not used) or <name>.txt (phones separated by white space),
and aligns them in place of the CTC decode, with the same SIL-Viterbi decode (boundaries and
pauses) and the same outputs. Labels are read as IPA or model symbols, plus g, r, ʀ, ɥ
(-> y), œ̃ (-> ɛ̃); --phones_map map.json maps the others; pause labels are dropped. The
candidate tiers remain the CTC posteriors inside each aligned phone, so they show where the model
hears something else. A recording longer than --max_chunk is decoded chunk by chunk first, and
each given phone goes to the chunk of the decoded phone it matches (edit-distance alignment).
Comparison with a reference (--reference FOLDER, jointrecalign/reference.py): for
<name>.wav, the phone tier of FOLDER/<name>.TextGrid (--ref_tier, default the tier named
phones/phonemes/..., else the first interval tier) is compared with the transcription with these
metrics:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.