-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with MacOs MPS Support (M2 Pro) #322
Comments
This is duplicate of #263. |
Thank you for the reply. I have checked out that thread and unable to get FasterWhisper to work even with source build of CTranslate2 compilation with MPS and Apple acceleration enabled. It is famously janky and I am afraid very few people got it compiled and used it correctly even if it is theoretically supported. I did however get WhisperCPP to work, but I cant figure how to incorporate it with the existing framework with the wrapper inside the example and transcribe anything function by WhisperCPP. Any guidance or sample code is appreciated |
If you're working with only audio files, The only require parameter for You can run WhisperCPP in Also use At its simplest, something like this: def run_whispercpp(audio):
# run WhisperCPP on `audio`
# process WhisperCPP output into proper format then return it
result = transcribe_any(inference_func=run_whispercpp, force_order=True) |
I had the same error yesterday. After I reinstall a dev pytorch I succeed to run whisper with GPU on my M2.
The newly installed version is torch-2.4.0.dev20240322. Check out openai/whisper#382 (comment) for more details. |
@410063005 Unfortunately still doesn't work for me. |
@jianfch I am currently working this code now and I think I have made some progress but I am not sure why but the "print(result.to_srt_vtt(word_level=True))" returns empty to the likes of when WhisperCPP is working as intended :
|
The problem is here:
Whisper.cpp seems to support word-level timestamps. However, it returns timestamps for the punctuations too. So I'd advise ignoring the timestamps of the punctuations and prepending/appending the punctuations to an adjacent word for best results (this treats the punctuations as gaps). |
PyTorch version 2.2 and when I run this
It shows the following
The text was updated successfully, but these errors were encountered: