| Summary: | Automatic Subtitling with Whisper does not work on Windows 10 | ||
|---|---|---|---|
| Product: | [Applications] kdenlive | Reporter: | Zeth <highadeptzeth> |
| Component: | Video Effects & Transitions | Assignee: | Jean-Baptiste Mardelle <jb> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 24.05.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Microsoft Windows | ||
| URL: | https://www.reddit.com/r/kdenlive/comments/1ejad4k/automatic_subtitling_with_whisper_malfunction_on/ | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Zeth
2024-08-06 12:42:44 UTC
Git commit 79045d36f909cbbda9ea5ad1f402f5eb0441d814 by Jean-Baptiste Mardelle. Committed on 13/08/2024 at 09:32. Pushed by mardelle into branch 'release/24.08'. Switch openai installer to python requirements files, allowing to fix numpy error on Windows M +3 -0 data/scripts/CMakeLists.txt M +15 -5 data/scripts/checkpackages.py A +3 -0 data/scripts/requirements-seamless.txt A +5 -0 data/scripts/requirements-whisper-windows.txt A +4 -0 data/scripts/requirements-whisper.txt M +47 -9 src/pythoninterfaces/abstractpythoninterface.cpp M +1 -0 src/pythoninterfaces/abstractpythoninterface.h M +12 -7 src/pythoninterfaces/speechtotext.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/79045d36f909cbbda9ea5ad1f402f5eb0441d814 There are currently 2 issues with Whisper on Windows. The problem you are experiencing is related to torch and python 3.12, and is caused by a missing dll. I don't know why this happens and don't think there is anything we can do from Kdenlive's side. The solution is to copy the missing dll (libomp140.x86_64.dll) to the torch folder: C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\lib\ This library can be downloaded from: https://www.dllme.com/dll/files/libomp140_x86_64 The other problem, that you will experience once this is solved, is an incompatibility between torch and the latest versions of numpy / numba, see the bug report for solution: https://bugs.kde.org/show_bug.cgi?id=490661 That does it! Twenty minutes later and my video document is correctly and almost effortlessly subtitled. There is only one snag, a note really. Whisper still spits out an error in the log, despite functioning: "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\whisper\__init__.py:146: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. checkpoint = torch.load(fp, map_location=device)" Should I be worried? From what I understand, the program is warning me that an update might break a functionality? Thank you for the fix!! |