Table of Contents

Class ChunkingStrategy

Namespace
OpenAI.Audio
Assembly
OpenAI-DotNet.dll
public sealed class ChunkingStrategy
Inheritance
ChunkingStrategy
Inherited Members

Constructors

ChunkingStrategy()

public ChunkingStrategy()

ChunkingStrategy(int?, int?, float?)

Controls how the audio is cut into chunks. When set to "auto", the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. server_vad object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.

public ChunkingStrategy(int? prefixPaddingMs = null, int? silenceDurationMs = null, float? threshold = null)

Parameters

prefixPaddingMs int?

Amount of audio to include before the VAD detected speech (in milliseconds).

silenceDurationMs int?

Duration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

threshold float?

Sensitivity threshold (0.0 to 1.0) for voice activity detection. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

Properties

Auto

public static ChunkingStrategy Auto { get; }

Property Value

ChunkingStrategy

PrefixPaddingMs

Amount of audio to include before the VAD detected speech (in milliseconds).

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("prefix_padding_ms")]
public int? PrefixPaddingMs { get; }

Property Value

int?

SilenceDurationMs

Duration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("silence_duration_ms")]
public int? SilenceDurationMs { get; }

Property Value

int?

Threshold

Sensitivity threshold (0.0 to 1.0) for voice activity detection. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("threshold")]
public float? Threshold { get; }

Property Value

float?

Type

[JsonInclude]
[JsonPropertyName("type")]
public string Type { get; }

Property Value

string