← All projects
Project · 04 / 07

Train Medical Vocabulary

Fine-tuning Whisper for medical speech

Fine-tunes a Whisper speech model on medical vocabulary. A local Llama model writes sentences full of medical terms, text-to-speech turns them into audio, and the paired clips and transcripts train Whisper to recognize clinical words more accurately. Experimental, not for clinical use.

The data pipeline

  1. A locally run Llama model generates sentences dense with medical vocabulary.
  2. Google Translate text-to-speech turns each sentence into audio, using the accent closest to the speaker's own.
  3. Each recording is paired with its transcript in a CSV file.

Training

The training script loads the audio as mono 16 kHz and fine-tunes Whisper with Hugging Face Transformers (BF16, small batches with gradient accumulation). Its default output folder, whisper-medical-final, is the model Sunsara's Scribe AI is configured to load.

Experimental, not for clinical use.

Built with

Python, PyTorch, Transformers, pandas and librosa.