An end-to-end, high-performance Nepali Voice Agent and Neural Text-to-Speech (TTS) system featuring voice cloning, automated speech recognition (STT), bilingual translation pipelines, and local LLM intelligence.
The Nepali Voice Agent provides dual operating modes for natural conversational voice interaction:
🎤 User (Nepali Speech)
│
▼
[1. Speech Recognition (STT)] ──> aamoshdahal/whisper-small-nepali (Devanagari text)
│
▼
[2. Machine Translation] ──> IndicTrans2 (Nepali ➔ English)
│
▼
[3. LLM Reasoning] ──> Gemma 4 (via Ollama, concise English response)
│
▼
[4. Machine Translation] ──> IndicTrans2 (English ➔ Nepali)
│
▼
[5. Neural TTS Engine] ──> Chatterbox Nepali Edition (or Kala-TTS)
│
▼
🔊 Output Speech (Synthesized Nepali Audio)
🎤 User (Nepali Speech)
│
▼
[1. Speech Recognition (STT)] ──> aamoshdahal/whisper-small-nepali (Devanagari text)
│
▼
[2. LLM Reasoning in Nepali] ──> Gemma 4 (via Ollama, direct Devanagari generation)
│
▼
[3. Neural TTS Engine] ──> Chatterbox Nepali Edition (or Kala-TTS)
│
▼
🔊 Output Speech (Synthesized Nepali Audio)
- 🎙️ Zero-Shot Voice Cloning: High-fidelity zero-shot speaker cloning using a 5–10 second reference audio clip with Chatterbox TTS.
- 🇳🇵 Full Devanagari Support: Custom tokenizers and alignment analyzers adapted to prevent early cutoff on complex conjuncts and long Nepali vowels.
- ⚡ Dual Engine Voice Synthesis:
- Chatterbox Nepali Edition: State-of-the-art multi-speaker neural TTS fine-tuned on Nepali speech.
- Kala-TTS: Fast, lightweight Nepali phoneme-based fallback.
- 🌐 Modern Interactive Web Dashboard: Real-time microphone audio recording, voice selection, sample uploading, and instant playback.
- 💻 CLI & Diagnostics: Command-line interactive assistant (
nepali_assistant_v2.py) and STT diagnostics suite (diagnose_stt.py). - 🚀 GPU/CPU Optimization: Designed to run efficiently on consumer GPUs (e.g. RTX 40/50 series) and Apple Silicon (MPS).
├── chatterbox-nepali-edition/ # Chatterbox TTS Nepali fork (models, tokenizer, trainer)
│ ├── src/chatterbox/ # TTS source modules (T3, S3Gen, S3Tokenizer, Voice Encoder)
│ ├── gradio_nepali.py # Standalone Gradio interface for Nepali TTS
│ ├── test_nepali.py # TTS benchmarking & generation script
│ └── pyproject.toml # Package definition
├── static/ # Frontend Web UI (HTML5, CSS3, Vanilla JS)
│ ├── index.html # Web app interface
│ ├── style.css # Custom styling
│ └── app.js # Audio recording & WebSocket/HTTP handling
├── checkpoints/ # Model weights directory (e.g., t3_nepali_epoch_20.pt)
├── samples/ # Reference speaker samples (e.g., Achyut Ghimire)
├── server.py # FastAPI server & real-time REST/SSE endpoints
├── nepali_assistant_v2.py # Terminal/CLI voice assistant interface
├── diagnose_stt.py # STT testing and diagnostic script
├── requirements.txt # Python package dependencies
└── .gitignore # Excludes caches, venv, audio files, and model weights
git clone https://github.com/Nishchal-ll/voice-agent.git
cd voice-agentPython 3.10 or 3.11 is recommended.
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Install Chatterbox Nepali module in editable mode
pip install -e ./chatterbox-nepali-editionInstall Ollama and pull the LLM model:
ollama pull gemma4:e2b-it-qat- Download the Chatterbox Nepali checkpoint (
t3_nepali_epoch_20.pt) from Hugging Face and place it undercheckpoints/t3_nepali_epoch_20.pt. - Place reference audio files (e.g.
achyut_ref_10s.wav) insamples/.
python3 server.pyOpen your browser and navigate to http://localhost:8000 to interact with the voice assistant.
python3 nepali_assistant_v2.pyPress Enter to start recording from your microphone, and Enter again to submit.
cd chatterbox-nepali-edition
export PYTHONPATH=src
python3 gradio_nepali.pypython3 diagnose_stt.pyThis project builds upon open-source research and community models:
-
Whisper Small Nepali (STT)
- Model:
aamoshdahal/whisper-small-nepali - Authors: Aamosh Dahal et al. (Fine-tuned OpenAI Whisper on Nepali Speech Corpora)
- Model:
-
IndicTrans2 (Machine Translation)
- Models:
ai4bharat/indictrans2-indic-en-dist-200M,ai4bharat/indictrans2-en-indic-dist-200M - Repository: AI4Bharat IndicTrans2
- Citation:
@article{gala2023indictrans2, title={IndicTrans2: Towards High-Quality and Accessible Machine Translation Models for all 22 Scheduled Indian Languages}, author={Gala, Jay and others}, journal={Transactions on Machine Learning Research}, year={2023} }
- Models:
-
Gemma (Language Model)
- Provider: Google DeepMind
- Serving: Ollama
-
Chatterbox TTS & Resemble AI
- Base Architecture: Resemble AI Chatterbox
- Nepali Fine-tuning & Devanagari Patching:
officialuser& contributors
-
Kala TTS
- Repository: kala-tts
This repository is distributed under the MIT License. Check individual submodules and models for their respective licensing terms.