narrator-avatar 1.0.3 → 1.0.5
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 +2 -24
- package/dist/narrator-avatar.js +34734 -371
- package/dist/narrator-avatar.js.map +1 -1
- package/dist/narrator-avatar.umd.cjs +4066 -4
- package/dist/narrator-avatar.umd.cjs.map +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ React component for 3D talking avatars with lip-sync, Deepgram or Google TTS, co
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
10
|
- **3D avatars** – Ready Player Me–compatible GLB models (full-body)
|
|
11
|
-
- **Lip-sync** – Word-level sync with Deepgram or Google TTS
|
|
11
|
+
- **Lip-sync** – Word-level sync with Deepgram or Google TTS (English bundled; other languages need extra setup)
|
|
12
12
|
- **TTS** – Deepgram (streaming) or Google Cloud Text-to-Speech
|
|
13
13
|
- **Gestures** – Content-aware hand gestures using all 8 built-in: handup, index, ok, thumbup, thumbdown, side, shrug, namaste
|
|
14
14
|
- **Playback** – Speak, Pause, Resume, Stop (phrase-level in accurate mode)
|
|
@@ -18,7 +18,6 @@ React component for 3D talking avatars with lip-sync, Deepgram or Google TTS, co
|
|
|
18
18
|
|
|
19
19
|
- [Install](#install)
|
|
20
20
|
- [Usage](#usage)
|
|
21
|
-
- [Using with Vite](#using-with-vite)
|
|
22
21
|
- [Props](#props)
|
|
23
22
|
- [Ref API](#ref-api)
|
|
24
23
|
- [Environment variables](#environment-variables)
|
|
@@ -31,9 +30,7 @@ React component for 3D talking avatars with lip-sync, Deepgram or Google TTS, co
|
|
|
31
30
|
npm install narrator-avatar
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
Peer dependencies (React 18+)
|
|
35
|
-
|
|
36
|
-
**Using Vite?** Add one line to your Vite config or the avatar will fail to load. See [Using with Vite](#using-with-vite).
|
|
33
|
+
Peer dependencies (React 18+) are installed automatically. The package bundles TalkingHead, Three.js (0.151), and English lip-sync—**no import maps or Vite config required.**
|
|
37
34
|
|
|
38
35
|
## Usage
|
|
39
36
|
|
|
@@ -71,25 +68,6 @@ function MyPage() {
|
|
|
71
68
|
}
|
|
72
69
|
```
|
|
73
70
|
|
|
74
|
-
## Using with Vite
|
|
75
|
-
|
|
76
|
-
**Required for Vite apps.** The underlying `@met4citizen/talkinghead` package loads lip-sync language modules via dynamic `import()`. If Vite pre-bundles it, those imports break and you get a 404 on `lipsync-en.mjs` and `Cannot read properties of undefined (reading 'preProcessText')`.
|
|
77
|
-
|
|
78
|
-
Exclude it from optimization:
|
|
79
|
-
|
|
80
|
-
```js
|
|
81
|
-
// vite.config.js or vite.config.ts
|
|
82
|
-
import { defineConfig } from 'vite';
|
|
83
|
-
import react from '@vitejs/plugin-react';
|
|
84
|
-
|
|
85
|
-
export default defineConfig({
|
|
86
|
-
plugins: [react()],
|
|
87
|
-
optimizeDeps: { exclude: ['@met4citizen/talkinghead'] },
|
|
88
|
-
});
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Restart the dev server after changing the config.
|
|
92
|
-
|
|
93
71
|
## Props
|
|
94
72
|
|
|
95
73
|
| Prop | Description |
|