-
Notifications
You must be signed in to change notification settings - Fork 929
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
Help for installing phyton component for Ctranslate2 and WhisperX #6914
Comments
Try reading more here: https://www.nikse.dk/subtitleedit/help#audio_to_text_whisper First uninstall Python - then re-install Python version 3.10: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Check the "Add to path check box" during installation: Open a commend prompt, and type To install the latest CTranslate2 (Faster Whisper) do a To install latest Open AI Whisper do a Do they work from SE now? Note: Whisper requires a new CPU with AVX 2 and having 16GB RAM or more is required for the large models. |
Ah, you also need Git for Windows: https://gitforwindows.org/ |
Thank you. All works fine. OpenAI, CTranslate2, WhisperX. GIT for windows was missing. |
@despairTK: Does the small model work any better? What OS are you on? |
All models are the same result, my OS is windows 11 |
@despairTK Did you tried standalone whisper binaries? |
I too am getting no gpu usage in whisperx and ctran, and only blank subtitle files are created. I am using windows 11 |
@kingchobo10 Did you tried standalone whisper binaries? https://github.com/Purfview/whisper-standalone-win |
No, that is not a standalone binary in your screenshot. |
I read the Issues of Ctranslate2 and found the problem. When I set --device cpu, Ctranslate2 can output SRT files and output normal text normally, but when --device cuda, it will not output any SRT files or text. I provided two screenshots. It seems that the original problem has not been resolved? |
I installed CUDA as instructed and ran the standalone binary, but got an error message |
I used this |
Maybe you need to restart Windows. |
I've already restarted Windows and in the old version of normal whisper mode, I could use the GPU. |
I think path should be in "PATH", not "CUDA_PATH....". You can try previous "b103" release. |
GPU RAM is used up to 1.7 GB. So far, subtitle edit behaves exactly the same. However, SUBTITLE EDIT only creates an empty subtitle file after that and finishes. With the standalone binary, however, it uses up to 3GB and works. I think it's because of the error message, it only works when I hit enter after some time has passed since that error message appeared. 2023-05-15 15:11:56.0324187 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1671 onnxruntime::python::CreateInferencePybindStateModule] Init provider bridge failed. |
It's not the error message.
No, your hitting of Enter is meaningless.
Looks normal. |
I solved https://github.com/Purfview/whisper-standalone-win runtime error by searching the issue. Thank you so much |
What error and how you solved it? That first screen was download error probably because your firewall blocked the internet connection. |
I have solved these errors through Google, but when I use it in Subtitle Edit, I feel that the transcription speed is similar to that of OpenAI\Whisper. It may be caused by the fact that I select each line of subtitles for transcription. Looking forward to the follow-up updates of Faster-Whisper. |
But you didn't wrote how actually you solved them.
I don't understand what that means, can you make a screenshot? |
I believe it means they have subtitles that are already timed, and they're selecting them all and running Whisper on them, which means it has to load the model and so on for every one, which is why it's slow. |
I didn't knew of such feature by SE. In such case all whisper implementations will be slow because most time would be consumed by the model loading on every line, plus "r117" is packed into one file, so, + few seconds of unpacking. In such case maybe it would make sense to use non-packed "b103" release. I see people have problems with Nvidia libs with "r117", I could make a release including them, but I don't know which libs are actually needed, don't wanna include whole 4GB stuff. |
I'm sorry that I didn't write out the process of my solution. I will describe it now. I think it may be useful for most people, especially those who can run OpenAI\Whisper normally, but cannot run whisper-standalone-win normally. Generally, people who can run OpenAI\Whisper have installed CUDA Toolkit 11.7 (I installed this version myself, it may be different from yours), but running whisper-standalone-win requires cuDNN Archive. I installed Download cuDNN v8.9.0 (April 11th, 2023), for CUDA 11.x (the downloaded version needs to correspond to the CUDA Toolkit version you installed, pay attention to the version number at the end of the two), download Download cuDNN After v8.9.0 (April 11th, 2023), for CUDA 11.x, unzip it. Copy all the files inside to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 (please follow your own installation path) and copy them in. At this point run whisper-standalone-win if prompted After completing the above operations, it is still a reminder If I'm not clear enough, please refer to these two links: b103 I tried it, and the transcription speed is about the same. Just waiting for an update. I remember that guillaumekln mentioned this situation under Softcatala/whisper-ctranslate2#11: "You could load the model once and then use the same model instance to transcribe each file. This should work around the issue and also be more efficient than reloading the model each time.” In fact, https://github.com/Const-me/Whisper will be very fast for my line-by-line transcription, which is much faster than OpenAI\Whisper, but it has the disadvantage that some single-line subtitles that are too short cannot Recognition, and sometimes the recognition of a sentence is not very complete. |
GPU is broken in ctranslate2 for most users and nothing is output with the standalone or through Subtitle Edit. It seems to want CUDA 11.x and 12.x and CuDNN installed but even then I can't get it to function. We're waiting to fixes to ctranslate 2's CLI. There is a patched version that is Faster Whisper with functional CUDA in Subtitle Edit and standalone here: Purfview/whisper-standalone-win#11 |
Wait, has anyone managed to run WhisperX 2/3 on Windows? As far as I can tell it requires a recent version of Jax, which can't be installed on Windows at the moment (and when I try to run WhisperX using WSL I get some error, "'type' object is not subscriptable", which is beyond the scope of what we're talking about here, and which I don't understand enough to even try to solve). |
Make a screenshot of that folder. |
Maybe it's because of non-latin character in the path. Try to move Whisper-Faster folder to disc's root. [ PS: |
Okay, I'll delete from the folder. I copied it there trying to solve the problem when I was running out of options 😅 |
Look at error_log.txt, there you'll see what is used CPU or CUDA. Dunno about those letters, cut and share a short sample of that audio. |
I ran it again and it took about 4:20 for a 13:16 video, which I'm quite happy about. The subtitles still don't display those characters. I'll try reinstalling SE to see if that solves the issue. It didn't happen before. Here is a 10 second sample of the audio: |
But from your screenshot it's not running at all. |
I ran it through command prompt and specified to use CUDA. It worked well and the subtitles have all the characters. It took about the same time 4:14 and monitoring the system it was using about 3GB of VRAM and 0.2% of the GPU processing power. |
I have deleted all the models and downloaded them again, but it still processes the subtitles like this: I have been using faster whisper through the command line and it's been working just fine. It is a bit tedious though... Here is the new "error_log.txt" file: I'll using the CPP engine to see if it also happens with it. |
You copied it to the Windows' folders, you don't wanna do that with portable programs, especially when you don't run your system as Administrator. Move it out of there! Btw, do you run SE Beta? |
I'm running SE version 3.6.13 which is the latest it seems. I didn't see any beta version. |
Or real Administrator aka Windows is running you. :P Can you do few tests in console with large-v2? Check GPU VRAM usages with these 3 different options: |
I was just doing that to see what happens 😁
So the only one working is the int8. Another thing, whenever I start the process, this message appears, but it still works. It appears no matter what int option I use: PS: |
You never really know 👀 |
By the way, the GPU use is about 2% total and the program itself uses about 0.5% |
Try
Just ignore it. |
Do you know that you exchanged 51 MESSAGES for this topic? When you start your CHAT because it is chat, not the problem solution, you make it to be the CHAT, I get mail notifications every 5 minutes because you will DIE if you can't solve this problem. Why don't you chat in some other place? Go to Skype then do it forever. |
What the heck, man? |
@suiram96 But few post ago you wrote that
@Cyberyoda1411 At the email's bottom there is link to unsubscribe from topic. |
If you want me to LEAVE the Subtitle Edit forum because of you, I won't. You can't stop me from giving new suggestions about how this program can be better or how to solve some problems I have. But if there is a way I to LEAVE THIS endless issue, tell me how to do it. I will give up on this issue gladly. Maybe I can click on CLOSE WITH THIS COMMENT??? But I am almost sure that when you write the next comment, it will be open again. |
Sorry for the inconvenience, brother. I didn't want you to leave or whatever. I didn't think it would bother anybody. |
Read my post above your post. |
I have a big problem installing everything that is needed for the options Audio to text (whisper), engines Ctranslate2 and whisperX. I didn't try OpenAI, but I think it would be the same problem: a mix of installation, error messages, and insisting to put everything in PATH.
I go to the page: https://github.com/guillaumekln/faster-whisper (for Ctranslate2)
and I use the command: pip install faster-whisper
Then, when I want to use module Ctranslate2, the window asks me to find the file: whisper-ctranslate2.exe and it doesn't exist.
The same is with WhisperX at: https://github.com/m-bain/whisperX
Then I use the command: pip install git+https://github.com/m-bain/whisperx.git and I get two error messages. Some are related to the unknown command git. And I can't find the whisperx.exe file that SE wants me to find.
Anyway, I get a lot of 'you need to make a PATH', and error messages. Something is installed on my computer who knows where.
Can you help me to resolve this and use these two engines? Maybe you can explain to me how to use OpenAI (how to configure it). And just maybe, SE can do it for us, because it is more than complicated to me. And I am not so timid, but I can't find the way to get out of this.
A BUG: I accidentally made the window that asks for whisper-ctranslate2.exe and whisperx.exe location and I can't bring it back to normal, it is GIGANTIC. I can see the handles to make it smaller, but nothing happens when I try to resize these dialogue boxes.
The text was updated successfully, but these errors were encountered: