The Kdenlive FOSS video editor offers the possibility to add subtitles on a separate track using the Whisper speech recognition FOSS.
In this video we'll see how to set up the environment having Kdenlive installed as a flatpak package.
I tried several times, and after trial and error it worked in the end.
Links
Kdenlive: https://kdenlive.org/en/
Whisper: https://github.com/openai/whisper
CHAPTERS
0:00 Intro
0:41 Start Kdenlive installed as Flatpak and set up the speech recognition for the subtitles
2:31 Installing the `openai-whisper` Python package in the Flatpak environment: ensurepip and pip install
4:37 Running kdenlive with the needed environment variables
4:54 Extra: alternative way to set the environment variables using a GUI (Flatseal)
5:15 Checking the content of the Python installation directory
5:50 Checking if the speech recognition now works
6:22 Speech recognition for subtitles: attempt 1
7:28 Speech recognition for subtitles: attempt 2
7:38 Solving an error when running the recognition using a CPU
8:14 Speech recognition for subtitles: attempt 3
8:34 Clip and timeline selections don't always work as expected: attempt 4
9:30 Checking the resulting subtitles after the speech recognition
10:54 Discussion about rendering the video with and without subtitles
11:32 Export the subtitles as an srt file
11:42 Checking the exported srt file
12:17 Outro
#ai #kdenlive #subtitles #solvecomputerscience