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/README.md +56 -1
- package/dist/browser.d.ts +4 -89
- package/dist/browser.js +362 -1
- package/dist/chunk-6KQS7CTR.js +1 -0
- package/dist/{chunk-NKS5ZIWN.js → chunk-GPGNAQZV.js} +413 -170
- package/dist/{chunk-NDCZABOK.js → chunk-OVW4N5NH.js} +1 -13
- package/dist/express.d.ts +2 -2
- package/dist/express.js +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/hono.js +2 -2
- package/dist/index.d.ts +338 -3
- package/dist/index.js +2 -1
- package/dist/nextjs.d.ts +2 -2
- package/dist/nextjs.js +2 -2
- package/dist/{playout-delay-CtRZdtsj.d.ts → playout-delay-BzoM1BMN.d.ts} +135 -1
- package/dist/{proxy-client-BlaFxR6S.d.ts → proxy-client-CiTOjkg8.d.ts} +81 -3
- package/dist/react-native.d.ts +3 -3
- package/dist/react-native.js +624 -34
- package/dist/react.d.ts +12 -22
- package/dist/react.js +628 -35
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -1
- package/dist/tanstack-start.d.ts +2 -2
- package/dist/tanstack-start.js +2 -2
- package/dist/{types-su27kEw0.d.ts → types-Cdi7KWWj.d.ts} +1 -1
- package/dist/{types-BSSqsu_Z.d.ts → types-Cg_i1jhk.d.ts} +209 -18
- package/package.json +3 -3
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 {
|
|
1
|
+
export { DEFAULT_FISH_TTS_MODEL, ExternalTurnContext, ExternalUtterance, FISH_DELIVERY_MODELS, FishDelivery, FishTtsModel, ListRendersQuery, ListRendersResponse, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, Render, RenderAccessResponse, RenderFailureCode, RenderPlayback, RenderStatus, ShotTiming, StartCallOptions, WebhookVerificationErrorCode, capacityBusyResponseSchema, clipLibraryDeclarationSchema, externalTurnContextSchema, externalUtteranceSchema, fishTtsModelSchema, listRendersResponseSchema, liveKitSessionGrantSchema, proxyConnectRequestSchema, proxyEndRequestSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './index.js';
|
|
2
|
+
export { i as Asset, h as AssetKind, A as Avatar, r as AvatarClip, d as AvatarSourceSwap, c as AvatarUpdate, s as CallConnection, C as CallMode, a as CallPolicy, t as CallQueued, u as ClipDeclaration, g as ClipLibrary, e as ClipLibraryDeclaration, v as ClipLibraryPlan, f as ClipLibraryUpdate, w as ClipSource, x as ContextMessage, b as CreateLive2dAvatarInput, p as CreateRenderInput, q as CreditBalance, E as EndCallOptions, y as EndCallReason, z as ExternalLlm, l as ListRecordingsQuery, m as ListRecordingsResponse, j as ListSessionsOptions, L as LoopRedirect, o as RecordingAccessResponse, n as RecordingArtifact, B as RecordingArtifactStatus, D as RecordingMode, R as RegisteredAvatar, F as RenderShot, S as StartCallResult, T as TranscriptPayload, k as UsageSession, U as UsageSessionPage, G as VideoPolicy, H as VoiceWebhook, I as VoiceWebhookErrorCode, V as VoiceWebhookRequest, J as isQueued, K as listRecordingsResponseSchema, M as recordingAccessResponseSchema, N as recordingArtifactSchema, O as recordingModeSchema } from './types-Cg_i1jhk.js';
|
|
3
3
|
import './connection-history.js';
|
|
4
4
|
import 'zod';
|
package/dist/server.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import './chunk-6KQS7CTR.js';
|
|
2
|
+
export { DEFAULT_FISH_TTS_MODEL, FISH_DELIVERY_MODELS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, capacityBusyResponseSchema, clipLibraryDeclarationSchema, externalTurnContextSchema, externalUtteranceSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, liveKitSessionGrantSchema, proxyConnectRequestSchema, proxyEndRequestSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-GPGNAQZV.js';
|
|
2
3
|
import './chunk-MCIXU6XP.js';
|
package/dist/tanstack-start.d.ts
CHANGED
package/dist/tanstack-start.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CallMode, a as CallPolicy } from './types-
|
|
1
|
+
import { C as CallMode, a as CallPolicy } from './types-Cg_i1jhk.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";
|
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const createLive2dAvatarInputSchema: z.ZodObject<{
|
|
4
|
+
displayName: z.ZodString;
|
|
5
|
+
settings: z.ZodOptional<z.ZodCustom<Record<string, unknown>, Record<string, unknown>>>;
|
|
6
|
+
metadata: z.ZodOptional<z.ZodCustom<Record<string, unknown>, Record<string, unknown>>>;
|
|
7
|
+
voice: z.ZodObject<{
|
|
8
|
+
provider: z.ZodEnum<{
|
|
9
|
+
cartesia: "cartesia";
|
|
10
|
+
fish: "fish";
|
|
11
|
+
}>;
|
|
12
|
+
voice_id: z.ZodString;
|
|
13
|
+
model: z.ZodOptional<z.ZodString>;
|
|
14
|
+
speed: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
15
|
+
emotion: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
16
|
+
language: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
declare const avatarResponseSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
tenantId: z.ZodString;
|
|
22
|
+
displayName: z.ZodString;
|
|
23
|
+
renderer: z.ZodEnum<{
|
|
24
|
+
video: "video";
|
|
25
|
+
live2d: "live2d";
|
|
26
|
+
}>;
|
|
27
|
+
sourceKind: z.ZodEnum<{
|
|
28
|
+
video: "video";
|
|
29
|
+
image: "image";
|
|
30
|
+
}>;
|
|
31
|
+
modelId: z.ZodEnum<{
|
|
32
|
+
"realtime-avatar-live-v1": "realtime-avatar-live-v1";
|
|
33
|
+
"realtime-avatar-video-v1": "realtime-avatar-video-v1";
|
|
34
|
+
}>;
|
|
35
|
+
sourceAssetId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
36
|
+
status: z.ZodEnum<{
|
|
37
|
+
ready: "ready";
|
|
38
|
+
failed: "failed";
|
|
39
|
+
draft: "draft";
|
|
40
|
+
preprocessing: "preprocessing";
|
|
41
|
+
disabled: "disabled";
|
|
42
|
+
deleted: "deleted";
|
|
43
|
+
}>;
|
|
44
|
+
error: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
45
|
+
idleVideoStatus: z.ZodEnum<{
|
|
46
|
+
ready: "ready";
|
|
47
|
+
failed: "failed";
|
|
48
|
+
none: "none";
|
|
49
|
+
queued: "queued";
|
|
50
|
+
generating: "generating";
|
|
51
|
+
}>;
|
|
52
|
+
defaultVoiceId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
53
|
+
llm: z.ZodUnion<readonly [z.ZodObject<{
|
|
54
|
+
provider: z.ZodEnum<{
|
|
55
|
+
local: "local";
|
|
56
|
+
gemini: "gemini";
|
|
57
|
+
openai: "openai";
|
|
58
|
+
}>;
|
|
59
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
60
|
+
}, z.core.$strict>, z.ZodNull]>;
|
|
61
|
+
createdAt: z.ZodString;
|
|
62
|
+
updatedAt: z.ZodString;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
|
|
3
65
|
interface components {
|
|
4
66
|
schemas: {
|
|
5
67
|
LiveKitSessionRequest: {
|
|
@@ -95,6 +157,7 @@ interface components {
|
|
|
95
157
|
model: "s2-pro" | "s2.1-pro" | "drama-3";
|
|
96
158
|
gain_db?: number;
|
|
97
159
|
} | null;
|
|
160
|
+
delivery?: "whisper" | null;
|
|
98
161
|
}) | null;
|
|
99
162
|
voice_id?: string | null;
|
|
100
163
|
/** @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. */
|
|
@@ -708,6 +771,11 @@ interface components {
|
|
|
708
771
|
type: "voice.synthesize";
|
|
709
772
|
/** @constant */
|
|
710
773
|
version: 1;
|
|
774
|
+
performance?: {
|
|
775
|
+
generation_id: string;
|
|
776
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
777
|
+
utterance_id: string;
|
|
778
|
+
};
|
|
711
779
|
/** @description Unique per POST; also sent as the x-rta-request-id header. */
|
|
712
780
|
request_id: string;
|
|
713
781
|
/** @description The same session id the transcript webhook payload carries. */
|
|
@@ -732,6 +800,89 @@ interface components {
|
|
|
732
800
|
[key: string]: string;
|
|
733
801
|
};
|
|
734
802
|
};
|
|
803
|
+
ExternalTurnContext: {
|
|
804
|
+
session_id: string;
|
|
805
|
+
generation_id: string;
|
|
806
|
+
/** @constant */
|
|
807
|
+
version: 1;
|
|
808
|
+
/** @description Why this turn is generated. Open: answer a purpose you do not know as you would respond. */
|
|
809
|
+
purpose: ("respond" | "recovery" | "initiative") | string;
|
|
810
|
+
/** @enum {string} */
|
|
811
|
+
admission: "draft" | "accepted";
|
|
812
|
+
visible_character?: {
|
|
813
|
+
/** @constant */
|
|
814
|
+
renderer: "external";
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
ExternalUtterance: {
|
|
818
|
+
generation_id: string;
|
|
819
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
820
|
+
utterance_id: string;
|
|
821
|
+
};
|
|
822
|
+
ExternalPerformanceFrame: {
|
|
823
|
+
session_id: string;
|
|
824
|
+
generation_id: string;
|
|
825
|
+
/** @constant */
|
|
826
|
+
kind: "external_performance";
|
|
827
|
+
/** @constant */
|
|
828
|
+
version: 1;
|
|
829
|
+
/** @description Open: ignore a status you do not know. */
|
|
830
|
+
status: ("accepted" | "dropped" | "cancelled" | "audio_released") | string;
|
|
831
|
+
/**
|
|
832
|
+
* @description No receiver audible position or heard-text receipt exists in this producer version.
|
|
833
|
+
* @constant
|
|
834
|
+
*/
|
|
835
|
+
audible_checkpoint: "unavailable";
|
|
836
|
+
/**
|
|
837
|
+
* @description No utterance-to-receiver sample mapping exists. Release is permission, not playout.
|
|
838
|
+
* @constant
|
|
839
|
+
*/
|
|
840
|
+
audio_mapping: "unavailable";
|
|
841
|
+
};
|
|
842
|
+
/** @enum {string} */
|
|
843
|
+
ExternalLlmErrorCode: "external_llm_refused" | "external_llm_failed";
|
|
844
|
+
ExternalLlmErrorFrame: {
|
|
845
|
+
/** @constant */
|
|
846
|
+
kind: "external_llm_error";
|
|
847
|
+
/** @enum {string} */
|
|
848
|
+
code: "external_llm_refused" | "external_llm_failed";
|
|
849
|
+
message: string;
|
|
850
|
+
/** @constant */
|
|
851
|
+
fatal: true;
|
|
852
|
+
};
|
|
853
|
+
CorrelatedAudioHeader: {
|
|
854
|
+
session_id: string;
|
|
855
|
+
generation_id: string;
|
|
856
|
+
/** @constant */
|
|
857
|
+
version: 1;
|
|
858
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
859
|
+
utterance_id: string;
|
|
860
|
+
stream_id: string;
|
|
861
|
+
epoch: number;
|
|
862
|
+
/** @constant */
|
|
863
|
+
sample_rate: 24000;
|
|
864
|
+
/** @constant */
|
|
865
|
+
channels: 1;
|
|
866
|
+
/** @constant */
|
|
867
|
+
encoding: "pcm_s16le";
|
|
868
|
+
};
|
|
869
|
+
CorrelatedAudioReceipt: {
|
|
870
|
+
session_id: string;
|
|
871
|
+
generation_id: string;
|
|
872
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
873
|
+
utterance_id: string;
|
|
874
|
+
stream_id: string;
|
|
875
|
+
epoch: number;
|
|
876
|
+
/** @enum {string} */
|
|
877
|
+
status: "started" | "progress" | "finished" | "cancelled";
|
|
878
|
+
samples: number;
|
|
879
|
+
};
|
|
880
|
+
CorrelatedAudioCancel: {
|
|
881
|
+
/** @constant */
|
|
882
|
+
version: 1;
|
|
883
|
+
session_id: string;
|
|
884
|
+
epoch: number;
|
|
885
|
+
};
|
|
735
886
|
/** @enum {string} */
|
|
736
887
|
VoiceWebhookErrorCode: "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";
|
|
737
888
|
VoiceErrorFrame: {
|
|
@@ -749,6 +900,8 @@ interface components {
|
|
|
749
900
|
tenantId: string;
|
|
750
901
|
displayName: string;
|
|
751
902
|
/** @enum {string} */
|
|
903
|
+
renderer: "video" | "live2d";
|
|
904
|
+
/** @enum {string} */
|
|
752
905
|
sourceKind: "image" | "video";
|
|
753
906
|
/** @enum {string} */
|
|
754
907
|
modelId: "realtime-avatar-live-v1" | "realtime-avatar-video-v1";
|
|
@@ -769,6 +922,12 @@ interface components {
|
|
|
769
922
|
};
|
|
770
923
|
CreateAvatarRequest: {
|
|
771
924
|
displayName: string;
|
|
925
|
+
/**
|
|
926
|
+
* @description Defaults to video. live2d allocates a ready avatar identity for voice sessions with an app-owned rig. It requires defaultVoiceId or an explicit voice.voice selector; automatic casting is refused. Keep sourceKind image, omit sourceAssetId and motionPrompt, and omit modelId or use realtime-avatar-live-v1. No assets, clips, cache or manufacturing charge are created. Mint with mode voice; video rendering is refused. Session billing, authorization and external-LLM gates are unchanged.
|
|
927
|
+
* @default video
|
|
928
|
+
* @enum {string}
|
|
929
|
+
*/
|
|
930
|
+
renderer: "video" | "live2d";
|
|
772
931
|
/**
|
|
773
932
|
* @description `image` is how avatars are created: upload a portrait, and the platform generates the looping source video and the motion library from it. `video` is CLOSED — it survives in this enum for a handful of grandfathered tenants, and `createAvatar` answers everyone else `422` ("Creating from a supplied video is closed"). The gate is a per-tenant flag that fails closed, so treat `video` as unavailable unless you already know yours is on.
|
|
774
933
|
* @default image
|
|
@@ -811,6 +970,7 @@ interface components {
|
|
|
811
970
|
};
|
|
812
971
|
UpdateAvatarRequest: {
|
|
813
972
|
displayName?: string;
|
|
973
|
+
/** @description For Live2D avatars, must remain a ready shared or tenant-owned platform voice. Null, missing and foreign voices are refused with 404; this does not change video-avatar PATCH behavior. */
|
|
814
974
|
defaultVoiceId?: string | null;
|
|
815
975
|
llm?: {
|
|
816
976
|
/** @enum {string} */
|
|
@@ -1297,6 +1457,7 @@ interface components {
|
|
|
1297
1457
|
model: "s2-pro" | "s2.1-pro" | "drama-3";
|
|
1298
1458
|
gain_db?: number;
|
|
1299
1459
|
} | null;
|
|
1460
|
+
delivery?: "whisper" | null;
|
|
1300
1461
|
};
|
|
1301
1462
|
/** @description Mouth-motion amplitude, as on a live call (lip_gain). Omit it for the platform default. */
|
|
1302
1463
|
lipGain?: number;
|
|
@@ -1434,6 +1595,8 @@ interface components {
|
|
|
1434
1595
|
tenantId: string;
|
|
1435
1596
|
displayName: string;
|
|
1436
1597
|
/** @enum {string} */
|
|
1598
|
+
renderer: "video" | "live2d";
|
|
1599
|
+
/** @enum {string} */
|
|
1437
1600
|
sourceKind: "image" | "video";
|
|
1438
1601
|
/** @enum {string} */
|
|
1439
1602
|
modelId: "realtime-avatar-live-v1" | "realtime-avatar-video-v1";
|
|
@@ -3590,8 +3753,8 @@ declare const listUsageSessionsResponseSchema: z.ZodObject<{
|
|
|
3590
3753
|
avatarName: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
3591
3754
|
status: z.ZodEnum<{
|
|
3592
3755
|
failed: "failed";
|
|
3593
|
-
reserved: "reserved";
|
|
3594
3756
|
started: "started";
|
|
3757
|
+
reserved: "reserved";
|
|
3595
3758
|
released: "released";
|
|
3596
3759
|
}>;
|
|
3597
3760
|
startedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
@@ -3610,7 +3773,7 @@ declare function toSessionsPage(page: z.infer<typeof listUsageSessionsResponseSc
|
|
|
3610
3773
|
sessionId: string;
|
|
3611
3774
|
avatarId: string | null;
|
|
3612
3775
|
avatarName: string | null;
|
|
3613
|
-
status: "failed" | "
|
|
3776
|
+
status: "failed" | "started" | "reserved" | "released";
|
|
3614
3777
|
startedAt: string | null;
|
|
3615
3778
|
endedAt: string | null;
|
|
3616
3779
|
activeSeconds: number | null;
|
|
@@ -3885,6 +4048,28 @@ declare const voiceWebhookOptionsSchema: z.ZodObject<{
|
|
|
3885
4048
|
}, z.core.$strict>;
|
|
3886
4049
|
declare function voiceWebhookToWire(input: z.input<typeof voiceWebhookOptionsSchema>): NonNullable<Wire$1["LiveKitSessionRequest"]["voice_webhook"]>;
|
|
3887
4050
|
|
|
4051
|
+
declare const externalLlmWireSchema: z.ZodObject<{
|
|
4052
|
+
base_url: z.ZodURL;
|
|
4053
|
+
token: z.ZodString;
|
|
4054
|
+
fail_closed: z.ZodOptional<z.ZodBoolean>;
|
|
4055
|
+
visible_character: z.ZodOptional<z.ZodObject<{
|
|
4056
|
+
renderer: z.ZodLiteral<"external">;
|
|
4057
|
+
}, z.core.$strict>>;
|
|
4058
|
+
performance: z.ZodOptional<z.ZodLiteral<"v1">>;
|
|
4059
|
+
audio_output: z.ZodOptional<z.ZodLiteral<"correlated_pcm_v1">>;
|
|
4060
|
+
}, z.core.$strict>;
|
|
4061
|
+
declare const externalLlmOptionsSchema: z.ZodObject<{
|
|
4062
|
+
baseUrl: z.ZodURL;
|
|
4063
|
+
token: z.ZodString;
|
|
4064
|
+
failClosed: z.ZodOptional<z.ZodBoolean>;
|
|
4065
|
+
visibleCharacter: z.ZodOptional<z.ZodObject<{
|
|
4066
|
+
renderer: z.ZodLiteral<"external">;
|
|
4067
|
+
}, z.core.$strict>>;
|
|
4068
|
+
performance: z.ZodOptional<z.ZodLiteral<"v1">>;
|
|
4069
|
+
audioOutput: z.ZodOptional<z.ZodLiteral<"correlated_pcm_v1">>;
|
|
4070
|
+
}, z.core.$strict>;
|
|
4071
|
+
declare function externalLlmToWire(input: z.input<typeof externalLlmOptionsSchema>): z.output<typeof externalLlmWireSchema>;
|
|
4072
|
+
|
|
3888
4073
|
/**
|
|
3889
4074
|
* The public shapes. Everything an integrator touches is here, in one file, on purpose:
|
|
3890
4075
|
* an agent reading this repo should be able to learn the whole surface without following
|
|
@@ -4019,31 +4204,33 @@ type VideoPolicy = {
|
|
|
4019
4204
|
/** The session `llm` on the wire, from the published contract. */
|
|
4020
4205
|
type WireLlm = NonNullable<Wire["LiveKitSessionRequest"]["llm"]>;
|
|
4021
4206
|
/**
|
|
4022
|
-
* DERIVATION: `backend` and `model` index the contract's `llm`.
|
|
4207
|
+
* DERIVATION: `backend` and `model` index the contract's `llm`. The endpoint fields are sent as
|
|
4023
4208
|
* `external_llm`, which the platform marks server-authoritative and therefore REDACTS from the
|
|
4024
|
-
* published document
|
|
4025
|
-
* `
|
|
4209
|
+
* published document; they are generated from the platform's canonical `ExternalLLMEndpoint`
|
|
4210
|
+
* JSON Schema, vendored as `spec/external-llm.schema.json` (see `generate-clip-schema.mjs`).
|
|
4026
4211
|
*
|
|
4027
4212
|
* Answer this call's turns from an OpenAI-compatible endpoint YOUR SERVER hosts. The platform
|
|
4028
4213
|
* keeps listening, turn-taking, interruption, her voice and her face; each reply is streamed
|
|
4029
|
-
* from `POST {baseUrl}/chat/completions` instead of the platform's
|
|
4214
|
+
* from `POST {baseUrl}/chat/completions` (https only, `stream: true`) instead of the platform's
|
|
4215
|
+
* model. `token` is sent as `Authorization: Bearer <token>` on every turn of this call: mint it
|
|
4216
|
+
* per call and short-lived, 16–4096 characters.
|
|
4030
4217
|
*
|
|
4031
4218
|
* Enabled per workspace: a workspace without it, or an endpoint host it has not allowlisted, is
|
|
4032
4219
|
* refused with 403. A failure before the first token of a reply (an error, a stall, an empty
|
|
4033
|
-
* answer) speaks that reply from the platform's model instead, so the call never goes silent
|
|
4220
|
+
* answer) speaks that reply from the platform's model instead, so the call never goes silent —
|
|
4221
|
+
* unless `failClosed: true`: then that reply fails and no other model speaks for your character.
|
|
4222
|
+
*
|
|
4223
|
+
* `visibleCharacter: { renderer: "external" }` says YOUR app draws her, independent of `mode`:
|
|
4224
|
+
* a `voice` call stays audio-only, and its model is no longer told the caller cannot see her.
|
|
4225
|
+
* `performance: "v1"` adds `rta_context` (session, generation, purpose, draft/accepted) to each
|
|
4226
|
+
* request, the same identity on each voice-webhook sentence, and admission/cancellation frames
|
|
4227
|
+
* for `externalPerformance` on the client. It reports no playout timing.
|
|
4034
4228
|
*/
|
|
4035
|
-
|
|
4229
|
+
type ExternalLlm = Parameters<typeof externalLlmToWire>[0] & {
|
|
4036
4230
|
backend: Extract<NonNullable<WireLlm["backend"]>, "external">;
|
|
4037
|
-
/** https only. The worker POSTs `{baseUrl}/chat/completions` with `stream: true`. */
|
|
4038
|
-
baseUrl: string;
|
|
4039
|
-
/**
|
|
4040
|
-
* Sent as `Authorization: Bearer <token>` on every turn of this call. Mint it per call and
|
|
4041
|
-
* short-lived: it outlives nothing but the call. 16–4096 characters.
|
|
4042
|
-
*/
|
|
4043
|
-
token: string;
|
|
4044
4231
|
/** Sent as `model`. Omit it to let your endpoint choose. */
|
|
4045
4232
|
model?: NonNullable<WireLlm["model"]>;
|
|
4046
|
-
}
|
|
4233
|
+
};
|
|
4047
4234
|
/**
|
|
4048
4235
|
* Speak this call with your own voice. Each sentence she is about to say is POSTed to `url`,
|
|
4049
4236
|
* signed with `secret` (verify it with `verifyVoiceWebhook`), and the audio you stream back is what
|
|
@@ -4224,7 +4411,11 @@ type Asset = Pick<Wire["Asset"], "id" | "kind"> & {
|
|
|
4224
4411
|
*/
|
|
4225
4412
|
status: Wire["Asset"]["status"] | (string & {});
|
|
4226
4413
|
};
|
|
4227
|
-
|
|
4414
|
+
/** DERIVATION: the generated creation schema curates an explicit voice for an app-owned Live2D rig. */
|
|
4415
|
+
type CreateLive2dAvatarInput = z.input<typeof createLive2dAvatarInputSchema>;
|
|
4416
|
+
/** DERIVATION: the complete generated platform response, validated by createLive2dAvatar. */
|
|
4417
|
+
type RegisteredAvatar = z.output<typeof avatarResponseSchema>;
|
|
4418
|
+
type Avatar = Pick<Wire["Avatar"], "id" | "displayName" | "renderer" | "sourceKind" | "status" | "defaultVoiceId" | "sourceAssetId" | "error" | "idleVideoStatus">;
|
|
4228
4419
|
/**
|
|
4229
4420
|
* The patch `updateAvatar` sends — the two fields an integrator re-points after creation.
|
|
4230
4421
|
* The contract's `UpdateAvatarRequest` carries more (llm, persona, art direction…); that is
|
|
@@ -4376,4 +4567,4 @@ interface TranscriptPayload {
|
|
|
4376
4567
|
client_metadata: Record<string, string>;
|
|
4377
4568
|
}
|
|
4378
4569
|
|
|
4379
|
-
export { type Avatar as A, type
|
|
4570
|
+
export { type Avatar as A, type RecordingArtifactStatus as B, type CallMode as C, type RecordingMode as D, type EndCallOptions as E, type RenderShot as F, type VideoPolicy as G, type VoiceWebhook as H, type VoiceWebhookErrorCode as I, isQueued as J, listRecordingsResponseSchema as K, type LoopRedirect as L, recordingAccessResponseSchema as M, recordingArtifactSchema as N, recordingModeSchema as O, type RegisteredAvatar as R, type StartCallResult as S, type TranscriptPayload as T, type UsageSessionPage as U, type VoiceWebhookRequest as V, type CallPolicy as a, type CreateLive2dAvatarInput as b, type AvatarUpdate as c, type AvatarSourceSwap as d, type ClipLibraryDeclaration as e, type ClipLibraryUpdate as f, type ClipLibrary as g, type AssetKind as h, type Asset as i, type ListSessionsOptions as j, type UsageSession as k, type ListRecordingsQuery as l, type ListRecordingsResponse as m, type RecordingArtifact as n, type RecordingAccessResponse as o, type CreateRenderInput as p, type CreditBalance as q, type AvatarClip as r, type CallConnection as s, type CallQueued as t, type ClipDeclaration as u, type ClipLibraryPlan as v, type ClipSource as w, type ContextMessage as x, type EndCallReason as y, type ExternalLlm as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realtime-avatar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.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",
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"build": "tsup"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"tsup": "
|
|
119
|
-
"typescript": "
|
|
118
|
+
"tsup": "8.5.1",
|
|
119
|
+
"typescript": "5.9.3",
|
|
120
120
|
"@livekit/components-react": "2.9.21",
|
|
121
121
|
"@livekit/react-native": "3.0.0",
|
|
122
122
|
"@livekit/react-native-webrtc": "144.2.0",
|