kaixxx / noScribe

Cutting edge AI technology for automated audio transcription. A nice GUI for OpenAIs Whisper and pyannote (speaker identification)
GNU General Public License v3.0
442 stars 80 forks source link

"PyAnnote error: Torch not compiled with CUDA enabled" #79

Closed SecNotice closed 1 month ago

SecNotice commented 2 months ago

"PyAnnote error: Torch not compiled with CUDA enabled"

gernophil commented 2 months ago

Information not sufficient

Vidda92 commented 2 months ago

I think I'm dealing with a similar issue, so I can give a bit more context:

I downloaded the non cuda Version of noScribe. After chosing the audio and the transcript file, noScribe will start the "Audioumwandlung", which is successful (I'm using the German version and don't know the English equivalent).

The error message occurs during speaker identification. After loading pyannote, it says "PyAnnote error: Torch not compiled with CUDA enabled" aswell as "Fehler im 2. Schritt - Erkennung der Sprecher:innen"

In case the audio file itself might be the problem: The audio file I'm using at this moment is just a couple seconds long, but it contains little to no background noise and a single speaker. However I don't think the audio file itself is the problem because I ran into this issue with different audio files.

Thanks in advance!

kaixxx commented 2 months ago

Thank you for the information. I now remember that the same issue was discussed here: https://github.com/kaixxx/noScribe/discussions/65#discussioncomment-9843321 Please follow my suggestion there and change the values in "config.yml". Does this help?

gernophil commented 1 month ago

The file should be at C:\Users\<username>\AppData\Local\noScribe\noScribe\config.yml

Vidda92 commented 1 month ago

First of all, thank you for your quick response! I wasn't aware of the other thread discussing the same problem.

I tried opening "config.yaml", but I couldn't find "pyannote_xpu" and "whisper_xpu" to change it to "cpu". Did I open the wrong file?

This is what I see when I open the file:

model: ??? protocol: ??? warm_up: 0.0 subset: test

defaults:

kaixxx commented 1 month ago

This ist the wrong config file. Check the path that @gernophil posted above. It's also ".yml", not ".yaml".

Vidda92 commented 1 month ago

Now that I opened the right file, it worked! Thank you so much for your help again!

(As always, the real problem was sitting in front of the screen rather than sitting inside the device -.- Well, at least it works at last)

gernophil commented 1 month ago

It looks like noScribe would like to use CUDA, which would be a huge speed improvement. Maybe try and download the CUDA version of noScribe.

kaixxx commented 1 month ago

Now that I opened the right file, it worked!

Perfect, nice to hear. There is also a small bug here since noScribe should not try to use CUDA if is wasn't installed. I'll have to look into this and leave this issue open as a reminder.

gernophil commented 1 month ago

Now that I opened the right file, it worked!

Perfect, nice to hear. There is also a small bug here since noScribe should not try to use CUDA if is wasn't installed. I'll have to look into this and leave this issue open as a reminder.

But it would only select cuda, if it would be possible to use it, wouldn't it?

kaixxx commented 1 month ago

But it would only select cuda, if it would be possible to use it, wouldn't it?

It checks for the hardware, but not if the installed software stack is ready for CUDA. This is the bug I meant.

MonikaBarget commented 1 month ago

I had the same issue and will try your fixes. I was wondering, however, why this problem also occurs when I turn off speaker recognition.

Also, I was wondering if it is a problem that I am in the Netherlands. In config.yml, I see that "locale" is set to "nl". My audio files are predominantly in English, though.

app_version: '0.5' check_for_update: 'True' last_language: auto last_overlapping: 1 last_pause: 1sec+ last_quality: precise last_speaker: auto last_timestamps: 0 locale: nl

MonikaBarget commented 1 month ago

Now that I opened the right file, it worked!

Perfect, nice to hear. There is also a small bug here since noScribe should not try to use CUDA if is wasn't installed. I'll have to look into this and leave this issue open as a reminder.

I think it would also be good to at least stop the program from aborting when the / an error occurs. I barely had time to read the error message because the program just crashed after the speaker identification failed. I then had to check the log files to see what was wrong, but I can tell you most of my colleagues would not know where to look...

kaixxx commented 1 month ago

I wasn't aware that noScribe crashes completely after this error. That's bad. I'll have to look into this. @MonikaBarget : Can you tell me what the last entry in the logfile was before the crash?

MonikaBarget commented 1 month ago

I wasn't aware that noScribe crashes completely after this error. That's bad. I'll have to look into this. @MonikaBarget : Can you tell me what the last entry in the logfile was before the crash?

I reinstalled noScribe just to be sure... So I lost the old logs. But it was something like:

ERROR: PyAnnote error: Torch not compiled with CUDA enabled
ERROR:

The line after the second ERROR was definitely empty like this. I got the same for all my test projects that crashed.

Now that I have updated the config.yml file, it works like a charm! Thanks so much for this great tool.

kaixxx commented 1 month ago

@MonikaBarget The error points to the fact that your hardware probably supports CUDA but you downloaded the non-CUDA version of noScribe. CUDA is a technology from NVIDIA that uses your graphics card to accelerate certain AI-related functions. It can save you a lot of time in noScribe. I would suggest installing the CUDA-enabled version of noScribe and reverting the settings in config.yml back to pyannote_xpu: cpu.

I'm actually thinking about ditching the non-CUDA version altogether to avoid this error once and for all. The only advantage of the non-CUDA version ist the smaller download.

MonikaBarget commented 1 month ago

@MonikaBarget The error points to the fact that your hardware probably supports CUDA but you downloaded the non-CUDA version of noScribe. CUDA is a technology from NVIDIA that uses your graphics card to accelerate certain AI-related functions. It can save you a lot of time in noScribe. I would suggest installing the CUDA-enabled version of noScribe and reverting the settings in config.yml back to pyannote_xpu: cpu.

I'm actually thinking about ditching the non-CUDA version altogether to avoid this error once and for all. The only advantage of the non-CUDA version ist the smaller download.

I have constant issues with storage on my work machine, which is, indeed, why I opted for the smaller download. I have asked our research software engineer, however, if there's an option to host noScribe on our Data Science Research Infrastructure.

kaixxx commented 1 month ago

@MonikaBarget OK, I understand. A client-server version of noScribe is in the making but not finished yet.

Odrec commented 1 month ago

@MonikaBarget OK, I understand. A client-server version of noScribe is in the making but not finished yet.

That sounds great!

kaixxx commented 1 month ago

@MonikaBarget Could you do me a favor? I've implemented a better CUDA-detection (hopefully). Problem is, I cannot really test it because I don't have a NVIDIA graphics card. It would be great if you could perfom the following steps:

kaixxx commented 1 month ago

@MonikaBarget Please wait a moment with your test. It seems that just swapping the exe doesn't work. I will compile a new installer. It's an automated process so no big deal, but it takes a while.

MonikaBarget commented 1 month ago

@MonikaBarget Please wait a moment with your test. It seems that just swapping the exe doesn't work. I will compile a new installer. It's an automated process so no big deal, but it takes a while.

I will try it tomorrow! I am just running a transcription on a dictation and don't want to interrupt it now.

kaixxx commented 1 month ago

@MonikaBarget Ok, the new installer finished uploading: https://drive.switch.ch/index.php/s/0h0TU8ey55P7Nm8

MonikaBarget commented 1 month ago

@MonikaBarget Ok, the new installer finished uploading: https://drive.switch.ch/index.php/s/0h0TU8ey55P7Nm8

* Install the new version

* Delete or rename the config.yml

* Start noScribe, let it perfom a (short) transcription and close it again.

* If everything works fine, a new config.yml should be created with the options for 'pyannote_xpu' and 'whisper_xpu' both set to 'cpu'.

It worked! See my post in the MAC thread.

kaixxx commented 1 month ago

@MonikaBarget Perfect, thank you for testing. I will now integrate this into the official installer.