This repository provides a simple setup and usage guide for transcribing audio files to text in English and Hindi using OpenAI's Whisper model.
OpenAIwhisper-LocalTest/
├── README.md
├── install_venv.sh
├── requirements.txt
├── Dataset/
│ ├── Arzoooutput hindi.wav
│ └── Pankaj sir audio.wav
├── Research/
│ └── 1.Base.ipynb
└── output/
├── hinditranscription.txt
└── transcription.txt
# Create the virtual environment
python3 -m venv linuxvenv
# Activate virtual environment (Ubuntu/Linux)
source linuxvenv/bin/activate
# Upgrade pip
python -m pip install --upgrade pippip install -r requirements.txt- JupyterLab
- OpenAI Whisper
- ffmpeg-python
Audio files to be transcribed are placed in the Dataset directory:
Arzoooutput hindi.wav(Hindi audio example)Pankaj sir audio.wav(English audio example)
Open and run the provided notebook in the Research directory:
1.Base.ipynb
The notebook includes code blocks to:
- Transcribe English audio
- Transcribe Hindi audio
You can use Whisper directly from the command line as well:
whisper "Dataset/Pankaj sir audio.wav" --model base --language en
whisper "Dataset/Arzoooutput hindi.wav" --model medium --language hiTranscribed text files will be saved in the output directory:
- English transcription:
transcription.txt - Hindi transcription:
hinditranscription.txt
English Transcription:
Okay, next person is your supervisor...
Hindi Transcription:
मुझे अपनी आवाज विक्सित करने में काफी समय लगा और अब जब यह है तो मैं चुप नहीं रहने वाली
- Choose Whisper models based on required accuracy and performance:
tiny,base- Faster, less accuratesmall,medium,large- More accurate, slower