AliAiCall class
阿里云 AI 通话插件 提供了与 AI 通话相关的所有功能接口
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
call(
{required String rtcToken, required String aiAgentInstanceId, required String aiAgentUserId, required String channelId}) → Future< void> -
发起通话
rtcTokenRTC通话令牌aiAgentInstanceIdAI代理实例IDaiAgentUserIdAI代理用户IDchannelId通话频道ID -
enableSpeaker(
bool enable) → Future< void> -
切换扬声器状态
enabletrue开启,false关闭 -
enableVoiceInterrupt(
bool enable) → Future< void> -
启用/禁用语音打断功能
enabletrue启用,false禁用 -
hangup(
) → Future< void> - 挂断通话
-
initEngine(
{required String userId}) → Future< void> -
初始化引擎
userId用户ID -
interruptSpeaking(
) → Future< void> - 打断AI说话
-
setAIRole(
String roleId, String roleName) → Future< void> -
设置AI角色
roleId角色IDroleName角色名称 -
setEngineEventHandler(
{void onCallBegin()?, void onCallEnd()?, void onError(String)?, void onUserSpeaking(bool)?, void onNetworkQuality(int)?, void onVideoSizeChanged(Map< String, int> )?, void onVoiceIdChanged(String)?, void onRoleChanged(String)?, void onAIAgentStateChanged(String)?, void onUserAsrSubtitleNotify(Map<String, dynamic> )?, void onAIAgentSubtitleNotify(Map<String, dynamic> )?, void onVolumeChanged(Map<String, dynamic> )?}) → void - 设置引擎回调函数
-
switchMicrophone(
bool on) → Future< void> -
切换麦克风状态
ontrue开启,false关闭 -
switchRobotVoice(
String voiceId) → Future< void> -
切换AI机器人声音
voiceId声音ID