Bug 439757 - Speech to text work incorrrectly
Summary: Speech to text work incorrrectly
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (other bugs)
Version First Reported In: 21.04.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-11 15:22 UTC by 杨雪枫
Modified: 2021-08-02 14:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08
Sentry Crash Report:
fritzibaby: timeline_corruption+


Attachments
empty output subtitle (25.89 KB, image/png)
2021-07-11 15:22 UTC, 杨雪枫
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 杨雪枫 2021-07-11 15:22:45 UTC
Created attachment 139994 [details]
empty output subtitle

Speech to text starts and finish with no progress ,and results empty subtitle(no subtitle created.),no error reported.
Comment 1 emohr 2021-07-18 11:28:49 UTC
I tested it with AppImage 21.04.3 and the subtitle are created (Kdenlive language: English, test clip: English). Please check with the AppImage if it's working.
Comment 2 杨雪枫 2021-07-19 14:11:40 UTC
bellow is my kdenlive log:
subtitle constructor
Filter!
Tractor!
root context get sub model new function
=== STARTING RENDER B
=== STARTING RENDER C, IN: 0  -  1269
[wav @ 0x7f946042b600] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[wav @ 0x7f946042b600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[wav @ 0x7f946042b600] Encoder did not produce proper pts, making some up.
=== STARTING RENDER D
=== RUNNING SPEECH ANALYSIS:  "/tmp/.mount_kdenlitgVg4v/usr/share/kdenlive/scripts/speech.py"
==== ANALYSIS SPEECH:  "/home/sysadmin/.local/share/kdenlive/speechmodels"  -  "vosk-model-small-cn-0.3"  -  "/tmp/tRxkSh.wav"  -  "/tmp/ziFhhU.srt"
/// TERMINATING SPEECH JOB

+++++++++++++++++++++++++++
srt File
srt file import
Saving subtitle filter:  "/tmp/1626703653381.srt"
But where I get empty file:

[sysadmin@localhost ~]$ cat /tmp/1626703653381.srt
[sysadmin@localhost ~]$
Comment 3 杨雪枫 2021-07-19 14:14:15 UTC
while kdenlive-21.04.2 work correctly.
Comment 4 emohr 2021-07-19 18:24:28 UTC
Goto settings -> configure Kdenlive -> speech to text -> click on check configuration -> which vosk and srt version do you have?
Comment 5 杨雪枫 2021-07-20 10:55:46 UTC
Vosk 0.3.27,Srt 3.4.1
Comment 6 an.onymer 2021-07-22 10:10:06 UTC
I have the same problem. I documented my steps in this post: https://www.reddit.com/r/kdenlive/comments/nwk7bv/speechtotext_stops_after_starting_speech/

OS is Windows 10 Pro, Version 2004, build 19041.1110
kdenlive 21.04.3, MLT Version 6.26.1

Tried vosk-model-en-us-daanzu-20200905
Comment 7 emohr 2021-07-23 15:12:44 UTC
I can confirm. Even setting back vosk to a working version with pip3 install --no-cache-dir vosk==0.3.22. doesn’t make speech-to-text running.
Comment 8 emohr 2021-07-23 15:38:31 UTC
Please try following work around: 

Window-key+r enter "cmd". Enter in cmd.exe "pip3 install --no-cache-dir vosk==0.3.22." (wihtout ")

Kdenlive: goto settings -> configure Kdenlive -> Speech to text -> click on check configuration -> you should see vosk 0.3.22. 

Restart Kdenlive -> gotto settings -> speech to text -> click on check configuration -> click check for update -> after the update to 0.3.30 is done, speech to text should work.
Comment 9 an.onymer 2021-07-24 09:38:46 UTC
(In reply to emohr from comment #8)
> Please try following work around: 
> 
> Window-key+r enter "cmd". Enter in cmd.exe "pip3 install --no-cache-dir
> vosk==0.3.22." (wihtout ")
pip install works fine

> Kdenlive: goto settings -> configure Kdenlive -> Speech to text -> click on
> check configuration -> you should see vosk 0.3.22. 
 "Check configuration" only tells me "Speech to text is properly configured" in a green box. Above that, I have a list of vosk models.

> Restart Kdenlive -> gotto settings -> speech to text -> click on check
> configuration -> click check for update -> after the update to 0.3.30 is
> done, speech to text should work.
"Check updates" shows "Updating modules" for a second and then just "Speech to text is properly configured" again.
Unfortunately, this did not make it work for me. :S
Comment 10 emohr 2021-07-24 10:45:11 UTC
I assume you are on 21.04.3. It seems vosk 0.3.22 doesn't work properly with 21.04.3. 

Close Kdenlive. Install only vosk 0.3.22. Do the following: window+r enter cmd. Enter "pip3 install --no-cache-dir vosk==0.3.22" (wihtout "). 

Start Kdenlive. Does speech-to text works now?
Comment 11 an.onymer 2021-07-24 11:16:40 UTC
(In reply to emohr from comment #10)
> I assume you are on 21.04.3. It seems vosk 0.3.22 doesn't work properly with
> 21.04.3. 
> 
> Close Kdenlive. Install only vosk 0.3.22. Do the following: window+r enter
> cmd. Enter "pip3 install --no-cache-dir vosk==0.3.22" (wihtout "). 
> 
> Start Kdenlive. Does speech-to text works now?

No, it doesn't. cmd says "Requirement already satisfied:(...)", as I already performed the task before.

Do I have to use an older version of kdenlive? I don't already understand how the work around is related to what you told me to do.
Comment 12 emohr 2021-07-24 15:26:06 UTC
My idea was to install an old vosk version so that we can force Kdenlive to update to a new version by themselves and that Kdenlive set all links again. 

I assume 21.04.0 should work: https://download.kde.org/stable/kdenlive/21.04/windows/
Comment 13 an.onymer 2021-07-24 16:54:25 UTC
(In reply to emohr from comment #12)
Sadly no. I installed 21.04.0 parallel to the current version. The problem persists, the behaviour did not change :(
Comment 14 emohr 2021-07-25 13:25:21 UTC
Maybe it helps to reset Kdenlive. To do so following these steps: https://userbase.kde.org/Kdenlive/Manual/Windows_Issues#Cannot_open_projects_made_with_previous_version
Comment 15 emohr 2021-07-28 15:59:39 UTC
It seems that 21.04.3 still has the problem. Please check with the nightly build if speech to text is working: https://binary-factory.kde.org/job/Kdenlive_Nightly_mingw64/lastSuccessfulBuild/artifact/
Comment 16 杨雪枫 2021-07-29 10:30:27 UTC
Nightly Build still has this bug
Comment 17 杨雪枫 2021-08-02 13:11:19 UTC
Update vosk to 0.3.30 seems resolve this,so I shoud close this bug.
Comment 18 emohr 2021-08-02 14:59:00 UTC
Thank you for the feedback. Glad to hear it works with nightly build and vosk 0.3.30.