Whisper.net 1.2.1-preview4

This is a prerelease version of Whisper.net.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Whisper.net --version 1.2.1-preview4
                    
NuGet\Install-Package Whisper.net -Version 1.2.1-preview4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Whisper.net" Version="1.2.1-preview4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Whisper.net" Version="1.2.1-preview4" />
                    
Directory.Packages.props
<PackageReference Include="Whisper.net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Whisper.net --version 1.2.1-preview4
                    
#r "nuget: Whisper.net, 1.2.1-preview4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Whisper.net@1.2.1-preview4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Whisper.net&version=1.2.1-preview4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Whisper.net&version=1.2.1-preview4&prerelease
                    
Install as a Cake Tool

Whisper.net

Open-Source Whisper.net

Dotnet bindings for OpenAI Whisper made possible by [whisper.cpp] (https://github.com/ggerganov/whisper.cpp)

Getting started

To install Whisper.net, run the following command in the Package Manager Console:

PM> Install-Package Whisper.net

or simply add a package reference in your csproj:

        <PackageReference Include="Whisper.net" Version="1.2.1-preview4" />

Versioning

Each version of Whisper.net is tied to a specific version of Whisper.cpp. The version of Whisper.net is the same as the version of Whisper it is based on. For example, Whisper.net 1.2.0 is based on Whisper 1.2.0.

However, there can be cases where Whisper.net patch version is incremented without a corresponding Whisper.cpp version change. This is the case when the changes in Whisper.net are not related to the changes in Whisper.cpp.

Ggml Models

Whisper.net uses Ggml models to perform speech recognition and translation.

You can find more about Ggml models here

Also, for easier integration Whisper.net provides a Downloader which is using https://huggingface.co.


    var modelName = "ggml-base.bin";
    if (!File.Exists(modelName))
    {
        using var modelStream = await WhisperGgmlDownloader.GetGgmlModelAsync(GgmlType.Base);
        using var fileWriter = File.OpenWrite(modelName);
        await modelStream.CopyToAsync(fileWriter);
    }

Usage


    using var whisperFactory = WhisperFactory.FromPath("ggml-base.bin");

    using var processor = whisperFactory.CreateBuilder()
        .WithSegmentEventHandler(OnNewSegment)
        .WithFileModel("ggml-base.bin")
        .WithTranslate()
        .WithLanguage("auto")
        .Build();

    void OnNewSegment(object sender, OnSegmentEventArgs e)
    {
        Console.WriteLine($"CSSS {e.Start} ==> {e.End} : {e.Segment}");
    }

    using var fileStream = File.OpenRead("yourAudio.wav");
    processor.Process()

Documentation

You can find the documentation and code samples here: https://github.com/sandrohanea/whisper.net

License

MIT Licence https://github.com/sandrohanea/whisper.net/blob/main/LICENSE

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (15)

Showing the top 5 NuGet packages that depend on Whisper.net:

Package Downloads
LangChain.Providers.WhisperNet

OpenAI Whisper STT Provider using Whisper.Net library

OpenF1.Data

Package Description

VolcanicArts.VRCOSC.SDK

VRCOSC's SDK for developing VRCOSC modules

Whisper.net.AllRuntimes

Whisper.net.Runtime.Cuda contains the native runtime libraries to enable Whisper on .NET with Whisper.net and GPU support (Cuda)

fAI

Fred's experimentation with AI

GitHub repositories (6)

Showing the top 6 popular GitHub repositories that depend on Whisper.net:

Repository Stars
SciSharp/LLamaSharp
A C#/.NET library to run LLM (🦙LLaMA/LLaVA) on your local device efficiently.
SciSharp/BotSharp
AI Multi-Agent Framework in .NET
umlx5h/LLPlayer
The media player for language learning, with dual subtitles, AI-generated subtitles, real-time translation, and more!
fagenorn/handcrafted-persona-engine
An AI-powered interactive avatar engine using Live2D, LLM, ASR, TTS, and RVC. Ideal for VTubing, streaming, and virtual assistant applications.
JustAman62/undercut-f1
F1 Live Timing TUI for all F1 sessions with variable delay to sync to your TV. Supports replaying previously recorded sessions.
VolcanicArts/VRCOSC
Modular OSC program creator, toolkit, and router made for VRChat. Show your heartrate, time, hardware stats, speech to text, control Spotify, and more! Includes drag-and-drop prefabs for your avatar.
Version Downloads Last Updated
1.8.1 24,000 3/30/2025
1.8.0 405 3/29/2025
1.7.5-preview1 368 3/4/2025
1.7.4 18,327 12/26/2024
1.7.3 2,688 12/1/2024
1.7.3-preview2 153 11/29/2024
1.7.3-preview1 169 11/28/2024
1.7.2 6,461 11/10/2024
1.7.2-preview3 231 11/5/2024
1.7.2-preview2 200 10/31/2024
1.7.2-preview1 166 10/27/2024
1.7.1 2,961 10/17/2024
1.7.1-preview1 165 10/14/2024
1.7.0 1,799 10/7/2024
1.5.0 56,032 11/25/2023
1.4.7 5,820 9/2/2023
1.4.6 3,029 7/2/2023
1.4.5 913 6/19/2023
1.4.4 325 6/18/2023
1.4.3 1,207 5/27/2023
1.4.2 455 5/20/2023
1.4.0 1,099 5/1/2023
1.3.0 640 4/29/2023
1.2.2 1,541 3/26/2023
1.2.1 953 2/21/2023
1.2.1-preview4 250 2/16/2023
1.2.1-preview3 194 2/16/2023
1.2.1-preview2 249 2/14/2023
1.2.1-preview1 238 2/14/2023
1.2.0 3,351 2/4/2023