The transcript printed in the terminal is hard to search, quote, or file away. The -otxt flag writes the same transcript to a plain text file next to the audio, which is the simplest transcript format to keep.
What you need
- whisper.cpp built, with whisper-cli available
- A Whisper model, for example ggml-base.en.bin
- An audio file converted to 16 kHz mono 16-bit WAV
Step 1: Convert the audio if needed
Convert the recording to 16-bit WAV with ffmpeg, for example ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav, if it is not already in that format.
Step 2: Run with the text output flag
Run whisper-cli -m models/ggml-base.en.bin -f output.wav -otxt. The -otxt flag writes the transcript to a .txt file.
Step 3: Confirm the text file exists and reads well
Open the .txt file and confirm it holds the transcript. Check the first and last lines against the audio before you rely on it.
Worked example: synthetic plain text export
The table below is a synthetic example. It shows the expected result of exporting a transcript; no audio was transcribed.
| Check | Expected | Result |
|---|---|---|
| Command runs | Completes | Pass |
| Text file written | output.wav.txt | Pass |
| Content | Full transcript | Pass |
| First line checked | Matches audio | Pass |
Expected result (UNTESTED). the command completes, a plain text file is written next to the audio, and the first line matches the recording. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Plain text has no timestamps; use -osrt or -ovtt if you need them.
- The file name follows the audio file name, so keep the audio name meaningful.
- A plain text transcript still needs a spot-check before it is quoted.
