Application not finding libtorchaudio.pyd during runtime despite it being present in specified folder

Hello, I’m trying to usa pyannote.audio fo diarization, which uses pytorch, howerver when I try to run the application it returns the fllowing error:

Traceback (most recent call last):
File “C:\Users\pedroaf\Documents\utils\Transcricao\diarisation_teste.py”, line 1, in
from pyannote.audio import Pipeline
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyannote\audio_init_.py”, line 29, in
from .core.inference import Inference
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyannote\audio\core\inference.py”, line 34, in
from pytorch_lightning.utilities.memory import is_oom_error
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytorch_lightning_init_.py”, line 27, in
from pytorch_lightning.callbacks import Callback # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytorch_lightning\callbacks_init_.py”, line 14, in
from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py”, line 24, in
from pytorch_lightning.callbacks.callback import Callback
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytorch_lightning\callbacks\callback.py”, line 22, in
from pytorch_lightning.utilities.types import STEP_OUTPUT
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytorch_lightning\utilities\types.py”, line 40, in
from torchmetrics import Metric
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics_init_.py”, line 22, in
from torchmetrics import functional # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\functional_init_.py”, line 14, in
from torchmetrics.functional.audio.deprecated import permutation_invariant_training as permutation_invariant_training
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\functional\audio_init
.py", line 14, in
from torchmetrics.functional.audio.pit import permutation_invariant_training, pit_permutate
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\functional\audio\pit.py”, line 22, in
from torchmetrics.utilities import rank_zero_warn
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\utilities_init
.py", line 14, in
from torchmetrics.utilities.checks import check_forward_full_state_property
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\utilities\checks.py”, line 25, in
from torchmetrics.metric import Metric
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\metric.py”, line 30, in
from torchmetrics.utilities.data import (
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\utilities\data.py”, line 22, in
from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12, _TORCH_GREATER_EQUAL_1_13, _XLA_AVAILABLE
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchmetrics\utilities\imports.py”, line 51, in
TORCHAUDIO_GREATER_EQUAL_0_10: Optional[bool] = compare_version(“torchaudio”, operator.ge, “0.10.0”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning_utilities\core\imports.py”, line 77, in compare_version
pkg = importlib.import_module(package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\importlib_init
.py", line 126, in import_module
return bootstrap.gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchaudio_init
.py", line 1, in
from . import ( # noqa: F401
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchaudio_extension_init
.py", line 45, in
_load_lib(“libtorchaudio”)
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchaudio_extension\utils.py”, line 64, in load_lib
torch.ops.load_library(path)
File “C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch_ops.py”, line 852, in load_library
ctypes.CDLL(path)
File "C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\ctypes_init
.py", line 376, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module ‘C:\Users\pedroaf\AppData\Local\Programs\Python\Python311\Lib\site-packages\torchaudio\lib\libtorchaudio.pyd’ (or one of its dependencies). Try using
the full path with constructor syntax.

I checked the specified folder and the libtorchaudio.pyd file is present there, my computer has an intel gpu, while the library uses CUDA, is it a hardware limitation or could it be caused be something else?

I am using python 3.11 currently, is it a support problem?

Thanks!