Quebec: A High-Precision Forced Aligner for Speech Timestamps
Quebec is a specialized forced alignment API designed to provide high-precision word-level timestamps for speech, achieving 77% of word boundaries within 20ms of human-labeled ground truth. This level of accuracy significantly outperforms existing tools like WhisperX and the Montreal Forced Aligner (MFA), which typically struggle with boundary precision and occasional alignment drift.
The Problem with Existing Aligners
Forced alignment—the process of mapping a transcript to specific audio timestamps—is critical for applications like video editing where precise cuts are required. Standard tools often fail to meet the 20ms threshold necessary for clean audio edits. While MFA is generally precise, it frequently loses its place during long recordings. Conversely, models like WhisperX and ElevenLabs Scribe often exhibit systematic latency, frequently placing word starts approximately 50ms late. These inaccuracies lead to "bad cuts," where audio is clipped or excessive silence is left behind.
Technical Architecture
Quebec improves upon existing methods by utilizing a three-part approach that constrains the search space and refines results:
- Fenced Decoder: Instead of a traditional beam search, Quebec uses a "fence" based on rough timings provided by a transcriber. By forcing the alignment to occur within a 200ms window of the transcriber's initial guess, the system can solve the search exactly without pruning, drastically reducing the rate of alignment loss.
- Boundary Refinement Model: Because acoustic models often struggle with overlapping phonemes, Quebec employs a small convolutional neural network. This model analyzes a 200ms window around each boundary, utilizing spectrograms and features from the first two layers of Whisper tiny to adjust boundaries in 5ms increments.
- LLM-Assisted Training Data: To train the boundary model, the developers created a custom dataset of 16,852 hand-labeled boundaries. They successfully used Gemini to label audio based on specific phonetic rules, such as identifying the collapse of 500-4000 Hz energy to mark the end of words ending in vowels or liquids.
Performance and Integration
Quebec is optimized for speed and scalability. Long audio files are segmented at pauses into 2-minute chunks that are processed in parallel. The boundary model is lightweight enough to run on CPU, achieving 0.7s of processing time per minute of audio.
The service is available as an API, allowing users to submit audio for transcription or provide their own transcripts for alignment. It is currently English-only and supports files up to 60 minutes in length.
Community Feedback
Early reception on Hacker News highlights potential use cases beyond video editing, including automated audio gating for podcast mixing, real-time lip-sync animation, and language learning tools. Some users raised concerns regarding the potential for such precise editing tools to facilitate the creation of misleading media or "fake news."
"Neat. I was just looking for something like this for auto gating etc, for mixing podcast audio. Also phoneme level accuracy from something like this would be useful for realtime lipsync animation, and tools support pronunciation learning." — @totetsu
"The example use case really feels like making fake news and misleading edits easier..." — @londons_explore