--- id: monotonic-alignment-search version: "0.2.1" license: MIT license_treatment: permissive maintenance: aging --- # monotonic-alignment-search — Monotonically align text and speech License: permissive · Maintenance: aging · Downloads: 131.0K/mo ## What it is and what it does Monotonic Alignment Search (MAS) is a specialized algorithm extracted from the Glow-TTS text-to-speech project that solves the problem of finding the optimal alignment between a text sequence and a speech sequence. It takes two tensors—a value matrix and a mask—and returns a path indicating which text tokens correspond to which speech frames, respecting the constraint that alignments must be monotonic (never backtrack in time). The package provides two implementations: a Cython-optimized version for performance and a pure NumPy fallback for compatibility. The package is designed for researchers and developers working on speech synthesis, voice conversion, or other audio-text alignment tasks. It depends only on NumPy at runtime, though PyTorch is required to prepare the input tensors. The implementation is extracted directly from the original Glow-TTS repository and is intended for reuse in other projects that need this specific alignment algorithm. Use it for: - Align text phonemes to speech frames in text-to-speech synthesis pipelines. - Find frame-level correspondences between text and audio in voice conversion systems. - Compute monotonic alignments for duration prediction models in speech generation. - Prototype or extend speech synthesis models that require text-speech synchronization. - Integrate alignment search into audio-text multimodal learning tasks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Finds the most probable alignment between a text sequence and a speech sequence using monotonic alignment search, with Cython-optimized and NumPy implementations. Yes, if you are building or extending a text-to-speech or speech alignment system and need a standalone, well-tested implementation of monotonic alignment search. The MIT license is permissive, install friction is moderate (compiled wheels available, PyTorch must be managed separately), and there are no known security vulnerabilities. However, maintenance is minimal (aging status, 303 days since last release); use it as a stable library component rather than expecting active development or rapid bug fixes. ## Install pip install monotonic-alignment-search uv add monotonic-alignment-search poetry add monotonic-alignment-search ## Installing monotonic-alignment-search Before you install: Medium install friction due to compiled wheels; requires PyTorch to be installed separately (or via optional extras with uv). Last release 303 days ago with minimal maintenance activity (3 stars, aging status), but no active issues flagged. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install monotonic-alignment-search from monotonic_alignment_search import maximum_path path = maximum_path(value, mask, implementation="cython") PyTorch must be installed separately; install via `uv add monotonic-alignment-search[cpu]` or `[cuda]` to include it, or install PyTorch manually first. Verify before relying: - Whether the package is actively maintained beyond the last commit date (2025-10-15) and whether bug reports are being addressed. - Performance characteristics and alignment accuracy compared to alternative implementations or the original Glow-TTS repository. - Whether the NumPy implementation is suitable for production use or primarily for prototyping. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 131.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags text to speech alignment, monotonic alignment search, sequence alignment audio, speech text synchronization, glow-tts alignment, dynamic time warping alternative, audio text matching, speech-synthesis, audio-alignment, sequence-matching [View on SkillFed](https://skillfed.io/packages/monotonic-alignment-search) · [View on PyPI](https://pypi.org/project/monotonic-alignment-search/)