class

OpenAI::RealtimeTurnDetectionVariant1Inner1

Inherits JSON::Serializable < Reference < Object

Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.

Constructors

new(type_value : String = "", threshold : Float64 | Nil = nil, prefix_padding_ms : Int64 | Nil = nil, silence_duration_ms : Int64 | Nil = nil, create_response : Bool | Nil = nil, interrupt_response : Bool | Nil = nil, idle_timeout_ms : RealtimeTurnDetectionVariant1Inner1IdleTimeoutMs | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

create_response

Whether or not to automatically generate a response when a VAD stop event occurs. If interrupt_response is set to false this may fail to create a response if the model is already responding.

If both create_response and interrupt_response are set to false, the model will never respond automatically but VAD events will still be emitted.

Source
create_response=(create_response : Bool | Nil)

Whether or not to automatically generate a response when a VAD stop event occurs. If interrupt_response is set to false this may fail to create a response if the model is already responding.

If both create_response and interrupt_response are set to false, the model will never respond automatically but VAD events will still be emitted.

Source
idle_timeout_ms
Source
idle_timeout_ms=(idle_timeout_ms : RealtimeTurnDetectionVariant1Inner1IdleTimeoutMs | Nil)
Source
interrupt_response

Whether or not to automatically interrupt (cancel) any ongoing response with output to the default conversation (i.e. conversation of auto) when a VAD start event occurs. If true then the response will be cancelled, otherwise it will continue until complete.

If both create_response and interrupt_response are set to false, the model will never respond automatically but VAD events will still be emitted.

Source
interrupt_response=(interrupt_response : Bool | Nil)

Whether or not to automatically interrupt (cancel) any ongoing response with output to the default conversation (i.e. conversation of auto) when a VAD start event occurs. If true then the response will be cancelled, otherwise it will continue until complete.

If both create_response and interrupt_response are set to false, the model will never respond automatically but VAD events will still be emitted.

Source
prefix_padding_ms

Used only for server_vad mode. Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.

Source
prefix_padding_ms=(prefix_padding_ms : Int64 | Nil)

Used only for server_vad mode. Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.

Source
silence_duration_ms

Used only for server_vad mode. Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

Source
silence_duration_ms=(silence_duration_ms : Int64 | Nil)

Used only for server_vad mode. Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

Source
threshold

Used only for server_vad mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

Source
threshold=(threshold : Float64 | Nil)

Used only for server_vad mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

Source
type_value

Type of turn detection, server_vad to turn on simple Server VAD.

Source
type_value=(type_value : String)

Type of turn detection, server_vad to turn on simple Server VAD.

Source