Class AutomaticActivityDetection
Configures automatic detection of activity.
public record AutomaticActivityDetection : IEquatable<AutomaticActivityDetection>
- Inheritance
-
AutomaticActivityDetection
- Implements
- Inherited Members
Properties
Disabled
If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals.
[JsonPropertyName("disabled")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Disabled { get; set; }
Property Value
- bool?
EndOfSpeechSensitivity
Determines how likely detected speech is ended.
[JsonPropertyName("endOfSpeechSensitivity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EndSensitivity? EndOfSpeechSensitivity { get; set; }
Property Value
PrefixPaddingMs
The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives.
[JsonPropertyName("prefixPaddingMs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? PrefixPaddingMs { get; set; }
Property Value
- int?
SilenceDurationMs
The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency.
[JsonPropertyName("silenceDurationMs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? SilenceDurationMs { get; set; }
Property Value
- int?
StartOfSpeechSensitivity
Determines how likely speech is to be detected.
[JsonPropertyName("startOfSpeechSensitivity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public StartSensitivity? StartOfSpeechSensitivity { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a AutomaticActivityDetection object.
public static AutomaticActivityDetection? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- AutomaticActivityDetection
The deserialized AutomaticActivityDetection object, or null if deserialization fails.