This script allows you to transcribe audio files (MP3, WAV, etc.) to text using the Faster Whisper Python library. Please read these instructions carefully before running the script.
-
Install Python (3.8 or higher)
Download and install from https://www.python.org/downloads/.
Make sure to add Python to your system PATH during installation. OR you can simply run this command in terminal to install python: "winget install Python.Python.3" for MAC: brew install python -
Install ffmpeg (required for audio decoding)
- Windows: https://ffmpeg.org/download.html
- Linux:
sudo apt install ffmpeg - Mac:
brew install ffmpeg
Make sure ffmpeg is added to your system PATH so the script can find it. (Explanation in End on how to do this) Now you can verify if both are installed by writing "python --version" or "py --version" and "ffmpeg -version"
- Place the audio file you want to transcribe in the same folder as the script.
- Make sure to use the correct file extension (e.g.,
.mp3,.wav). - Also works for videos (.mp4)
- The output transcription will also be saved in the same folder with the filename:
The script supports the following Faster Whisper models. Please choose the one that fits your needs:
| Model | Speed & Size | Accuracy |
|---|---|---|
| tiny | Fastest, smallest | Least accurate |
| small | Fast, small | Slightly more accurate |
| base | Moderate speed & size | Good accuracy |
| medium | Slower, larger | More accurate |
| large | Slowest, largest | Most accurate |
Tip: Use base for a good balance between speed and accuracy. Model names are case-insensitive.
- Open a terminal or command prompt in the folder containing the script.
- Run the script: type "python transcription.py"
- Follow Along the input instructions prompted on screen
To make ffmpeg accessible to the script:
Windows:
- Download and unzip ffmpeg.
- Copy the path to the
binfolder (e.g.,C:\ffmpeg\bin). - Open Environment Variables → Path → Edit → New, paste the path, and click OK.
- Restart the terminal or command prompt.
Linux / Mac:
write export PATH=$PATH:/path/to/ffmpeg/bin
- GitHub: https://github.com/Syed-56
- LinkedIn: https://www.linkedin.com/in/syedsultan10
- Faster Whisper: MIT License (https://github.com/guillaumekln/faster-whisper)
- ffmpeg: LGPL/GPL License (https://ffmpeg.org)