---
title: ".NET speech to text: batch or live?"
url: https://recursiveai.org/onespeech/articles/dotnet-speech-to-text-library/
description: "For .NET speech to text, use batch for a single transcript of a finished recording or live recognition to get text while audio is still arriving."
date: 2026-11-30
author: OneSpeech team
---

# .NET speech to text: batch or live?

For .NET speech to text, use batch for a single transcript of a finished recording or live recognition to get text while audio is still arriving.

November 30, 2026 · OneSpeech team

OneSpeech is a free, open-source .NET library from Recursive AI, licensed under [MIT or Apache-2.0](https://licenses.nuget.org/MIT%20OR%20Apache-2.0). [NuGet](https://www.nuget.org/packages/RecursiveAI.OneSpeech/1.1.0) · [GitHub](https://github.com/recursive-ai-oss/onespeech-csharp)

Install for .NET 10: `dotnet add package RecursiveAI.OneSpeech --version 1.1.0`

On first use, OneSpeech downloads uncached model weights: Whisper base is 290.4 MB here, while leaving `model` unset in the batch call fetches the default Whisper large-v3-turbo (1,617.8 MB), before any companion models.

## Batch: transcribe a finished recording

In a .NET 10 console project, save [jfk.wav](https://raw.githubusercontent.com/ggml-org/whisper.cpp/79b11911d9d38c4be2fc7dc8b4efeff3324c090f/samples/jfk.wav) in the project directory. It’s an 11-second public-domain excerpt from [John F. Kennedy’s inaugural address](https://www.archives.gov/milestone-documents/president-john-f-kennedys-inaugural-address). The [speech-to-text cookbook](https://recursiveai.org/onespeech/cookbook/speech-to-text/) documents the recording’s provenance.

*Program.cs · .NET 10*

```
using OneSpeech;
 
var transcript = Speech.Transcribe("jfk.wav",
    language: "en", model: "openai/whisper-base");
Console.WriteLine($"Batch: {transcript.Text}");
```

*Output · Terminal*

```
Batch: And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country.
```

## Live: replay the same recording as PCM

From the same project directory, run this FFmpeg command to create `speech.f32` from `jfk.wav`. The command is silent on success.

*Prepare the PCM replay file · Shell*

```
ffmpeg -hide_banner -loglevel error -y -i jfk.wav -ac 1 -ar 16000 -f f32le speech.f32
```

Replace `Program.cs` with the live example. It reads 20 ms blocks from the PCM file without a microphone or real-time pacing.

*Program.cs · .NET 10*

```
using OneSpeech;
 
await foreach (var update in Speech.Listen(ReadPcm("speech.f32"),
    language: "en", model: "openai/whisper-base"))
{
    if (update is FinalEvent final)
        Console.WriteLine($"Live final: {final.Segment.Text}");
}
 
static async IAsyncEnumerable<AudioBuffer> ReadPcm(string path)
{
    await using var file = File.OpenRead(path);
    var bytes = new byte[320 * sizeof(float)];
    int count;
    while ((count = await file.ReadAtLeastAsync(bytes, bytes.Length, false)) > 0)
    {
        var samples = new float[count / sizeof(float)];
        for (int i = 0; i < samples.Length; i++)
            samples[i] = System.Buffers.Binary.BinaryPrimitives
                .ReadSingleLittleEndian(bytes.AsSpan(i * sizeof(float)));
        yield return new AudioBuffer(samples, sampleRate: 16000);
    }
}
```

*Output · Terminal*

```
Live final: And so my fellow Americans.
Live final: ASK NOT!
Live final: what your country can do for you.
Live final: Ask what you can do for your country.
```

“ASK NOT!” is the model’s raw output. The replay prints four final segments, with their original capitalization and punctuation.

## Choose by the result your app needs

### Batch recognition

| Use case | Archive a completed interview or meeting |
|---|---|
| API | `Speech.Transcribe` |
| Result | One `Transcript` with segments, word timing where available, and document-local speaker labels. The default diarizer doesn’t detect overlapping speech. [Batch behavior](https://recursiveai.org/onespeech/docs/transcribing-files/) |

### File streaming

| Use case | Index a long recording incrementally |
|---|---|
| API | `Speech.TranscribeStream` |
| Result | Final segments from a file or encoded stream without retaining all decoded PCM. No whole-file speaker assignment. [File-streaming behavior](https://recursiveai.org/onespeech/docs/live-sessions/) |

### Live recognition

| Use case | Display captions during speech |
|---|---|
| API | `Speech.Listen` |
| Result | Events from caller-supplied mono 16 kHz PCM. With streaming Moonshine, replace the draft for the current utterance on each partial and append the final once. [Live event contract](https://recursiveai.org/onespeech/docs/live-sessions/) |

`Listen` doesn’t capture a microphone. In production, supply blocks from your capture or network layer, mix and resample there if needed, and pass cancellation from the lifetime of the session. The example prints only finals. A caption UI should also handle partials as replacements, not extra lines; the `AudioTime` on an event describes accepted audio, not end-to-end wall-clock latency.

## Choose a model before packaging the app

The example explicitly uses Whisper base for both calls. If you omit the model, OneSpeech 1.1.0 defaults to Whisper large-v3-turbo for batch and Moonshine streaming tiny for live. That Moonshine checkpoint is for English recognition and can emit partials. With an offline-family model like Whisper base, the live utterance session emits finals only. If users need text before they pause, test a checkpoint that emits partials in their language rather than assuming that streaming input implies streaming text. See [Moonshine’s language and streaming behavior](https://recursiveai.org/onespeech/docs/moonshine/) and the [model catalog](https://recursiveai.org/onespeech/docs/models/).

Measure on the machine that will run recognition. For batch, check transcription errors, timing and speaker labels on representative files. For live, replay real capture at its original pace and check time to first useful draft, draft revisions, and time from a pause to the final caption. Test on your actual accents, background noise, and hardware before picking a model.

## Budget for the model cache, not just the NuGet package

Inference runs locally, but the first call can fetch weights. The [v1.1.0 model download table](https://recursiveai.org/onespeech/docs/model-downloads/) lists 1,617.8 MB of publisher weights for Whisper large-v3-turbo and 176.2 MB for Moonshine streaming tiny. Those aren’t install totals: the cache can also hold converted weights, a CAM++ speaker embedder, and timing models. The recognizer’s size alone doesn’t tell you what a batch call needs.

For a disconnected deployment, prepare the exact model and language with `Speech.PrefetchAsync`, provision the resulting cache for the runtime user, and test a real call with the network disabled. The [offline NuGet model packages](https://recursiveai.org/onespeech/docs/cli-and-model-packages/) carry certain pinned models, not every companion role. Keep the published `onespeech-models` directory beside the executable when using those packages. Check each checkpoint’s notices separately from the library license.

Deployment references: [OneSpeech documentation](https://recursiveai.org/onespeech/docs/) and [when to replace System.Speech grammar recognition](https://recursiveai.org/onespeech/articles/system-speech-cross-platform-alternative/).
