This repository contains the ongoing Research & Development for an end-to-end code-mixed Bengali-English Speech-to-Text (STT) and Text-to-Speech (TTS) architecture.
The project is structured into two main components:
The STT directory houses a comprehensive 5-step global evaluation and benchmarking harness. Its main objective is to measure and optimize the Word Error Rate (WER) and Character Error Rate (CER) across various open-source models, processing strategies, and linguistic edge-cases (specifically code-switching and dialectal Bengali).
The pipeline systematically cleans audio, detects language, transcribes, and normalizes the text:
Step 1): Tests various methods (VAD, Bandpass Filters, Loudness Normalization, 16kHz resampling) to clean audio before inference.Step 2): Evaluates code-switched ASR engines including Whisper (Tiny, Base) with zero-shot & domain prompting, faster-whisper, and IndicWav2Vec.Step 3): Applies domain-specific rule-based transcript fixing for phone numbers, dates, currency, and abbreviations.Step 4): Tests token-level LID (Language Identification) using Unicode-range detection vs neural fastText models for mixed text.Step 5): Cleans up output utilizing 4 sub-methods:
অর্ডার → order).হইছে → হয়েছে).Navigate to the STT directory and run the evaluator harness:
cd STT
source venv/bin/activate
# Run evaluation on a specific step/approach
python3 run_experiment.py --approach 1A
# View the leaderboard for a specific step
python3 run_experiment.py --step 5 --compare
Note: Progress and individual benchmark rankings are logged internally and documented in STT/experiment_plan.md.
The TTS directory contains a high-fidelity Bangla synthesis pipeline engineered to handle the challenges of code-switching, metric/English unit abbreviations, and prosody generation over deep neural acoustic models.
Hybrid Text Normalization (normalizer.py, ml_translator.py): Standard TTS engines choke on English numbers and acronyms. This 2-layer pipeline intercepts them:
3.5kg → তিন দশমিক পাঁচ কেজি), dates, and abbreviations (Prof. → প্রফেসর).csebuetnlp/banglat5_nmt_en_bn) catches any leftover English grammatical tokens and natively translates them to Bengali syntax.Acoustic Modeling (VITS2):
Long-Form Narrative Engine (process_story_vits.py):
Specific environments are maintained inside their respective folders. Generally, both pipelines rely heavily on torch, transformers, openai-whisper, fasttext, and standard audio suites (soundfile, librosa).
STT/ and TTS/ environments.This repository contains the ongoing Research & Development for an end-to-end code-mixed Bengali-English Speech-to-Text (STT) and Text-to-Speech (TTS) architecture.
The project is structured into two main components:
The STT directory houses a comprehensive 5-step global evaluation and benchmarking harness. Its main objective is to measure and optimize the Word Error Rate (WER) and Character Error Rate (CER) across various open-source models, processing strategies, and linguistic edge-cases (specifically code-switching and dialectal Bengali).
The pipeline systematically cleans audio, detects language, transcribes, and normalizes the text:
Step 1): Tests various methods (VAD, Bandpass Filters, Loudness Normalization, 16kHz resampling) to clean audio before inference.Step 2): Evaluates code-switched ASR engines including Whisper (Tiny, Base) with zero-shot & domain prompting, faster-whisper, and IndicWav2Vec.Step 3): Applies domain-specific rule-based transcript fixing for phone numbers, dates, currency, and abbreviations.Step 4): Tests token-level LID (Language Identification) using Unicode-range detection vs neural fastText models for mixed text.Step 5): Cleans up output utilizing 4 sub-methods:
অর্ডার → order).হইছে → হয়েছে).Navigate to the STT directory and run the evaluator harness:
cd STT
source venv/bin/activate
# Run evaluation on a specific step/approach
python3 run_experiment.py --approach 1A
# View the leaderboard for a specific step
python3 run_experiment.py --step 5 --compare
Note: Progress and individual benchmark rankings are logged internally and documented in STT/experiment_plan.md.
The TTS directory contains a high-fidelity Bangla synthesis pipeline engineered to handle the challenges of code-switching, metric/English unit abbreviations, and prosody generation over deep neural acoustic models.
Hybrid Text Normalization (normalizer.py, ml_translator.py): Standard TTS engines choke on English numbers and acronyms. This 2-layer pipeline intercepts them:
3.5kg → তিন দশমিক পাঁচ কেজি), dates, and abbreviations (Prof. → প্রফেসর).csebuetnlp/banglat5_nmt_en_bn) catches any leftover English grammatical tokens and natively translates them to Bengali syntax.Acoustic Modeling (VITS2):
Long-Form Narrative Engine (process_story_vits.py):
Specific environments are maintained inside their respective folders. Generally, both pipelines rely heavily on torch, transformers, openai-whisper, fasttext, and standard audio suites (soundfile, librosa).
STT/ and TTS/ environments.