@streamoji/aitwin 0.5.9 → 0.6.1

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 CHANGED
@@ -99,6 +99,7 @@ Provide **`id`** (cloud twin), **`avatarId`/`faceId`** (R2 custom face), or **`a
99
99
  | `ttsEngineId` | TTS engine when using `assets` (default Cartesia) |
100
100
  | `voiceId` | Override TTS voice |
101
101
  | `speakingRate` | Default `0.85` |
102
+ | `idleHandoffHoldMs` | Milliseconds to hold still sil after speech before resuming the idle video loop (default `200`) |
102
103
  | `showErrorOverlay` | Canvas error overlay (default `true`) |
103
104
  | `captions` | Plain subtitles during TTS/voice playback (`true` or style options) |
104
105
  | `onReady` | Assets loaded and canvas ready |
@@ -133,6 +134,19 @@ Enable plain subtitles for the current speech segment:
133
134
 
134
135
  Works for both `speakText()` and voice `connect()` bot responses.
135
136
 
137
+ #### Idle handoff
138
+
139
+ After speech ends, the twin returns to a still closed-mouth frame before the idle video loop resumes. Adjust the pause with `idleHandoffHoldMs`:
140
+
141
+ ```tsx
142
+ <AiTwin
143
+ id="olivia"
144
+ idleHandoffHoldMs={3000}
145
+ />
146
+ ```
147
+
148
+ Applies to both `speakText()` and voice `connect()` playback.
149
+
136
150
  ### Ref handle
137
151
 
138
152
  | Method | Description |
@@ -142,7 +156,7 @@ Works for both `speakText()` and voice `connect()` bot responses.
142
156
  | `disconnect()` | End voice session |
143
157
  | `isConnected()` | Whether voice WebSocket is active |
144
158
  | `stop()` | Stop playback and return toward idle |
145
- | `setTtsEngineId(engineId)` | Switch Google / Inworld / Cartesia |
159
+ | `setTtsEngineId(engineId)` | Switch Google / Inworld / Cartesia / visemetts |
146
160
  | `renderViseme(to, options?)` | Manual viseme transition (lab) |
147
161
  | `isReady()` | Whether face assets are loaded |
148
162
  | `getStatus()` | Current lipsync status |