Table of Contents

Method GetMono16kSamples

Namespace
LMKit.Media.Audio
Assembly
LM-Kit.NET.dll

GetMono16kSamples(CancellationToken)

Reads and returns the per-frame average across all channels, normalized into [-1, 1], and resampled to 16 kHz if necessary.

public float[] GetMono16kSamples(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to cancel the read operation.

Returns

float[]

Read-only memory of normalized float samples at 16 kHz.

Exceptions

OperationCanceledException

Thrown if the read is cancelled via cancellationToken.

CorruptedAudioException

Thrown if the WAV data chunk ends prematurely.