Hi, I have attempted to install the Whisper AI component so that I can generate subtitles from audio for my videos but keep getting roadblocks.
When I try to process a subtitle from an audio clip the below message comes up…
Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at (won’t let me include the link here)
When I click on the “log” the below appears…
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with ‘pybind11>=2.12’.
If you are a user of the module, the easiest solution will be to
downgrade to ‘numpy<2’ or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File (wo
import whispertotext
File “C:\Program Files\kdenlive\bin\data\kdenlive\scripts\whispertotext.py”, line 13, in
import torch
File “C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_init_.py”, line 2120, in
from torch.higher_order_ops import cond
File "C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_higher_order_ops_init.py", line 1, in
from .cond import cond
File “C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_higher_order_ops\cond.py”, line 5, in
import torch._subclasses.functional_tensor
File “C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_subclasses\functional_tensor.py”, line 42, in
class FunctionalTensor(torch.Tensor):
File “C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_subclasses\functional_tensor.py”, line 258, in FunctionalTensor
cpu = _conversion_method_template(device=torch.device(“cpu”))
C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\torch_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: ARRAY_API not found (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.)
cpu = conversion_method_template(device=torch.device(“cpu”))
C:\Users\nedwi\AppData\Local\kdenlive\venv\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 github 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)
Traceback (most recent call last):
File “C:\Program Files\kdenlive\bin\data\kdenlive\scripts\whispertosrt.py”, line 118, in
sys.exit(main(sys.argv[1], # source AV file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\kdenlive\bin\data\kdenlive\scripts\whispertosrt.py”, line 65, in main
result = whispertotext.run_whisper(source, model, device, task, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\kdenlive\bin\data\kdenlive\scripts\whispertotext.py”, line 53, in run_whisper
model = whisper.load_model(model, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\whisper_init.py", line 154, in load_model
model.set_alignment_heads(alignment_heads)
File “C:\Users\nedwi\AppData\Local\kdenlive\venv\Lib\site-packages\whisper\model.py”, line 251, in set_alignment_heads
mask = torch.from_numpy(array).reshape(
^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Numpy is not available
When I go to Configure Speech to Text it says “Speech to text is configured:
srt 3.5.3, torch 2.4.0, srt_equalizer 0.1.10, openai-whisper 20231117 in a green box” so I am at a loss as to what the problem is. I have spent hours trying to figure it out. Any help is greatly appreciated!!