sandrohanea / whisper.net

Whisper.net. Speech to text made simple using Whisper Models
MIT License
505 stars 77 forks source link

How to build runtime dll #191

Open baaj2109 opened 2 months ago

baaj2109 commented 2 months ago

Hello, I tried adding additional methods in whisper.cpp to obtain more information. I entered the command cmake -B ./build in whisper.cpp, obtained the ALL_INSTALL project, compiled it to get whisper.dll. After replacing this dll with the dll in whisper.net.runtime, whenever I call the method:

public IntPtr LoadNativeContext()
{
    return NativeMethods.whisper_init_from_file_with_params_no_state(pathModel, new WhisperContextParams() { UseGpu = useGpu ? (byte)1 : (byte)0 });
}

I got the exception:

Exception thrown at 0x00007FFE6D4405A7 (whisper.dll) in Whisper.net.Demo.exe: 0xC0000005: Access violation reading location 0x0000000000000001.

Could you share how you created the runtime dll? Thank you