tigros/Whisperer

Immediate crash using Intel's Arc card - A380

Closed this issue · 35 comments

Hello.

I was looking for a batch processing mode of Whisper https://github.com/Const-me/Whisper and I think this is the app here. proposed by the developer.

Unfortunately, it crashes immediately with the attached pop-up message using my Intel Arc A380 6GB VRAM card (latest drivers - Latest Win 11 Pro all updates):
Intel Arc crash

  1. Is it possible to fix it ?

  2. I'm looking forward to batch processing of one by one file, not as many as possible at the same time.

Does this app support this mode ?
Is it possible to add it ?

Thank you.

tigros commented

Hi,

Can you run these commands from cmd and paste results?

reg query hklm\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318} /f 00* /k
reg query hklm\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000 /v HardwareInformation*
reg query hklm\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0001 /v HardwareInformation*

Also please run attached program in cmd and paste that too.
printgpu.zip

Thanks

I hope it's clear.

Intel

And this is the result of the same commands and program for Skylake iGPU - HD 530

Whisperer crashed with the same output.

Intel2

tigros commented

Hi,

I would complain to Intel for not having HardwareInformation.qwMemorySize, they should've put that!

I'm looking for alternative but it's not easy to find so far. Will keep looking.

tigros commented

ok please try attached whisperer.exe.

also in cmd please paste result of included GPUmembyproc.exe

Whisperer.zip

I will post to Intel's forum regarding the Memory size.

Using HD 530 I got an Unhandled exception of .NET Framework but after pressing "Continue" the program seems to work.

GPUmembyproc.exe returns 0

The whole exception is here:
image

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at whisperer.Form1.toproper(String s)
at whisperer.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

whisperer
Assembly Version: 2.8.0.0
Win32 Version: 2.8.0.0
CodeBase: file:///C:/various_progs/Whisper/Whisperer/whisperer.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

ObjectListView
Assembly Version: 2.9.1.1072
Win32 Version: 2.9.1.0
CodeBase: file:///C:/various_progs/Whisper/Whisperer/ObjectListView.DLL

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

tigros commented

i guess the error is because the saved lang in the registry was blank, because of earlier crash..

you need to try this on arc PC, intel HD not expected to work.

OK, I'll try it and post again here with A380

What is the saved lang in the registry ?

tigros commented

data saved in the registry here:

reg query hkcu\SOFTWARE\tigros\whisperer

includes language.

Right.
I deleted the registry folder "tigros" and re-run the program with no .NET complaints

Using HD 530 and model "ggml-medium.en.bin" it crashes with memory complaints, although I have selected 1 files max

I can use HD 530 with WhisperDesktop v1.12 and ggml-medium.en.bin with no problem as iGPU leverages up to 4GB of my RAM

Screenshot 2023-09-18 065528

tigros commented

I was able to fix things on my mom's new AMD laptop because I had access to it via teamviewer, no access to intel HD to troubleshoot.

Please try Arc PC, that's the big question.

Everything looks fine with Arc.
Here is the output of GPUmem.
image

A few issues regarding the first few minutes with the app:

  1. It doesn't have a progress bar or anything else to report what is going on with the process during runtime.

I can only see the number of "Completed" files changing.

  1. It doesn't keep user's preferences like:

a) "same as input folder"
b) Number of files "max at once"

Haven't tried the other options yet.

I guess the other thing I asked for regarding processing one file only can be done by selecting "max at once" just 1 file.

tigros commented

yes you can set max at once to 1.

some have asked about progress bar before, nope can't do it, the way to know it's working is the Go button says Cancel instead.

I guess I will put a v2.9 soon, hopefully keeps working with other setups.

OK.

And what about keeping user prefs ?

Also, since you are using WhisperDesktop for GPU transcribing, what preferences this app Whisperer use for GPU advanced options ?

I mean "Compute shaders" and "Reshaped matrix multiply" as WhisperDesktop says in the app.

tigros commented

ok i'll add the 2 prefs since it's easy to do.

it uses main.exe not whisperdesktop, if you type main.exe in cmd you'll see what's available.

It would be useful to add as many user prefs as you can, like:
"srt", "txt", "vtt". "when done", "skip if output exists", "translate to english" etc

You get the idea.

Also, if progress bar is not possible, maybe a total processing time after batch job is done.
A total completion time.

Another helpful addition would be to provide a Windows explorer pop-up selection when the user clicks on the path selection of the "Model path" and "Output dir"

It's an unusual trouble to copy paste the path from Windows explorer to the app.

tigros commented

ya maybe a clock showing elapsed time i guess so some kind of movement

What is main.exe ?

Does it support word level timestamps ?

It seems that is uses the same model ggml-medium.en.bin differently than WhisperDesktop.

It produces different results using the same input file.

Also, it doesn't expose those options I mentioned before.

Does it work with ggml-large-v1.bin and ggml-large.bin (v2) models ?

tigros commented

main.exe is command line interface or cli.

v1, v2 should work.

to add more options you'd have to ask in Const-me repo.

Yes, I found everything and doing some tests and benchmarks.

It seems that the cli version of WindowsDesktop the cli.zip has a different version of whisper.dll inside the cli.zip than the one you are using for Whisperer.
The latest Whisper.dll file is inside the cli.zip, the library.zip and the WindowsDesktop.zip

Have you seen that ?

Also, I compared apples with oranges when I said in the previous post that for the same input, Whisperer and WhisperDesktop are producing different results.
Yes, they are because I used different model (medium.en vs large-v1).
Using the same model they both produce the same result for the same input.

Last one for now, when I posted before regarding the path and an easier way to select it, I mean something like the "Pick files" button you have already implemented.

I tried both large-v1 and large (v2) and they work fine indeed.
Large (v2) is a little slower and probably more accurate.

tigros commented

thanks for letting me know about newer version.

Please try this, tell me if anything missing before i commit.

Thanks.

Whisperer.zip

UPDATED! (Second time)

You fixed everything in no time, awesome!

A few more things to add before commit:

  1. When I pick the files and they are included in the app, they should also automatically be selected, all of them. No manual selection should be necessary.

  2. The list with the included files should remain like the other user prefs between different runs...If someone wants to delete the list, you already provide the "Clear" button

  3. When I use the "max at once" as 1 by 1 file processing, when the first one completes I see the button from "cancel" changing to "Go" although the batch processing hasn't completed yet. I think it's a bug.

  4. Also, the "Elapsed time" stops when the first file is completed, like the "Cancel" button and not the whole process, which is still running. It should report the whole elapsed time.

tigros commented

3, 4 you have to multi-select, use ctrl-a to select all, or hold shift+click to select range, or ctrl+click to multi-select individually, there's a count next to the max at once.

I have updated my list above with different numbering and content!

I think you replied to the previous one.

tigros commented

3 and 4 what is count next to max at once? if it's 1 / ... then you aren't multi-selecting.

here's one to try.

Whisperer.zip

It's better to reproduce it by your side.

I have selected multiple files and "max at once" just 1.

After the first completion, the batch process is still running but the button from "Cancel" changes to "Go" and the elapse time stops.
The process of course is still running.

All these insights are referring to the previous version.

I'm outside the house right now and I can't test the last version. Give me two hours and I will report back again.

tigros commented

maybe the srt's exist so getting skipped? in that case just uncheck the "skip if exists"

No the folder is clear.

Last time I did the test, I was using just two files.

Try just two files and see if you can replicate the issue.

tigros commented

it would be quite odd looking at the code, no i can't reproduce.

there was a bug in last one, use this one.

Whisperer.zip

The first two additions are working like a charm.

Regarding 3, 4 issues I managed to reproduce the bug which has slightly changed its behavior:

  1. If you have selected the default option "Skip if output exists" everything works fine

  2. If you uncheck "skip if output exists" try to create or let the program create a new clean folder and select it as output folder.

  3. With the above option "skip if output exists" unchecked, add two files and set the "max at once" to 1

  4. After the completion of the processing, close the app and open the folder of the output deleting all .srt files

  5. Open again the app without clearing the files added and without changing anything run the task again.

  6. At the end you will see the "Completed" figure saying 1 instead of 2 (the app transcribes successfully both files) and if you go to the output folder you will find both .srt files and one wav which shouldn't be there.

Probably this is the reason which says "Completed" 1 instead of 2.

Elapsed time works now in all cases and the button never changes to "Go" during processing .

I had to delete the whole "tigros" folder in registry and start from the beginning to have this output which is close to perfect.

tigros commented

it's weird you had a left over wav file, not sure what happened there, still can't reproduce.

i need to test this on my mother's laptop, probably broken for integrated GPU, that will be later tonight.

You have to leave both "Skip if output exists" and "Same as input folder" unchecked.
And create a new, clean output folder.

If you can't reproduce the weird behavior, never mind.

I think it's better to release the new version, it will have a lot of changes worth checking for all, along with Intel's Arc support.

Thanks for the additions and the batch processing app.

tigros commented

it's possible you closed/reopened the app without realizing there was a main.exe still running, when you cancel or close it doesn't kill main.exe, you could use task manager and look for main.exe. So beware of that. Also that is something that could leave wav's behind.

I've tested on mom's PC, all good, I may have fixed for intel HD too. Please run included GPUmembyproc.exe on your Intel PC and paste results.

Thanks.
Whisperer.zip

Hi.

The main wasn't running because I've been waiting for the app to produce two .srt files.
So, when everything completed there were two .srt files and one .wav.

Anyway, next time I'll try to record a video and upload it.

The last version runs flawlessly with my Intel iGPU HD 530, reporting the proper GPU VRAM of 4GB.

All clear to unleash the beast.

tigros commented

ok v2.9 released https://github.com/tigros/Whisperer/releases/tag/2.9

Thanks for all your work!