Table of Contents

Class VoiceActivityDetectionSettings

Namespace
OpenAI.Realtime
Assembly
OpenAI-DotNet.dll
public sealed class VoiceActivityDetectionSettings
Inheritance
VoiceActivityDetectionSettings
Inherited Members

Constructors

VoiceActivityDetectionSettings()

public VoiceActivityDetectionSettings()

VoiceActivityDetectionSettings(TurnDetectionType, float?, int?, int?, bool)

public VoiceActivityDetectionSettings(TurnDetectionType type = TurnDetectionType.Server_VAD, float? detectionThreshold = null, int? prefixPadding = null, int? silenceDuration = null, bool createResponse = true)

Parameters

type TurnDetectionType
detectionThreshold float?
prefixPadding int?
silenceDuration int?
createResponse bool

Properties

CreateResponse

[JsonInclude]
[JsonPropertyName("create_response")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool CreateResponse { get; }

Property Value

bool

DetectionThreshold

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

Property Value

float?

PrefixPadding

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

Property Value

int?

SilenceDuration

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

Property Value

int?

Type

[JsonInclude]
[JsonPropertyName("type")]
[JsonConverter(typeof(JsonStringEnumConverter<TurnDetectionType>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public TurnDetectionType Type { get; }

Property Value

TurnDetectionType

Methods

Disabled()

public static VoiceActivityDetectionSettings Disabled()

Returns

VoiceActivityDetectionSettings