Debian 12 + python + kdenlive appimage : how to set up for voice recognition?

Hello everyone,

In order to be able to use a kdenlive-23.08.x-x86_64.AppImage, which I couldn’t up until recently (see Kdenlive 23.08.2 released - #5 by ludo0565 and others there as well), I finally installed the latest version of the OS - Debian 12 Bookworm.

As it were, as far as I am concerned, an improvement (newest versions of the Kdenlive appimage do start and are apparently normally usable [still having a project started under the old “22” versions]) doesn’t come alone: it brings … other … improvements, which are, to me … a break in my usual practice.

In this case it is Python, which under Debian 12 seems to me largeley overhauled: compulsory virtual environment (with specific directory, among other things), no clue where VOSK (which I already had working under Debian 11) is supposed to be positioned and situated, and so on and so forth… (despite searching, but I’ll search on)

Up to the last and main question: how and where do I tell the Kdenlive appimage to look for VOSK and SRT ?
(Apparently, it still seems to know where the language packages are)

Thanks a lot for your answers on the last/main question (and any contributions on the earlier questions).

Cheers

Ludo

Hello everyone,

Well, in the last two days I began to see light at the end of the tunnel… I’m kind of beginning to sense how the whole thing is organised with Python on Debian 12…

But my question regarding how and where do I tell the Kdenlive appimage to look for VOSK and SRT remains:

On version 22.12.2 I have this window:

If I click on “Install mssing dependencies”, I get this:
Capture d’écran du 2024-01-18 21-13-37

I can do nothing else. (Anyway the information displayed in that window is not quite correct, because Python is alrady installed, and everything I need works: now I can operate VOSK and let it transcribe text)

And on version 23.08.4 I have this window:

If I click on “Install mssing dependencies”, I get that:
Capture d’écran du 2024-01-18 21-15-59

I wait for 2-3 minutes, nothing happens…

In ~/.config/kdenlive-appimagerc I have this:
Capture d’écran du 2024-01-18 21-28-01

And I don’t seem to find anything else which would be relevant…
So I know where are VOSK and SRT, but I’m not sure where to enter what to let kdenlive-appimage know where to find them…

If anyone can help, I’d be grateful…

ludo

Once installed in the path it should be able to find them.
A quick Google search leads to this article as the first hit listed on using them perhaps a clue to the manual install required step shown in it might get them done for you.

https://www.google.com/search?client=firefox-b-d&q=vosk+model+small+debian+12

Hi redgreen925, hi everyone,

Yes, indeed, I found this page, too.
It’s one of those I found between my first and my second post, which caused me to say that I was “seeing light at the end of the tunnel”.
This page (and one two other ones) allowed me to understand how Python and in particular VOSK are organised in Debian 12 (and in a particular user’s directory).

But all this did not tell me anything about the status/place/position of VOSK data in a Kdenlive’s appimage environment, and how and where it’s got to be declared, in order that Kdenlive should find it.

Whereas in Debian 11, Kdenlive’s appimage seemed to find the data it needed, in Debian 12 it’s not the case… So I was thinking, there ought to be in Kdenlive settings a window that allows me to select the directory where “vosk” (by the way, now there is a “vosk-transcriber” programme) and “srt”. I know where they are; but there is no way I can tell the Kdenlive appimage.

Thanks for your help and support.

ludo

You are welcome but unfortunately I have no clue on that problem you have. Other than it is obviously a path or permission perhaps problem. As if the 11 found it the 12 should too. Does the vosk-transcriber location show up in your PATH if you use the echo $PATH.

zeus@9600k:~$ echo $PATH
/home/zeus/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Hi redgreen925, hi everyone,

@redgreen925:
Thank you for your time!

I checked as you rightly suggested:
user@debian-12:~/nerd-dictation$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

I have installed - following the Debian advice of setting up a virtual python environment - the python programme data only locally, i.e. only for “user” in his own directory…
So I might have to declare the directory where “vosk-transcriber” and “srt” are so that it appears in the $PATH , right?

Cheers

ludo

Yes if it cannot see it in the path then programs looking for it will not find it. An article below on adding to the path in Linux.

How to check where it is at according to the system.

zeus@9600k:~$ which vosk-transcriber
zeus@9600k:~$ which backup_home.sh
/home/zeus/bin/backup_home.sh

There you can see it does not find it on my system because it is not installed or if installed is not in a directory in the PATH line. My home directory backup script is shown is in my ~/bin directory which I know is in my path.

Hi redgreen925, hi everyone,

Yes, I found pages like this. It was pretty straightforward, going from making a temporary change to making a permanent change in the .bashrc file (with a check after restart).

Unfortunately to no avail. It didn’t change anything.

Here screen shots - under Debian 12 Bookworm of course:

Just as a proof that it worked earlier on (and without declaring anything in PATH or anywhere else for that matter), these two screen shots, under Debian 11 Bullseye, with kdenlive-22.12.2-x86_64.AppImage:

So this is worth a bug report for regression, right?

Thank you to the team and all users for their support in making this a great program.

Cheers

ludo

I would think so, it worked before and now does not, definitely a change in behavior with the newer package.

Hello everyone,

It is reported here:
https://bugs.kde.org/show_bug.cgi?id=480278

In the hope that a solution will be found…

Best regards and thanks to all for the great work.

ludo

1 Like

This confirms the problems I’ve been having also on Siduction (Debian Sid).

Mind you I only decided to try installing kdenlive / vosk recently.

Installing vosk using pip was straightforward once I learned about python venv.

Then the need to manually activate the venv to “expose” vosk & srt in $PYTHONPATH.

Then learning the need to append an export statement to .bashrc to add the venv to $PATH.

vosk-transcriber and srt are now both accessible, though Kdenlive 23.08.4 still does not see them.

which vosk-transcriber
/usr/lib/python3.11/venv-vosk/voskapi/bin/vosk-transcriber
which srt
/usr/lib/python3.11/venv-vosk/voskapi/bin/srt

Hello TassieDevyl, hello everyone,

Sory that you too have had the same experience.

I still have no news on my bug report here

I don’t know what to make of it…

Cheers

ludo

Hello everyone,

Well, looking for solutions, I found the light of day at the end of the tunnel!

Wondering why I had noticed nothing new for a while here, I decided to look closer.
I found this notice: Kdenlive 24.02.0 RC ready for testing
And apparently this latest release candidate solves my problem:

I just had to make a copy of my already installed and standing (and under regular use) “python_virtual_env” directory right where kdenlive settings were telling they’re expecting it, renaming it as shown - and there it went: kdenlive found it, and all is ready for use, just like I knew it!

A first test gave a speech recognition as I knew it from previous versions.

I mark this thread as solved.

Cheers to all!

ludo

P.S. I can’t wait till kdenlive-24-02-0-rc is effectively released