Generating audio transcripts
This short write-up offers a quick overview of a simple method you can use to create a transcript from either a video or an audio file, which may be helpful in a variety of contexts such as documentation, content analysis, or accessibility.
Extracting audio from a video file
If you are working with a video instead of an audio file, you will need to first extract the audio stream. This can be done very easily using ffmpeg.
ffmpeg -i input-video.avi -vn -acodec copy audio.aac
Install the tools
We will use OpenAI Whisper and more specifically a packaged version from snap called whisper-gael.
In debian you will need to install snapd if you don’t already have it.
sudo apt update sudo apt install snapd sudo snap install whisper-gael
Generating the transcipt
snap run whisper-gael.whisper --language en --model large --output_format txt --task transcribe audio.aac
The available models are: tiny, base, small, medium, large, tiny.en, base.en, small.en, and medium.en.
Comments