CharacterController class
数字人控制器,提供外部控制 CharacterWidget 的接口
Constructors
-
CharacterController({required GlobalKey<
State< key})CharacterWidget> >
Properties
- connectionState → CharacterConnectionState?
-
获取当前连接状态
no setter
- conversationState → CharacterConversationState?
-
获取当前对话状态
no setter
- errorMessage → String?
-
获取错误信息
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- playerState → CharacterPlayerState?
-
获取当前播放器状态
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setUpState → CharacterSetUpState?
-
获取当前SDK设置状态
no setter
Methods
-
close(
{bool shouldCleanup = false}) → Future< void> - 关闭数字人对话
-
deleteAllCharacterAssets(
) → Future< void> -
deleteCharacterAssets(
String characterId) → Future< void> -
删除数字人数据
characterId数字人ID -
interrupt(
) → Future< void> - 打断当前对话
-
loadCharacter(
String characterId, {Uint8List? backgroundImage, bool isBackgroundOpaque = true}) → Future< void> - 加载数字人数据
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
playback(
{required Uint8List audioData, required List< Uint8List> animations}) → Future<void> - 回放
-
preloadCharacter(
String characterId) → Future< void> - 预加载数字人数据
-
receiveAnimations(
List< Uint8List> animations, String reqID) → Future<void> - 通知数字人播放器接收动画数据
-
sendAudioData(
Uint8List audioData, bool end) → Future< String> -
发送音频数据
audioData音频二进制数据end是否结束 返回对话 ID -
setVolume(
double volume) → Future< void> -
设置数字人音量
volume音量范围0.0, 1.0 -
start(
) → Future< void> - 开始数字人对话
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited