Member Junction
    Preparing search index...

    Function BuildRealtimeOverridesJson

    • Builds the runtime-override ConfigOverridesJson envelope (the highest-precedence cascade layer) from a per-session model and/or voice choice — the single, surface-agnostic shape every realtime host uses to carry a dev's pick into ResolveEffectiveRealtimeConfig. The native-chat picker produces the same shape client-side (BuildRealtimeConfigOverridesJson in @memberjunction/ng-conversations — the two are kept in lockstep by realtime-convergence-drift.test.ts); the server-bridged hosts (LiveKit, Zoom/Teams) build it here so both funnel into the one override slot.

      Envelope: {"realtime":{"modelPreference":"<id>","voice":{"default":{"voice":"<v>"}}}}.

      The voice is filed PROVIDER-AGNOSTICALLY, which is what lets a host carry a voice at all: the vendor is not known here (and on the default-model path is not known to the caller at any point before the session is prepared), so naming one would be a guess. GetProviderVoiceSettings files this onto whichever driver the framework resolves. See issue #3530.

      Parameters

      • OptionalmodelId: string

        The MJ: AI Models Name or ID to prefer, or null/empty for none.

      • Optionalvoice: string

        The provider-native voice id (e.g. echo), or null/empty for none.

      Returns string

      The JSON string, or null when nothing was overridden (keeps the cascade at its lower layers).