MahmoudAshraf97 / whisper-diarization

Automatic Speech Recognition with Speaker Diarization based on OpenAI Whisper
BSD 2-Clause "Simplified" License
2.44k stars 238 forks source link

from .ctc_forced_aligner import forced_align as forced_align_cpp error #189

Closed yangtonyin closed 1 month ago

yangtonyin commented 1 month ago
/opt/conda/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")
Traceback (most recent call last):
  File "/workspace/whisper-diarization/diarize.py", line 21, in <module>
    from ctc_forced_aligner import (
  File "/opt/conda/lib/python3.10/site-packages/ctc_forced_aligner/__init__.py", line 1, in <module>
    from .alignment_utils import (
  File "/opt/conda/lib/python3.10/site-packages/ctc_forced_aligner/alignment_utils.py", line 11, in <module>
    from .ctc_forced_aligner import forced_align as forced_align_cpp
ImportError: /opt/conda/lib/python3.10/site-packages/ctc_forced_aligner/ctc_forced_aligner.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1017SymbolicShapeMeta18init_is_contiguousEv

my env is python 3.10.14 torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0

MahmoudAshraf97 commented 1 month ago

reinstall ctc-forced-aligner package, it must be installed and used with the same pytorch version which might've changed after installation

yangtonyin commented 1 month ago

My original operating system was Windows 11 and it did not work. But later I change to Ubuntu and was able to execute it. In the same docker environment, I think it was related to the operating system.

MahmoudAshraf97 commented 1 month ago

windows build is working as intended https://github.com/MahmoudAshraf97/ctc-forced-aligner/actions/runs/9172392840/job/25276129631 so try again using windows after compiling with the same torch version that you'll use