zackees / transcribe-anything

Input a local file or url and this service will transcribe it using Whisper AI. Completely private and Free 🤯🤯🤯
MIT License
532 stars 46 forks source link

Transcribe-Anything "insane" mode installation issue on M1 Mac #17

Closed nexuslux closed 7 months ago

nexuslux commented 7 months ago

Description:

When attempting to run transcribe-anything in insane mode on my M1 Mac, I encountered an error related to the installation of intel-openmp==2024.0.2. Here are the procedural steps and the error observed.

Steps to reproduce:

  1. I ran the CLI command:
    
    transcribe-anything /Users/xxx/Downloads/Test/xxxx.m4a --hf_token hf_[mytoken] --device insane
    2.  I encountered the following error:
    subprocess.CalledProcessError: Command 'pip install intel-openmp==2024.0.2' returned non-zero exit status 1.
    I understand the intel-openmp==2024.0.2 package is part of Intel's Math Kernel Library (MKL) and is typically used for linear algebra, Fourier transform, and random number capabilities in numpy, scipy, and scikit-learn. Given MKL currently doesn't support M1 chips, I believe this is causing the error in my case.
    While the transcribe-anything software does support M1 chips for CPU tasks, it appears the MKL dependency needed for insane mode isn't compatible.
    Please advise on whether there's a workaround or solution on M1 chips or if compatibility is planned in future updates. Thanks in advance!
    System Specs: Apple M1 MacBook
    Python Version: Python 3.11
Danielyy commented 7 months ago

me too! M2 Mac

Running: pip install intel-openmp==2024.0.2 ERROR: Could not find a version that satisfies the requirement intel-openmp==2024.0.2 (from versions: none) ERROR: No matching distribution found for intel-openmp==2024.0.2

zackees commented 7 months ago

Hmm looks like i need to ignore the system constructions that intel has setup and hope it works.

zackees commented 7 months ago

Ok, it looks like I fixed it. Can one of you please run:

pip install -U transcribe-anything and see if it fixes your problem and report back here so I can close this bug?

Gajotres commented 7 months ago

I'm having a bit different issue also on M1 Mac:

transcribe-anything test.mp3 Running: pip install torch==2.1.2 ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.1) ERROR: No matching distribution found for torch==2.1.2

zackees commented 7 months ago

Okay, I've updated torch for the legacy whisper model and it's going through testing.

In the meanwhile you can use --device insane to try and get better results.

Gajotres commented 7 months ago

Thanks @zackees, transcribe-anything was able to create the text_**** folder but now it's stuck on another missing dependency:

ERROR: Could not find a version that satisfies the requirement torchaudio==2.1.2 (from versions: 2.2.0, 2.2.1) ERROR: No matching distribution found for torchaudio==2.1.2

It looks like all torch-related dependencies need an update.

zackees commented 7 months ago

Okay new bug fix version has been released.

pip install to get the code

nexuslux commented 7 months ago

transcribe-anything 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' --hf_token hf_xxxx (with my token)

so it won't do speaker codes with the hugging face pyannote unless I add --insane is that right?

Right now it just does the transcription for this: transcribe-anything 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' --hf_token hf_yokxxx

But then it doesn't have speaker 0 / Speaker 01 etc..

zackees commented 7 months ago

That's correct, you must use device insane

nexuslux commented 7 months ago

But --insane doesn't work on Mac? It requires a Nvidia gpu?

zackees commented 7 months ago

--device insane works on MacM1. It uses the mps mode.

Danielyy commented 6 months ago

The issue has been fixed, thank you.