VoiceToText.Audio.NAudio
0.1.0
dotnet add package VoiceToText.Audio.NAudio --version 0.1.0
NuGet\Install-Package VoiceToText.Audio.NAudio -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.Audio.NAudio" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VoiceToText.Audio.NAudio" Version="0.1.0" />
<PackageReference Include="VoiceToText.Audio.NAudio" />
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.Audio.NAudio --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VoiceToText.Audio.NAudio, 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.Audio.NAudio@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.Audio.NAudio&version=0.1.0
#tool nuget:?package=VoiceToText.Audio.NAudio&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
VoiceToText
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
- .NET 10 SDK (10.0.100 or later)
- A speech model — Whisper models auto-download; Vosk models must be downloaded manually
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 withPushAudio()+PartialResultReceived/FinalResultReceivedeventsIAudioSource— audio input abstraction (microphone, file) withDataAvailableevent
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 targetnetstandard2.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
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- NAudio (>= 2.2.1)
- VoiceToText (>= 0.1.0)
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 | 92 | 3/12/2026 |