sandrohanea / whisper.net

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

Could not able to compile and build while trying to integrate in .net framework project 4.7.2 #69

Closed zulfiker closed 1 year ago

zulfiker commented 1 year ago

Hello there . Greeting

I have a desktop application in which i am trying to integrate whisper .net library . The project is based on .net framework 4.7.2 and WPF . Visual studio 2019 is used

After adding the project from nugget when i try to add sample code in the project in the following line i get an compilation error .

await foreach (var result in processor.ProcessAsync(fileStream))
            {
                Console.WriteLine($"{result.Start}->{result.End}: {result.Text}");
            }

The error is The type 'IAsyncEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

after doing some research i found that IAsyncEnumerable is part of .net core sdk . to use it for framework version i need to use Microsoft.Bcl.AsyncInterfaces package . even after installing it the error is still there . i have also .net core installed in the sytem and also tried with chaning c# language version from 7.3 to 8.0 . error is still there

I have successfully build sample project which is based on .net core .

So my question is , is this library .net framework compatible or .net core is must ?

sandrohanea commented 1 year ago

Hello @zulfiker ,

NetFramework is supported as shown in: https://github.com/sandrohanea/whisper.net/blob/a6ef6265aa734d796f4cf76a504c5285a87ac839/examples/Simple/Simple.csproj#LL5C3-L5C56

This is supported with netstandard2.0 and as shown here, for this you'll have 2 transient dependencies:

sandrohanea commented 1 year ago

Closing due to inactivity ,netframework 4.7.2 is supported and tested.