Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Text to speech alignment using CTC forced alignment
| Date | Stars |
|---|---|
| 2026-07-31 | 532 |
| 2026-08-02 | 537 |
| 2026-08-06 | 537 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<h1 align="center">Forced Alignment with Hugging Face CTC Models</h1>
[](https://freepalestine.dev)
<p align="center">
<a href="https://github.com/MahmoudAshraf97/ctc-forced-aligner/actions/workflows/test_build.yml">
<img src="https://github.com/MahmoudAshraf97/ctc-forced-aligner/actions/workflows/CI.yml/badge.svg"
alt="Build Status">
</a>
<a href="https://github.com/MahmoudAshraf97/ctc-forced-aligner/stargazers">
<img src="https://img.shields.io/github/stars/MahmoudAshraf97/ctc-forced-aligner.svg?colorA=orange&colorB=orange&logo=github"
alt="GitHub stars">
</a>
<a href="https://github.com/MahmoudAshraf97/ctc-forced-aligner/issues">
<img src="https://img.shields.io/github/issues/MahmoudAshraf97/ctc-forced-aligner.svg"
alt="GitHub issues">
</a>
<a href="https://github.com/MahmoudAshraf97/ctc-forced-aligner/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/MahmoudAshraf97/ctc-forced-aligner.svg"
alt="GitHub license">
</a>
<a href="https://twitter.com/intent/tweet?text=&url=https%3A%2F%2Fgithub.com%2FMahmoudAshraf97%2Fctc-forced-aligner">
<img src="https://img.shields.io/twitter/url/https/github.com/MahmoudAshraf97/ctc-forced-aligner.svg?style=social" alt="Twitter">
</a>
</a>
</p>
<img src="https://github.blog/wp-content/uploads/2020/09/github-stars-logo_Color.png" alt="drawing" width="25"/> **Please, star the project on github (see top-right corner) if you appreciate my contribution to the community!**
This Python package provides an efficient way to perform forced alignment between text and audio using Hugging Face's pretrained models. It leverages the power of Wav2Vec2, HuBERT, and MMS models for accurate alignment, making it a powerful tool for creating speech corpuses.
### Features
- **Atleast 5X less memory usage:** Improved implementation to use much less memory than TorchAudio forced alignment API.
- **Wide range of language support:** Works with multiple languages including English, Arabic, Russian, German, and 1126 more languages.
- **Flexibility in alignment granularity:** Choose between aligning on a sentence, word, or character level.
- **Customizable alignment parameters:** Control the frequency of `<star>` token insertion, merge threshold for segment merging, and more.
- **Integration with Hugging Face's models:** Leverage the power of pretrained Wav2Vec2, HuBERT, and MMS models for accurate alignment.
- **GPU acceleration:** Utilize your GPU for faster inference.
- **Output in JSON format:** Provides clear and structured alignment results for easy analysis and integration.
### Installation
`FFMPEG` is needed as prerequisite to use
#### Latest version from GitHub
```bash
pip install git+https://github.com/MahmoudAshraf97/ctc-forced-aligner.git
```
#### Installing locally from source
```bash
git clone https://github.com/MahmoudAshraf97/ctc-forced-aligner.git
cd ctc-forced-aligner
pip install -e .[dev]
```
### Usage
```bash
ctc-forced-aligner --audio_path "path/to/audio.wav" --text_path "path/to/text.txt" --language "eng" --romanize
```
<details>
<summary>Terminal Usage</summary>
### Arguments
| Argument | Description | Default |
|---|---|---|
| `--audio_path` | Path to the audio file | Required |
| `--text_path` | Path to the text file | Required |
| `--language` | Language in ISO 639-3 code | Required |
| `--romanize` | Enable romanization for non-latin scripts or for multilingual models regardless of the language, required when using the default model| False |
| `--split_size` | Alignment granularity: "sentence", "word", or "char" | "word" |
| `--star_frequency` | Frequency of `<star>` token: "segment" or "edges" | "edges" |
| `--merge_threshold` | Merge threshold for segment merging | 0.00 |
| `--alignment_model` | Name of the alignment model | [MahmoudAshraf/mms-300m-1130-forced-aligner](https://huggingface.co/MahmoudAshraf/mms-300Excerpt of 8,002 characters
Read on GitHubMahmoud Ashraf · @TarteelAI
78
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:02de37d391c8c3f9, desc:alignment