MahmoudAshraf97/ctc-forced-aligner
Text to speech alignment using CTC forced alignment
What it solves
This project provides a way to perform forced alignment between audio files and their corresponding text transcripts. This process identifies the exact start and end timestamps for specific segments of text (such as words, characters, or sentences) as they are spoken in an audio recording, which is essential for creating high-quality speech corpuses.
How it works
The tool leverages pretrained Connectionist Temporal Classification (CTC) models from Hugging Face, specifically Wav2Vec2, HuBERT, and MMS models. It processes audio waveforms and text transcripts, using these models to map the spoken sounds to the written text, outputting the results in a structured JSON format with precise timestamps.
Who it’s for
It is designed for researchers and developers working with speech-to-text data, linguists, and anyone needing to synchronize audio and text for subtitles, speech corpus creation, or audio analysis.
Highlights
- Memory Efficiency: Uses significantly less memory (at least 5X less) than the TorchAudio forced alignment API.
- Broad Language Support: Supports over 1,100 languages, including English, Arabic, Russian, and German.
- Flexible Granularity: Allows alignment at the sentence, word, or character level.
- GPU Acceleration: Supports CUDA for faster inference.
- Structured Output: Generates JSON files containing the aligned text and precise timestamps for each segment.
Related
- Project
- Project
- Project
- Project
- Project