0
stars
14
commits
Python
primary language
Apr 30, 2026
updated
A bidirectional speech-to-speech AI system with multilingual transcription, LLM-powered translation, and neural text-to-speech synthesis for Indian languages.
Course: Intro to Speech Processing — MBZUAI
Developer: Ramnarayan Choudhary (choudharyramnarayan123@gmail.com)
Status: ✅ Complete | Last Updated: April 2026
This repository contains the complete implementation for the final course project in NLP703: Speech Processing. It builds an end-to-end, 5-layer cognitive speech agent that:
The system provides a fully interactive Web UI using Gradio, allowing you to test the end-to-end pipeline through your browser.
The project is built on PyTorch and uses a Python virtual environment.
# Clone the repository
git clone https://github.com/Ramnarayan-Choudhary/Speech_agent.git
cd Speech_agent
# Activate the virtual environment
source venv/bin/activate
Run the Gradio application:
python app.py
This will start the server and output a local URL (e.g., http://127.0.0.1:7860) as well as a Public Share Link.
The interface has two main tabs:
Note: For LLM translation features, ensure your Weights & Biases API key is configured in the
.envfile, as the translation uses the W&B Inference API forQwen3-14B. If no key is present, the agent gracefully falls back to skipping the translation layer.
Every metric reported in the final academic paper is computationally backed by the evaluation suite in this repository.
To run the full multi-dimensional evaluation (STT, Routing, BLEU, and TTS) on a GPU cluster (SLURM environment):
# Submit the evaluation job to the GPU queue
sbatch scripts/eval_all.sbatch
This script will generate raw JSON metrics in the eval_results/ directory.
The system was evaluated on the Google FLEURS multilingual benchmark (test split) running on an NVIDIA RTX 5000 Ada (32 GB) GPU.
| Language | WER (↓) | CER (↓) | Avg Latency | Model Used |
|---|---|---|---|---|
| English | 21.05% | 6.33% | 0.78s | Whisper Turbo Base |
| Marathi | 72.68% | 20.87% | 2.27s | + LoRA(mr) |
| Gujarati | 76.71% | 34.88% | 3.01s | + LoRA(gu) |
Note: Indic WER is inflated due to domain mismatch (LoRA trained on IndicSpeech studio recordings vs FLEURS diverse conversational test set). The low CER (~20%) proves the phonetics are highly accurate.
Neural TTS was objectively evaluated using an ASR-Proxy (ASR-WER) and Real-Time Factor (RTF).
| Language | Intelligibility (ASR-WER) ↓ | RTF ↓ |
|---|---|---|
| English | 2.5% | 0.94 |
| Marathi | 11.4% | 0.95 |
| Gujarati | 14.1% | 0.75 |
An RTF < 1.0 indicates the system synthesizes audio faster than it takes to play it, proving its viability for real-time interactive agents.
┌─────────────────────────────────────────────────────────────────────────────────┐
│ INDIC COGNITIVE SPEECH AGENT │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌───────────┐ ┌────────────────┐ ┌──────────────────────┐ │
│ │ Audio In │──►│ Silero │──►│ Whisper LID │──►│ Dynamic LoRA Switch │ │
│ │ (16kHz) │ │ VAD │ │ (constrained │ │ (mr/gu adapters or │ │
│ └──────────┘ │ trims sil.│ │ en/mr/gu only)│ │ base model for en) │ │
│ └───────────┘ └───────┬────────┘ └───────┬──────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────┐ │
│ │ Whisper STT │ │
│ │ Large-v3-Turbo │ │
│ └────────┬─────────┘ │
│ │ raw_stt │
│ ▼ ▼ │
│ ┌──────────────────────────────────┐ │
│ │ Qwen3-14B LLM (W&B API) │ │
│ │ [CLEANED]: phonetically fixed │ │
│ │ [ENGLISH]: fluent translation │ │
│ └──────────────┬───────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────┐ │
│ │ AI4Bharat Indic Parler-TTS │ │
│ │ → Audio output (44.1kHz WAV) │ │
│ └──────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────┘
app.py: The interactive Gradio application.src/speech_agent.py: The core Cognitive Speech Agent class handling VAD, LID, and STT.src/tts_engine.py: The Parler-TTS wrapper.src/speech_to_text_finetune/: The data processing and LoRA fine-tuning scripts.scripts/: Automated evaluation scripts (evaluate_full_pipeline.py, evaluate_tts_quality.py).eval_results/: Verifiable JSON logs of all metric outcomes.paper/: LaTeX source code and final compiled PDF for the project report.Built for MBZUAI NLP703.
14 commits
Python
41.7%
TeX
34.3%
BibTeX Style
14.0%
Jupyter Notebook
7.6%
Shell
2.2%
0
stars
14
commits
Python
primary language
Apr 30, 2026
updated
A bidirectional speech-to-speech AI system with multilingual transcription, LLM-powered translation, and neural text-to-speech synthesis for Indian languages.
Course: Intro to Speech Processing — MBZUAI
Developer: Ramnarayan Choudhary (choudharyramnarayan123@gmail.com)
Status: ✅ Complete | Last Updated: April 2026
This repository contains the complete implementation for the final course project in NLP703: Speech Processing. It builds an end-to-end, 5-layer cognitive speech agent that:
The system provides a fully interactive Web UI using Gradio, allowing you to test the end-to-end pipeline through your browser.
The project is built on PyTorch and uses a Python virtual environment.
# Clone the repository
git clone https://github.com/Ramnarayan-Choudhary/Speech_agent.git
cd Speech_agent
# Activate the virtual environment
source venv/bin/activate
Run the Gradio application:
python app.py
This will start the server and output a local URL (e.g., http://127.0.0.1:7860) as well as a Public Share Link.
The interface has two main tabs:
Note: For LLM translation features, ensure your Weights & Biases API key is configured in the
.envfile, as the translation uses the W&B Inference API forQwen3-14B. If no key is present, the agent gracefully falls back to skipping the translation layer.
Every metric reported in the final academic paper is computationally backed by the evaluation suite in this repository.
To run the full multi-dimensional evaluation (STT, Routing, BLEU, and TTS) on a GPU cluster (SLURM environment):
# Submit the evaluation job to the GPU queue
sbatch scripts/eval_all.sbatch
This script will generate raw JSON metrics in the eval_results/ directory.
The system was evaluated on the Google FLEURS multilingual benchmark (test split) running on an NVIDIA RTX 5000 Ada (32 GB) GPU.
| Language | WER (↓) | CER (↓) | Avg Latency | Model Used |
|---|---|---|---|---|
| English | 21.05% | 6.33% | 0.78s | Whisper Turbo Base |
| Marathi | 72.68% | 20.87% | 2.27s | + LoRA(mr) |
| Gujarati | 76.71% | 34.88% | 3.01s | + LoRA(gu) |
Note: Indic WER is inflated due to domain mismatch (LoRA trained on IndicSpeech studio recordings vs FLEURS diverse conversational test set). The low CER (~20%) proves the phonetics are highly accurate.
Neural TTS was objectively evaluated using an ASR-Proxy (ASR-WER) and Real-Time Factor (RTF).
| Language | Intelligibility (ASR-WER) ↓ | RTF ↓ |
|---|---|---|
| English | 2.5% | 0.94 |
| Marathi | 11.4% | 0.95 |
| Gujarati | 14.1% | 0.75 |
An RTF < 1.0 indicates the system synthesizes audio faster than it takes to play it, proving its viability for real-time interactive agents.
┌─────────────────────────────────────────────────────────────────────────────────┐
│ INDIC COGNITIVE SPEECH AGENT │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌───────────┐ ┌────────────────┐ ┌──────────────────────┐ │
│ │ Audio In │──►│ Silero │──►│ Whisper LID │──►│ Dynamic LoRA Switch │ │
│ │ (16kHz) │ │ VAD │ │ (constrained │ │ (mr/gu adapters or │ │
│ └──────────┘ │ trims sil.│ │ en/mr/gu only)│ │ base model for en) │ │
│ └───────────┘ └───────┬────────┘ └───────┬──────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────┐ │
│ │ Whisper STT │ │
│ │ Large-v3-Turbo │ │
│ └────────┬─────────┘ │
│ │ raw_stt │
│ ▼ ▼ │
│ ┌──────────────────────────────────┐ │
│ │ Qwen3-14B LLM (W&B API) │ │
│ │ [CLEANED]: phonetically fixed │ │
│ │ [ENGLISH]: fluent translation │ │
│ └──────────────┬───────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────┐ │
│ │ AI4Bharat Indic Parler-TTS │ │
│ │ → Audio output (44.1kHz WAV) │ │
│ └──────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────┘
app.py: The interactive Gradio application.src/speech_agent.py: The core Cognitive Speech Agent class handling VAD, LID, and STT.src/tts_engine.py: The Parler-TTS wrapper.src/speech_to_text_finetune/: The data processing and LoRA fine-tuning scripts.scripts/: Automated evaluation scripts (evaluate_full_pipeline.py, evaluate_tts_quality.py).eval_results/: Verifiable JSON logs of all metric outcomes.paper/: LaTeX source code and final compiled PDF for the project report.Built for MBZUAI NLP703.
14 commits
Python
41.7%
TeX
34.3%
BibTeX Style
14.0%
Jupyter Notebook
7.6%
Shell
2.2%