Running WhisperX on Jetson Nano Orin 8GB

Hi, I just installed WhisperX successfully. However, when calling the example Python script I am getting the following error during whisperx package import:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[3], line 1
----> 1 import whisperx
      2 import gc 

File ~/Git/whisperX/whisperx/__init__.py:1
----> 1 from .transcribe import load_model
      2 from .alignment import load_align_model, align
      3 from .audio import load_audio

File ~/Git/whisperX/whisperx/transcribe.py:10
      7 import torch
      9 from .alignment import align, load_align_model
---> 10 from .asr import load_model
     11 from .audio import load_audio
     12 from .diarize import DiarizationPipeline, assign_word_speakers

File ~/Git/whisperX/whisperx/asr.py:5
      2 import warnings
      3 from typing import List, Union, Optional, NamedTuple
----> 5 import ctranslate2
      6 import faster_whisper
      7 import numpy as np

File ~/Git/whisperX/.venv/lib/python3.10/site-packages/ctranslate2/__init__.py:21
     18         ctypes.CDLL(library)
     20 try:
---> 21     from ctranslate2._ext import (
     22         AsyncGenerationResult,
     23         AsyncScoringResult,
     24         AsyncTranslationResult,
     25         DataType,
     26         Device,
     27         Encoder,
     28         EncoderForwardOutput,
     29         ExecutionStats,
     30         GenerationResult,
     31         GenerationStepResult,
     32         Generator,
     33         MpiInfo,
     34         ScoringResult,
     35         StorageView,
     36         TranslationResult,
     37         Translator,
     38         contains_model,
     39         get_cuda_device_count,
     40         get_supported_compute_types,
     41         set_random_seed,
     42     )
     43     from ctranslate2.extensions import register_extensions
     44     from ctranslate2.logging import get_log_level, set_log_level

ImportError: /home/username/Git/whisperX/.venv/lib/python3.10/site-packages/ctranslate2/../ctranslate2.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block

I already tried “export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1” but it didn’t help.

Any idea how to fix it?

Hi,

We can import whisperx normally although some user warnings.
Please find our steps below:

$ pip3 install whisperx
$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import whisperx
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/home/nvidia/.local/lib/python3.10/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
/home/nvidia/.local/lib/python3.10/site-packages/pyannote/audio/pipelines/speaker_verification.py:43: UserWarning: torchaudio._backend.get_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  backend = torchaudio.get_audio_backend()
/home/nvidia/.local/lib/python3.10/site-packages/pyannote/audio/pipelines/speaker_verification.py:45: UserWarning: Module 'speechbrain.pretrained' was deprecated, redirecting to 'speechbrain.inference'. Please update your script. This is a change from SpeechBrain 1.0. See: https://github.com/speechbrain/speechbrain/releases/tag/v1.0.0
  from speechbrain.pretrained import (
/home/nvidia/.local/lib/python3.10/site-packages/pyannote/audio/pipelines/speaker_verification.py:53: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend(backend)
/home/nvidia/.local/lib/python3.10/site-packages/pyannote/audio/tasks/segmentation/mixins.py:37: UserWarning: `torchaudio.backend.common.AudioMetaData` has been moved to `torchaudio.AudioMetaData`. Please update the import path.
  from torchaudio.backend.common import AudioMetaData
>>> 

Thanks.

Hi,

Thanks a lot for testing it out. Ok, I will reinstall JetPack because I wanna upgrade anyway. Maybe it will fix the issue.

Hi,

If you are still facing the same issue after reinstalling, please attach the WhisperX installation command wit us.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.