Logo Lanfrica

pmapuranga/JHB-Transcribing-Application

Domaine:

natural language processing

Type de record:

software
Créateur:
pma
Hôte:
Shona - English Whisper # Shona Whisper laptop starter kit This kit lets you: 1. test baseline transcription with faster-whisper; 2. create local train/validation/test manifests; 3. fine-tune Whisper using LoRA on a laptop; 4. test the fine-tuned LoRA adapter; 5. optionally merge the adapter and convert the model for faster-whisper. ## 1. Set up Linux / Ubuntu with NVIDIA GPU: ```bash cd shona-whisper-laptop-kit ./setup_cuda_linux.sh source .venv/bin/activate ``` Linux / Ubuntu CPU-only: ```bash cd shona-whisper-laptop-kit ./setup_cpu_linux.sh source .venv/bin/activate ``` Windows users: use WSL2 Ubuntu for the easiest CUDA/Python setup. If pip fails with `OSError: [Errno 28] No space left on device`, free space inside the Linux filesystem and rerun the setup script. The CPU install needs about 12 GB free; the CUDA install needs about 20 GB free because PyTorch wheels are large. Check space with: ```bash df -h . python -m pip cache purge sudo apt clean rm -rf .tmp/shona-whisper-pip-* ``` ## 2. Test baseline transcription first ```bash python scripts/transcribe_faster_whisper.py path/to/sermon.wav \ --model large-v3-turbo \ --device cuda \ --compute-type float16 \ --language sn ``` CPU-only: ```bash python scripts/transcribe_faster_whisper.py path/to/sermon.wav \ --model small \ --device cpu \ --compute-type int8 \ --language sn ``` ## 3. Prepare training data Recommended clip length: 15 to 30 seconds. Expected layout: ```text data/clips/sermon_001_0001.wav data/clips/sermon_001_0001.txt data/clips/sermon_001_0002.wav data/clips/sermon_001_0002.txt ``` Each `.txt` file should contain the exact transcript for the matching audio clip. Normalize raw audio if needed: ```bash python scripts/normalize_audio.py --input data/raw --output data/clips --overwrite ``` Create train/valid/test CSVs: ```bash python scripts/make_manifest.py --clips data/clips --out data/manifests ``` ## 4. Evaluate the pretrained baseline ```bash python scripts/evaluate_faster_whisper.py \ --csv da …

Languages