Quick Fixes

Free Software, Writing and other Stuff

SoftwareTutorialsVideos

Struggling to install Whisper models for Kdenlive’s smart transcription plugin? Try this…

First, credit where credit is due: the following solution was cobbled together combining both advice from Kdenlive developers and a tutorial by Veronica Explains linked below.

So, if you are having a hard time installing Whisper models on Kdenlive’s latest Flatpak package, here’s how I did it.

Stop Kdenlive and open a terminal window.

From the command line, run:

flatpak run --command=/bin/bash org.kde.kdenlive

That 👆 was blatantly copied from the Veronica Explains‘ blogpost mentioned above that covers something related.

To quote her:

To break that down: flatpak run invokes the flatpak program to run an application. You can use that to run your Flatpak programs directly from the terminal (useful when running a window manager or building a startup script).

The program we’re running is org.kde.kdenlive, which is the application ID for the Kdenlive program.

In between flatpak run and org.kde.kdenlive, we have --command=/bin/bash, which will tell Flatpak that we want to run the bash prompt inside the Kdenlive Flatpak runtime, the sandboxed environment available to the Flatpak version of the Kdenlive application.

Hats off to Veronica for explaining things so well.

Anyway… You won’t see any difference when you jump into the sandboxed environment—no warning will be displayed and the prompt will remain unchanged.

Trust me, a no message is a good message: everything will be working as it should.

From inside the environment run Whisper on an audio or video file, any audio or video file:

$HOME/.var/app/org.kde.kdenlive/data/kdenlive/venv/bin/whisper [_some video or audio file_]

This will make Whisper automatically download the default model (which is turbo) and install it, before proceeding to transcribe the spoken bits of the file’s audio track.

Note that you can install other models with a slight variation:

$HOME/.var/app/org.kde.kdenlive/data/kdenlive/venv/bin/whisper --model large [_some video or audio file_]

Apart from turbo and large, you have a choice between tiny, tiny.en, base, base.en, small, small.en, medium and medium.en. That said, turbo should serve you just fine for most cases.

Once downloaded and transcribed, Whisper generates between one and several text/subtitle files in the current directory. If You don’t need them, you can safely remove them.

You can stop the virtual environment by typing

exit

And then start Kdenlive normally.

Check the models in Settings > Configure Kdenlive… > Plugins > Speech to text and clicking on the Model drop down. Tada!

Once the process described in this blogpost are c completed, you can see that models are now installed in Kdenlive. Why? Virtual environments and stuff... I don't know. Magic.

Interestingly, if you now try downloading more models from inside Kdenlive, it will work flawlessly.

... And you can even install new modesl from inside Kdenlive. Again, fuck me sideways if I know why.

I guess it just needs that little nudge.

Leave a Reply