System.Exception: 'Failed to load native whisper library.'
See original GitHub issueHI,
I have been trying to run this code, but I keep getting this error message: System.Exception: ‘Failed to load native whisper library.’
` using System; using System.IO; using System.Threading.Tasks; using System.Windows.Forms; using CommandLine; using Whisper.net; using Whisper.net.Ggml; using Whisper.net.Wave;
namespace NameSpace { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private async void button1_Click(object sender, EventArgs e)
{
await Parser.Default.ParseArguments<object>(new string[] { })
.WithParsedAsync(this.Demo);
}
string modelName = "ggml-base.bin";
string filename = "1min.wav";
async Task Demo(object opt)
{
if (!File.Exists(modelName))
{
Console.WriteLine($"Downloading Model ggml-base.bin");
var modelStream = await WhisperGgmlDownloader.GetGgmlModelAsync(GgmlType.BaseEn);
var fileWriter = File.OpenWrite(modelName);
await modelStream.CopyToAsync(fileWriter);
}
FullDetection();
}
void FullDetection()
{
var processor = WhisperProcessorBuilder.Create()
.WithSegmentEventHandler(OnNewSegment)
.WithFileModel(modelName)
.WithTranslate()
.WithLanguage("auto")
.Build();
void OnNewSegment(object sender, OnSegmentEventArgs e)
{
Console.WriteLine($"CSSS {e.Start} ==> {e.End} : {e.Segment}");
}
var fileStream = File.OpenRead(filename);
processor.Process(fileStream);
}
}
}
`
Issue Analytics
- State:
- Created 7 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
RuntimeError: Failed to load audio: dyld[58520]: Library not ...
I notice now that if I run ffmpeg --version I also get an error: dyld[59959]: Library not loaded: /opt/homebrew/opt/rav1e/lib/librav1e.0.5.dylib ...
Read more >Failed to load native whisper library. #11 - bytemeta
When trying to build the WhisperProcessor I get the following error: 'Failed to load native whisper library.' image I am using Windows 11...
Read more >Why do I have error loading native librarieswhen ...
I have this error: System.IO.FileNotFoundException: 'Error loading native library. Not found in any of the possible locations: ...
Read more >Faster Whisper: Could not load library cudnn - Beginners
Hi there, I've installed Whisper from OpenAI and it works. I then installed Faster Whisper, it worked, and then tried WhisperX, ...
Read more >Speech-to-Text with OpenAI's Whisper
OpenAI has recently released a new speech recognition model called Whisper. Unlike DALLE-2 and GPT-3, Whisper is a free and open-source model.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It fixed, Really do not know how, Now I got a new error message:
The program ‘[6796] WinFormsApp2.exe’ has exited with code -1073741795 (0xc000001d) ‘Illegal Instruction’.
You can also try with version 1.2.1 where the loader is throwing different exceptions for library not found or library couldn’t be loaded.
https://www.nuget.org/packages/Whisper.net/1.2.1-preview1#versions-body-tab
Usage changed a bit as well (now you need to create a WhisperFactory in order to get the builder). The reason is that WhisperFactory can be shared across multiple threads and the model will be loaded only once.
You can see updated usage here: https://github.com/sandrohanea/whisper.net/tree/release/1.2.1-pre#usage