Builds Inworld's turn_detection block from the config bag, in this order of precedence:
A raw turn_detection object is sent as given — it is Inworld's own vocabulary, so it wins outright.
Otherwise the normalized turnDetection request maps onto the two modes Inworld documents:
Mode: 'serverVad' → { type: 'server_vad' } with threshold and silence_duration_ms from Threshold and
SilenceDurationMs;
any other mode (or none) → { type: 'semantic_vad' } with eagerness from the flat eagerness shorthand, then
the normalized Eagerness, then INWORLD_DEFAULT_VAD_EAGERNESS.
Settings the chosen mode has no field for — Eagerness under server VAD, Threshold / SilenceDurationMs under
semantic VAD, Mode: 'native', and Coverage — are named in the returned warning rather than dropped silently.
Wire-format binding point — the server_vad / semantic_vad field names follow Inworld's published
turn-detection reference; verify against a live endpoint.
Builds Inworld's
turn_detectionblock from the config bag, in this order of precedence:turn_detectionobject is sent as given — it is Inworld's own vocabulary, so it wins outright.turnDetectionrequest maps onto the two modes Inworld documents:Mode: 'serverVad'→{ type: 'server_vad' }withthresholdandsilence_duration_msfromThresholdandSilenceDurationMs;{ type: 'semantic_vad' }witheagernessfrom the flateagernessshorthand, then the normalizedEagerness, then INWORLD_DEFAULT_VAD_EAGERNESS.Settings the chosen mode has no field for —
Eagernessunder server VAD,Threshold/SilenceDurationMsunder semantic VAD,Mode: 'native', andCoverage— are named in the returned warning rather than dropped silently.