Article
Running live speech-to-text with Foundry Local and C#
Microsoft's .NET Blog introduced a C# sample that uses Foundry Local to transcribe microphone audio in real time. The post shows how local AI in .NET can move beyond chat and into on-device speech recognition.
Share
Koharu's reading tip
The sample brings together model acquisition, loading, live sessions, and microphone streaming in one C# app. Before trying it, check the Windows-specific parts and the version differences across the blog, docs, and sample repository.

Foundry Local and C# implement live speech-to-text
On August 4, 2026, Microsoft published a .NET Blog post showing how to build a C# console app that transcribes microphone audio in real time with Foundry Local. The sample centers on Microsoft.AI.Foundry.Local.WinML, NAudio, and the Foundry Local catalog model nemotron-speech-streaming-en-0.6b.
According to the primary source, the app initializes Foundry Local, resolves and downloads a speech model, loads it, creates a live transcription session, and streams 16-kHz, 16-bit, mono PCM audio into that session. The app receives both interim results while the user speaks and final results after an utterance completes. That makes the post a concrete example of local AI in .NET beyond chat.
For background, Microsoft Learn describes Foundry Local as a local AI solution with SDKs, a curated model catalog, and automatic hardware acceleration for running AI on the device. The no-cloud-resource and no-Azure-subscription positioning matters especially for audio workflows where keeping microphone data local is part of the design goal.
The sample uses Foundry Local SDK audio APIs instead of Microsoft.Extensions.AI
The primary source draws a clear line between a previous local chat sample, which used IChatClient from Microsoft.Extensions.AI, and this live speech-to-text sample, which uses the native AudioClient from the Foundry Local SDK. The reason is that live transcription sessions, raw PCM streaming, and interim transcription results are Foundry Local-specific capabilities.
That split fits Microsoft's broader .NET AI guidance. The .NET + AI ecosystem tools and SDKs page describes Microsoft.Extensions.AI as a unified layer of C# abstractions for working with AI services. In practice, common chat or embedding paths can use the abstraction, while provider-specific streaming audio features can stay on the provider SDK.
koharu tone="note" portrait="characters/deformed/thinking.webp" It helps to separate what belongs in a common abstraction from what needs the provider SDK. Live audio is one of those places where the specific SDK behavior really matters.
The Nemotron 0.6B model is resolved from the Foundry Local catalog
In the primary source, the sample obtains the English streaming ASR model with catalog.GetModelAsync("nemotron-speech-streaming-en-0.6b"). The model is not downloaded separately from Hugging Face; it is resolved through the Foundry Local catalog and handled through model.DownloadAsync() and model.LoadAsync().
Microsoft Learn's Foundry Local SDK reference says the SDK has C#, JavaScript, Python, and Rust implementations and covers model acquisition, hardware detection, and execution provider management. It also distinguishes the Windows package Microsoft.AI.Foundry.Local.WinML from the cross-platform Microsoft.AI.Foundry.Local package.
The NuGet page for Microsoft.AI.Foundry.Local.WinML currently shows version 1.2.4 and notes .NET 8.0-or-higher compatibility, along with features such as model catalog access, lifecycle management, audio transcription, and WinML acceleration. Before running the blog sample, it is worth checking the current package page as well as the post itself.
Microphone audio is streamed as 16-kHz PCM chunks
The important implementation detail is that this is not batch transcription over a completed audio file. The sample opens a live session with CreateLiveTranscriptionSession(), sets SampleRate = 16000, Channels = 1, and Language = "en", then starts the session before appending audio chunks.
Microsoft Learn's live microphone transcription guide shows the same basic flow: capture microphone audio, stream it to a local speech model, and print transcription output as speech arrives. The page lists .NET 9.0 SDK or later and a working microphone as prerequisites for its C# path, and explains that the Windows package integrates with Windows ML.
The primary source also calls out an implementation concern around NAudio. Because WaveInEvent raises a synchronous callback while session.AppendAsync() is asynchronous, the complete sample queues PCM chunks in a bounded channel and sends them from a dedicated task. That keeps audio capture from turning into an unbounded set of fire-and-forget operations.
Windows-specific assumptions and sample version differences need a quick check
The primary source explicitly marks this C# sample as Windows-only. Microsoft.AI.Foundry.Local.WinML targets Windows ML, and NAudio.WaveInEvent uses Windows audio APIs. Foundry Local itself is described on Microsoft Learn as supporting Windows, Apple silicon macOS, and Linux, but this particular blog implementation should be read as Windows-specific.
There is also a small version-context wrinkle across the referenced materials. The primary source says the complete sample targets .NET 10, the Microsoft Learn live transcription guide lists .NET 9.0 SDK or later, and the official GitHub 11-foundrylocal-live-transcription README currently lists .NET SDK 8.0+ and net8.0-windows10.0.18362. When trying the sample, align the blog post, README, .csproj, and NuGet package version you are actually using.
The practical use cases named by the primary source are live captions, meeting notes, voice-controlled desktop applications, accessibility tools, and edge solutions with limited connectivity. This does not mean local AI replaces every cloud AI workload; it does show that local-first speech processing is now a realistic .NET application path to evaluate.
Source
- Title: Beyond Chat: live Speech-to-Text with Foundry Local and C#
- URL: https://devblogs.microsoft.com/dotnet/foundry-local-live-speech-to-text-csharp/
Share
Related Articles
These articles share nearby categories or tags, so you can keep reading along the same thread.




