When two forced aligners (e.g. MFA and Wav2TextGrid) produce different .TextGrid files for the same audio, it can be hard to know where and how they disagree. This package provides ready-made Qt charts that let you visually audit alignment quality and inter-aligner agreement across an entire corpus in seconds:
Note
The analyses implemented here were originally developed in R by @tjmahr. This package adapts his work for Python.
pip install alignment-comparison-plots
# or with uv
uv add alignment-comparison-plotsRequires Python ≥ 3.11.
import glob
from alignment_comparison_plots import plot_phoneme_counts
paths_a = glob.glob("/path/to/alignment_a/**/*.TextGrid", recursive=True)
paths_b = glob.glob("/path/to/alignment_b/**/*.TextGrid", recursive=True)
plot_phoneme_counts(paths_a=paths_a, paths_b=paths_b, label_a="Ref", label_b="Hyp")See the Contributing guide for instructions on adding new plot functions.
make serve-docs # local docs preview at http://127.0.0.1:8000
make build-docs # build static site into ./site
make typecheck # run mypy on the source
make test # run protocol conformance testsMIT