realtime-avatar 0.31.0 → 0.33.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/README.md CHANGED
@@ -53,6 +53,12 @@ lifecycle; the hook is not a shared audio-session lease. Camera publication stil
53
53
  server grant's permission and the caller's opt-in. Room callbacks/options continue to use LiveKit's
54
54
  public types and implementation; no separate connection state machine is introduced.
55
55
 
56
+ **On iOS, the room also clears an input mute an earlier call left on the app.** A server-closed room
57
+ can leave iOS 26's per-app input mute set, so later calls publish an unmuted track of silence. Each
58
+ time the room's own microphone goes live, `RealtimeAvatarLiveKitRoom` round-trips the audio engine's
59
+ mute once so the engine writes "unmuted" itself (iOS with the Voice Processing mute mode only; never
60
+ on Android). A room you compose yourself needs `useClearStaleInputMute(room)` inside it.
61
+
56
62
  **This is a native build upgrade, not an OTA-only change.** Rebuild iOS and Android binaries with
57
63
  RN3/WebRTC 144.2.0 before shipping JavaScript that requires them. Retain the previous SDK group for
58
64
  installed binaries that still use RN2, and isolate their OTA runtime/channel appropriately.
@@ -1,4 +1,4 @@
1
- import { sessionModeSchema, liveKitSessionReleaseReasonSchema, RealtimeAvatar, ROUTE_TIMEOUT_MS, isQueued, RealtimeAvatarHttpError, RealtimeAvatarError } from './chunk-LRGQKZFB.js';
1
+ import { sessionModeSchema, liveKitSessionReleaseReasonSchema, RealtimeAvatar, ROUTE_TIMEOUT_MS, isQueued, RealtimeAvatarHttpError, RealtimeAvatarError } from './chunk-VLYUMP3I.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // ../http-client/src/generated/error-semantics.ts
@@ -350,8 +350,13 @@ var renderAccessResponseSchema = z.object({
350
350
  var schema02 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
351
351
  var schema110 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
352
352
  var schema27 = z.union([schema02, schema110]);
353
+ var schema32 = z.enum(["whisper"]);
354
+ var schema42 = z.null();
355
+ var schema52 = z.union([schema32, schema42]);
353
356
  var fishTtsModelSchema = schema27;
354
357
  var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
358
+ var fishDeliverySchema = schema52;
359
+ var FISH_DELIVERY_MODELS = { "whisper": ["drama-3"] };
355
360
 
356
361
  // ../http-client/src/retry.ts
357
362
  var RETRYABLE_STATUS = /* @__PURE__ */ new Set([408, 500, 502, 503, 504]);
@@ -387,12 +392,12 @@ function isTransient(cause) {
387
392
  var schema03 = z.string().min(2).max(64);
388
393
  var schema111 = z.array(schema03);
389
394
  var schema28 = z.string().regex(new RegExp("\\S")).min(1).max(160);
390
- var schema32 = z.array(schema28).max(1e3);
391
- var schema42 = z.strictObject({
395
+ var schema33 = z.array(schema28).max(1e3);
396
+ var schema43 = z.strictObject({
392
397
  "language_codes": schema111.optional(),
393
- "custom_vocabulary": schema32.optional()
398
+ "custom_vocabulary": schema33.optional()
394
399
  });
395
- var transcriptionWireSchema = schema42;
400
+ var transcriptionWireSchema = schema43;
396
401
  var transcriptionOptionsSchema = z.object({
397
402
  languageCodes: transcriptionWireSchema.shape.language_codes,
398
403
  customVocabulary: transcriptionWireSchema.shape.custom_vocabulary
@@ -409,17 +414,17 @@ var contentPolicySchema = schema04;
409
414
  var schema05 = z.literal("voice_error");
410
415
  var schema112 = z.enum(["voice_webhook_url_not_allowed", "voice_webhook_unauthorized", "voice_webhook_unreachable", "voice_webhook_timeout", "voice_webhook_http_error", "voice_webhook_unsupported_audio", "voice_webhook_empty_audio"]);
411
416
  var schema29 = z.string();
412
- var schema33 = z.int().min(-9007199254740991).max(9007199254740991);
413
- var schema43 = z.boolean();
414
- var schema52 = z.object({
417
+ var schema34 = z.int().min(-9007199254740991).max(9007199254740991);
418
+ var schema44 = z.boolean();
419
+ var schema53 = z.object({
415
420
  "kind": schema05,
416
421
  "code": schema112,
417
422
  "message": schema29,
418
- "status": schema33.optional(),
419
- "fatal": schema43,
423
+ "status": schema34.optional(),
424
+ "fatal": schema44,
420
425
  "request_id": schema29.optional()
421
426
  });
422
- var voiceErrorFrameSchema = schema52;
427
+ var voiceErrorFrameSchema = schema53;
423
428
 
424
429
  // ../client/src/wire.ts
425
430
  var DEFAULT_AVATAR_ID = "maria";
@@ -488,8 +493,15 @@ var fishVoiceSpecSchema = z.object({
488
493
  voice_id: z.string().min(1).max(120),
489
494
  speed: z.number().min(0.5).max(2).nullable().optional(),
490
495
  emotion: z.string().min(1).max(80).nullable().optional(),
491
- language: z.string().min(2).max(16).nullable().optional()
492
- }).strict();
496
+ language: z.string().min(2).max(16).nullable().optional(),
497
+ delivery: fishDeliverySchema.optional()
498
+ }).strict().superRefine((voice, ctx) => {
499
+ if (!voice.delivery) return;
500
+ const models = FISH_DELIVERY_MODELS[voice.delivery];
501
+ if (!models.includes(voice.model)) {
502
+ ctx.addIssue({ code: "custom", path: ["delivery"], message: `delivery "${voice.delivery}" needs model ${models.join(" | ")}` });
503
+ }
504
+ });
493
505
  var voiceSpecSchema = z.discriminatedUnion("provider", [
494
506
  cartesiaVoiceSpecSchema,
495
507
  breezeVoiceSpecSchema,
@@ -759,16 +771,16 @@ var liveKitSessionReleaseReasonSchema = z.enum([
759
771
  var schema06 = z.url().regex(new RegExp("^https:\\/\\/")).max(500);
760
772
  var schema113 = z.string().min(16).max(200);
761
773
  var schema210 = z.string().min(1).max(200);
762
- var schema34 = z.string().min(2).max(35);
763
- var schema44 = z.literal([8e3, 16e3, 22050, 24e3, 44100, 48e3]);
764
- var schema53 = z.int().min(1e3).max(15e3);
774
+ var schema35 = z.string().min(2).max(35);
775
+ var schema45 = z.literal([8e3, 16e3, 22050, 24e3, 44100, 48e3]);
776
+ var schema54 = z.int().min(1e3).max(15e3);
765
777
  var schema62 = z.strictObject({
766
778
  "url": schema06,
767
779
  "secret": schema113,
768
780
  "voice_id": schema210.optional(),
769
- "language": schema34.optional(),
770
- "sample_rate": schema44.optional(),
771
- "timeout_ms": schema53.optional()
781
+ "language": schema35.optional(),
782
+ "sample_rate": schema45.optional(),
783
+ "timeout_ms": schema54.optional()
772
784
  });
773
785
  var schema72 = z.literal("voice.synthesize");
774
786
  var schema82 = z.literal(1);
@@ -825,16 +837,16 @@ var voiceWebhookRequestSchema = schema232;
825
837
  var schema07 = z.string().min(8).max(80);
826
838
  var schema115 = z.enum(["eou", "llm", "tts", "decision", "hold", "e2e"]);
827
839
  var schema211 = z.literal("interrupt_stop");
828
- var schema35 = z.union([schema115, schema211]);
829
- var schema45 = z.int().max(9007199254740991).gt(0);
830
- var schema54 = z.number().min(0);
840
+ var schema36 = z.union([schema115, schema211]);
841
+ var schema46 = z.int().max(9007199254740991).gt(0);
842
+ var schema55 = z.number().min(0);
831
843
  var schema63 = z.strictObject({
832
- "count": schema45,
833
- "max": schema54,
834
- "p50": schema54,
835
- "p90": schema54
844
+ "count": schema46,
845
+ "max": schema55,
846
+ "p50": schema55,
847
+ "p90": schema55
836
848
  });
837
- var schema73 = z.partialRecord(schema35, schema63);
849
+ var schema73 = z.partialRecord(schema36, schema63);
838
850
  var schema83 = z.literal("available");
839
851
  var schema93 = z.literal("dialogue");
840
852
  var schema103 = z.string().regex(new RegExp("^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d))|(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?)$"));
@@ -885,8 +897,8 @@ var schema332 = z.strictObject({
885
897
  });
886
898
  var schema342 = z.string();
887
899
  var schema352 = z.union([schema342, schema116]);
888
- var schema36 = z.enum(["reserved", "started", "released", "failed"]);
889
- var schema37 = z.union([schema54, schema116]);
900
+ var schema362 = z.enum(["reserved", "started", "released", "failed"]);
901
+ var schema37 = z.union([schema55, schema116]);
890
902
  var schema38 = z.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value));
891
903
  var schema39 = z.strictObject({
892
904
  "sessionId": schema07,
@@ -894,7 +906,7 @@ var schema39 = z.strictObject({
894
906
  "releaseIdentity": schema332.optional(),
895
907
  "avatarId": schema352,
896
908
  "avatarName": schema352,
897
- "status": schema36,
909
+ "status": schema362,
898
910
  "startedAt": schema352,
899
911
  "endedAt": schema352,
900
912
  "activeSeconds": schema37,
@@ -919,7 +931,7 @@ function toSessionsPage(page) {
919
931
  // ../http-client/src/client.ts
920
932
  var DEFAULT_BASE_URL = "https://realtimeavatar.ai/api/v1";
921
933
  var RENDER_MISMATCH = "Render response did not match the SDK contract";
922
- var SDK_VERSION = "0.31.0";
934
+ var SDK_VERSION = "0.33.0";
923
935
  var RealtimeAvatar = class {
924
936
  #apiKey;
925
937
  #baseUrl;
@@ -1659,4 +1671,4 @@ function isQueued(result) {
1659
1671
  return "queued" in result;
1660
1672
  }
1661
1673
 
1662
- export { DEFAULT_FISH_TTS_MODEL, ROUTE_TIMEOUT_MS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, liveKitSessionReleaseReasonSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, sessionModeSchema, verifyTranscript, verifyVoiceWebhook };
1674
+ export { DEFAULT_FISH_TTS_MODEL, FISH_DELIVERY_MODELS, ROUTE_TIMEOUT_MS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, liveKitSessionReleaseReasonSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, sessionModeSchema, verifyTranscript, verifyVoiceWebhook };
package/dist/express.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-Du6T6XQB.js';
2
- import './types-DOFXGl7G.js';
1
+ import { P as ProxyConfig } from './types-DygYBvSv.js';
2
+ import './types-VoejsHij.js';
3
3
  import 'zod';
4
4
 
5
5
  type Expressish = {
package/dist/express.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-TJM53JXR.js';
2
- import './chunk-LRGQKZFB.js';
1
+ import { createProxyHandler } from './chunk-DM5TWRC4.js';
2
+ import './chunk-VLYUMP3I.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/express.ts
package/dist/hono.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-Du6T6XQB.js';
2
- import './types-DOFXGl7G.js';
1
+ import { P as ProxyConfig } from './types-DygYBvSv.js';
2
+ import './types-VoejsHij.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/hono.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-TJM53JXR.js';
2
- import './chunk-LRGQKZFB.js';
1
+ import { createProxyHandler } from './chunk-DM5TWRC4.js';
2
+ import './chunk-VLYUMP3I.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/hono.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as CallPolicy, C as CallMode, S as StartCallResult, E as EndCallOptions, A as Avatar, b as AvatarUpdate, c as AvatarSourceSwap, d as ClipLibraryDeclaration, e as ClipLibraryUpdate, L as LoopRedirect, f as ClipLibrary, g as AssetKind, h as Asset, i as ListSessionsOptions, U as UsageSessionPage, j as UsageSession, k as ListRecordingsQuery, l as ListRecordingsResponse, R as RecordingArtifact, m as RecordingAccessResponse, n as CreateRenderInput, o as CreditBalance, T as TranscriptPayload, V as VoiceWebhookRequest } from './types-DOFXGl7G.js';
2
- export { p as AvatarClip, q as CallConnection, r as CallQueued, s as ClipDeclaration, t as ClipLibraryPlan, u as ClipSource, v as ContextMessage, w as EndCallReason, x as ExternalLlm, y as RecordingArtifactStatus, z as RecordingMode, B as RenderShot, D as VideoPolicy, F as VoiceWebhook, G as VoiceWebhookErrorCode, H as isQueued, I as listRecordingsResponseSchema, J as recordingAccessResponseSchema, K as recordingArtifactSchema, M as recordingModeSchema } from './types-DOFXGl7G.js';
1
+ import { a as CallPolicy, C as CallMode, S as StartCallResult, E as EndCallOptions, A as Avatar, b as AvatarUpdate, c as AvatarSourceSwap, d as ClipLibraryDeclaration, e as ClipLibraryUpdate, L as LoopRedirect, f as ClipLibrary, g as AssetKind, h as Asset, i as ListSessionsOptions, U as UsageSessionPage, j as UsageSession, k as ListRecordingsQuery, l as ListRecordingsResponse, R as RecordingArtifact, m as RecordingAccessResponse, n as CreateRenderInput, o as CreditBalance, T as TranscriptPayload, V as VoiceWebhookRequest } from './types-VoejsHij.js';
2
+ export { p as AvatarClip, q as CallConnection, r as CallQueued, s as ClipDeclaration, t as ClipLibraryPlan, u as ClipSource, v as ContextMessage, w as EndCallReason, x as ExternalLlm, y as RecordingArtifactStatus, z as RecordingMode, B as RenderShot, D as VideoPolicy, F as VoiceWebhook, G as VoiceWebhookErrorCode, H as isQueued, I as listRecordingsResponseSchema, J as recordingAccessResponseSchema, K as recordingArtifactSchema, M as recordingModeSchema } from './types-VoejsHij.js';
3
3
  import { ConnectionHistoryResponse } from './connection-history.js';
4
4
  import { z } from 'zod';
5
5
 
@@ -605,5 +605,13 @@ declare const fishTtsModelSchema: z.ZodUnion<readonly [z.ZodEnum<{
605
605
  }>]>;
606
606
  type FishTtsModel = z.infer<typeof fishTtsModelSchema>;
607
607
  declare const DEFAULT_FISH_TTS_MODEL: "s2.1-pro";
608
+ declare const fishDeliverySchema: z.ZodUnion<readonly [z.ZodEnum<{
609
+ whisper: "whisper";
610
+ }>, z.ZodNull]>;
611
+ type FishDelivery = NonNullable<z.infer<typeof fishDeliverySchema>>;
612
+ /** The models each delivery can be heard on, from the platform's `x-fish-delivery-models`. */
613
+ declare const FISH_DELIVERY_MODELS: {
614
+ readonly whisper: readonly ["drama-3"];
615
+ };
608
616
 
609
- export { Asset, AssetKind, Avatar, AvatarSourceSwap, AvatarUpdate, CallMode, CallPolicy, ClipLibrary, ClipLibraryDeclaration, ClipLibraryUpdate, CreateRenderInput, CreditBalance, DEFAULT_FISH_TTS_MODEL, EndCallOptions, type FishTtsModel, ListRecordingsQuery, ListRecordingsResponse, type ListRendersQuery, type ListRendersResponse, ListSessionsOptions, LoopRedirect, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, type RealtimeAvatarOptions, RealtimeAvatarWebhookError, RecordingAccessResponse, RecordingArtifact, type Render, type RenderAccessResponse, type RenderFailureCode, type RenderPlayback, type RenderStatus, type ShotTiming, type StartCallOptions, StartCallResult, TranscriptPayload, UsageSession, UsageSessionPage, VoiceWebhookRequest, type WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, listRendersResponseSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook };
617
+ export { Asset, AssetKind, Avatar, AvatarSourceSwap, AvatarUpdate, CallMode, CallPolicy, ClipLibrary, ClipLibraryDeclaration, ClipLibraryUpdate, CreateRenderInput, CreditBalance, DEFAULT_FISH_TTS_MODEL, EndCallOptions, FISH_DELIVERY_MODELS, type FishDelivery, type FishTtsModel, ListRecordingsQuery, ListRecordingsResponse, type ListRendersQuery, type ListRendersResponse, ListSessionsOptions, LoopRedirect, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, type RealtimeAvatarOptions, RealtimeAvatarWebhookError, RecordingAccessResponse, RecordingArtifact, type Render, type RenderAccessResponse, type RenderFailureCode, type RenderPlayback, type RenderStatus, type ShotTiming, type StartCallOptions, StartCallResult, TranscriptPayload, UsageSession, UsageSessionPage, VoiceWebhookRequest, type WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, listRendersResponseSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { DEFAULT_FISH_TTS_MODEL, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-LRGQKZFB.js';
1
+ export { DEFAULT_FISH_TTS_MODEL, FISH_DELIVERY_MODELS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-VLYUMP3I.js';
2
2
  import './chunk-MCIXU6XP.js';
package/dist/nextjs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-Du6T6XQB.js';
2
- import './types-DOFXGl7G.js';
1
+ import { P as ProxyConfig } from './types-DygYBvSv.js';
2
+ import './types-VoejsHij.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/nextjs.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-TJM53JXR.js';
2
- import './chunk-LRGQKZFB.js';
1
+ import { createProxyHandler } from './chunk-DM5TWRC4.js';
2
+ import './chunk-VLYUMP3I.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/nextjs.ts
@@ -48,6 +48,14 @@ declare const fishTtsModelSchema: z.ZodUnion<readonly [z.ZodEnum<{
48
48
  }>]>;
49
49
  type FishTtsModel$1 = z.infer<typeof fishTtsModelSchema>;
50
50
  declare const DEFAULT_FISH_TTS_MODEL: "s2.1-pro";
51
+ declare const fishDeliverySchema: z.ZodUnion<readonly [z.ZodEnum<{
52
+ whisper: "whisper";
53
+ }>, z.ZodNull]>;
54
+ type FishDelivery = NonNullable<z.infer<typeof fishDeliverySchema>>;
55
+ /** The models each delivery can be heard on, from the platform's `x-fish-delivery-models`. */
56
+ declare const FISH_DELIVERY_MODELS: {
57
+ readonly whisper: readonly ["drama-3"];
58
+ };
51
59
 
52
60
  /**
53
61
  * Wire schemas for the public Realtime Avatar API.
@@ -120,6 +128,9 @@ declare const voiceSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
120
128
  speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
121
129
  emotion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
130
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
+ delivery: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
132
+ whisper: "whisper";
133
+ }>, z.ZodNull]>>;
123
134
  }, z.core.$strict>], "provider">;
124
135
  declare const sessionClipSchema: z.ZodObject<{
125
136
  clip_id: z.ZodString;
@@ -228,6 +239,9 @@ declare const liveKitSessionRequestSchema: z.ZodObject<{
228
239
  speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
229
240
  emotion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
241
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ delivery: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
243
+ whisper: "whisper";
244
+ }>, z.ZodNull]>>;
231
245
  }, z.core.$strict>], "provider">>>;
232
246
  voiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
247
  clipLibrary: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2139,4 +2153,4 @@ interface ProxyClientOptions {
2139
2153
  }
2140
2154
  declare function createProxyClient(options: ProxyClientOptions): AvatarSessionClient;
2141
2155
 
2142
- export { MAX_RECONNECT_ATTEMPTS as $, type AvatarVideoFit as A, type BehaviorSnapshot as B, type CallTranscript as C, DEFAULT_APPROACHING_END_LEAD_SECONDS as D, type EndReason as E, type FishTtsModel as F, type Governor as G, type GovernorAction as H, type GovernorConfig as I, type GovernorSignal as J, type GovernorState as K, type LiveKitSessionGrant as L, type GraceWindowClosedEvent as M, type GraceWindowOpenEvent as N, type GraceWindowState as O, type IdleWarningEvent as P, type InboundRtpCursor as Q, type InboundRtpReading as R, type KnownBehaviorState as S, type LLMProvider as T, type LLMSelection as U, type LiveKitAvatarGrantState as V, type LiveKitAvatarGrantStatus as W, type LiveKitCapacityState as X, type LiveKitConnectionStatus as Y, type LiveKitSessionRequest as Z, type LiveKitSessionStartResult as _, AdaptivePlayoutController as a, type LivePlaybackKeeper as a$, MAX_SESSION_INSTRUCTIONS_CHARS as a0, type ProxyClientOptions as a1, type QualityCap as a2, RECONNECT_BACKOFF_MS as a3, type RealtimeAvatarRequestOptions as a4, type RealtimeSessionApi as a5, type RealtimeSessionMedia as a6, type RealtimeSessionRoomSinks as a7, type ReconnectPolicy as a8, type ReconnectingEvent as a9, capacityErrorFromBusy as aA, capacityStateFromGrant as aB, createProxyClient as aC, fishTtsModelSchema as aD, isNativeLiveTrackSubscribed as aE, knownBehaviorStates as aF, mapTurnState as aG, readInboundRtp as aH, sessionBehaviorSchema as aI, sessionClipSchema as aJ, splitCallTranscript as aK, useAvatarAdaptivePlayoutDelay as aL, useAvatarCamera as aM, useAvatarPlayoutDelay as aN, useAvatarQualityGovernor as aO, useCallTranscript as aP, useLiveKitAvatarGrant as aQ, useLiveTrackProducing as aR, useMicLease as aS, useRealtimeSession as aT, useReleaseMicLeaseOnTrackEnded as aU, useSessionLifecycle as aV, type CallMicrophone as aW, type CallAudioPlayback as aX, type CallMicrophoneProblem as aY, AvatarVideoSurface as aZ, type AvatarVideoSurfaceProps as a_, type RecoveryState as aa, type RetryStep as ab, type SendTurnOptions as ac, type SessionBehavior as ad, type SessionClip as ae, type SessionClocks as af, type SessionEndReason as ag, type SessionLifecycleApi as ah, type SessionLifecyclePhase as ai, type SessionLifecyclePhaseKind as aj, SessionLifecycleRoomBridge as ak, type SessionLifecycleRoomBridgeProps as al, type SessionReadinessFailure as am, type SurfaceLayers as an, type TranscriptSender as ao, type TranscriptSenderOptions as ap, type TurnState as aq, type TurnTimeoutEvent as ar, type UseAvatarQualityGovernorInput as as, type UseLiveKitAvatarGrantInput as at, type UseRealtimeSessionInput as au, type UseSessionLifecycleInput as av, type VoiceError as aw, type VoiceErrorCode as ax, type VoiceSpec as ay, type VoiceSpecInput as az, type AdaptivePlayoutDecision as b, MIC_LEASE_ENDED_TIMEOUT_MS as b0, type MicLease as b1, NETWORK_QUALITY_POLICY as b2, type NetworkQualityStatus as b3, type PlayableVideoElement as b4, RealtimeAvatarCapacityError as b5, RealtimeAvatarLiveKitRoom as b6, type RealtimeAvatarLiveKitRoomProps as b7, shouldReplayPendingTurn as b8, type AdaptivePlayoutOptions as c, type AdaptivePlayoutSample as d, type ApproachingEndEvent as e, type ApproachingEndReason as f, type AvatarConnectionDetails as g, type AvatarSessionClient as h, type CallTranscriptSegment as i, type CartesiaTtsModel as j, type ClipResult as k, type ClosingTurnResult as l, type CreditsLowEvent as m, DEFAULT_CREDITS_LOW_LEAD_SECONDS as n, DEFAULT_FISH_TTS_MODEL as o, DEFAULT_GOVERNOR_CONFIG as p, DEFAULT_GRACE_CEILING_SECONDS as q, DEFAULT_GRACE_WINDOW_LEAD_SECONDS as r, DEFAULT_IDLE_SECONDS as s, DEFAULT_IDLE_WARN_LEAD_SECONDS as t, DEFAULT_READY_TIMEOUT_SECONDS as u, DEFAULT_TURN_TIMEOUT_SECONDS as v, type DeclaredInputSource as w, type EndedEvent as x, type ExtendResult as y, type FreezeReadingFn as z };
2156
+ export { type LiveKitSessionRequest as $, type AvatarVideoFit as A, type BehaviorSnapshot as B, type CallTranscript as C, DEFAULT_APPROACHING_END_LEAD_SECONDS as D, type EndReason as E, FISH_DELIVERY_MODELS as F, type FishTtsModel as G, type FreezeReadingFn as H, type Governor as I, type GovernorAction as J, type GovernorConfig as K, type LiveKitSessionGrant as L, type GovernorSignal as M, type GovernorState as N, type GraceWindowClosedEvent as O, type GraceWindowOpenEvent as P, type GraceWindowState as Q, type IdleWarningEvent as R, type InboundRtpCursor as S, type InboundRtpReading as T, type KnownBehaviorState as U, type LLMProvider as V, type LLMSelection as W, type LiveKitAvatarGrantState as X, type LiveKitAvatarGrantStatus as Y, type LiveKitCapacityState as Z, type LiveKitConnectionStatus as _, AdaptivePlayoutController as a, AvatarVideoSurface as a$, type LiveKitSessionStartResult as a0, MAX_RECONNECT_ATTEMPTS as a1, MAX_SESSION_INSTRUCTIONS_CHARS as a2, type ProxyClientOptions as a3, type QualityCap as a4, RECONNECT_BACKOFF_MS as a5, type RealtimeAvatarRequestOptions as a6, type RealtimeSessionApi as a7, type RealtimeSessionMedia as a8, type RealtimeSessionRoomSinks as a9, type VoiceSpec as aA, type VoiceSpecInput as aB, capacityErrorFromBusy as aC, capacityStateFromGrant as aD, createProxyClient as aE, fishTtsModelSchema as aF, isNativeLiveTrackSubscribed as aG, knownBehaviorStates as aH, mapTurnState as aI, readInboundRtp as aJ, sessionBehaviorSchema as aK, sessionClipSchema as aL, splitCallTranscript as aM, useAvatarAdaptivePlayoutDelay as aN, useAvatarCamera as aO, useAvatarPlayoutDelay as aP, useAvatarQualityGovernor as aQ, useCallTranscript as aR, useLiveKitAvatarGrant as aS, useLiveTrackProducing as aT, useMicLease as aU, useRealtimeSession as aV, useReleaseMicLeaseOnTrackEnded as aW, useSessionLifecycle as aX, type CallMicrophone as aY, type CallAudioPlayback as aZ, type CallMicrophoneProblem as a_, type ReconnectPolicy as aa, type ReconnectingEvent as ab, type RecoveryState as ac, type RetryStep as ad, type SendTurnOptions as ae, type SessionBehavior as af, type SessionClip as ag, type SessionClocks as ah, type SessionEndReason as ai, type SessionLifecycleApi as aj, type SessionLifecyclePhase as ak, type SessionLifecyclePhaseKind as al, SessionLifecycleRoomBridge as am, type SessionLifecycleRoomBridgeProps as an, type SessionReadinessFailure as ao, type SurfaceLayers as ap, type TranscriptSender as aq, type TranscriptSenderOptions as ar, type TurnState as as, type TurnTimeoutEvent as at, type UseAvatarQualityGovernorInput as au, type UseLiveKitAvatarGrantInput as av, type UseRealtimeSessionInput as aw, type UseSessionLifecycleInput as ax, type VoiceError as ay, type VoiceErrorCode as az, type AdaptivePlayoutDecision as b, type AvatarVideoSurfaceProps as b0, type LivePlaybackKeeper as b1, MIC_LEASE_ENDED_TIMEOUT_MS as b2, type MicLease as b3, NETWORK_QUALITY_POLICY as b4, type NetworkQualityStatus as b5, type PlayableVideoElement as b6, RealtimeAvatarCapacityError as b7, RealtimeAvatarLiveKitRoom as b8, type RealtimeAvatarLiveKitRoomProps as b9, shouldReplayPendingTurn as ba, type AdaptivePlayoutOptions as c, type AdaptivePlayoutSample as d, type ApproachingEndEvent as e, type ApproachingEndReason as f, type AvatarConnectionDetails as g, type AvatarSessionClient as h, type CallTranscriptSegment as i, type CartesiaTtsModel as j, type ClipResult as k, type ClosingTurnResult as l, type CreditsLowEvent as m, DEFAULT_CREDITS_LOW_LEAD_SECONDS as n, DEFAULT_FISH_TTS_MODEL as o, DEFAULT_GOVERNOR_CONFIG as p, DEFAULT_GRACE_CEILING_SECONDS as q, DEFAULT_GRACE_WINDOW_LEAD_SECONDS as r, DEFAULT_IDLE_SECONDS as s, DEFAULT_IDLE_WARN_LEAD_SECONDS as t, DEFAULT_READY_TIMEOUT_SECONDS as u, DEFAULT_TURN_TIMEOUT_SECONDS as v, type DeclaredInputSource as w, type EndedEvent as x, type ExtendResult as y, type FishDelivery as z };
@@ -1,12 +1,13 @@
1
1
  import { LiveKitRoomProps } from '@livekit/react-native';
2
2
  export { AudioSession, VideoTrack, VideoTrackProps, registerGlobals } from '@livekit/react-native';
3
- import { L as LiveKitSessionGrant, A as AvatarVideoFit } from './proxy-client-BlaFxR6S.js';
4
- export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, h as AvatarSessionClient, 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, $ as MAX_RECONNECT_ATTEMPTS, a0 as MAX_SESSION_INSTRUCTIONS_CHARS, a1 as ProxyClientOptions, a2 as QualityCap, a3 as RECONNECT_BACKOFF_MS, 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, al as SessionLifecycleRoomBridgeProps, 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, aw as VoiceError, ax as VoiceErrorCode, ay as VoiceSpec, az as VoiceSpecInput, aA as capacityErrorFromBusy, aB as capacityStateFromGrant, aC as createProxyClient, aD as fishTtsModelSchema, aE as isNativeLiveTrackSubscribed, aF as knownBehaviorStates, aG as mapTurnState, aH as readInboundRtp, aI as sessionBehaviorSchema, aJ as sessionClipSchema, aK as splitCallTranscript, aL as useAvatarAdaptivePlayoutDelay, aM as useAvatarCamera, aN as useAvatarPlayoutDelay, aO as useAvatarQualityGovernor, aP as useCallTranscript, aQ as useLiveKitAvatarGrant, aR as useLiveTrackProducing, aS as useMicLease, aT as useRealtimeSession, aU as useReleaseMicLeaseOnTrackEnded, aV as useSessionLifecycle } from './proxy-client-BlaFxR6S.js';
3
+ import { L as LiveKitSessionGrant, A as AvatarVideoFit } from './proxy-client-DJhYiiKX.js';
4
+ export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, h as AvatarSessionClient, 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 FISH_DELIVERY_MODELS, z as FishDelivery, G as FishTtsModel, H as FreezeReadingFn, I as Governor, J as GovernorAction, K as GovernorConfig, M as GovernorSignal, N as GovernorState, O as GraceWindowClosedEvent, P as GraceWindowOpenEvent, Q as GraceWindowState, R as IdleWarningEvent, S as InboundRtpCursor, T as InboundRtpReading, U as KnownBehaviorState, V as LLMProvider, W as LLMSelection, X as LiveKitAvatarGrantState, Y as LiveKitAvatarGrantStatus, Z as LiveKitCapacityState, _ as LiveKitConnectionStatus, $ as LiveKitSessionRequest, a0 as LiveKitSessionStartResult, a1 as MAX_RECONNECT_ATTEMPTS, a2 as MAX_SESSION_INSTRUCTIONS_CHARS, a3 as ProxyClientOptions, a4 as QualityCap, a5 as RECONNECT_BACKOFF_MS, a6 as RealtimeAvatarRequestOptions, a7 as RealtimeSessionApi, a8 as RealtimeSessionMedia, a9 as RealtimeSessionRoomSinks, aa as ReconnectPolicy, ab as ReconnectingEvent, ac as RecoveryState, ad as RetryStep, ae as SendTurnOptions, af as SessionBehavior, ag as SessionClip, ah as SessionClocks, ai as SessionEndReason, aj as SessionLifecycleApi, ak as SessionLifecyclePhase, al as SessionLifecyclePhaseKind, am as SessionLifecycleRoomBridge, an as SessionLifecycleRoomBridgeProps, ao as SessionReadinessFailure, ap as SurfaceLayers, aq as TranscriptSender, ar as TranscriptSenderOptions, as as TurnState, at as TurnTimeoutEvent, au as UseAvatarQualityGovernorInput, av as UseLiveKitAvatarGrantInput, aw as UseRealtimeSessionInput, ax as UseSessionLifecycleInput, ay as VoiceError, az as VoiceErrorCode, aA as VoiceSpec, aB as VoiceSpecInput, aC as capacityErrorFromBusy, aD as capacityStateFromGrant, aE as createProxyClient, aF as fishTtsModelSchema, aG as isNativeLiveTrackSubscribed, aH as knownBehaviorStates, aI as mapTurnState, aJ as readInboundRtp, aK as sessionBehaviorSchema, aL as sessionClipSchema, aM as splitCallTranscript, aN as useAvatarAdaptivePlayoutDelay, aO as useAvatarCamera, aP as useAvatarPlayoutDelay, aQ as useAvatarQualityGovernor, aR as useCallTranscript, aS as useLiveKitAvatarGrant, aT as useLiveTrackProducing, aU as useMicLease, aV as useRealtimeSession, aW as useReleaseMicLeaseOnTrackEnded, aX as useSessionLifecycle } from './proxy-client-DJhYiiKX.js';
5
+ import { Room } from 'livekit-client';
6
+ export { DisconnectReason, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Room, RoomEvent, SendTextOptions, Track } from 'livekit-client';
5
7
  import { ReactNode, ReactElement } from 'react';
6
8
  import { StyleProp, ViewStyle } from 'react-native';
7
9
  export { useChat, useConnectionState, useLocalParticipant, useRoomContext, useTrackToggle, useTranscriptions, useVoiceAssistant } from '@livekit/components-react';
8
10
  export { D as DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS } from './playout-delay-CtRZdtsj.js';
9
- export { DisconnectReason, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Room, RoomEvent, SendTextOptions, Track } from 'livekit-client';
10
11
  import 'zod';
11
12
 
12
13
  type RealtimeAvatarLiveKitRoomProps = Omit<LiveKitRoomProps, "serverUrl" | "token" | "connect" | "audio" | "video" | "options"> & {
@@ -32,6 +33,12 @@ type RealtimeAvatarLiveKitRoomProps = Omit<LiveKitRoomProps, "serverUrl" | "toke
32
33
  * LiveKitRoom props) can still one-line the session lifecycle.
33
34
  */
34
35
  declare function useRealtimeAvatarAudioSession(enabled: boolean): void;
36
+ /**
37
+ * Run `clearStaleInputMute` each time `room`'s local microphone goes live: when it is published
38
+ * unmuted and when it is unmuted later, for as long as that publication stays published and
39
+ * unmuted and this hook stays mounted.
40
+ */
41
+ declare function useClearStaleInputMute(room: Room | undefined): void;
35
42
  /** Thin typed bridge from a Realtime Avatar grant into the native LiveKitRoom. */
36
43
  declare function RealtimeAvatarLiveKitRoom(props: RealtimeAvatarLiveKitRoomProps): ReactElement;
37
44
 
@@ -126,4 +133,4 @@ type AvatarVideoSurfaceProps = {
126
133
  */
127
134
  declare function AvatarVideoSurface(props: AvatarVideoSurfaceProps): ReactElement;
128
135
 
129
- export { AvatarVideoFit, AvatarVideoSurface, type AvatarVideoSurfaceProps, type IdleVideoRender, RealtimeAvatarLiveKitRoom, type RealtimeAvatarLiveKitRoomProps, useRealtimeAvatarAudioSession };
136
+ export { AvatarVideoFit, AvatarVideoSurface, type AvatarVideoSurfaceProps, type IdleVideoRender, RealtimeAvatarLiveKitRoom, type RealtimeAvatarLiveKitRoomProps, useClearStaleInputMute, useRealtimeAvatarAudioSession };
@@ -3,8 +3,9 @@ export { AudioSession, VideoTrack, registerGlobals } from '@livekit/react-native
3
3
  import { useState, useRef, useEffect, useCallback, createElement, useMemo } from 'react';
4
4
  import { useLocalParticipant, useConnectionState, useTranscriptions, useMaybeRoomContext, useVoiceAssistant, isTrackReference, useRoomContext, useChat, useAudioPlayback } from '@livekit/components-react';
5
5
  export { useChat, useConnectionState, useLocalParticipant, useRoomContext, useTrackToggle, useTranscriptions, useVoiceAssistant } from '@livekit/components-react';
6
- import { ConnectionState, isRemoteTrack, VideoQuality, ConnectionQuality, RoomEvent, TrackEvent, Track, ConnectionError, ConnectionErrorReason, ParticipantEvent, DisconnectReason, createLocalVideoTrack, Room } from 'livekit-client';
6
+ import { ConnectionState, RoomEvent, Track, isRemoteTrack, VideoQuality, ConnectionQuality, TrackEvent, ConnectionError, ConnectionErrorReason, ParticipantEvent, DisconnectReason, createLocalVideoTrack, Room } from 'livekit-client';
7
7
  export { DisconnectReason, Room, RoomEvent, Track } from 'livekit-client';
8
+ import { AudioDeviceModule, AudioEngineMuteMode } from '@livekit/react-native-webrtc';
8
9
  import { Platform, StyleSheet, Animated, Image, View, Text } from 'react-native';
9
10
  import { z } from 'zod';
10
11
 
@@ -159,6 +160,51 @@ function useRealtimeAvatarAudioSession(enabled) {
159
160
  };
160
161
  }, [enabled]);
161
162
  }
163
+ var INPUT_LIVE_WAIT_MS = 5e3;
164
+ var INPUT_LIVE_POLL_MS = 100;
165
+ async function clearStaleInputMute(stillWanted) {
166
+ if (Platform.OS !== "ios") return;
167
+ try {
168
+ if (AudioDeviceModule.getMuteMode() !== AudioEngineMuteMode.VoiceProcessing) return;
169
+ for (const deadline = Date.now() + INPUT_LIVE_WAIT_MS; !AudioDeviceModule.isRecording(); ) {
170
+ if (Date.now() >= deadline || !stillWanted()) return;
171
+ await new Promise((resolve) => setTimeout(resolve, INPUT_LIVE_POLL_MS));
172
+ }
173
+ if (!stillWanted()) return;
174
+ try {
175
+ await AudioDeviceModule.setMicrophoneMuted(true);
176
+ } finally {
177
+ await AudioDeviceModule.setMicrophoneMuted(false);
178
+ }
179
+ } catch {
180
+ }
181
+ }
182
+ function useClearStaleInputMute(room) {
183
+ useEffect(() => {
184
+ if (!room) return;
185
+ let mounted = true;
186
+ const local = room.localParticipant;
187
+ const clearIfLive = (publication) => {
188
+ if (publication?.source !== Track.Source.Microphone || publication.isMuted) return;
189
+ void clearStaleInputMute(
190
+ () => mounted && !publication.isMuted && local.getTrackPublication(Track.Source.Microphone) === publication
191
+ );
192
+ };
193
+ const onUnmuted = (publication, participant) => {
194
+ if (participant === local) clearIfLive(publication);
195
+ };
196
+ room.on(RoomEvent.LocalTrackPublished, clearIfLive).on(RoomEvent.TrackUnmuted, onUnmuted);
197
+ clearIfLive(local.getTrackPublication(Track.Source.Microphone));
198
+ return () => {
199
+ mounted = false;
200
+ room.off(RoomEvent.LocalTrackPublished, clearIfLive).off(RoomEvent.TrackUnmuted, onUnmuted);
201
+ };
202
+ }, [room]);
203
+ }
204
+ function StaleInputMuteClearer() {
205
+ useClearStaleInputMute(useMaybeRoomContext());
206
+ return null;
207
+ }
162
208
  function RealtimeAvatarLiveKitRoom(props) {
163
209
  const {
164
210
  grant,
@@ -186,6 +232,7 @@ function RealtimeAvatarLiveKitRoom(props) {
186
232
  video: cameraPublishOptions(grant, video),
187
233
  options: roomOptions
188
234
  },
235
+ createElement(StaleInputMuteClearer),
189
236
  children
190
237
  );
191
238
  }
@@ -1743,8 +1790,13 @@ var voiceErrorFrameSchema = schema5;
1743
1790
  var schema04 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
1744
1791
  var schema13 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
1745
1792
  var schema23 = z.union([schema04, schema13]);
1793
+ var schema33 = z.enum(["whisper"]);
1794
+ var schema43 = z.null();
1795
+ var schema52 = z.union([schema33, schema43]);
1746
1796
  var fishTtsModelSchema = schema23;
1747
1797
  var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
1798
+ var fishDeliverySchema = schema52;
1799
+ var FISH_DELIVERY_MODELS = { "whisper": ["drama-3"] };
1748
1800
 
1749
1801
  // ../client/src/wire.ts
1750
1802
  var DEFAULT_AVATAR_ID = "maria";
@@ -1813,8 +1865,15 @@ var fishVoiceSpecSchema = z.object({
1813
1865
  voice_id: z.string().min(1).max(120),
1814
1866
  speed: z.number().min(0.5).max(2).nullable().optional(),
1815
1867
  emotion: z.string().min(1).max(80).nullable().optional(),
1816
- language: z.string().min(2).max(16).nullable().optional()
1817
- }).strict();
1868
+ language: z.string().min(2).max(16).nullable().optional(),
1869
+ delivery: fishDeliverySchema.optional()
1870
+ }).strict().superRefine((voice, ctx) => {
1871
+ if (!voice.delivery) return;
1872
+ const models = FISH_DELIVERY_MODELS[voice.delivery];
1873
+ if (!models.includes(voice.model)) {
1874
+ ctx.addIssue({ code: "custom", path: ["delivery"], message: `delivery "${voice.delivery}" needs model ${models.join(" | ")}` });
1875
+ }
1876
+ });
1818
1877
  var voiceSpecSchema = z.discriminatedUnion("provider", [
1819
1878
  cartesiaVoiceSpecSchema,
1820
1879
  breezeVoiceSpecSchema,
@@ -3885,4 +3944,4 @@ function createProxyClient(options) {
3885
3944
  };
3886
3945
  }
3887
3946
 
3888
- export { AdaptivePlayoutController, AvatarVideoSurface, DEFAULT_APPROACHING_END_LEAD_SECONDS, DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS, DEFAULT_CREDITS_LOW_LEAD_SECONDS, DEFAULT_FISH_TTS_MODEL, DEFAULT_GOVERNOR_CONFIG, DEFAULT_GRACE_CEILING_SECONDS, DEFAULT_GRACE_WINDOW_LEAD_SECONDS, DEFAULT_IDLE_SECONDS, DEFAULT_IDLE_WARN_LEAD_SECONDS, DEFAULT_READY_TIMEOUT_SECONDS, DEFAULT_TURN_TIMEOUT_SECONDS, MAX_RECONNECT_ATTEMPTS, MAX_SESSION_INSTRUCTIONS_CHARS, RECONNECT_BACKOFF_MS, RealtimeAvatarLiveKitRoom, SessionLifecycleRoomBridge, capacityErrorFromBusy, capacityStateFromGrant, createProxyClient, fishTtsModelSchema, isNativeLiveTrackSubscribed, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useLiveKitAvatarGrant, useLiveTrackProducing, useMicLease, useRealtimeAvatarAudioSession, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
3947
+ export { AdaptivePlayoutController, AvatarVideoSurface, DEFAULT_APPROACHING_END_LEAD_SECONDS, DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS, DEFAULT_CREDITS_LOW_LEAD_SECONDS, DEFAULT_FISH_TTS_MODEL, DEFAULT_GOVERNOR_CONFIG, DEFAULT_GRACE_CEILING_SECONDS, DEFAULT_GRACE_WINDOW_LEAD_SECONDS, DEFAULT_IDLE_SECONDS, DEFAULT_IDLE_WARN_LEAD_SECONDS, DEFAULT_READY_TIMEOUT_SECONDS, DEFAULT_TURN_TIMEOUT_SECONDS, FISH_DELIVERY_MODELS, MAX_RECONNECT_ATTEMPTS, MAX_SESSION_INSTRUCTIONS_CHARS, RECONNECT_BACKOFF_MS, RealtimeAvatarLiveKitRoom, SessionLifecycleRoomBridge, capacityErrorFromBusy, capacityStateFromGrant, createProxyClient, fishTtsModelSchema, isNativeLiveTrackSubscribed, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useClearStaleInputMute, useLiveKitAvatarGrant, useLiveTrackProducing, useMicLease, useRealtimeAvatarAudioSession, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
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 { an as SessionLifecycleRoomBridgeProps, h as AvatarSessionClient, A as AvatarVideoFit, aY as CallMicrophone, aZ as CallAudioPlayback, ay as VoiceError, a_ as CallMicrophoneProblem } from './proxy-client-DJhYiiKX.js';
3
+ export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, a$ as AvatarVideoSurface, b0 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 FISH_DELIVERY_MODELS, z as FishDelivery, G as FishTtsModel, H as FreezeReadingFn, I as Governor, J as GovernorAction, K as GovernorConfig, M as GovernorSignal, N as GovernorState, O as GraceWindowClosedEvent, P as GraceWindowOpenEvent, Q as GraceWindowState, R as IdleWarningEvent, S as InboundRtpCursor, T as InboundRtpReading, U as KnownBehaviorState, V as LLMProvider, W as LLMSelection, X as LiveKitAvatarGrantState, Y as LiveKitAvatarGrantStatus, Z as LiveKitCapacityState, _ as LiveKitConnectionStatus, $ as LiveKitSessionRequest, a0 as LiveKitSessionStartResult, b1 as LivePlaybackKeeper, a1 as MAX_RECONNECT_ATTEMPTS, a2 as MAX_SESSION_INSTRUCTIONS_CHARS, b2 as MIC_LEASE_ENDED_TIMEOUT_MS, b3 as MicLease, b4 as NETWORK_QUALITY_POLICY, b5 as NetworkQualityStatus, b6 as PlayableVideoElement, a3 as ProxyClientOptions, a4 as QualityCap, a5 as RECONNECT_BACKOFF_MS, b7 as RealtimeAvatarCapacityError, b8 as RealtimeAvatarLiveKitRoom, b9 as RealtimeAvatarLiveKitRoomProps, a6 as RealtimeAvatarRequestOptions, a7 as RealtimeSessionApi, a8 as RealtimeSessionMedia, a9 as RealtimeSessionRoomSinks, aa as ReconnectPolicy, ab as ReconnectingEvent, ac as RecoveryState, ad as RetryStep, ae as SendTurnOptions, af as SessionBehavior, ag as SessionClip, ah as SessionClocks, ai as SessionEndReason, aj as SessionLifecycleApi, ak as SessionLifecyclePhase, al as SessionLifecyclePhaseKind, am as SessionLifecycleRoomBridge, ao as SessionReadinessFailure, ap as SurfaceLayers, aq as TranscriptSender, ar as TranscriptSenderOptions, as as TurnState, at as TurnTimeoutEvent, au as UseAvatarQualityGovernorInput, av as UseLiveKitAvatarGrantInput, aw as UseRealtimeSessionInput, ax as UseSessionLifecycleInput, az as VoiceErrorCode, aA as VoiceSpec, aB as VoiceSpecInput, aC as capacityErrorFromBusy, aD as capacityStateFromGrant, aE as createProxyClient, aF as fishTtsModelSchema, aH as knownBehaviorStates, aI as mapTurnState, aJ as readInboundRtp, aK as sessionBehaviorSchema, aL as sessionClipSchema, ba as shouldReplayPendingTurn, aM as splitCallTranscript, aN as useAvatarAdaptivePlayoutDelay, aO as useAvatarCamera, aP as useAvatarPlayoutDelay, aQ as useAvatarQualityGovernor, aR as useCallTranscript, aS as useLiveKitAvatarGrant, aU as useMicLease, aV as useRealtimeSession, aW as useReleaseMicLeaseOnTrackEnded, aX as useSessionLifecycle } from './proxy-client-DJhYiiKX.js';
4
4
  import { CSSProperties, ReactNode } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { R as RecordingArtifact } from './recording-ydFVySSd.js';
package/dist/react.js CHANGED
@@ -2362,8 +2362,13 @@ var voiceErrorFrameSchema = schema5;
2362
2362
  var schema04 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
2363
2363
  var schema13 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
2364
2364
  var schema23 = z.union([schema04, schema13]);
2365
+ var schema33 = z.enum(["whisper"]);
2366
+ var schema43 = z.null();
2367
+ var schema52 = z.union([schema33, schema43]);
2365
2368
  var fishTtsModelSchema = schema23;
2366
2369
  var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
2370
+ var fishDeliverySchema = schema52;
2371
+ var FISH_DELIVERY_MODELS = { "whisper": ["drama-3"] };
2367
2372
 
2368
2373
  // ../client/src/wire.ts
2369
2374
  var DEFAULT_AVATAR_ID = "maria";
@@ -2432,8 +2437,15 @@ var fishVoiceSpecSchema = z.object({
2432
2437
  voice_id: z.string().min(1).max(120),
2433
2438
  speed: z.number().min(0.5).max(2).nullable().optional(),
2434
2439
  emotion: z.string().min(1).max(80).nullable().optional(),
2435
- language: z.string().min(2).max(16).nullable().optional()
2436
- }).strict();
2440
+ language: z.string().min(2).max(16).nullable().optional(),
2441
+ delivery: fishDeliverySchema.optional()
2442
+ }).strict().superRefine((voice, ctx) => {
2443
+ if (!voice.delivery) return;
2444
+ const models = FISH_DELIVERY_MODELS[voice.delivery];
2445
+ if (!models.includes(voice.model)) {
2446
+ ctx.addIssue({ code: "custom", path: ["delivery"], message: `delivery "${voice.delivery}" needs model ${models.join(" | ")}` });
2447
+ }
2448
+ });
2437
2449
  var voiceSpecSchema = z.discriminatedUnion("provider", [
2438
2450
  cartesiaVoiceSpecSchema,
2439
2451
  breezeVoiceSpecSchema,
@@ -4907,4 +4919,4 @@ function RecordingPlayer({ assets, className }) {
4907
4919
  ] });
4908
4920
  }
4909
4921
 
4910
- export { AdaptivePlayoutController, AvatarCall, AvatarVideoSurface, DEFAULT_APPROACHING_END_LEAD_SECONDS, DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS, DEFAULT_AVATAR_UNSTABLE_STALL_MS, DEFAULT_CREDITS_LOW_LEAD_SECONDS, DEFAULT_FISH_TTS_MODEL, DEFAULT_GOVERNOR_CONFIG, DEFAULT_GRACE_CEILING_SECONDS, DEFAULT_GRACE_WINDOW_LEAD_SECONDS, DEFAULT_IDLE_SECONDS, DEFAULT_IDLE_WARN_LEAD_SECONDS, DEFAULT_READY_TIMEOUT_SECONDS, DEFAULT_TURN_TIMEOUT_SECONDS, MAX_RECONNECT_ATTEMPTS, MAX_SESSION_INSTRUCTIONS_CHARS, MIC_LEASE_ENDED_TIMEOUT_MS, NETWORK_QUALITY_POLICY, RECONNECT_BACKOFF_MS, RealtimeAvatarCapacityError, RealtimeAvatarLiveKitRoom, RecordingPlayer, SessionLifecycleRoomBridge, capacityErrorFromBusy, capacityStateFromGrant, createProxyClient, fishTtsModelSchema, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, shouldReplayPendingTurn, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCall, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useCharacterTools, useLiveKitAvatarGrant, useMicLease, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
4922
+ export { AdaptivePlayoutController, AvatarCall, AvatarVideoSurface, DEFAULT_APPROACHING_END_LEAD_SECONDS, DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS, DEFAULT_AVATAR_UNSTABLE_STALL_MS, DEFAULT_CREDITS_LOW_LEAD_SECONDS, DEFAULT_FISH_TTS_MODEL, DEFAULT_GOVERNOR_CONFIG, DEFAULT_GRACE_CEILING_SECONDS, DEFAULT_GRACE_WINDOW_LEAD_SECONDS, DEFAULT_IDLE_SECONDS, DEFAULT_IDLE_WARN_LEAD_SECONDS, DEFAULT_READY_TIMEOUT_SECONDS, DEFAULT_TURN_TIMEOUT_SECONDS, FISH_DELIVERY_MODELS, MAX_RECONNECT_ATTEMPTS, MAX_SESSION_INSTRUCTIONS_CHARS, MIC_LEASE_ENDED_TIMEOUT_MS, NETWORK_QUALITY_POLICY, RECONNECT_BACKOFF_MS, RealtimeAvatarCapacityError, RealtimeAvatarLiveKitRoom, RecordingPlayer, SessionLifecycleRoomBridge, capacityErrorFromBusy, capacityStateFromGrant, createProxyClient, fishTtsModelSchema, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, shouldReplayPendingTurn, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCall, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useCharacterTools, useLiveKitAvatarGrant, useMicLease, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { DEFAULT_FISH_TTS_MODEL, FishTtsModel, ListRendersQuery, ListRendersResponse, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, Render, RenderAccessResponse, RenderFailureCode, RenderPlayback, RenderStatus, ShotTiming, StartCallOptions, WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, listRendersResponseSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './index.js';
2
- export { h as Asset, g as AssetKind, A as Avatar, p as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, q as CallConnection, C as CallMode, a as CallPolicy, r as CallQueued, s as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, t as ClipLibraryPlan, e as ClipLibraryUpdate, u as ClipSource, v as ContextMessage, n as CreateRenderInput, o as CreditBalance, E as EndCallOptions, w as EndCallReason, x as ExternalLlm, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, y as RecordingArtifactStatus, z as RecordingMode, B as RenderShot, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, D as VideoPolicy, F as VoiceWebhook, G as VoiceWebhookErrorCode, V as VoiceWebhookRequest, H as isQueued, I as listRecordingsResponseSchema, J as recordingAccessResponseSchema, K as recordingArtifactSchema, M as recordingModeSchema } from './types-DOFXGl7G.js';
1
+ export { DEFAULT_FISH_TTS_MODEL, FISH_DELIVERY_MODELS, FishDelivery, FishTtsModel, ListRendersQuery, ListRendersResponse, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, Render, RenderAccessResponse, RenderFailureCode, RenderPlayback, RenderStatus, ShotTiming, StartCallOptions, WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, listRendersResponseSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './index.js';
2
+ export { h as Asset, g as AssetKind, A as Avatar, p as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, q as CallConnection, C as CallMode, a as CallPolicy, r as CallQueued, s as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, t as ClipLibraryPlan, e as ClipLibraryUpdate, u as ClipSource, v as ContextMessage, n as CreateRenderInput, o as CreditBalance, E as EndCallOptions, w as EndCallReason, x as ExternalLlm, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, y as RecordingArtifactStatus, z as RecordingMode, B as RenderShot, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, D as VideoPolicy, F as VoiceWebhook, G as VoiceWebhookErrorCode, V as VoiceWebhookRequest, H as isQueued, I as listRecordingsResponseSchema, J as recordingAccessResponseSchema, K as recordingArtifactSchema, M as recordingModeSchema } from './types-VoejsHij.js';
3
3
  import './connection-history.js';
4
4
  import 'zod';
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
- export { DEFAULT_FISH_TTS_MODEL, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-LRGQKZFB.js';
1
+ export { DEFAULT_FISH_TTS_MODEL, FISH_DELIVERY_MODELS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-VLYUMP3I.js';
2
2
  import './chunk-MCIXU6XP.js';
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-Du6T6XQB.js';
2
- import './types-DOFXGl7G.js';
1
+ import { P as ProxyConfig } from './types-DygYBvSv.js';
2
+ import './types-VoejsHij.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-TJM53JXR.js';
2
- import './chunk-LRGQKZFB.js';
1
+ import { createProxyHandler } from './chunk-DM5TWRC4.js';
2
+ import './chunk-VLYUMP3I.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // src/tanstack-start.ts
@@ -1,4 +1,4 @@
1
- import { C as CallMode, a as CallPolicy } from './types-DOFXGl7G.js';
1
+ import { C as CallMode, a as CallPolicy } from './types-VoejsHij.js';
2
2
 
3
3
  /** The three things a caller can ask the proxy to do. Gate on these, not on URLs. */
4
4
  type ProxyOperation = "connect" | "end" | "avatars" | "credits";
@@ -90,6 +90,12 @@ interface components {
90
90
  speed?: number | null;
91
91
  emotion?: string | null;
92
92
  language?: string | null;
93
+ whisper?: {
94
+ /** @enum {string} */
95
+ model: "s2-pro" | "s2.1-pro" | "drama-3";
96
+ gain_db?: number;
97
+ } | null;
98
+ delivery?: "whisper" | null;
93
99
  }) | null;
94
100
  voice_id?: string | null;
95
101
  /** @description The session's motion-state map. Normally omitted: the avatar's PLATFORM-GENERATED library (idle / listen / gesture clips rendered from the portrait at creation) is injected automatically. An explicit [] opts the call out of clips. Supplying custom clip URLs is a legacy channel for existing integrations — custom video is not part of the public contract. */
@@ -207,7 +213,7 @@ interface components {
207
213
  /** @description DEPRECATED, no-op. Accepted and ignored. The faster hesitation ceiling this requested is now the default for every session, so sending it changes nothing. Safe to stop sending; the field is retained only so existing callers do not break. */
208
214
  fast_endpointing?: boolean;
209
215
  require_ready_clip_library?: boolean;
210
- /** @description Preview, enabled per workspace. A prepared scene from POST /v1/scenes, played forward over its full length in place of the avatar's source video; the avatar keeps the voice and persona. Cannot be combined with mode voice, render_backend generative, source_video_url, video_cache_id or a non-empty clip_library. */
216
+ /** @description Preview, enabled per workspace. A prepared scene from POST /v1/scenes, played forward over its full length in place of the avatar's source video; the avatar keeps the voice and persona. Cannot be combined with mode voice, render_backend generative, source_video_url, video_cache_id or a non-empty clip_library (unless scene.clips is library, whose clips are scenes this workspace prepared). */
211
217
  scene?: {
212
218
  /** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
213
219
  video_cache_id: string;
@@ -219,6 +225,26 @@ interface components {
219
225
  attach_continuation?: boolean;
220
226
  /** @description Preview, opt-in. Lets the minting server switch this scene session to another ready scene it owns mid-call, without a new session. Requires extend_secret to sign replace_scene commands. Absent or false plays this scene for the whole call. */
221
227
  replaceable?: boolean;
228
+ /**
229
+ * @description Preview, opt-in. How the speaking render is fitted onto the filmed scene: frame keeps the lips on each filmed frame's face (its own position and mouth). Absent renders as before.
230
+ * @enum {string}
231
+ */
232
+ speech_fit?: "frame";
233
+ /**
234
+ * @description Preview, opt-in. Which part of the face the speaking render replaces on the filmed scene: full re-renders the whole face, as a video call does. Absent re-renders the mouth and jaw only, as before.
235
+ * @enum {string}
236
+ */
237
+ speech_mask?: "full";
238
+ /**
239
+ * @description Preview, opt-in. library lets this scene session carry clip_library and clip_behavior: gesture clips that are scenes this workspace prepared, each starting on this scene's first frame and ending on its last. The character picks them as reactions and gestures; they play at the scene's loop boundary. A clip that cannot be admitted is left out, never refused. Absent plays this scene alone.
240
+ * @enum {string}
241
+ */
242
+ clips?: "library";
243
+ /**
244
+ * @description Preview, opt-in, needs clips. hurry plays the scene at twice its speed to its last frame while a gesture waits, so the gesture starts sooner; hurry_silent does so only while she is silent. Absent waits for the scene's natural end.
245
+ * @enum {string}
246
+ */
247
+ clip_lead?: "hurry" | "hurry_silent";
222
248
  };
223
249
  };
224
250
  LiveKitSessionGrant: {
@@ -1267,6 +1293,12 @@ interface components {
1267
1293
  speed?: number | null;
1268
1294
  emotion?: string | null;
1269
1295
  language?: string | null;
1296
+ whisper?: {
1297
+ /** @enum {string} */
1298
+ model: "s2-pro" | "s2.1-pro" | "drama-3";
1299
+ gain_db?: number;
1300
+ } | null;
1301
+ delivery?: "whisper" | null;
1270
1302
  };
1271
1303
  /** @description Mouth-motion amplitude, as on a live call (lip_gain). Omit it for the platform default. */
1272
1304
  lipGain?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "realtime-avatar",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Realtime Avatar SDK. `realtime-avatar` and the route adapters hold your API key and are server-only; `realtime-avatar/react`, `/browser` and `/tools` never can — importing a server entry into a browser build throws at bundle time.",
5
5
  "license": "MIT",
6
6
  "author": "The Influence Company",