Skip to content

Forced alignment of speech and text using Montreal Forced Aligner (MFA) | IIITH assignment

Notifications You must be signed in to change notification settings

Adars2005/MFA_InternshipTask_IIITHyderabad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎧 Assignment β€” Forced Alignment using Montreal Forced Aligner (MFA)

πŸ“Œ Objective

To automatically align speech audio and text transcripts at the word and phoneme level using the Montreal Forced Aligner (MFA).


🧩 Steps to Run

# 1️⃣ Create and activate environment
conda create -n mfa_env -c conda-forge montreal-forced-aligner -y
conda activate mfa_env

# 2️⃣ Download models
mfa model download dictionary english_us_arpa
mfa model download acoustic english_mfa

# 3️⃣ Prepare dataset
# Ensure data/ready_corpus contains .wav and .txt pairs

# 4️⃣ Validate
mfa validate data/ready_corpus english_us_arpa english_mfa

# 5️⃣ Align
mfa align data/ready_corpus english_us_arpa english_mfa outputs/aligned

πŸ“Š Outputs

Alignment Files β†’ outputs/aligned/*.TextGrid

Alignment Report β†’ outputs/aligned/alignment_analysis.csv

Each .TextGrid contains:

Word tier β†’ timestamps for words

Phone tier β†’ timestamps for phonemes

πŸ” Visualization

Open in Praat
:

Open β†’ Read from file β†’ F2BJ_RLP1.wav

Open β†’ Read from file β†’ F2BJ_RLP1.TextGrid

Select both β†’ View & Edit

🧠 Observations

Word and phone boundaries aligned accurately.

Minor timing deviations in fast speech segments.

english_us_arpa dictionary and english_mfa acoustic model performed well.

About

Forced alignment of speech and text using Montreal Forced Aligner (MFA) | IIITH assignment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published