cs.CLSep 17, 2026

Scaling Forced Alignment to End-User Devices

Authors: Lawry Sorenson, Michael Crandall, Eric K. Ringger, Stephen D. Richardson

Organizations: Brigham Young University Computer Science Department Provo, UT, United States

Abstract

The Viterbi algorithm has been previously used to perform forced alignment of audio to text to mine training data from online resources. However, many existing implementations have quadratic time and space complexity, scaling poorly to long input sequences. We propose two optimizations to address this issue. First, we apply the Hirschberg algorithm to perform the alignment in place using linear memory. Second, we model the alignment between speech and text as a constrained random walk, allowing us to prune the search space with arbitrary confidence while accounting for transcription errors. The Hirschberg optimization reduces memory usage from 140 GB to 5 MB for three-hour inputs while producing identical alignments in one-third the time of torchaudio when both run on a CPU. We achieve an additional 2x speedup with pruning on inputs longer than 20 minutes while preserving alignment accuracy in more than 98% of tested cases.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. FuseAlign: Forced Alignment in the Wild

    Sep 27, 2026Mithilesh Vaidya, Stephen Bailey, Sumukh Badam +2Forced AlignmentAudio-Text Alignment

  2. Where Words Begin and End

    Oct 13, 2026Husein ZolkepliForced AlignmentAudio-Text Alignment

  3. Adaptive Duration Model for Text Speech Alignment

    Jul 30, 2025Junjie CaoAudio-Text AlignmentTTS Synthesis