VoiceToText.Vosk 0.1.0

dotnet add package VoiceToText.Vosk --version 0.1.0
                    
NuGet\Install-Package VoiceToText.Vosk -Version 0.1.0
                    
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="VoiceToText.Vosk" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VoiceToText.Vosk" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="VoiceToText.Vosk" />
                    
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 VoiceToText.Vosk --version 0.1.0
                    
#r "nuget: VoiceToText.Vosk, 0.1.0"
                    
#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 VoiceToText.Vosk@0.1.0
                    
#: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=VoiceToText.Vosk&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=VoiceToText.Vosk&version=0.1.0
                    
Install as a Cake Tool

VoiceToText

Build NuGet License: MIT

A C# speech-to-text library with a provider abstraction layer. Supports multiple STT backends through a common interface, designed for reuse across transcribers, Unity games, desktop apps, and more.

Packages

Package Description
VoiceToText Core abstractions (zero STT dependencies)
VoiceToText.Vosk Vosk provider — true streaming, lightweight, sub-second latency
VoiceToText.Whisper Whisper.net provider — best accuracy, batch model (streaming simulated with 2-3s buffer)
VoiceToText.Audio.NAudio Windows microphone capture via NAudio

Prerequisites

Usage

Register services

services.AddVoiceToText()
    .AddVoskRecognizer(opts => opts.ModelPath = "models/vosk-model-small-en-us")
    .AddNAudioMicrophone();

Batch transcription

await using var recognizer = serviceProvider.GetRequiredService<ISpeechRecognizer>();
await using var stream = File.OpenRead("audio.wav");
var result = await recognizer.TranscribeAsync(stream);
Console.WriteLine(result.Text);

Real-time streaming

var streaming = serviceProvider.GetRequiredService<IStreamingRecognizer>();
streaming.FinalResultReceived += (_, e) => Console.WriteLine(e.Text);
await streaming.StartAsync();
// Push audio chunks...
await streaming.StopAsync();

Console Sample

The included console sample supports file transcription and live microphone input.

# Transcribe a WAV file (defaults to Whisper)
dotnet run --project samples/VoiceToText.Samples.Console -- hello-world.wav

# Live microphone with Vosk
dotnet run --project samples/VoiceToText.Samples.Console -- --mic --vosk --model vosk-model-small-en-us-0.15

# Live microphone with Whisper (default)
dotnet run --project samples/VoiceToText.Samples.Console -- --mic

Options:

Flag Description
--mic Live microphone streaming (Windows only)
--vosk Use Vosk provider
--whisper Use Whisper provider (default)
--model <path> Path to model file (.bin) or directory

Project Structure

src/
  VoiceToText/                    Core abstractions (zero STT dependencies)
  VoiceToText.Vosk/               Vosk provider (true streaming)
  VoiceToText.Whisper/            Whisper.net provider (batch, best accuracy)
  VoiceToText.Audio.NAudio/       Windows microphone capture
samples/
  VoiceToText.Samples.Console/    Push-to-talk console demo
tests/
  VoiceToText.Tests/              Unit tests (26 tests)

Architecture

Core Interfaces

  • ISpeechRecognizer — batch/file transcription (TranscribeAsync, TranscribeSegmentsAsync)
  • IStreamingRecognizer — real-time streaming with PushAudio() + PartialResultReceived/FinalResultReceived events
  • IAudioSource — audio input abstraction (microphone, file) with DataAvailable event

Audio Pipeline

All audio is normalized to 16kHz mono 16-bit PCM. The AudioFormatConverter utility handles stereo-to-mono, resampling, and PCM/float conversion.

Target Frameworks

  • net10.0 — primary target
  • netstandard2.1 — Unity 2021+ and broad compatibility

Building

dotnet build
dotnet test
dotnet pack    # produces 4 .nupkg files

Contributing

Feature branches off main. PRs welcome.

License

MIT

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 is compatible.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 88 3/12/2026