MahmoudAshraf97 / whisper-diarization

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

FileNotFoundError: [WinError 2] #272

Open LoreTamba opened 4 days ago

LoreTamba commented 4 days ago

Hi, I get this error:

[NeMo W 2024-11-18 11:02:15 nemo_logging:393] A:\Lorenzo\Desktop\whisper-diarization-main\venv\Lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True. warnings.warn(

Traceback (most recent call last): File "A:\Lorenzo\Desktop\whisper-diarization-main\diarize.py", line 172, in tokens_starred, text_starred = preprocess_text( ^^^^^^^^^^^^^^^^ File "A:\Lorenzo\Desktop\whisper-diarization-main\venv\Lib\site-packages\ctc_forced_aligner\text_utils.py", line 220, in preprocess_text tokens = get_uroman_tokens(norm_text, language) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Lorenzo\Desktop\whisper-diarization-main\venv\Lib\site-packages\ctc_forced_aligner\text_utils.py", line 153, in get_uroman_tokens assert not subprocess.call( ^^^^^^^^^^^^^^^^ File "C:\Users\loren\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 389, in call with Popen(*popenargs, **kwargs) as p: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\loren\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\loren\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] Impossibile trovare il file specificato

Can you pls give me an explanation? I also tried to reinstall perl as it was highlighted in another (closed) issue but it doesn't work

Thanks a lot!

homelab-00 commented 4 days ago

It looks a lot like an issue I had while trying to run and install this project, which was resolved by installing 'perl', although I can see you have already installed it.

You can take a look at my full windows installation instructions here and see if they help.

LoreTamba commented 4 days ago

It looks a lot like an issue I had while trying to run and install this project, which was resolved by installing 'perl', although I can see you have already installed it.

You can take a look at my full windows installation instructions here and see if they help.

I was reading right now your guide, it's very helpful! I have a question: did you install perl with pip or in another way?

Although the error seems to be related to ctc-forced-aligner. Do I need to reinstall it maybe?

homelab-00 commented 4 days ago

Glad the guide's useful!

I have a question: did you install perl with pip or in another way?

I installed it (on my Windows 10 machine) using Strawberry Perl. Remember to make sure 'perl' has been correctly added to PATH. Since I'm using Strawberry Perl, my PATH includes these entries:

C:\Strawberry\c\bin C:\Strawberry\perl\site\bin C:\Strawberry\perl\bin

Although the error seems to be related to ctc-forced-aligner. Do I need to reinstall it maybe?

I'm pretty sure that ctc-forced-aligner is installed along with whisper-diarization. However I think it's best to start over to have a clean sheet and be able to better isolate issues.

LoreTamba commented 4 days ago

I installed it (on my Windows 10 machine) using Strawberry Perl. Remember to make sure 'perl' has been correctly added to PATH. Since I'm using Strawberry Perl, my PATH includes these entries:

C:\Strawberry\c\bin C:\Strawberry\perl\site\bin C:\Strawberry\perl\bin

I downloaded perl from Strawberry Perl site as portable ZIP and added to PATH all the directories you mentioned but I still get the error

homelab-00 commented 4 days ago

Try uninstalling/removing any existing 'perl' installations, reboot your pc, install Strawberry Perl using the installer rather than the portable zip, reboot again and give it another try.

LoreTamba commented 4 days ago

Now it works!! But I have a new problem: it seems that it doesn't actually transcribe my audio input, but a demo one (?)

Should I put my file in a specific folder?

UPDATE Found the error, all works fine now. Thank you!!