Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

jointrecalign

Latest version: v0.1.4

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
PyPI package Publisher: Imen-BA
0 Stars
0 Forks
5 Versions
302 Downloads
Python Repo language

Scan summary

jointrecalign was last scanned on 1 Dec 2026 at version 0.1.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest 2 were published within 6 days (26 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 0.1.4.
  • Downloads: 302 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 0.1.4

Findings

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.

README

The publisher’s own README, as collected from the registry.

A joint French phoneme recognition and alignment model

PyPI

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.

Contents

  • Models
  • Installation
  • Transcribing recordings
  • Data
  • Training
  • Tests
  • Repository layout

Models

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.

CTC phone recogniser (stages 1 and 2)

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.

Joint recognition + alignment model (stage 3)

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)
  • Phone keys. Each phone of the target sequence gets one vector. It is a weighted average of encoder frames: the weights are that phone's CTC posterior times a Gaussian window (σ = 10 frames) centred on the phone. No separate text encoder is needed.
  • L_FS: ForwardSum alignment loss. It is computed on the frame × phone attention energy, with a beta-binomial prior that is annealed away between 15 % and 50 % of training.
  • L_m: masked reconstruction loss.
    • The encoder frames are masked (p ~ U[0.1, 0.5]).
    • They are reconstructed from the masked frames and the alignment-weighted phone keys.
    • The reconstruction is scored with InfoNCE against codes from an EMA vector quantizer of the encoder output (nearest-code assignment, 320 codes).
    • A good reconstruction needs the right phone at the right frame, so L_m also trains the alignment.
  • L_energy. A small head predicts each frame's waveform log-energy from the alignment content alone. It is added to L_m. A loud frame assigned to silence is then predicted quiet, and the error corrects the alignment.
  • Latent optional silence (SIL) starts at step 2000, in the style of Kaldi/MFA.
    • SIL slots are inserted at word boundaries: [SIL] p1 p2 [SIL] p3 … [SIL]. They are optional and all share one learned key.
    • Entering a slot costs log p = −2, and a used SIL lasts at least 4 frames (40 ms).
    • The ForwardSum dynamic programming sums over paths with and without each SIL (jointrecalign/sil_fs.py).
    • L_m takes its attention from the forward-backward occupancy.
    • At inference, a Viterbi pass over the same topology gives phone boundaries and pauses.
  • Gradient routing.
    • L_CTC trains the whole encoder.
    • L_FS and L_m reach only the top 2 transformer layers, through the queries.
    • Their gradient is scaled by ALPHA (--encoder_alpha, --lm_encoder_alpha), ramped in between steps 2000 and 5000.
    • Phone keys and reconstruction targets are always detached.

At inference the model aligns its own CTC decode, so it needs no transcription.

Installation

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.

Transcribing recordings

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:

OX Radar and Response Center

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.

Where it’s listed

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).

  • pypi-releases jointrecalign

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229