@omote/three 0.3.2 → 0.3.3
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 +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ npm install @omote/three @omote/core three
|
|
|
14
14
|
import * as THREE from 'three';
|
|
15
15
|
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
16
16
|
import { OmoteAvatar } from '@omote/three';
|
|
17
|
-
import {
|
|
17
|
+
import { createKokoroTTS } from '@omote/core';
|
|
18
18
|
|
|
19
19
|
// Load avatar
|
|
20
20
|
const loader = new GLTFLoader();
|
|
@@ -27,7 +27,7 @@ loader.load('/avatar.glb', async (gltf) => {
|
|
|
27
27
|
// Wire conversational voice (speaker + listener via connectVoice)
|
|
28
28
|
await avatar.connectVoice({
|
|
29
29
|
mode: 'local',
|
|
30
|
-
tts:
|
|
30
|
+
tts: createKokoroTTS({ defaultVoice: 'af_heart' }),
|
|
31
31
|
onTranscript: async (text) => {
|
|
32
32
|
const res = await fetch('/api/chat', { method: 'POST', body: text });
|
|
33
33
|
return await res.text();
|
|
@@ -78,11 +78,12 @@ Write 52 ARKit blendshape weights to morph targets using pre-computed indices.
|
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
80
|
import { OmoteAvatar } from '@omote/three';
|
|
81
|
-
import {
|
|
81
|
+
import { createKokoroTTS } from '@omote/core';
|
|
82
82
|
|
|
83
83
|
const avatar = new OmoteAvatar({ target: gltf.scene });
|
|
84
84
|
await avatar.connectVoice({
|
|
85
|
-
|
|
85
|
+
mode: 'local',
|
|
86
|
+
tts: createKokoroTTS({ defaultVoice: 'af_heart' }),
|
|
86
87
|
interruptionEnabled: true,
|
|
87
88
|
onTranscript: async (text) => {
|
|
88
89
|
const res = await fetch('/api/chat', { body: text });
|