Compare commits
5 Commits
feat/updat
...
feat/task-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cce0600e5 | ||
|
|
274a307e83 | ||
|
|
03ef24b031 | ||
|
|
21f6c6d468 | ||
|
|
d7a7e3174c |
@@ -2,7 +2,7 @@ import type { StartAvatarResponse } from "@heygen/streaming-avatar";
|
|||||||
|
|
||||||
import StreamingAvatar, {
|
import StreamingAvatar, {
|
||||||
AvatarQuality,
|
AvatarQuality,
|
||||||
StreamingEvents, TaskType, VoiceEmotion,
|
StreamingEvents, TaskMode, TaskType, VoiceEmotion,
|
||||||
} from "@heygen/streaming-avatar";
|
} from "@heygen/streaming-avatar";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -91,7 +91,7 @@ export default function InteractiveAvatar() {
|
|||||||
const res = await avatar.current.createStartAvatar({
|
const res = await avatar.current.createStartAvatar({
|
||||||
quality: AvatarQuality.Low,
|
quality: AvatarQuality.Low,
|
||||||
avatarName: avatarId,
|
avatarName: avatarId,
|
||||||
knowledgeId: knowledgeId,
|
knowledgeId: knowledgeId, // Or use a custom `knowledgeBase`.
|
||||||
voice: {
|
voice: {
|
||||||
rate: 1.5, // 0.5 ~ 1.5
|
rate: 1.5, // 0.5 ~ 1.5
|
||||||
emotion: VoiceEmotion.EXCITED,
|
emotion: VoiceEmotion.EXCITED,
|
||||||
@@ -117,7 +117,7 @@ export default function InteractiveAvatar() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// speak({ text: text, task_type: TaskType.REPEAT })
|
// speak({ text: text, task_type: TaskType.REPEAT })
|
||||||
await avatar.current.speak({ text: text }).catch((e) => {
|
await avatar.current.speak({ text: text, taskType: TaskType.REPEAT, taskMode: TaskMode.SYNC }).catch((e) => {
|
||||||
setDebug(e.message);
|
setDebug(e.message);
|
||||||
});
|
});
|
||||||
setIsLoadingRepeat(false);
|
setIsLoadingRepeat(false);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ai-sdk/openai": "^0.0.34",
|
"@ai-sdk/openai": "^0.0.34",
|
||||||
"@heygen/streaming-avatar": "^2.0.2",
|
"@heygen/streaming-avatar": "^2.0.7",
|
||||||
"@nextui-org/button": "2.0.34",
|
"@nextui-org/button": "2.0.34",
|
||||||
"@nextui-org/chip": "^2.0.32",
|
"@nextui-org/chip": "^2.0.32",
|
||||||
"@nextui-org/code": "2.0.29",
|
"@nextui-org/code": "2.0.29",
|
||||||
|
|||||||
Reference in New Issue
Block a user