Skip to content

Commit 2c0e4c0

Browse files
authored
Update web.md
1 parent 84e9b45 commit 2c0e4c0

File tree

1 file changed

+19
-0
lines changed
  • articles/communication-services/tutorials/audio-quality-enhancements/includes

1 file changed

+19
-0
lines changed

articles/communication-services/tutorials/audio-quality-enhancements/includes/web.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ The `activeEffects` property returns an object with the names of the current act
7171
```js
7272
// Using the audio effects feature api
7373
const currentActiveEffects = audioEffectsFeatureApi.activeEffects;
74+
75+
// Create the noise supression instance
76+
const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
77+
// Its recommened to check support for the effect in the current environment using the isSupported method on the feature API. Remember that Noise Supression is only supported on Desktop Browsers for Chrome and Edge
78+
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
79+
if (isDeepNoiseSuppressionSupported) {
80+
console.log('Noise supression is supported in browser environment');
81+
}
82+
83+
// To start ACS Deep Noise Suppression,
84+
await audioEffectsFeatureApi.startEffects({
85+
noiseSuppression: deepNoiseSuppression
86+
});
87+
88+
// To stop ACS Deep Noise Suppression
89+
await audioEffectsFeatureApi.stopEffects({
90+
noiseSuppression: true
91+
});
92+
7493
```
7594

7695
### Start a call with Noise Suppression enabled

0 commit comments

Comments
 (0)