MahmoudAshraf97 / whisper-diarization

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

Installed without any issues, received this error when trying to run. #201

Closed azmatt closed 2 months ago

azmatt commented 2 months ago

Traceback (most recent call last): File "/home/matt/Desktop/speaker/whisper-diarization/diarize.py", line 8, in from ctc_forced_aligner import ( ImportError: cannot import name 'generate_emissions' from 'ctc_forced_aligner' (unknown location)

MahmoudAshraf97 commented 2 months ago

Are you sure you have a working installation of ctc-forced-aligner?

azmatt commented 2 months ago

I do not, and when I try to install it, it gives no errors, but doesn't produce an executable. I'm on Ubuntu 22.04.

MahmoudAshraf97 commented 2 months ago

Can you share the logs?

azmatt commented 2 months ago

It looks like it may have installed under the name UNKNOWN

Processing /home/matt/Desktop/comeon/ctc-forced-aligner Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: UNKNOWN Building wheel for UNKNOWN (pyproject.toml) ... done Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-cp310-cp310-linux_x86_64.whl size=70794 sha256=bfc70c592ad730a97d161816e13dda280c8c57506849db6d37007a80c52dd9b9 Stored in directory: /root/.cache/pip/wheels/de/3d/3c/c503fe8bf126e4bc6e414f15a9af65d89de6fb13c2d19ced16 Successfully built UNKNOWN Installing collected packages: UNKNOWN Attempting uninstall: UNKNOWN Found existing installation: UNKNOWN 0.0.0 Uninstalling UNKNOWN-0.0.0: Successfully uninstalled UNKNOWN-0.0.0 Successfully installed UNKNOWN-0.0.0

azmatt commented 2 months ago

I re-did a fresh Ubuntu 22.04 to make sure it wasn't some other issue, and the same thing.

matt@matt-virtual-machine:~/Desktop/whisper-diarization$ python3 diarize.py -a audio_short.mp4 Traceback (most recent call last): File "/home/matt/Desktop/whisper-diarization/diarize.py", line 8, in from ctc_forced_aligner import ( ImportError: cannot import name 'generate_emissions' from 'ctc_forced_aligner' (unknown location) matt@matt-virtual-machine:~/Desktop/whisper-diarization$ cd .. matt@matt-virtual-machine:~/Desktop$ pip install git+https://github.com/MahmoudAshraf97/ctc-forced-aligner.git Defaulting to user installation because normal site-packages is not writeable Collecting git+https://github.com/MahmoudAshraf97/ctc-forced-aligner.git Cloning https://github.com/MahmoudAshraf97/ctc-forced-aligner.git to /tmp/pip-req-build-on094l9n Running command git clone --filter=blob:none --quiet https://github.com/MahmoudAshraf97/ctc-forced-aligner.git /tmp/pip-req-build-on094l9n Resolved https://github.com/MahmoudAshraf97/ctc-forced-aligner.git to commit abd458dd879305566cd4ed0c8624c95f22e3126a Running command git submodule update --init --recursive -q Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done matt@matt-virtual-machine:~/Desktop$ python3 diarize.py -a audio_short.mp4 python3: can't open file '/home/matt/Desktop/diarize.py': [Errno 2] No such file or directory matt@matt-virtual-machine:~/Desktop$ cd whisper-diarization/ matt@matt-virtual-machine:~/Desktop/whisper-diarization$ python3 diarize.py -a audio_short.mp4 Traceback (most recent call last): File "/home/matt/Desktop/whisper-diarization/diarize.py", line 8, in from ctc_forced_aligner import ( ImportError: cannot import name 'generate_emissions' from 'ctc_forced_aligner' (unknown location) matt@matt-virtual-machine:~/Desktop/whisper-diarization$

MahmoudAshraf97 commented 2 months ago

I just tried

pip install git+https://github.com/MahmoudAshraf97/ctc-forced-aligner.git

on colab and it worked fine

azmatt commented 2 months ago

I finally had to go into the directory and run sudo python3 setup.py install and that time it seemed to work.

shubhendumadhukar commented 3 days ago

I finally had to go into the directory and run sudo python3 setup.py install and that time it seemed to work.

Which directory? I am facing the same error. I have installed ctc-forced-aligner, but I still get the same error ImportError: cannot import name 'generate_emissions' from 'ctc_forced_aligner' (unknown location)

And can not find the executable ctc-forced-aligner: command not found