MethodChannelAliAiCall class

通过 MethodChannel 实现的阿里云 AI 通话插件 负责与原生平台进行通信

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
用于与原生平台通信的方法通道
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call({required String rtcToken, required String aiAgentInstanceId, required String aiAgentUserId, required String channelId}) Future<void>
发起通话 rtcToken RTC通话令牌 aiAgentInstanceId AI代理实例ID aiAgentUserId AI代理用户ID channelId 通话频道ID
override
enableSpeaker(bool enable) Future<void>
切换扬声器状态 enable true开启,false关闭
override
enableVoiceInterrupt(bool enable) Future<void>
启用/禁用语音打断功能 enable true启用,false禁用
override
hangup() Future<void>
挂断通话
override
initEngine({required String userId}) Future<void>
初始化引擎 userId 用户ID
override
interruptSpeaking() Future<void>
打断AI说话
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAIRole(String roleId, String roleName) Future<void>
设置AI角色 roleId 角色ID roleName 角色名称
override
setEngineCallback({void onCallBegin()?, void onCallEnd()?, void onError(String)?, void onAIResponse(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>
切换麦克风状态 on true开启,false关闭
override
switchRobotVoice(String voiceId) Future<void>
切换AI机器人声音 voiceId 声音ID
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited