Member Junction
    Preparing search index...
    • Merges a raw audio override from the Config bag into the audio block the driver built, so a bag that tunes one leaf (say turn_detection.idle_timeout_ms) no longer discards the built transcription model, voice, and VAD settings.

      Rules:

      • Plain objects merge key by key; the bag's leaves win over the built values.
      • An explicit null leaf in the bag is kept and sent as null (OpenAI's "off": turn_detection: null turns VAD off, transcription: null turns transcription off). Omitting a key keeps the built value. Null leaves inside an object the bag writes onto a non-object or nothing are kept too.
      • A non-object override (string, null, array, ...) is ignored; built is returned unchanged.
      • A turn_detection.type that differs from the built one replaces the whole turn_detection object, because fields of one detector kind (e.g. silence_duration_ms) are invalid on another.
      • A merged turn_detection object that still has no type (nothing was built, the bag gave none) gets defaultTurnDetectionType when one is passed: the provider rejects a type-less block.
      • In meeting mode, after the merge: a surviving turn_detection object gets create_response: false. An explicit turn_detection: null is kept (VAD off cannot auto-respond). If the bag nulled or broke input, or sent a turn_detection that is neither an object nor null, and the built block had a turn_detection, that block is restored with the floor (on the built input when input was clobbered). If the profile built none, nothing is invented and the bag's value stands.

      Neither argument is mutated.

      Parameters

      • built: RealtimeAudioConfig

        The audio block from BuildAudioBlock, or undefined when nothing was built.

      • override: unknown

        The raw audio value from the open JSON Config bag; untrusted shape.

      • meetingMode: boolean

        Whether the session is a meeting (the model must not auto-respond).

      • OptionaldefaultTurnDetectionType: string

        The provider's own default turn_detection.type (OpenAIRealtimeProfile.defaultTurnDetectionType), if known.

      Returns RealtimeAudioConfig

      The merged audio block, or undefined when there is neither a built block nor an override.