Skip to content

Commit 1c5832d

Browse files
authored
feat(web): enable acoustic echo cancellation and noise suppression (#1308)
AEC: acoustic echo cancellation ANS: automatic noise suppression
1 parent 9fdb01f commit 1c5832d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

web/flat-web/src/api-middleware/rtc/device-test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export class DeviceTest {
8282
} else {
8383
this.microphoneAudioTrack = await AgoraRTC.createMicrophoneAudioTrack({
8484
microphoneId: deviceId,
85+
// AEC: acoustic echo cancellation
86+
AEC: true,
87+
// ANS: automatic noise suppression
88+
ANS: true,
8589
});
8690
}
8791
}

web/flat-web/src/api-middleware/rtc/room.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ export class RtcRoom {
136136
await this.joined;
137137
this._localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack({
138138
microphoneId: configStore.microphoneId,
139+
// AEC: acoustic echo cancellation
140+
AEC: true,
141+
// ANS: automatic noise suppression
142+
ANS: true,
139143
});
140144
setMicrophoneTrack(this._localAudioTrack as IMicrophoneAudioTrack);
141145
this._localAudioTrack.once("track-ended", () => {

0 commit comments

Comments
 (0)