How to Transcribe Your Own Audio for Free on macOS X Using WhisperAI (Whisper.cpp)
Transcribing audio locally for free is a pain, especially when you’re unwilling to pay. Fortunately, with tools like whisper.cpp, you can transcribe your audio files on your Mac with minimal-ish fuss. This post will guide you through the steps to set up whisper.cpp and use it to transcribe audio. Whether you’re a student, a professional, or just someone looking to transcribe personal recordings, this method is a great free, local solution. I’ve personally used this to transcribe audio for my blog posts.
Prerequisites
Before diving into the transcription process, ensure you have the following:
- A decent computer (Mac OSX)
- Git installed
- Homebrew installed
These tools are needed for the installing and running the software.
Step-by-Step Guide
0. Brew Install make [Optional]
OSX machines usually have make
availible out of the box but just in case.
brew install make
1. Download Whisper.cpp
Start by downloading whisper.cpp. This tool, implemented in C++, is a free and efficient way to transcribe audio using whisper AI. You can get it from GitHub:
GitHub - ggerganov/whisper.cpp
2. Clone and Build the Project
Run the following commands in your terminal:
cd whisper.cpp
make
cd models
This will clone the whisper.cpp repository and build the project on your system.
3. Download the Audio Model
Choose the audio model that suits your needs. For general purposes, the medium model is recommended. If you’re dealing with poor audio quality, consider the large model. You can view what models are availible here. Run the command:
bash ./download-ggml-model.sh medium
This downloads the medium model to your system.
4. Test the Setup
To ensure everything is set up correctly, test the command:
./main -m models/ggml-small.bin -f samples/jfk.wav
This command uses a sample file to demonstrate how whisper.cpp works.
5. Record Your Audio
Now, it’s time to record your audio. Download Audacity for Mac from:
Record your audio, and when you’re done, export it as a .wav file with a Sample Rate of 16000Hz.
Save the file in an accessible location, such as /Users/[user]/whisper.cpp/samples
, but this can be any path — remember, you’re referencing it in the next section.
6. Transcribe Your Audio
Run the command:
./main -m models/ggml-medium.bin -f samples/[audio filename].wav | sed 's/\[[^][]*\]//g' > output.txt
This command will transcribe your audio file and save the transcript in a text file named output.txt
in your current directory.
Conclusion
What we’ve covered is the complete process of setting up and using whisper.cpp for audio transcription on a Mac OSX. From downloading and building the project to recording and transcribing your own audio, this method provides a free and efficient way to get accurate transcriptions. The final step cleans up the output, giving you a clear, readable transcript of your audio file.
Remember, the quality of transcription depends on the clarity of the audio, so ensure your recordings are as clear as possible. With this tool, you can transcribe lectures, meetings, interviews, or any audio you need without any cost.
Happy transcribing!