setAnsMode method

FutureOr<int> setAnsMode(
  1. ByteRTCAnsMode ansMode
)

@valid since 3.52 @detail api @author liuchuang @brief 支持根据业务场景,设置通话中的音频降噪模式。 @param ansMode 降噪模式。具体参见 ByteRTCAnsMode{@link #ByteRTCAnsMode}。 @return - 0: 调用成功。 - < 0 : 调用失败。查看 ByteRTCReturnStatus{@link #ByteRTCReturnStatus} 获得更多错误说明 @note - 该接口进房前后均可调用,可重复调用,仅最后一次调用生效。 - 降噪算法包含传统降噪和 AI 降噪。传统降噪主要是抑制平稳噪声,比如空调声、风扇声等。而 AI 降噪主要是抑制非平稳噪声,比如键盘敲击声、桌椅碰撞声等。 - 只有以下 ByteRTCRoomProfile{@link #ByteRTCRoomProfile} 场景时,调用本接口可以开启 AI 降噪。其余场景的 AI 降噪不会生效。 - 游戏语音模式: ByteRTCRoomProfileGame - 高音质游戏模式: ByteRTCRoomProfileGameHD - 云游戏模式: ByteRTCRoomProfileCloudGame - 1 vs 1 音视频通话: ByteRTCRoomProfileChat - 多端同步播放音视频:ByteRTCRoomProfileLwTogether - 云端会议中的个人设备:ByteRTCRoomProfileMeeting - 课堂互动模式:ByteRTCRoomProfileClassroom - 云端会议中的会议室终端:ByteRTCRoomProfileMeetingRoom

Implementation

FutureOr<int> setAnsMode(ByteRTCAnsMode ansMode) async {
  return await nativeCall('setAnsMode:', [ansMode.$value]);
}