AliAiCallPlatform class abstract

阿里云 AI 通话插件的平台接口抽象类 所有平台特定的实现都必须继承这个类

Inheritance
  • Object
  • PlatformInterface
  • AliAiCallPlatform
Implementers

Constructors

AliAiCallPlatform()
构造函数,初始化平台接口

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

call({required String rtcToken, required String aiAgentInstanceId, required String aiAgentUserId, required String channelId, String? aiAgentId, String? userId}) Future<void>
发起通话 rtcToken RTC通话令牌 aiAgentInstanceId AI代理运行实例ID(服务端启动智能体后返回) aiAgentUserId AI代理在RTC频道中的用户ID channelId 通话频道ID aiAgentId 智能体模板ID(控制台创建的 Agent ID,iOS 侧必传) userId 当前登录用户ID(iOS call1/2 接口必传)
enableSpeaker(bool enable) Future<void>
切换扬声器状态 enable true开启,false关闭
enableVoiceInterrupt(bool enable) Future<void>
启用/禁用语音打断功能 enable true启用,false禁用
hangup() Future<void>
挂断通话
initEngine({required String userId}) Future<void>
初始化引擎 userId 用户ID
interruptSpeaking() Future<void>
打断AI说话
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 角色名称
switchMicrophone(bool on) Future<void>
切换麦克风状态 on true开启,false关闭
switchRobotVoice(String voiceId) Future<void>
切换AI机器人声音 voiceId 声音ID
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance AliAiCallPlatform
获取当前平台实现实例
getter/setter pair