realtime-avatar 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { ToolRegistration, RegisteredTool } from './tools.js';
2
- import { al as SessionLifecycleRoomBridgeProps, h as AvatarSessionClient, A as AvatarVideoFit, aW as CallMicrophone, aX as CallAudioPlayback, aw as VoiceError, aY as CallMicrophoneProblem } from './proxy-client-BlaFxR6S.js';
3
- export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, aZ as AvatarVideoSurface, a_ as AvatarVideoSurfaceProps, B as BehaviorSnapshot, C as CallTranscript, i as CallTranscriptSegment, j as CartesiaTtsModel, k as ClipResult, l as ClosingTurnResult, m as CreditsLowEvent, D as DEFAULT_APPROACHING_END_LEAD_SECONDS, n as DEFAULT_CREDITS_LOW_LEAD_SECONDS, o as DEFAULT_FISH_TTS_MODEL, p as DEFAULT_GOVERNOR_CONFIG, q as DEFAULT_GRACE_CEILING_SECONDS, r as DEFAULT_GRACE_WINDOW_LEAD_SECONDS, s as DEFAULT_IDLE_SECONDS, t as DEFAULT_IDLE_WARN_LEAD_SECONDS, u as DEFAULT_READY_TIMEOUT_SECONDS, v as DEFAULT_TURN_TIMEOUT_SECONDS, w as DeclaredInputSource, E as EndReason, x as EndedEvent, y as ExtendResult, F as FishTtsModel, z as FreezeReadingFn, G as Governor, H as GovernorAction, I as GovernorConfig, J as GovernorSignal, K as GovernorState, M as GraceWindowClosedEvent, N as GraceWindowOpenEvent, O as GraceWindowState, P as IdleWarningEvent, Q as InboundRtpCursor, R as InboundRtpReading, S as KnownBehaviorState, T as LLMProvider, U as LLMSelection, V as LiveKitAvatarGrantState, W as LiveKitAvatarGrantStatus, X as LiveKitCapacityState, Y as LiveKitConnectionStatus, Z as LiveKitSessionRequest, _ as LiveKitSessionStartResult, a$ as LivePlaybackKeeper, $ as MAX_RECONNECT_ATTEMPTS, a0 as MAX_SESSION_INSTRUCTIONS_CHARS, b0 as MIC_LEASE_ENDED_TIMEOUT_MS, b1 as MicLease, b2 as NETWORK_QUALITY_POLICY, b3 as NetworkQualityStatus, b4 as PlayableVideoElement, a1 as ProxyClientOptions, a2 as QualityCap, a3 as RECONNECT_BACKOFF_MS, b5 as RealtimeAvatarCapacityError, b6 as RealtimeAvatarLiveKitRoom, b7 as RealtimeAvatarLiveKitRoomProps, a4 as RealtimeAvatarRequestOptions, a5 as RealtimeSessionApi, a6 as RealtimeSessionMedia, a7 as RealtimeSessionRoomSinks, a8 as ReconnectPolicy, a9 as ReconnectingEvent, aa as RecoveryState, ab as RetryStep, ac as SendTurnOptions, ad as SessionBehavior, ae as SessionClip, af as SessionClocks, ag as SessionEndReason, ah as SessionLifecycleApi, ai as SessionLifecyclePhase, aj as SessionLifecyclePhaseKind, ak as SessionLifecycleRoomBridge, am as SessionReadinessFailure, an as SurfaceLayers, ao as TranscriptSender, ap as TranscriptSenderOptions, aq as TurnState, ar as TurnTimeoutEvent, as as UseAvatarQualityGovernorInput, at as UseLiveKitAvatarGrantInput, au as UseRealtimeSessionInput, av as UseSessionLifecycleInput, ax as VoiceErrorCode, ay as VoiceSpec, az as VoiceSpecInput, aA as capacityErrorFromBusy, aB as capacityStateFromGrant, aC as createProxyClient, aD as fishTtsModelSchema, aF as knownBehaviorStates, aG as mapTurnState, aH as readInboundRtp, aI as sessionBehaviorSchema, aJ as sessionClipSchema, b8 as shouldReplayPendingTurn, aK as splitCallTranscript, aL as useAvatarAdaptivePlayoutDelay, aM as useAvatarCamera, aN as useAvatarPlayoutDelay, aO as useAvatarQualityGovernor, aP as useCallTranscript, aQ as useLiveKitAvatarGrant, aS as useMicLease, aT as useRealtimeSession, aU as useReleaseMicLeaseOnTrackEnded, aV as useSessionLifecycle } from './proxy-client-BlaFxR6S.js';
2
+ import { au as SessionLifecycleRoomBridgeProps, h as AvatarSessionClient, A as AvatarVideoFit, b3 as CallMicrophone, b4 as CallAudioPlayback, aF as VoiceError, b5 as CallMicrophoneProblem, H as ExternalPerformanceObserver } from './proxy-client-CiTOjkg8.js';
3
+ export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, b6 as AvatarVideoSurface, b7 as AvatarVideoSurfaceProps, B as BehaviorSnapshot, C as CallTranscript, i as CallTranscriptSegment, j as CartesiaTtsModel, k as ClipResult, l as ClosingTurnResult, m as CreditsLowEvent, D as DEFAULT_APPROACHING_END_LEAD_SECONDS, n as DEFAULT_CREDITS_LOW_LEAD_SECONDS, o as DEFAULT_FISH_TTS_MODEL, p as DEFAULT_GOVERNOR_CONFIG, q as DEFAULT_GRACE_CEILING_SECONDS, r as DEFAULT_GRACE_WINDOW_LEAD_SECONDS, s as DEFAULT_IDLE_SECONDS, t as DEFAULT_IDLE_WARN_LEAD_SECONDS, u as DEFAULT_READY_TIMEOUT_SECONDS, v as DEFAULT_TURN_TIMEOUT_SECONDS, w as DeclaredInputSource, E as EXTERNAL_PERFORMANCE_TIMING, x as EndReason, y as EndedEvent, z as ExtendResult, F as ExternalPerformanceFrame, G as ExternalPerformanceInvalidation, I as FISH_DELIVERY_MODELS, J as FishDelivery, K as FishTtsModel, M as FreezeReadingFn, N as Governor, O as GovernorAction, P as GovernorConfig, Q as GovernorSignal, R as GovernorState, S as GraceWindowClosedEvent, T as GraceWindowOpenEvent, U as GraceWindowState, V as IdleWarningEvent, W as InboundRtpCursor, X as InboundRtpReading, Y as KNOWN_EXTERNAL_PERFORMANCE_STATUSES, Z as KnownBehaviorState, _ as KnownExternalPerformanceStatus, $ as LLMProvider, a0 as LLMSelection, a1 as LiveKitAvatarGrantState, a2 as LiveKitAvatarGrantStatus, a3 as LiveKitCapacityState, a4 as LiveKitConnectionStatus, a5 as LiveKitSessionRequest, a6 as LiveKitSessionStartResult, b8 as LivePlaybackKeeper, a7 as MAX_RECONNECT_ATTEMPTS, a8 as MAX_SESSION_INSTRUCTIONS_CHARS, b9 as MIC_LEASE_ENDED_TIMEOUT_MS, ba as MicLease, bb as NETWORK_QUALITY_POLICY, bc as NetworkQualityStatus, a9 as ObservedExternalPerformanceFrame, bd as PlayableVideoElement, aa as ProxyClientOptions, ab as QualityCap, ac as RECONNECT_BACKOFF_MS, be as RealtimeAvatarCapacityError, bf as RealtimeAvatarLiveKitRoom, bg as RealtimeAvatarLiveKitRoomProps, ad as RealtimeAvatarRequestOptions, ae as RealtimeSessionApi, af as RealtimeSessionMedia, ag as RealtimeSessionRoomSinks, ah as ReconnectPolicy, ai as ReconnectingEvent, aj as RecoveryState, ak as RetryStep, al as SendTurnOptions, am as SessionBehavior, an as SessionClip, ao as SessionClocks, ap as SessionEndReason, aq as SessionLifecycleApi, ar as SessionLifecyclePhase, as as SessionLifecyclePhaseKind, at as SessionLifecycleRoomBridge, av as SessionReadinessFailure, aw as SurfaceLayers, ax as TranscriptSender, ay as TranscriptSenderOptions, az as TurnState, aA as TurnTimeoutEvent, aB as UseAvatarQualityGovernorInput, aC as UseLiveKitAvatarGrantInput, aD as UseRealtimeSessionInput, aE as UseSessionLifecycleInput, aG as VoiceErrorCode, aH as VoiceSpec, aI as VoiceSpecInput, aJ as capacityErrorFromBusy, aK as capacityStateFromGrant, aL as createProxyClient, aM as fishTtsModelSchema, aO as knownBehaviorStates, aP as mapTurnState, aQ as readInboundRtp, aR as sessionBehaviorSchema, aS as sessionClipSchema, bh as shouldReplayPendingTurn, aT as splitCallTranscript, aU as useAvatarAdaptivePlayoutDelay, aV as useAvatarCamera, aW as useAvatarPlayoutDelay, aX as useAvatarQualityGovernor, aY as useCallTranscript, aZ as useLiveKitAvatarGrant, a$ as useMicLease, b0 as useRealtimeSession, b1 as useReleaseMicLeaseOnTrackEnded, b2 as useSessionLifecycle } from './proxy-client-CiTOjkg8.js';
4
+ import { e as CorrelatedAudioObserver } from './playout-delay-BzoM1BMN.js';
5
+ export { d as CorrelatedAudioInvalidation, f as CorrelatedAudioPosition, D as DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS } from './playout-delay-BzoM1BMN.js';
4
6
  import { CSSProperties, ReactNode } from 'react';
5
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
8
  import { R as RecordingArtifact } from './recording-ydFVySSd.js';
7
- export { D as DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS } from './playout-delay-CtRZdtsj.js';
8
9
  import 'zod';
9
10
  import 'livekit-client';
10
11
  import '@livekit/components-react';
@@ -43,24 +44,6 @@ declare function useCharacterTools(tools: Record<string, RegisteredTool>, option
43
44
  }) => void;
44
45
  }): CharacterToolsState;
45
46
 
46
- /**
47
- * The CONNECT surface (client half) — one component that puts a live character on screen.
48
- *
49
- * WHY THIS EXISTS. The lower-level surface is deliberately LiveKit-first: the app owns the
50
- * room, mounts the lifecycle bridge, maps a nine-arm phase union to its own copy, and wires
51
- * the video surface. That is the right shape for a team that wants to own media policy, and
52
- * it is far too much surface for a team that wants a character on screen. Worse, it makes
53
- * the transport part of the integration contract: an app that names `RealtimeAvatarLiveKitRoom`
54
- * and `SessionLifecycleRoomBridge` is coupled to WebRTC-via-LiveKit forever.
55
- *
56
- * `<AvatarCall>` closes that hole. It mounts the room, the bridge, and the video surface, and
57
- * reports a FIVE-arm status that says nothing about how the pixels arrive. Swapping the
58
- * transport underneath is then our problem, not the integrator's.
59
- *
60
- * Everything the lower-level API offers is still exported and still supported — this is
61
- * additive. Reach for it when you genuinely need to own the room.
62
- */
63
-
64
47
  /**
65
48
  * What the app renders a banner for. Deliberately NOT the internal phase union: those arms
66
49
  * name connection mechanics, and an integrator should never write `case "reconnectable"`.
@@ -180,6 +163,13 @@ type AvatarCallProps = Pick<SessionLifecycleRoomBridgeProps, "onConnectionDetail
180
163
  * `onEnded` follows with `failed`.
181
164
  */
182
165
  onVoiceError?: (error: VoiceError) => void;
166
+ /**
167
+ * For a call your server minted with `llm.performance: "v1"`: each generation's admission and
168
+ * cancellation, for a character you draw yourself. Not a playback clock.
169
+ */
170
+ externalPerformance?: ExternalPerformanceObserver;
171
+ /** Opt in to SDK-owned correlated PCM; disables this component's ordinary audio renderer. */
172
+ correlatedAudio?: CorrelatedAudioObserver;
183
173
  /**
184
174
  * What to show while `audio` is `blocked` (the browser is muting her until a gesture):
185
175
  * - `true` (default): a "Tap to turn on sound" button, top-centre over the video.
@@ -216,4 +206,4 @@ declare function RecordingPlayer({ assets, className }: {
216
206
  className?: string;
217
207
  }): react_jsx_runtime.JSX.Element;
218
208
 
219
- export { AvatarCall, type AvatarCallAudio, type AvatarCallEndReason, type AvatarCallHandle, type AvatarCallMicrophone, type AvatarCallMicrophoneProblem, type AvatarCallProps, type AvatarCallStatus, AvatarSessionClient, AvatarVideoFit, type CharacterToolsState, DEFAULT_AVATAR_UNSTABLE_STALL_MS, type RecordingPlaybackAsset, RecordingPlayer, SessionLifecycleRoomBridgeProps, VoiceError, useAvatarCall, useCharacterTools };
209
+ export { AvatarCall, type AvatarCallAudio, type AvatarCallEndReason, type AvatarCallHandle, type AvatarCallMicrophone, type AvatarCallMicrophoneProblem, type AvatarCallProps, type AvatarCallStatus, AvatarSessionClient, AvatarVideoFit, type CharacterToolsState, CorrelatedAudioObserver, DEFAULT_AVATAR_UNSTABLE_STALL_MS, ExternalPerformanceObserver, type RecordingPlaybackAsset, RecordingPlayer, SessionLifecycleRoomBridgeProps, VoiceError, useAvatarCall, useCharacterTools };