realtime-avatar 0.33.0 → 0.35.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-DM5TWRC4.js → chunk-ARJEAQQT.js} +1 -13
- package/dist/{chunk-VLYUMP3I.js → chunk-WHYDSORD.js} +426 -170
- 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-DJhYiiKX.d.ts → proxy-client-CiTOjkg8.d.ts} +67 -3
- package/dist/react-native.d.ts +3 -3
- package/dist/react-native.js +623 -36
- package/dist/react.d.ts +12 -22
- package/dist/react.js +627 -37
- 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-DygYBvSv.d.ts → types-CUvcV0Wq.d.ts} +1 -1
- package/dist/{types-VoejsHij.d.ts → types-CpnLuiJU.d.ts} +220 -18
- package/package.json +3 -3
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 {
|
|
1
|
+
export { DEFAULT_FISH_TTS_MODEL, ExternalSpeechSegment, ExternalTurnContext, ExternalUtterance, FISH_DELIVERY_MODELS, FishDelivery, FishTtsModel, ListRendersQuery, ListRendersResponse, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, Render, RenderAccessResponse, RenderFailureCode, RenderPlayback, RenderStatus, ShotTiming, StartCallOptions, WebhookVerificationErrorCode, capacityBusyResponseSchema, clipLibraryDeclarationSchema, externalSpeechSegmentSchema, 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-CpnLuiJU.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, externalSpeechSegmentSchema, externalTurnContextSchema, externalUtteranceSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, listRendersResponseSchema, liveKitSessionGrantSchema, proxyConnectRequestSchema, proxyEndRequestSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, renderAccessResponseSchema, renderSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-WHYDSORD.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-CpnLuiJU.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: {
|
|
@@ -709,6 +771,11 @@ interface components {
|
|
|
709
771
|
type: "voice.synthesize";
|
|
710
772
|
/** @constant */
|
|
711
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
|
+
};
|
|
712
779
|
/** @description Unique per POST; also sent as the x-rta-request-id header. */
|
|
713
780
|
request_id: string;
|
|
714
781
|
/** @description The same session id the transcript webhook payload carries. */
|
|
@@ -733,6 +800,100 @@ interface components {
|
|
|
733
800
|
[key: string]: string;
|
|
734
801
|
};
|
|
735
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
|
+
/** @constant */
|
|
813
|
+
text_output?: "speech_segments_v1";
|
|
814
|
+
visible_character?: {
|
|
815
|
+
/** @constant */
|
|
816
|
+
renderer: "external";
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
ExternalUtterance: {
|
|
820
|
+
generation_id: string;
|
|
821
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
822
|
+
utterance_id: string;
|
|
823
|
+
};
|
|
824
|
+
ExternalSpeechSegment: {
|
|
825
|
+
/** @constant */
|
|
826
|
+
version: 1;
|
|
827
|
+
generation_id: string;
|
|
828
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
829
|
+
utterance_id: string;
|
|
830
|
+
/** @description Complete committed speech, preserved verbatim; its utterance_id is reused by the signed voice callback and PCM stream. */
|
|
831
|
+
text: string;
|
|
832
|
+
};
|
|
833
|
+
ExternalPerformanceFrame: {
|
|
834
|
+
session_id: string;
|
|
835
|
+
generation_id: string;
|
|
836
|
+
/** @constant */
|
|
837
|
+
kind: "external_performance";
|
|
838
|
+
/** @constant */
|
|
839
|
+
version: 1;
|
|
840
|
+
/** @description Open: ignore a status you do not know. */
|
|
841
|
+
status: ("accepted" | "dropped" | "cancelled" | "audio_released") | string;
|
|
842
|
+
/**
|
|
843
|
+
* @description No receiver audible position or heard-text receipt exists in this producer version.
|
|
844
|
+
* @constant
|
|
845
|
+
*/
|
|
846
|
+
audible_checkpoint: "unavailable";
|
|
847
|
+
/**
|
|
848
|
+
* @description No utterance-to-receiver sample mapping exists. Release is permission, not playout.
|
|
849
|
+
* @constant
|
|
850
|
+
*/
|
|
851
|
+
audio_mapping: "unavailable";
|
|
852
|
+
};
|
|
853
|
+
/** @enum {string} */
|
|
854
|
+
ExternalLlmErrorCode: "external_llm_refused" | "external_llm_failed";
|
|
855
|
+
ExternalLlmErrorFrame: {
|
|
856
|
+
/** @constant */
|
|
857
|
+
kind: "external_llm_error";
|
|
858
|
+
/** @enum {string} */
|
|
859
|
+
code: "external_llm_refused" | "external_llm_failed";
|
|
860
|
+
message: string;
|
|
861
|
+
/** @constant */
|
|
862
|
+
fatal: true;
|
|
863
|
+
};
|
|
864
|
+
CorrelatedAudioHeader: {
|
|
865
|
+
session_id: string;
|
|
866
|
+
generation_id: string;
|
|
867
|
+
/** @constant */
|
|
868
|
+
version: 1;
|
|
869
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
870
|
+
utterance_id: string;
|
|
871
|
+
stream_id: string;
|
|
872
|
+
epoch: number;
|
|
873
|
+
/** @constant */
|
|
874
|
+
sample_rate: 24000;
|
|
875
|
+
/** @constant */
|
|
876
|
+
channels: 1;
|
|
877
|
+
/** @constant */
|
|
878
|
+
encoding: "pcm_s16le";
|
|
879
|
+
};
|
|
880
|
+
CorrelatedAudioReceipt: {
|
|
881
|
+
session_id: string;
|
|
882
|
+
generation_id: string;
|
|
883
|
+
/** @description Logical sentence identity, unchanged across HTTP retries; not request_id. */
|
|
884
|
+
utterance_id: string;
|
|
885
|
+
stream_id: string;
|
|
886
|
+
epoch: number;
|
|
887
|
+
/** @enum {string} */
|
|
888
|
+
status: "started" | "progress" | "finished" | "cancelled";
|
|
889
|
+
samples: number;
|
|
890
|
+
};
|
|
891
|
+
CorrelatedAudioCancel: {
|
|
892
|
+
/** @constant */
|
|
893
|
+
version: 1;
|
|
894
|
+
session_id: string;
|
|
895
|
+
epoch: number;
|
|
896
|
+
};
|
|
736
897
|
/** @enum {string} */
|
|
737
898
|
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";
|
|
738
899
|
VoiceErrorFrame: {
|
|
@@ -750,6 +911,8 @@ interface components {
|
|
|
750
911
|
tenantId: string;
|
|
751
912
|
displayName: string;
|
|
752
913
|
/** @enum {string} */
|
|
914
|
+
renderer: "video" | "live2d";
|
|
915
|
+
/** @enum {string} */
|
|
753
916
|
sourceKind: "image" | "video";
|
|
754
917
|
/** @enum {string} */
|
|
755
918
|
modelId: "realtime-avatar-live-v1" | "realtime-avatar-video-v1";
|
|
@@ -770,6 +933,12 @@ interface components {
|
|
|
770
933
|
};
|
|
771
934
|
CreateAvatarRequest: {
|
|
772
935
|
displayName: string;
|
|
936
|
+
/**
|
|
937
|
+
* @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.
|
|
938
|
+
* @default video
|
|
939
|
+
* @enum {string}
|
|
940
|
+
*/
|
|
941
|
+
renderer: "video" | "live2d";
|
|
773
942
|
/**
|
|
774
943
|
* @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.
|
|
775
944
|
* @default image
|
|
@@ -812,6 +981,7 @@ interface components {
|
|
|
812
981
|
};
|
|
813
982
|
UpdateAvatarRequest: {
|
|
814
983
|
displayName?: string;
|
|
984
|
+
/** @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. */
|
|
815
985
|
defaultVoiceId?: string | null;
|
|
816
986
|
llm?: {
|
|
817
987
|
/** @enum {string} */
|
|
@@ -1436,6 +1606,8 @@ interface components {
|
|
|
1436
1606
|
tenantId: string;
|
|
1437
1607
|
displayName: string;
|
|
1438
1608
|
/** @enum {string} */
|
|
1609
|
+
renderer: "video" | "live2d";
|
|
1610
|
+
/** @enum {string} */
|
|
1439
1611
|
sourceKind: "image" | "video";
|
|
1440
1612
|
/** @enum {string} */
|
|
1441
1613
|
modelId: "realtime-avatar-live-v1" | "realtime-avatar-video-v1";
|
|
@@ -3592,8 +3764,8 @@ declare const listUsageSessionsResponseSchema: z.ZodObject<{
|
|
|
3592
3764
|
avatarName: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
3593
3765
|
status: z.ZodEnum<{
|
|
3594
3766
|
failed: "failed";
|
|
3595
|
-
reserved: "reserved";
|
|
3596
3767
|
started: "started";
|
|
3768
|
+
reserved: "reserved";
|
|
3597
3769
|
released: "released";
|
|
3598
3770
|
}>;
|
|
3599
3771
|
startedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
@@ -3612,7 +3784,7 @@ declare function toSessionsPage(page: z.infer<typeof listUsageSessionsResponseSc
|
|
|
3612
3784
|
sessionId: string;
|
|
3613
3785
|
avatarId: string | null;
|
|
3614
3786
|
avatarName: string | null;
|
|
3615
|
-
status: "failed" | "
|
|
3787
|
+
status: "failed" | "started" | "reserved" | "released";
|
|
3616
3788
|
startedAt: string | null;
|
|
3617
3789
|
endedAt: string | null;
|
|
3618
3790
|
activeSeconds: number | null;
|
|
@@ -3887,6 +4059,30 @@ declare const voiceWebhookOptionsSchema: z.ZodObject<{
|
|
|
3887
4059
|
}, z.core.$strict>;
|
|
3888
4060
|
declare function voiceWebhookToWire(input: z.input<typeof voiceWebhookOptionsSchema>): NonNullable<Wire$1["LiveKitSessionRequest"]["voice_webhook"]>;
|
|
3889
4061
|
|
|
4062
|
+
declare const externalLlmWireSchema: z.ZodObject<{
|
|
4063
|
+
base_url: z.ZodURL;
|
|
4064
|
+
token: z.ZodString;
|
|
4065
|
+
fail_closed: z.ZodOptional<z.ZodBoolean>;
|
|
4066
|
+
visible_character: z.ZodOptional<z.ZodObject<{
|
|
4067
|
+
renderer: z.ZodLiteral<"external">;
|
|
4068
|
+
}, z.core.$strict>>;
|
|
4069
|
+
performance: z.ZodOptional<z.ZodLiteral<"v1">>;
|
|
4070
|
+
audio_output: z.ZodOptional<z.ZodLiteral<"correlated_pcm_v1">>;
|
|
4071
|
+
text_output: z.ZodOptional<z.ZodLiteral<"speech_segments_v1">>;
|
|
4072
|
+
}, z.core.$strict>;
|
|
4073
|
+
declare const externalLlmOptionsSchema: z.ZodObject<{
|
|
4074
|
+
baseUrl: z.ZodURL;
|
|
4075
|
+
token: z.ZodString;
|
|
4076
|
+
failClosed: z.ZodOptional<z.ZodBoolean>;
|
|
4077
|
+
visibleCharacter: z.ZodOptional<z.ZodObject<{
|
|
4078
|
+
renderer: z.ZodLiteral<"external">;
|
|
4079
|
+
}, z.core.$strict>>;
|
|
4080
|
+
performance: z.ZodOptional<z.ZodLiteral<"v1">>;
|
|
4081
|
+
audioOutput: z.ZodOptional<z.ZodLiteral<"correlated_pcm_v1">>;
|
|
4082
|
+
textOutput: z.ZodOptional<z.ZodLiteral<"speech_segments_v1">>;
|
|
4083
|
+
}, z.core.$strict>;
|
|
4084
|
+
declare function externalLlmToWire(input: z.input<typeof externalLlmOptionsSchema>): z.output<typeof externalLlmWireSchema>;
|
|
4085
|
+
|
|
3890
4086
|
/**
|
|
3891
4087
|
* The public shapes. Everything an integrator touches is here, in one file, on purpose:
|
|
3892
4088
|
* an agent reading this repo should be able to learn the whole surface without following
|
|
@@ -4021,31 +4217,33 @@ type VideoPolicy = {
|
|
|
4021
4217
|
/** The session `llm` on the wire, from the published contract. */
|
|
4022
4218
|
type WireLlm = NonNullable<Wire["LiveKitSessionRequest"]["llm"]>;
|
|
4023
4219
|
/**
|
|
4024
|
-
* DERIVATION: `backend` and `model` index the contract's `llm`.
|
|
4220
|
+
* DERIVATION: `backend` and `model` index the contract's `llm`. The endpoint fields are sent as
|
|
4025
4221
|
* `external_llm`, which the platform marks server-authoritative and therefore REDACTS from the
|
|
4026
|
-
* published document
|
|
4027
|
-
* `
|
|
4222
|
+
* published document; they are generated from the platform's canonical `ExternalLLMEndpoint`
|
|
4223
|
+
* JSON Schema, vendored as `spec/external-llm.schema.json` (see `generate-clip-schema.mjs`).
|
|
4028
4224
|
*
|
|
4029
4225
|
* Answer this call's turns from an OpenAI-compatible endpoint YOUR SERVER hosts. The platform
|
|
4030
4226
|
* keeps listening, turn-taking, interruption, her voice and her face; each reply is streamed
|
|
4031
|
-
* from `POST {baseUrl}/chat/completions` instead of the platform's
|
|
4227
|
+
* from `POST {baseUrl}/chat/completions` (https only, `stream: true`) instead of the platform's
|
|
4228
|
+
* model. `token` is sent as `Authorization: Bearer <token>` on every turn of this call: mint it
|
|
4229
|
+
* per call and short-lived, 16–4096 characters.
|
|
4032
4230
|
*
|
|
4033
4231
|
* Enabled per workspace: a workspace without it, or an endpoint host it has not allowlisted, is
|
|
4034
4232
|
* refused with 403. A failure before the first token of a reply (an error, a stall, an empty
|
|
4035
|
-
* answer) speaks that reply from the platform's model instead, so the call never goes silent
|
|
4233
|
+
* answer) speaks that reply from the platform's model instead, so the call never goes silent —
|
|
4234
|
+
* unless `failClosed: true`: then that reply fails and no other model speaks for your character.
|
|
4235
|
+
*
|
|
4236
|
+
* `visibleCharacter: { renderer: "external" }` says YOUR app draws her, independent of `mode`:
|
|
4237
|
+
* a `voice` call stays audio-only, and its model is no longer told the caller cannot see her.
|
|
4238
|
+
* `performance: "v1"` adds `rta_context` (session, generation, purpose, draft/accepted) to each
|
|
4239
|
+
* request, the same identity on each voice-webhook sentence, and admission/cancellation frames
|
|
4240
|
+
* for `externalPerformance` on the client. It reports no playout timing.
|
|
4036
4241
|
*/
|
|
4037
|
-
|
|
4242
|
+
type ExternalLlm = Parameters<typeof externalLlmToWire>[0] & {
|
|
4038
4243
|
backend: Extract<NonNullable<WireLlm["backend"]>, "external">;
|
|
4039
|
-
/** https only. The worker POSTs `{baseUrl}/chat/completions` with `stream: true`. */
|
|
4040
|
-
baseUrl: string;
|
|
4041
|
-
/**
|
|
4042
|
-
* Sent as `Authorization: Bearer <token>` on every turn of this call. Mint it per call and
|
|
4043
|
-
* short-lived: it outlives nothing but the call. 16–4096 characters.
|
|
4044
|
-
*/
|
|
4045
|
-
token: string;
|
|
4046
4244
|
/** Sent as `model`. Omit it to let your endpoint choose. */
|
|
4047
4245
|
model?: NonNullable<WireLlm["model"]>;
|
|
4048
|
-
}
|
|
4246
|
+
};
|
|
4049
4247
|
/**
|
|
4050
4248
|
* Speak this call with your own voice. Each sentence she is about to say is POSTed to `url`,
|
|
4051
4249
|
* signed with `secret` (verify it with `verifyVoiceWebhook`), and the audio you stream back is what
|
|
@@ -4226,7 +4424,11 @@ type Asset = Pick<Wire["Asset"], "id" | "kind"> & {
|
|
|
4226
4424
|
*/
|
|
4227
4425
|
status: Wire["Asset"]["status"] | (string & {});
|
|
4228
4426
|
};
|
|
4229
|
-
|
|
4427
|
+
/** DERIVATION: the generated creation schema curates an explicit voice for an app-owned Live2D rig. */
|
|
4428
|
+
type CreateLive2dAvatarInput = z.input<typeof createLive2dAvatarInputSchema>;
|
|
4429
|
+
/** DERIVATION: the complete generated platform response, validated by createLive2dAvatar. */
|
|
4430
|
+
type RegisteredAvatar = z.output<typeof avatarResponseSchema>;
|
|
4431
|
+
type Avatar = Pick<Wire["Avatar"], "id" | "displayName" | "renderer" | "sourceKind" | "status" | "defaultVoiceId" | "sourceAssetId" | "error" | "idleVideoStatus">;
|
|
4230
4432
|
/**
|
|
4231
4433
|
* The patch `updateAvatar` sends — the two fields an integrator re-points after creation.
|
|
4232
4434
|
* The contract's `UpdateAvatarRequest` carries more (llm, persona, art direction…); that is
|
|
@@ -4378,4 +4580,4 @@ interface TranscriptPayload {
|
|
|
4378
4580
|
client_metadata: Record<string, string>;
|
|
4379
4581
|
}
|
|
4380
4582
|
|
|
4381
|
-
export { type Avatar as A, type
|
|
4583
|
+
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.35.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",
|