FieldCure.DocumentParsers.Audio 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FieldCure.DocumentParsers.Audio --version 0.2.0
                    
NuGet\Install-Package FieldCure.DocumentParsers.Audio -Version 0.2.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="FieldCure.DocumentParsers.Audio" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.DocumentParsers.Audio" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="FieldCure.DocumentParsers.Audio" />
                    
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 FieldCure.DocumentParsers.Audio --version 0.2.0
                    
#r "nuget: FieldCure.DocumentParsers.Audio, 0.2.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 FieldCure.DocumentParsers.Audio@0.2.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=FieldCure.DocumentParsers.Audio&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=FieldCure.DocumentParsers.Audio&version=0.2.0
                    
Install as a Cake Tool

FieldCure.DocumentParsers.Audio

Audio transcription support for FieldCure.DocumentParsers.

This package adds an IDocumentParser for .mp3, .wav, .m4a, .ogg, .flac, and .webm files. Audio is converted to 16 kHz mono PCM WAV with NAudio, then transcribed with Whisper.net into timestamped Markdown for RAG pipelines.

Install

dotnet add package FieldCure.DocumentParsers.Audio

Usage

using FieldCure.DocumentParsers;
using FieldCure.DocumentParsers.Audio;

await using var transcriber = DocumentParserFactoryAudioExtensions.AddAudioSupport();

var parser = DocumentParserFactory.GetParser(".mp3")!;
var markdown = parser.ExtractText(File.ReadAllBytes("meeting.mp3"));

For explicit options, instantiate AudioDocumentParser directly:

var parser = new AudioDocumentParser();
var markdown = parser.ExtractText(
    File.ReadAllBytes("meeting.m4a"),
    new AudioExtractionOptions
    {
        SourceExtension = ".m4a",
        Language = "ko",
        ModelSize = WhisperModelSize.Base,
        IncludeTimestamps = true
    });

Set ModelPath to use a pre-downloaded ggml model. Otherwise the default model provider downloads the selected model from Hugging Face on first use and caches it under {UserProfile}/.fieldcure/whisper-models/.

Lifecycle

WhisperTranscriber caches the underlying WhisperFactory for the model path in use, so it holds native resources for as long as it lives. Dispose it once at application shutdown:

// Startup
var transcriber = DocumentParserFactoryAudioExtensions.AddAudioSupport();

// Shutdown
await transcriber.DisposeAsync();

When you construct AudioDocumentParser() with no arguments it owns its transcriber, and await using on the parser disposes it for you.

Runtime selection (CUDA / Vulkan / CPU)

Whisper.net resolves the native runtime through process-global state (Whisper.net.LibraryLoader.RuntimeOptions.RuntimeLibraryOrder). To override the default CUDA → Vulkan → CPU order, set it once at startup rather than per call:

using Whisper.net.LibraryLoader;

// App startup
RuntimeOptions.RuntimeLibraryOrder = [RuntimeLibrary.Cpu];

AudioExtractionOptions.RuntimeLibraryOrder writes to the same global, which is convenient for one-off configuration but is last-writer-wins under concurrent calls.

Notes

  • The package is Windows-only in v0.1.0 because audio decoding uses NAudio's Media Foundation path for several containers.
  • The ggml model is downloaded at runtime; it is not included in the NuGet package.
  • For tests or cloud transcription, inject a custom IAudioTranscriber.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.4.0 113 4/29/2026
0.3.1 107 4/28/2026
0.3.0 99 4/28/2026
0.2.2 100 4/27/2026
0.2.1 99 4/27/2026
0.2.0 95 4/27/2026
0.1.0 104 4/26/2026

v0.2.0 - Adds WhisperEnvironment for environment-aware Whisper model size recommendation (Tiny→Large) based on detected GPU/RAM/cores, plus AudioExtractionOptions.WithModelSize for partial overrides. No breaking changes.