Logo Lanfrica

Innocent-ICS/asr-afrispeech

Domain:

natural language processing

Record type:

softwaremodel
Creator:
Inn
Host:
This project is an RNN-based ASR system built to help African doctors auto-transcribe their consultation notes. It uses the Afrispeech dataset. # ASR RNN System A comprehensive Automatic Speech Recognition (ASR) system that implements and compares six encoder-decoder RNN architectures on the Shona language dataset from AfriSpeech-200. ## Overview This system evaluates three RNN types (Vanilla RNN, LSTM, GRU) both with and without Bahdanau attention mechanism. It provides a complete pipeline for training, evaluation, and comparison of different ASR architectures. ### Features - **Six Model Variants**: Vanilla RNN, LSTM, GRU (each with and without attention) - **Modular Architecture**: Generalizable RNN module that supports all cell types - **Comprehensive Logging**: Dual logging to WandB and TensorBoard with visual plots - **Robust Error Handling**: Graceful handling of common errors with helpful messages - **Two Execution Modes**: Quick testing with small data subset and full experiments - **Complete Metrics**: CTC loss, accuracy, perplexity, CER, WER, and sample transcriptions ## Quick Start ```bash # 1. Install dependencies pip install -r requirements.txt # 2. (Optional) Set up WandB token in .env file echo "wandb_token=YOUR_TOKEN" > .env # 3. Run quick test (2-5 minutes) python asrking1.py # 4. Run full experiments (~12-15 hours) python asrking2.py # 5. View results in TensorBoard tensorboard --logdir=logs/tensorboard # Open localhost ``` ## Requirements - Python 3.8 or higher - PyTorch 2.0 or higher - 8GB RAM minimum (16GB recommended) - 5GB free disk space - CUDA-capable GPU (optional but recommended) ## Installation ### 1. Install Dependencies ```bash pip install -r requirements.txt ``` Key packages: - `torch` and `torchaudio` - Deep learning and audio processing - `datasets` - Hugging Face datasets for AfriSpeech-200 - `wandb` - Experiment tracking - `tensorboard` - Visualization - `jiwer` - Error rate computation ### 2. Configure WandB (Optional) Create a `.env` file: ```bash wandb_token=YOUR_WANDB_TOKEN_HERE ``` Get your token at: wandb.ai ## Usage …