ElBruno.S1Mini 0.1.0

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

ElBruno.S1Mini

NuGet NuGet Downloads CI Build Publish to NuGet License: MIT HuggingFace .NET GitHub stars

Local ASR transcript normalizer for .NET ๐Ÿงน

Clean raw speech-to-text transcripts into well-formed written text in .NET. Powered by superwhisper/s1-mini (a 0.6B Qwen3 fine-tune) running locally via ONNX Runtime GenAI. Auto-downloads the INT4 ONNX model from HuggingFace.

โš ๏ธ s1-mini is not a chat model. It performs exactly one task โ€” normalizing an ASR transcript. Give it anything else and you get unpredictable output.

Packages

Package NuGet Downloads Description
ElBruno.S1Mini NuGet NuGet Downloads Self-contained transcript normalizer with S1MiniClient (IChatClient) and TranscriptNormalizer.

Features

  • ๐Ÿงน Filler removal + punctuation + capitalization in one call
  • ๐Ÿ” Self-correction resolution โ€” "nine am no sorry ten thirty" becomes 10:30
  • ๐Ÿ”ข Written form for spoken numbers, dates, times, currency, emails
  • ๐ŸŽš๏ธ Control-line settings โ€” Styling (formal / semi-formal / casual) and Context (general / email) with empirically verified behavior
  • ๐Ÿ“ฆ Auto-download โ€” INT4 ONNX model fetched from HuggingFace on first use
  • ๐Ÿงต IChatClient compatible โ€” S1MiniClient plugs into Microsoft.Extensions.AI
  • ๐Ÿ’‰ DI-friendly โ€” AddTranscriptNormalizer() for ASP.NET Core
  • ๐Ÿช Chunking helper โ€” NormalizeChunkedAsync for transcripts longer than the ~1,000-token recommended input
  • ๐Ÿ›‘ Empty-in / empty-out โ€” pure filler returns string.Empty, as the model card documents
  • ๐Ÿฆบ Temperature-0 safe โ€” the ORT-GenAI native divide-by-zero trap is guarded at the runtime layer so callers can always use greedy decoding

Installation

dotnet add package ElBruno.S1Mini

Quick Start

using ElBruno.S1Mini.Normalization;

// Downloads elbruno/s1-mini-onnx (int4) on first run.
using var normalizer = await TranscriptNormalizer.CreateAsync();

var cleaned = await normalizer.NormalizeAsync(
    "so um i need to like send the the report by uh friday no wait make that thursday");

Console.WriteLine(cleaned);
// So I need to send the report by Thursday.

Control-line options

using ElBruno.S1Mini.Normalization;

var cleaned = await normalizer.NormalizeAsync(
    transcript,
    new TranscriptNormalizerOptions
    {
        Styling = TranscriptStyling.Formal,
        Context = TranscriptContext.Email,
    });

Empirically verified against the real INT4 model:

  • Styling: SemiFormal (default), Formal, Casual โ€” all three produce distinct output.
  • Structure: Prose (default), Lists โ€” caveat: Lists did not reliably produce Markdown bullets in testing; output stayed prose. Kept as a model-card value.
  • Context: General (default), Email โ€” distinct. Message and Notes are accepted but empirically behave identically to General; kept for API completeness.

See docs/transcript-normalization.md for the full behavior table and before/after examples.

Dependency Injection

using ElBruno.S1Mini;

builder.Services.AddTranscriptNormalizer(options =>
{
    options.CacheDirectory = @"C:\models";
});

TranscriptNormalizer is registered as its own service type โ€” not as IChatClient. s1-mini is not a chat model, and exposing it as one would mislead consumers expecting chat semantics.

Compose with any IChatClient

TranscriptNormalizer is a control-line + prompt-builder layer over any IChatClient. Supply your own client (as long as it is really pointed at s1-mini):

using ElBruno.S1Mini;
using ElBruno.S1Mini.Normalization;

using var chatClient = await S1MiniClient.CreateAsync();
using var normalizer = new TranscriptNormalizer(chatClient);

S1MiniClient also implements IChatClient directly, so you can plug it into any Microsoft.Extensions.AI pipeline โ€” with the caveat that it only handles the exact prompt shape s1-mini was fine-tuned on.

Chunking long transcripts

var cleaned = await normalizer.NormalizeChunkedAsync(longTranscript, maxCharsPerChunk: 3500);

Each chunk is normalized statelessly at sentence boundaries; for tighter control on transcripts with context spanning boundaries, chunk manually at a natural pause instead.

FP16 is currently broken on CPU

elbruno/s1-mini-onnx also has an fp16/ subfolder, but that variant fails at inference on CPU with onnxruntime-genai 0.15.1 (upstream ORT GQA repeat_kv Reshape shape-mismatch bug). Use INT4 (the default). This library will not switch to FP16 automatically.

Model license

superwhisper/s1-mini is Apache-2.0 with a naming clause. The converted ONNX artifacts (elbruno/s1-mini-onnx) are an explicitly unofficial, unaffiliated, non-endorsed derivative. ElBruno.S1Mini's C# code is MIT; the downloaded model weights remain under the upstream Apache-2.0 license. Vendor quality claim: 94.8% token accuracy on 7,519 held-out English cases (Superwhisper's measurement, not independently re-verified here). English only, v1.

Building from Source

git clone https://github.com/elbruno/ElBruno.S1Mini
cd ElBruno.S1Mini
dotnet build ElBruno.S1Mini.slnx
dotnet test ElBruno.S1Mini.slnx --framework net8.0

What's New

  • ๐ŸŽ‰ v0.1.0 โ€” Initial release: TranscriptNormalizer API with styling/structure/context control line, chunking helper, and DI extension.
  • ๐Ÿงต S1MiniClient โ€” self-contained IChatClient implementation with automatic HuggingFace download of elbruno/s1-mini-onnx (int4).
  • ๐Ÿงช Qwen3 non-thinking prompt format โ€” ported verbatim from the model's own chat_template.jinja, verified byte-for-byte against the real model.
  • ๐Ÿฆบ ORT-GenAI temperature-0 crash guard โ€” the native temperature=0 divide-by-zero trap is guarded at the runtime layer; greedy decoding is safe for every call.
  • ๐Ÿ”ฌ Empirically-verified control-line documentation โ€” enum XML docs and README table reflect what the real INT4 model actually does, including the lists / message / notes caveats.

Documentation

Samples

Sample Description
HelloS1Mini Console sample covering default normalization, Context.Email, Structure.Lists, and pure-filler input.

Testing

dotnet test ElBruno.S1Mini.slnx --framework net8.0

Tests use a fake IChatClient and a recording IGenerationSearchOptions seam โ€” no model downloads, no network, no GPU required.

๐Ÿ“„ License

MIT โ€” see LICENSE. The downloaded s1-mini model weights are Apache-2.0 (upstream), not MIT.

๐Ÿ™ Acknowledgments

๐Ÿ‘‹ About the Author

Hi! I'm ElBruno ๐Ÿงก, a passionate developer and content creator exploring AI, .NET, and modern development practices.

Made with โค๏ธ by ElBruno

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.2.1 174 10/21/2026
0.2.0 114 10/20/2026
0.1.2 191 8/21/2026
0.1.1 142 8/20/2026
0.1.0 145 8/20/2026