Skip to content

Commit

Permalink
feat(web): enable acoustic echo cancellation and noise suppression (#…
Browse files Browse the repository at this point in the history
…1308)

AEC: acoustic echo cancellation
ANS: automatic noise suppression
  • Loading branch information
Matrixbirds committed Jan 18, 2022
1 parent 9fdb01f commit 1c5832d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/flat-web/src/api-middleware/rtc/device-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export class DeviceTest {
} else {
this.microphoneAudioTrack = await AgoraRTC.createMicrophoneAudioTrack({
microphoneId: deviceId,
// AEC: acoustic echo cancellation
AEC: true,
// ANS: automatic noise suppression
ANS: true,
});
}
}
Expand Down
4 changes: 4 additions & 0 deletions web/flat-web/src/api-middleware/rtc/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export class RtcRoom {
await this.joined;
this._localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack({
microphoneId: configStore.microphoneId,
// AEC: acoustic echo cancellation
AEC: true,
// ANS: automatic noise suppression
ANS: true,
});
setMicrophoneTrack(this._localAudioTrack as IMicrophoneAudioTrack);
this._localAudioTrack.once("track-ended", () => {
Expand Down

0 comments on commit 1c5832d

Please sign in to comment.