VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Running Subtitle Edit V5.2.0.

    Attempting to do a speech to text transcription of a foreign language video.

    Using a variety of transcribing engines and models in Subtitle Edit, I have yet to get a (very) good transcription. So I attempted to use Whisper X engine with large V2 model in Subtitle Edit for the transcription.

    But every time I run the transcription attempt, I get an error that "torchcodec" is not (properly) installed and Subtitle Edit was trying to use an alternative means for transcription which fails.

    On carrying out a quick(ish) online research regarding torchcodec, it seems that in order to get this codec working, it requires certain versions of ffmpeg, torchcodec, and python to be installed.

    As far as I can determine so far, the versions I've installed should be compatible with each other and should, in theory, all work together. But torchcodec still fails to run!?

    I have ffmpeg 8.1.2 full build shared, python 3.13, and torchcodec 0.16 installed.

    Why can't torchcodec run when it is, apparently, installed OK?

    Image
    [Attachment 94018 - Click to enlarge]
    Quote Quote  
  2. That message usually means torchcodec is installed but its native library can't load. The two usual causes are a torch/torchcodec version mismatch, or Python not finding the FFmpeg DLLs.

    First get the real error. Open a command prompt with the same Python that Subtitle Edit is using and run:
    python -c "import torchcodec; from torchcodec.decoders import AudioDecoder"
    The traceback will tell you which DLL or version it's choking on.

    Then check these:
    1. Run pip show torch torchcodec and compare the versions against the compatibility table in the torchcodec README on GitHub. Each torchcodec release is built for one torch version, so if WhisperX pulled in a different torch, reinstall torchcodec to match (or reinstall whisperx in a fresh venv so pip picks a matched set).
    2. torchcodec needs the FFmpeg shared DLLs (avcodec-*.dll, avformat-*.dll and so on) on PATH. The same table lists which FFmpeg major versions your torchcodec release supports. If 8 isn't listed, put the bin folder of a 7.x shared build first on PATH and try again.
    3. Python 3.13 is where wheels tend to lag behind. A separate Python 3.11 or 3.12 venv just for WhisperX is usually the least painful setup.

    If you mainly want the subtitles, you can skip the Python setup entirely: in Subtitle Edit's audio-to-text window pick Purfview's Faster-Whisper-XXL as the engine and let SE download it. It's a standalone exe, so there's no torch or torchcodec to break, and it offers the large-v2 model too.
    Quote Quote  
  3. Thank you very much for your detailed reply!

    Running the command python -c . . . in a command window showed that module NumPy was missing.

    Then running the command pip show . . showed that I have torch 2.14.1 and torchcodec 0.17.0 installed.

    I'm not sure I was reading the correct README at the GitHub site for compatibility between torch, torchcodec and for ffmpeg.

    The table for torch and torchcodec was found and indicated that my versions are or should be compatible. But I didn't see any compatibility listing for ffmpeg?

    As NumPy was apparently missing, I did an online search on how to install this module. I found that typing within the command window pip install numpy actually installed the NumPy module.

    So, I tried running again Whisper X engine with Large V2 module, and the transcription now worked, albeit a bit slowly.

    Yes, I'm aware aware there are different engines available in Subtitle Edit which I can and will try, but I just wanted to test the Whisper X engine also.

    Thank you very much again for the helpful reply!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!