realtime-avatar 0.28.0 → 0.30.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 +23 -1
- package/dist/{chunk-K3VC6BF7.js → chunk-GLIEEJMW.js} +1 -1
- package/dist/{chunk-V7A4NRKC.js → chunk-WXVBPMDN.js} +45 -42
- 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 +16 -3
- package/dist/index.js +1 -1
- package/dist/nextjs.d.ts +2 -2
- package/dist/nextjs.js +2 -2
- package/dist/{proxy-client-WjGIwL-t.d.ts → proxy-client-BlaFxR6S.d.ts} +27 -15
- package/dist/react-native.d.ts +2 -2
- package/dist/react-native.js +7 -4
- package/dist/react.d.ts +2 -2
- package/dist/react.js +7 -4
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/tanstack-start.d.ts +2 -2
- package/dist/tanstack-start.js +2 -2
- package/dist/{types-yiemDkm0.d.ts → types-Bv29uEAs.d.ts} +4 -5
- package/dist/{types-Bli1UeP0.d.ts → types-CgAEmIVE.d.ts} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -333,6 +333,27 @@ rta.iterateSessions({ from, to }) // the same, paging handled
|
|
|
333
333
|
// webhooks
|
|
334
334
|
verifyTranscript(rawBytes, headers, secret)
|
|
335
335
|
verifyVoiceWebhook(rawBytes, headers, secret) // one sentence to speak, typed; see "Custom voice (webhook)"
|
|
336
|
+
|
|
337
|
+
// contract values; also exported by realtime-avatar/react and /react-native
|
|
338
|
+
fishTtsModelSchema.safeParse(storedModelId) // a Fish model id you stored -> FishTtsModel, or a failure
|
|
339
|
+
DEFAULT_FISH_TTS_MODEL // the platform's Fish default model
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**A Fish model id you stored is validated once, with the SDK's own list.** Both values are
|
|
343
|
+
generated from the platform's contract: every live and deprecated id it accepts, and its
|
|
344
|
+
default. `fishTtsModelSchema.safeParse(row.model)` returns the public `FishTtsModel` on success,
|
|
345
|
+
so the voice you build needs no cast and your code keeps no copy of the list. Do it where the
|
|
346
|
+
stored string enters your server, and decide there what a refused id falls back to.
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
import { DEFAULT_FISH_TTS_MODEL, fishTtsModelSchema, type VoiceSpecInput } from "realtime-avatar/react";
|
|
350
|
+
|
|
351
|
+
const parsed = fishTtsModelSchema.safeParse(row.model);
|
|
352
|
+
const voice: VoiceSpecInput = {
|
|
353
|
+
provider: "fish",
|
|
354
|
+
voice_id: row.voiceId,
|
|
355
|
+
model: parsed.success ? parsed.data : DEFAULT_FISH_TTS_MODEL,
|
|
356
|
+
};
|
|
336
357
|
```
|
|
337
358
|
|
|
338
359
|
### Session page validation
|
|
@@ -624,7 +645,8 @@ a useful order from outside, and every one was a name we would have had to keep
|
|
|
624
645
|
|
|
625
646
|
What stayed: the components and hooks, the `DEFAULT_*` constants (so you can read the timings
|
|
626
647
|
rather than guess them), the two capacity mappers `capacityErrorFromBusy` / `capacityStateFromGrant`
|
|
627
|
-
for building your own queue UI,
|
|
648
|
+
for building your own queue UI, the zod schemas `sessionBehaviorSchema` / `sessionClipSchema`, and
|
|
649
|
+
the Fish model validator `fishTtsModelSchema` with its `DEFAULT_FISH_TTS_MODEL`.
|
|
628
650
|
|
|
629
651
|
|
|
630
652
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sessionModeSchema, liveKitSessionReleaseReasonSchema, RealtimeAvatar, ROUTE_TIMEOUT_MS, isQueued, RealtimeAvatarHttpError, RealtimeAvatarError } from './chunk-
|
|
1
|
+
import { sessionModeSchema, liveKitSessionReleaseReasonSchema, RealtimeAvatar, ROUTE_TIMEOUT_MS, isQueued, RealtimeAvatarHttpError, RealtimeAvatarError } from './chunk-WXVBPMDN.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// ../http-client/src/generated/error-semantics.ts
|
|
@@ -297,6 +297,11 @@ var recordingAccessResponseSchema = z.object({
|
|
|
297
297
|
url: z.string().url(),
|
|
298
298
|
expiresAt: z.string().datetime({ offset: true })
|
|
299
299
|
}).strict();
|
|
300
|
+
var schema02 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
|
|
301
|
+
var schema110 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
|
|
302
|
+
var schema27 = z.union([schema02, schema110]);
|
|
303
|
+
var fishTtsModelSchema = schema27;
|
|
304
|
+
var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
|
|
300
305
|
|
|
301
306
|
// ../http-client/src/retry.ts
|
|
302
307
|
var RETRYABLE_STATUS = /* @__PURE__ */ new Set([408, 500, 502, 503, 504]);
|
|
@@ -322,12 +327,12 @@ function isTransient(cause) {
|
|
|
322
327
|
const name = cause?.name;
|
|
323
328
|
return name === "TimeoutError" || name === "TypeError" || name === "FetchError";
|
|
324
329
|
}
|
|
325
|
-
var
|
|
326
|
-
var
|
|
327
|
-
var
|
|
328
|
-
var schema32 = z.array(
|
|
330
|
+
var schema03 = z.string().min(2).max(64);
|
|
331
|
+
var schema111 = z.array(schema03);
|
|
332
|
+
var schema28 = z.string().regex(new RegExp("\\S")).min(1).max(160);
|
|
333
|
+
var schema32 = z.array(schema28).max(1e3);
|
|
329
334
|
var schema42 = z.strictObject({
|
|
330
|
-
"language_codes":
|
|
335
|
+
"language_codes": schema111.optional(),
|
|
331
336
|
"custom_vocabulary": schema32.optional()
|
|
332
337
|
});
|
|
333
338
|
var transcriptionWireSchema = schema42;
|
|
@@ -342,20 +347,20 @@ function transcriptionToWire(input) {
|
|
|
342
347
|
...options.customVocabulary !== void 0 ? { custom_vocabulary: options.customVocabulary } : {}
|
|
343
348
|
};
|
|
344
349
|
}
|
|
345
|
-
var
|
|
346
|
-
var contentPolicySchema =
|
|
347
|
-
var
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
+
var schema04 = z.enum(["minor-sexual-content-v1", "safe-content-v1"]);
|
|
351
|
+
var contentPolicySchema = schema04;
|
|
352
|
+
var schema05 = z.literal("voice_error");
|
|
353
|
+
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"]);
|
|
354
|
+
var schema29 = z.string();
|
|
350
355
|
var schema33 = z.int().min(-9007199254740991).max(9007199254740991);
|
|
351
356
|
var schema43 = z.boolean();
|
|
352
357
|
var schema52 = z.object({
|
|
353
|
-
"kind":
|
|
354
|
-
"code":
|
|
355
|
-
"message":
|
|
358
|
+
"kind": schema05,
|
|
359
|
+
"code": schema112,
|
|
360
|
+
"message": schema29,
|
|
356
361
|
"status": schema33.optional(),
|
|
357
362
|
"fatal": schema43,
|
|
358
|
-
"request_id":
|
|
363
|
+
"request_id": schema29.optional()
|
|
359
364
|
});
|
|
360
365
|
var voiceErrorFrameSchema = schema52;
|
|
361
366
|
|
|
@@ -412,8 +417,6 @@ var cartesiaVoiceSpecSchema = z.object({
|
|
|
412
417
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
413
418
|
language: z.string().min(2).max(16).nullable().optional()
|
|
414
419
|
}).strict();
|
|
415
|
-
var FISH_TTS_MODELS = ["speech-1.6", "s1", "s2-pro", "speech-1.5", "s1-mini"];
|
|
416
|
-
var fishTtsModelSchema = z.enum(FISH_TTS_MODELS);
|
|
417
420
|
var breezeVoiceSpecSchema = z.object({
|
|
418
421
|
provider: z.literal("breezeblue"),
|
|
419
422
|
model: z.string().min(1).max(80).default("bluebell-v1-en"),
|
|
@@ -424,7 +427,7 @@ var breezeVoiceSpecSchema = z.object({
|
|
|
424
427
|
}).strict();
|
|
425
428
|
var fishVoiceSpecSchema = z.object({
|
|
426
429
|
provider: z.literal("fish"),
|
|
427
|
-
model: fishTtsModelSchema.default(
|
|
430
|
+
model: fishTtsModelSchema.default(DEFAULT_FISH_TTS_MODEL),
|
|
428
431
|
voice_id: z.string().min(1).max(120),
|
|
429
432
|
speed: z.number().min(0.5).max(2).nullable().optional(),
|
|
430
433
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
@@ -696,16 +699,16 @@ var liveKitSessionReleaseReasonSchema = z.enum([
|
|
|
696
699
|
"manual",
|
|
697
700
|
"idle_timeout"
|
|
698
701
|
]);
|
|
699
|
-
var
|
|
700
|
-
var
|
|
701
|
-
var
|
|
702
|
+
var schema06 = z.url().regex(new RegExp("^https:\\/\\/")).max(500);
|
|
703
|
+
var schema113 = z.string().min(16).max(200);
|
|
704
|
+
var schema210 = z.string().min(1).max(200);
|
|
702
705
|
var schema34 = z.string().min(2).max(35);
|
|
703
706
|
var schema44 = z.literal([8e3, 16e3, 22050, 24e3, 44100, 48e3]);
|
|
704
707
|
var schema53 = z.int().min(1e3).max(15e3);
|
|
705
708
|
var schema62 = z.strictObject({
|
|
706
|
-
"url":
|
|
707
|
-
"secret":
|
|
708
|
-
"voice_id":
|
|
709
|
+
"url": schema06,
|
|
710
|
+
"secret": schema113,
|
|
711
|
+
"voice_id": schema210.optional(),
|
|
709
712
|
"language": schema34.optional(),
|
|
710
713
|
"sample_rate": schema44.optional(),
|
|
711
714
|
"timeout_ms": schema53.optional()
|
|
@@ -714,7 +717,7 @@ var schema72 = z.literal("voice.synthesize");
|
|
|
714
717
|
var schema82 = z.literal(1);
|
|
715
718
|
var schema92 = z.string().min(1).max(200);
|
|
716
719
|
var schema102 = z.string();
|
|
717
|
-
var
|
|
720
|
+
var schema114 = z.string().min(1).max(5e3);
|
|
718
721
|
var schema122 = z.string();
|
|
719
722
|
var schema132 = z.null();
|
|
720
723
|
var schema142 = z.union([schema122, schema132]);
|
|
@@ -735,7 +738,7 @@ var schema232 = z.object({
|
|
|
735
738
|
"version": schema82,
|
|
736
739
|
"request_id": schema92,
|
|
737
740
|
"session_id": schema102,
|
|
738
|
-
"text":
|
|
741
|
+
"text": schema114,
|
|
739
742
|
"voice_id": schema142,
|
|
740
743
|
"language": schema162,
|
|
741
744
|
"output": schema192,
|
|
@@ -762,10 +765,10 @@ function voiceWebhookToWire(input) {
|
|
|
762
765
|
};
|
|
763
766
|
}
|
|
764
767
|
var voiceWebhookRequestSchema = schema232;
|
|
765
|
-
var
|
|
766
|
-
var
|
|
767
|
-
var
|
|
768
|
-
var schema35 = z.union([
|
|
768
|
+
var schema07 = z.string().min(8).max(80);
|
|
769
|
+
var schema115 = z.enum(["eou", "llm", "tts", "decision", "hold", "e2e"]);
|
|
770
|
+
var schema211 = z.literal("interrupt_stop");
|
|
771
|
+
var schema35 = z.union([schema115, schema211]);
|
|
769
772
|
var schema45 = z.int().max(9007199254740991).gt(0);
|
|
770
773
|
var schema54 = z.number().min(0);
|
|
771
774
|
var schema63 = z.strictObject({
|
|
@@ -778,8 +781,8 @@ var schema73 = z.partialRecord(schema35, schema63);
|
|
|
778
781
|
var schema83 = z.literal("available");
|
|
779
782
|
var schema93 = z.literal("dialogue");
|
|
780
783
|
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+)?)?)$"));
|
|
781
|
-
var
|
|
782
|
-
var schema123 = z.union([schema103,
|
|
784
|
+
var schema116 = z.null();
|
|
785
|
+
var schema123 = z.union([schema103, schema116]);
|
|
783
786
|
var schema133 = z.int().min(0).max(9007199254740991);
|
|
784
787
|
var schema143 = z.strictObject({
|
|
785
788
|
"first_at": schema123,
|
|
@@ -800,17 +803,17 @@ var schema183 = z.strictObject({
|
|
|
800
803
|
});
|
|
801
804
|
var schema193 = z.union([schema153, schema183]);
|
|
802
805
|
var schema203 = z.string().min(1).max(200);
|
|
803
|
-
var schema213 = z.union([schema203,
|
|
806
|
+
var schema213 = z.union([schema203, schema116]);
|
|
804
807
|
var schema223 = z.string().regex(new RegExp("^[0-9a-f]{40}$"));
|
|
805
|
-
var schema233 = z.union([schema223,
|
|
808
|
+
var schema233 = z.union([schema223, schema116]);
|
|
806
809
|
var schema242 = z.literal("cloudflare-worker-version");
|
|
807
810
|
var schema252 = z.literal("authenticated-worker-heartbeat");
|
|
808
|
-
var schema262 = z.union([schema252,
|
|
811
|
+
var schema262 = z.union([schema252, schema116]);
|
|
809
812
|
var schema272 = z.string().min(1).max(160);
|
|
810
|
-
var schema282 = z.union([schema272,
|
|
811
|
-
var schema292 = z.union([schema133,
|
|
813
|
+
var schema282 = z.union([schema272, schema116]);
|
|
814
|
+
var schema292 = z.union([schema133, schema116]);
|
|
812
815
|
var schema30 = z.iso.datetime({ offset: true }).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)))$"));
|
|
813
|
-
var schema31 = z.union([schema30,
|
|
816
|
+
var schema31 = z.union([schema30, schema116]);
|
|
814
817
|
var schema322 = z.strictObject({
|
|
815
818
|
"deploymentSource": schema242,
|
|
816
819
|
"workerSource": schema262,
|
|
@@ -824,12 +827,12 @@ var schema332 = z.strictObject({
|
|
|
824
827
|
"provenance": schema322
|
|
825
828
|
});
|
|
826
829
|
var schema342 = z.string();
|
|
827
|
-
var schema352 = z.union([schema342,
|
|
830
|
+
var schema352 = z.union([schema342, schema116]);
|
|
828
831
|
var schema36 = z.enum(["reserved", "started", "released", "failed"]);
|
|
829
|
-
var schema37 = z.union([schema54,
|
|
832
|
+
var schema37 = z.union([schema54, schema116]);
|
|
830
833
|
var schema38 = z.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value));
|
|
831
834
|
var schema39 = z.strictObject({
|
|
832
|
-
"sessionId":
|
|
835
|
+
"sessionId": schema07,
|
|
833
836
|
"speechDiagnostics": schema193.optional(),
|
|
834
837
|
"releaseIdentity": schema332.optional(),
|
|
835
838
|
"avatarId": schema352,
|
|
@@ -858,7 +861,7 @@ function toSessionsPage(page) {
|
|
|
858
861
|
|
|
859
862
|
// ../http-client/src/client.ts
|
|
860
863
|
var DEFAULT_BASE_URL = "https://realtimeavatar.ai/api/v1";
|
|
861
|
-
var SDK_VERSION = "0.
|
|
864
|
+
var SDK_VERSION = "0.30.0";
|
|
862
865
|
var RealtimeAvatar = class {
|
|
863
866
|
#apiKey;
|
|
864
867
|
#baseUrl;
|
|
@@ -1516,4 +1519,4 @@ function isQueued(result) {
|
|
|
1516
1519
|
return "queued" in result;
|
|
1517
1520
|
}
|
|
1518
1521
|
|
|
1519
|
-
export { ROUTE_TIMEOUT_MS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, liveKitSessionReleaseReasonSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, sessionModeSchema, verifyTranscript, verifyVoiceWebhook };
|
|
1522
|
+
export { DEFAULT_FISH_TTS_MODEL, ROUTE_TIMEOUT_MS, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, liveKitSessionReleaseReasonSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, sessionModeSchema, verifyTranscript, verifyVoiceWebhook };
|
package/dist/express.d.ts
CHANGED
package/dist/express.js
CHANGED
package/dist/hono.d.ts
CHANGED
package/dist/hono.js
CHANGED
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 CreditBalance, T as TranscriptPayload, V as VoiceWebhookRequest } from './types-
|
|
2
|
-
export { o as AvatarClip, p as CallConnection, q as CallQueued, r as ClipDeclaration, s as ClipLibraryPlan, t as ClipSource, u as ContextMessage, v as EndCallReason, w as ExternalLlm, x as RecordingArtifactStatus, y as RecordingMode, z as VideoPolicy, B as VoiceWebhook, D as VoiceWebhookErrorCode, F as isQueued, G as listRecordingsResponseSchema, H as recordingAccessResponseSchema, I as recordingArtifactSchema, J as recordingModeSchema } from './types-
|
|
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 CreditBalance, T as TranscriptPayload, V as VoiceWebhookRequest } from './types-Bv29uEAs.js';
|
|
2
|
+
export { o as AvatarClip, p as CallConnection, q as CallQueued, r as ClipDeclaration, s as ClipLibraryPlan, t as ClipSource, u as ContextMessage, v as EndCallReason, w as ExternalLlm, x as RecordingArtifactStatus, y as RecordingMode, z as VideoPolicy, B as VoiceWebhook, D as VoiceWebhookErrorCode, F as isQueued, G as listRecordingsResponseSchema, H as recordingAccessResponseSchema, I as recordingArtifactSchema, J as recordingModeSchema } from './types-Bv29uEAs.js';
|
|
3
3
|
import { ConnectionHistoryResponse } from './connection-history.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -423,4 +423,17 @@ declare const clipLibraryDeclarationSchema: z.ZodObject<{
|
|
|
423
423
|
}, z.core.$strict>>>>;
|
|
424
424
|
}, z.core.$strict>;
|
|
425
425
|
|
|
426
|
-
|
|
426
|
+
declare const fishTtsModelSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
427
|
+
s1: "s1";
|
|
428
|
+
"s2-pro": "s2-pro";
|
|
429
|
+
"s2.1-pro": "s2.1-pro";
|
|
430
|
+
"drama-3": "drama-3";
|
|
431
|
+
}>, z.ZodEnum<{
|
|
432
|
+
"speech-1.6": "speech-1.6";
|
|
433
|
+
"speech-1.5": "speech-1.5";
|
|
434
|
+
"s1-mini": "s1-mini";
|
|
435
|
+
}>]>;
|
|
436
|
+
type FishTtsModel = z.infer<typeof fishTtsModelSchema>;
|
|
437
|
+
declare const DEFAULT_FISH_TTS_MODEL: "s2.1-pro";
|
|
438
|
+
|
|
439
|
+
export { Asset, AssetKind, Avatar, AvatarSourceSwap, AvatarUpdate, CallMode, CallPolicy, ClipLibrary, ClipLibraryDeclaration, ClipLibraryUpdate, CreditBalance, DEFAULT_FISH_TTS_MODEL, EndCallOptions, type FishTtsModel, ListRecordingsQuery, ListRecordingsResponse, ListSessionsOptions, LoopRedirect, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, type RealtimeAvatarOptions, RealtimeAvatarWebhookError, RecordingAccessResponse, RecordingArtifact, type StartCallOptions, StartCallResult, TranscriptPayload, UsageSession, UsageSessionPage, VoiceWebhookRequest, type WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, verifyTranscript, verifyVoiceWebhook };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-
|
|
1
|
+
export { DEFAULT_FISH_TTS_MODEL, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-WXVBPMDN.js';
|
|
2
2
|
import './chunk-MCIXU6XP.js';
|
package/dist/nextjs.d.ts
CHANGED
package/dist/nextjs.js
CHANGED
|
@@ -36,6 +36,19 @@ declare const voiceErrorFrameSchema: z.ZodObject<{
|
|
|
36
36
|
request_id: z.ZodOptional<z.ZodString>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
|
|
39
|
+
declare const fishTtsModelSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
40
|
+
s1: "s1";
|
|
41
|
+
"s2-pro": "s2-pro";
|
|
42
|
+
"s2.1-pro": "s2.1-pro";
|
|
43
|
+
"drama-3": "drama-3";
|
|
44
|
+
}>, z.ZodEnum<{
|
|
45
|
+
"speech-1.6": "speech-1.6";
|
|
46
|
+
"speech-1.5": "speech-1.5";
|
|
47
|
+
"s1-mini": "s1-mini";
|
|
48
|
+
}>]>;
|
|
49
|
+
type FishTtsModel$1 = z.infer<typeof fishTtsModelSchema>;
|
|
50
|
+
declare const DEFAULT_FISH_TTS_MODEL: "s2.1-pro";
|
|
51
|
+
|
|
39
52
|
/**
|
|
40
53
|
* Wire schemas for the public Realtime Avatar API.
|
|
41
54
|
*
|
|
@@ -70,13 +83,6 @@ declare const cartesiaTtsModelSchema: z.ZodEnum<{
|
|
|
70
83
|
"cartesia/sonic-turbo": "cartesia/sonic-turbo";
|
|
71
84
|
"cartesia/sonic-turbo-latest": "cartesia/sonic-turbo-latest";
|
|
72
85
|
}>;
|
|
73
|
-
declare const fishTtsModelSchema: z.ZodEnum<{
|
|
74
|
-
"speech-1.6": "speech-1.6";
|
|
75
|
-
s1: "s1";
|
|
76
|
-
"s2-pro": "s2-pro";
|
|
77
|
-
"speech-1.5": "speech-1.5";
|
|
78
|
-
"s1-mini": "s1-mini";
|
|
79
|
-
}>;
|
|
80
86
|
declare const voiceSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
87
|
provider: z.ZodLiteral<"cartesia">;
|
|
82
88
|
model: z.ZodDefault<z.ZodEnum<{
|
|
@@ -100,13 +106,16 @@ declare const voiceSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
100
106
|
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
107
|
}, z.core.$strict>, z.ZodObject<{
|
|
102
108
|
provider: z.ZodLiteral<"fish">;
|
|
103
|
-
model: z.ZodDefault<z.ZodEnum<{
|
|
104
|
-
"speech-1.6": "speech-1.6";
|
|
109
|
+
model: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
105
110
|
s1: "s1";
|
|
106
111
|
"s2-pro": "s2-pro";
|
|
112
|
+
"s2.1-pro": "s2.1-pro";
|
|
113
|
+
"drama-3": "drama-3";
|
|
114
|
+
}>, z.ZodEnum<{
|
|
115
|
+
"speech-1.6": "speech-1.6";
|
|
107
116
|
"speech-1.5": "speech-1.5";
|
|
108
117
|
"s1-mini": "s1-mini";
|
|
109
|
-
}>>;
|
|
118
|
+
}>]>>;
|
|
110
119
|
voice_id: z.ZodString;
|
|
111
120
|
speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
112
121
|
emotion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -205,13 +214,16 @@ declare const liveKitSessionRequestSchema: z.ZodObject<{
|
|
|
205
214
|
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
215
|
}, z.core.$strict>, z.ZodObject<{
|
|
207
216
|
provider: z.ZodLiteral<"fish">;
|
|
208
|
-
model: z.ZodDefault<z.ZodEnum<{
|
|
209
|
-
"speech-1.6": "speech-1.6";
|
|
217
|
+
model: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
210
218
|
s1: "s1";
|
|
211
219
|
"s2-pro": "s2-pro";
|
|
220
|
+
"s2.1-pro": "s2.1-pro";
|
|
221
|
+
"drama-3": "drama-3";
|
|
222
|
+
}>, z.ZodEnum<{
|
|
223
|
+
"speech-1.6": "speech-1.6";
|
|
212
224
|
"speech-1.5": "speech-1.5";
|
|
213
225
|
"s1-mini": "s1-mini";
|
|
214
|
-
}>>;
|
|
226
|
+
}>]>>;
|
|
215
227
|
voice_id: z.ZodString;
|
|
216
228
|
speed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
217
229
|
emotion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -537,7 +549,7 @@ type LLMSelectionForProvider<TProvider extends LLMProvider = LLMProvider> = TPro
|
|
|
537
549
|
provider: TProvider;
|
|
538
550
|
} : never;
|
|
539
551
|
type CartesiaTtsModel = z.infer<typeof cartesiaTtsModelSchema>;
|
|
540
|
-
type FishTtsModel =
|
|
552
|
+
type FishTtsModel = FishTtsModel$1;
|
|
541
553
|
type VoiceSpec = z.infer<typeof voiceSpecSchema>;
|
|
542
554
|
type VoiceSpecInput = z.input<typeof voiceSpecSchema>;
|
|
543
555
|
type LiveKitSessionRequestInput = z.input<typeof liveKitSessionRequestSchema>;
|
|
@@ -2127,4 +2139,4 @@ interface ProxyClientOptions {
|
|
|
2127
2139
|
}
|
|
2128
2140
|
declare function createProxyClient(options: ProxyClientOptions): AvatarSessionClient;
|
|
2129
2141
|
|
|
2130
|
-
export {
|
|
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 };
|
package/dist/react-native.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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
|
|
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';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
6
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
7
7
|
export { useChat, useConnectionState, useLocalParticipant, useRoomContext, useTrackToggle, useTranscriptions, useVoiceAssistant } from '@livekit/components-react';
|
package/dist/react-native.js
CHANGED
|
@@ -1740,6 +1740,11 @@ var schema5 = z.object({
|
|
|
1740
1740
|
"request_id": schema22.optional()
|
|
1741
1741
|
});
|
|
1742
1742
|
var voiceErrorFrameSchema = schema5;
|
|
1743
|
+
var schema04 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
|
|
1744
|
+
var schema13 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
|
|
1745
|
+
var schema23 = z.union([schema04, schema13]);
|
|
1746
|
+
var fishTtsModelSchema = schema23;
|
|
1747
|
+
var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
|
|
1743
1748
|
|
|
1744
1749
|
// ../client/src/wire.ts
|
|
1745
1750
|
var DEFAULT_AVATAR_ID = "maria";
|
|
@@ -1794,8 +1799,6 @@ var cartesiaVoiceSpecSchema = z.object({
|
|
|
1794
1799
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
1795
1800
|
language: z.string().min(2).max(16).nullable().optional()
|
|
1796
1801
|
}).strict();
|
|
1797
|
-
var FISH_TTS_MODELS = ["speech-1.6", "s1", "s2-pro", "speech-1.5", "s1-mini"];
|
|
1798
|
-
var fishTtsModelSchema = z.enum(FISH_TTS_MODELS);
|
|
1799
1802
|
var breezeVoiceSpecSchema = z.object({
|
|
1800
1803
|
provider: z.literal("breezeblue"),
|
|
1801
1804
|
model: z.string().min(1).max(80).default("bluebell-v1-en"),
|
|
@@ -1806,7 +1809,7 @@ var breezeVoiceSpecSchema = z.object({
|
|
|
1806
1809
|
}).strict();
|
|
1807
1810
|
var fishVoiceSpecSchema = z.object({
|
|
1808
1811
|
provider: z.literal("fish"),
|
|
1809
|
-
model: fishTtsModelSchema.default(
|
|
1812
|
+
model: fishTtsModelSchema.default(DEFAULT_FISH_TTS_MODEL),
|
|
1810
1813
|
voice_id: z.string().min(1).max(120),
|
|
1811
1814
|
speed: z.number().min(0.5).max(2).nullable().optional(),
|
|
1812
1815
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
@@ -3882,4 +3885,4 @@ function createProxyClient(options) {
|
|
|
3882
3885
|
};
|
|
3883
3886
|
}
|
|
3884
3887
|
|
|
3885
|
-
export { AdaptivePlayoutController, AvatarVideoSurface, DEFAULT_APPROACHING_END_LEAD_SECONDS, DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS, DEFAULT_CREDITS_LOW_LEAD_SECONDS, 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, isNativeLiveTrackSubscribed, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useLiveKitAvatarGrant, useLiveTrackProducing, useMicLease, useRealtimeAvatarAudioSession, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
|
|
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 };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolRegistration, RegisteredTool } from './tools.js';
|
|
2
|
-
import {
|
|
3
|
-
export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails,
|
|
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';
|
|
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
|
@@ -2359,6 +2359,11 @@ var schema5 = z.object({
|
|
|
2359
2359
|
"request_id": schema22.optional()
|
|
2360
2360
|
});
|
|
2361
2361
|
var voiceErrorFrameSchema = schema5;
|
|
2362
|
+
var schema04 = z.enum(["s1", "s2-pro", "s2.1-pro", "drama-3"]);
|
|
2363
|
+
var schema13 = z.enum(["speech-1.6", "speech-1.5", "s1-mini"]);
|
|
2364
|
+
var schema23 = z.union([schema04, schema13]);
|
|
2365
|
+
var fishTtsModelSchema = schema23;
|
|
2366
|
+
var DEFAULT_FISH_TTS_MODEL = "s2.1-pro";
|
|
2362
2367
|
|
|
2363
2368
|
// ../client/src/wire.ts
|
|
2364
2369
|
var DEFAULT_AVATAR_ID = "maria";
|
|
@@ -2413,8 +2418,6 @@ var cartesiaVoiceSpecSchema = z.object({
|
|
|
2413
2418
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
2414
2419
|
language: z.string().min(2).max(16).nullable().optional()
|
|
2415
2420
|
}).strict();
|
|
2416
|
-
var FISH_TTS_MODELS = ["speech-1.6", "s1", "s2-pro", "speech-1.5", "s1-mini"];
|
|
2417
|
-
var fishTtsModelSchema = z.enum(FISH_TTS_MODELS);
|
|
2418
2421
|
var breezeVoiceSpecSchema = z.object({
|
|
2419
2422
|
provider: z.literal("breezeblue"),
|
|
2420
2423
|
model: z.string().min(1).max(80).default("bluebell-v1-en"),
|
|
@@ -2425,7 +2428,7 @@ var breezeVoiceSpecSchema = z.object({
|
|
|
2425
2428
|
}).strict();
|
|
2426
2429
|
var fishVoiceSpecSchema = z.object({
|
|
2427
2430
|
provider: z.literal("fish"),
|
|
2428
|
-
model: fishTtsModelSchema.default(
|
|
2431
|
+
model: fishTtsModelSchema.default(DEFAULT_FISH_TTS_MODEL),
|
|
2429
2432
|
voice_id: z.string().min(1).max(120),
|
|
2430
2433
|
speed: z.number().min(0.5).max(2).nullable().optional(),
|
|
2431
2434
|
emotion: z.string().min(1).max(80).nullable().optional(),
|
|
@@ -4904,4 +4907,4 @@ function RecordingPlayer({ assets, className }) {
|
|
|
4904
4907
|
] });
|
|
4905
4908
|
}
|
|
4906
4909
|
|
|
4907
|
-
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_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, knownBehaviorStates, mapTurnState, readInboundRtp, sessionBehaviorSchema, sessionClipSchema, shouldReplayPendingTurn, splitCallTranscript, useAvatarAdaptivePlayoutDelay, useAvatarCall, useAvatarCamera, useAvatarPlayoutDelay, useAvatarQualityGovernor, useCallTranscript, useCharacterTools, useLiveKitAvatarGrant, useMicLease, useRealtimeSession, useReleaseMicLeaseOnTrackEnded, useSessionLifecycle };
|
|
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 };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, StartCallOptions, WebhookVerificationErrorCode, clipLibraryDeclarationSchema, verifyTranscript, verifyVoiceWebhook } from './index.js';
|
|
2
|
-
export { h as Asset, g as AssetKind, A as Avatar, o as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, p as CallConnection, C as CallMode, a as CallPolicy, q as CallQueued, r as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, s as ClipLibraryPlan, e as ClipLibraryUpdate, t as ClipSource, u as ContextMessage, n as CreditBalance, E as EndCallOptions, v as EndCallReason, w as ExternalLlm, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, x as RecordingArtifactStatus, y as RecordingMode, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, z as VideoPolicy, B as VoiceWebhook, D as VoiceWebhookErrorCode, V as VoiceWebhookRequest, F as isQueued, G as listRecordingsResponseSchema, H as recordingAccessResponseSchema, I as recordingArtifactSchema, J as recordingModeSchema } from './types-
|
|
1
|
+
export { DEFAULT_FISH_TTS_MODEL, FishTtsModel, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, RealtimeAvatarWebhookError, StartCallOptions, WebhookVerificationErrorCode, clipLibraryDeclarationSchema, fishTtsModelSchema, verifyTranscript, verifyVoiceWebhook } from './index.js';
|
|
2
|
+
export { h as Asset, g as AssetKind, A as Avatar, o as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, p as CallConnection, C as CallMode, a as CallPolicy, q as CallQueued, r as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, s as ClipLibraryPlan, e as ClipLibraryUpdate, t as ClipSource, u as ContextMessage, n as CreditBalance, E as EndCallOptions, v as EndCallReason, w as ExternalLlm, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, x as RecordingArtifactStatus, y as RecordingMode, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, z as VideoPolicy, B as VoiceWebhook, D as VoiceWebhookErrorCode, V as VoiceWebhookRequest, F as isQueued, G as listRecordingsResponseSchema, H as recordingAccessResponseSchema, I as recordingArtifactSchema, J as recordingModeSchema } from './types-Bv29uEAs.js';
|
|
3
3
|
import './connection-history.js';
|
|
4
4
|
import 'zod';
|
package/dist/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-
|
|
1
|
+
export { DEFAULT_FISH_TTS_MODEL, RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarWebhookError, clipLibraryDeclarationSchema, fishTtsModelSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript, verifyVoiceWebhook } from './chunk-WXVBPMDN.js';
|
|
2
2
|
import './chunk-MCIXU6XP.js';
|
package/dist/tanstack-start.d.ts
CHANGED
package/dist/tanstack-start.js
CHANGED
|
@@ -84,11 +84,8 @@ interface components {
|
|
|
84
84
|
} | {
|
|
85
85
|
/** @constant */
|
|
86
86
|
provider: "fish";
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
* @enum {string}
|
|
90
|
-
*/
|
|
91
|
-
model: "speech-1.6" | "s1" | "s2-pro" | "drama-3" | "speech-1.5" | "s1-mini";
|
|
87
|
+
/** @default s2.1-pro */
|
|
88
|
+
model: ("s1" | "s2-pro" | "s2.1-pro" | "drama-3") | ("speech-1.6" | "speech-1.5" | "s1-mini");
|
|
92
89
|
voice_id: string;
|
|
93
90
|
speed?: number | null;
|
|
94
91
|
emotion?: string | null;
|
|
@@ -149,6 +146,8 @@ interface components {
|
|
|
149
146
|
gestures_enabled?: boolean;
|
|
150
147
|
};
|
|
151
148
|
expression_profile?: string;
|
|
149
|
+
/** @description Mouth-motion amplitude for this session's lip-sync, from 0.5 to 2. Lower values make speech movements smaller, higher values larger. Omit it to use the platform default. Applies to video sessions; ignored for voice sessions and render_backend generative. */
|
|
150
|
+
lip_gain?: number;
|
|
152
151
|
/** @enum {string} */
|
|
153
152
|
render_backend?: "warp" | "generative";
|
|
154
153
|
support_edits?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CallMode, a as CallPolicy } from './types-
|
|
1
|
+
import { C as CallMode, a as CallPolicy } from './types-Bv29uEAs.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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realtime-avatar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.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",
|