@streamoji/aitwin 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aitwin.cjs +5 -5
- package/dist/aitwin.js +1850 -1817
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,12 @@ export declare type AiTwinHandle = {
|
|
|
16
16
|
* Suspends idle video until the next speak/stop clears preview mode.
|
|
17
17
|
*/
|
|
18
18
|
setEmotion: (emotion: string) => void;
|
|
19
|
+
/** Hold a still mouth viseme preview (Oculus id, e.g. aa, PP, sil). */
|
|
20
|
+
setViseme: (viseme: string) => void;
|
|
19
21
|
/** Active expression preview emotion, or null when not in preview mode. */
|
|
20
22
|
getEmotion: () => string | null;
|
|
23
|
+
/** Active viseme preview id, or null when not in viseme preview mode. */
|
|
24
|
+
getViseme: () => string | null;
|
|
21
25
|
/** Leave expression preview and return to normal idle. */
|
|
22
26
|
clearEmotionPreview: () => void;
|
|
23
27
|
isReady: () => boolean;
|
|
@@ -375,6 +379,11 @@ declare type SkippedVisemeEntry = {
|
|
|
375
379
|
vtime: number;
|
|
376
380
|
};
|
|
377
381
|
|
|
382
|
+
/** Round each viseme vtime to the nearest grid slot for playback spacing. */
|
|
383
|
+
export declare function snapVisemeQueueToGrid(queue: VisemeQueueItem[], gridMs?: number): VisemeQueueItem[];
|
|
384
|
+
|
|
385
|
+
export declare function snapVisemeVtimeToGrid(vtime: number, gridMs?: number): number;
|
|
386
|
+
|
|
378
387
|
export declare const SPEAKING_RATE_MAX = 1.5;
|
|
379
388
|
|
|
380
389
|
export declare const SPEAKING_RATE_MIN = 0.5;
|
|
@@ -410,6 +419,9 @@ export declare const VISEME_TEST_SPEAKING_RATE = 0.85;
|
|
|
410
419
|
/** Viseme-test page: fixed female voice + speech speed for /avatar_ttsWithPoses. */
|
|
411
420
|
export declare const VISEME_TEST_VOICE_ID = "Olivia";
|
|
412
421
|
|
|
422
|
+
/** Align viseme vtimes to this grid (matches transition frame tick). */
|
|
423
|
+
export declare const VISEME_VTIME_GRID_MS = 16;
|
|
424
|
+
|
|
413
425
|
export declare interface VisemeQueueItem {
|
|
414
426
|
viseme: string;
|
|
415
427
|
weight: number;
|