You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure Communication Services audio effects *noise suppression* abilities can improve your audio calls by filtering out unwanted background noises. Noise suppression is a technology that removes background noises from audio calls. Eliminating background noise makes it easier to talk and listen. Noise suppression can also reduce distractions and tiredness caused by noisy places. For example, if you're taking an Azure Communication Services WebJS call in a noisy coffee shop, turning on noise suppression can make the call experience better.
15
+
The Azure Communication Services audio effects features can significantly enhance your audio calls by filtering out unwanted background noise and removing echo. Noise suppression works by identifying and eliminating distracting sounds like traffic, typing, or chatter, making conversations clearer and easier to follow. At the same time, echo removal ensures your voice doesn’t bounce back during the call, reducing feedback and preventing interruptions. These technologies not only improve speech clarity but also reduce listener fatigue—especially in noisy environments. For instance, if you're on an Azure Communication Services WebJS call in a busy coffee shop, enabling these audio effects can create a smoother, more focused communication experience.
16
+
17
+
## 🎧 What Are Audio Effects?
18
+
Audio effects in ACS are real-time enhancements applied to microphone input during a call. The Azure Communications Services audio effects package has multiple abilities to remove unwanted sounds from a call (from a client perspective).
19
+
20
+
**Noise suppression** (sometimes called noise reduction) focuses on eliminating unwanted background sounds. Think typing sounds, fan hums, distant conversations, or street noise. Its job is to isolate your voice so that whoever is listening hears you more clearly, and reduce or remove the distracting background sounds. It uses algorithms trained to recognize the difference between your speech and ambient noise, then reduces or removes that noise in real time. These noises can be considered a sound that isn't human voice.
21
+
Key traits that noise suppression enables:
22
+
- Removes continuous or predictable background noises.
23
+
- Enhances speech clarity.
24
+
- Typically works on the speaker’s end before sending out the audio.
25
+
26
+
**Echo cancellation** removes echo caused when your microphone picks up audio from your speakers. For example, when someone is on speakerphone and their microphone picks up your voice from their speaker, it can loop back to you as an echo. Echo cancellation predicts and subtracts this returning sound so you don’t hear yourself talking back a fraction of a second later.
27
+
Key traits for echo cancelation:
28
+
- Reduces acoustic feedback.
29
+
- Essential in open microphone and desktop setups where the microphone picks up audio output from a local speaker.
30
+
- Reduces listener fatigue and confusion caused by hearing your own voice returned.
16
31
17
32
## Use audio effects: Install the calling effects npm package
18
33
19
34
> [!IMPORTANT]
35
+
> **Noise Suppression** features are available in GA SDK version `1.28.4` or later, alongside the Azure Communication Services Calling Effects SDK version GA `1.1.2` or later. The general availability (GA) stable version `1.28.4` and later of the Calling SDK support noise suppression features. Alternatively, if you opt to use the public preview version, Calling SDK versions `1.24.2-beta.1` and later also support noise suppression.
20
36
> This tutorial employs the Azure Communication Services Calling SDK version `1.28.4` or later, alongside the Azure Communication Services Calling Effects SDK version `1.1.2` or later. The general availability (GA) stable version `1.28.4` and later of the Calling SDK support noise suppression features. Alternatively, if you opt to use the public preview version, Calling SDK versions `1.24.2-beta.1` and later also support noise suppression.
21
37
>
22
38
> Current browser support for adding audio noise suppression effects is available only on Chrome and Microsoft Edge desktop browsers.
23
39
24
-
The calling effects library can't be used standalone. It works only when used with the Azure Communication Services Calling client library for WebJS.
40
+
> [!IMPORTANT]
41
+
> **Echo Cancelation** features are available in public preview SDK version [1.37.1](https://github.com/Azure/Communication/blob/master/releasenotes/acs-javascript-calling-library-release-notes.md#1371-beta1-2025-06-16). Also note that to use echo cancelation you must use public preview audio effects SDK version beta version [1.21.1-beta](https://www.npmjs.com/package/@azure/communication-calling-effects/v/1.2.1-beta.1) or later.
25
42
26
-
Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
43
+
> [!NOTE]
44
+
> - Utilizing audio effects is available only on Chrome and Edge desktop browsers.
45
+
> - The audio effects library isn't a standalone module and can't function independently. To utilize its capabilities the effects package must be integrated with the Azure Communication Services Calling client library for WebJS.
46
+
> - If you use the GA version of the Calling SDK, you must use the [GA version](https://www.npmjs.com/package/@azure/communication-calling-effects/v/latest) of the Calling audio effects package.
27
47
28
-
If you use the GA version of the Calling SDK, you must use the [GA version](https://www.npmjs.com/package/@azure/communication-calling-effects/v/latest) of the Calling Effects SDK.
48
+
## Install the Audio Effects Package
49
+
Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
29
50
30
51
```console
31
52
@azure/communication-calling-effects/v/latest
32
53
```
33
54
34
-
If you use the public preview of the Calling SDK, you must use the [beta version](https://www.npmjs.com/package/@azure/communication-calling-effects/v/next) of the Calling Effects SDK.
55
+
If you use the **public preview** of the Calling SDK, you must use the [beta version](https://www.npmjs.com/package/@azure/communication-calling-effects/v/next) of the Calling Effects SDK. Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
35
56
36
57
```console
37
58
@azure/communication-calling-effects/v/next
38
59
```
39
60
40
-
## Load the noise suppression effects library
41
-
61
+
## Enable Audio Effects you wish to use
42
62
For information on the interface that details audio effects properties and methods, see the [Audio Effects Feature interface](/javascript/api/azure-communication-services/@azure/communication-calling/audioeffectsfeature?view=azure-communication-services-js&preserve-view=true) API documentation page.
43
63
44
-
To use noise suppression audio effects within the Azure Communication Services Calling SDK, you need the `LocalAudioStream` property that's currently in the call. You need access to the `AudioEffects` API of the `LocalAudioStream` property to start and stop audio effects.
45
64
65
+
### Initialize the Audio Effects Feature
66
+
To use audio effects within the Azure Communication Services Calling SDK, you need the `LocalAudioStream` property that's currently in the call. You need access to the `AudioEffects` API of the `LocalAudioStream` property to start and stop audio effects.
67
+
68
+
### Enable Noise Suppression
69
+
The following code snippet shows an example on how to enable **noise suppression** from within the WebJS environment.
### Validate that the current browser environment supports audio effects
114
+
We recommend that you check support for the effect in the current browser environment by using the `isSupported` method on the feature API. Remember that audio effects are only supported on desktop browsers for Chrome and Edge.
console.log('Noise Suppression is supported in the current browser environment');
128
+
}
129
+
```
97
130
98
-
// To stop Communication Services Deep Noise Suppression
99
-
awaitaudioEffectsFeatureApi.stopEffects({
100
-
noiseSuppression:true
101
-
});
131
+
## Bring it all together: Load and start noise suppression and echo cancelation
132
+
To initiate a call with noise suppression and echo cancelation enabled, create a new `LocalAudioStream` property using `AudioDeviceInfo`. Ensure that the `LocalAudioStream` source isn't set as a raw `MediaStream` property to support audio effects. Then, include this property within `CallStartOptions.audioOptions` when starting the call.
You can start a call with noise suppression turned on. Create a new `LocalAudioStream` property with `AudioDeviceInfo` (the `LocalAudioStream` source *shouldn't* be a raw `MediaStream` property to use audio effects), and pass it in `CallStartOptions.audioOptions`:
142
+
// Get LocalAudioStream from the localAudioStream collection on the call object
//To start Communication Services Deep Noise Suppression
116
150
awaitaudioEffectsFeatureApi.startEffects({
151
+
echoCancellation: echoCancellationEffect,
117
152
noiseSuppression: deepNoiseSuppression
118
-
});
119
-
120
-
// Pass LocalAudioStream in audioOptions in call start/accept options.
121
-
awaitcall.startCall({
122
-
audioOptions: {
123
-
muted:false,
124
-
localAudioStreams: [localAudioStreamWithEffects]
125
-
}
126
-
});
153
+
});
127
154
```
128
155
129
156
## Turn on noise suppression during an ongoing call
130
-
131
-
You might start a call and not have noise suppression turned on. The environment might get noisy so that you need to turn on noise suppression. To turn on noise suppression, you can use the `audioEffectsFeatureApi.startEffects` API.
157
+
You might start a call and not have noise suppression turned on. The end users room might get noisy so that they would need to turn on noise suppression. To turn on noise suppression, you can use the `audioEffectsFeatureApi.startEffects` interface.
### To start or stop audio effects packages during an active call
187
+
You might start a call and not have noise suppression turned on. The end users room might get noisy so that they would need to turn on noise suppression. To turn on noise suppression, you can use the `audioEffectsFeatureApi.startEffects` AP
188
+
189
+
#### To start Azure Communication Services Noise Suppression
190
+
```js
191
+
awaitaudioEffectsFeatureApi.startEffects({
192
+
noiseSuppression: deepNoiseSuppression
193
+
});
194
+
```
195
+
196
+
#### To stop Azure Communication Services Deep Noise Suppression
197
+
```js
198
+
awaitaudioEffectsFeatureApi.stopEffects({
199
+
noiseSuppression:true
200
+
});
201
+
```
202
+
203
+
#### To start Azure Communication Services echo cancelation
204
+
```js
205
+
awaitaudioEffectsFeatureApi.startEffects({
206
+
noiseSuppression: echoCancellation
207
+
});
208
+
```
209
+
210
+
#### To stop Azure Communication Services echo cancelation
211
+
```js
212
+
awaitaudioEffectsFeatureApi.stopEffects({
213
+
echoCancellation:true
214
+
});
215
+
```
216
+
217
+
## Check what audio effects are active
218
+
To check what noise suppression effects are currently active, you can use the `activeEffects` property. The `activeEffects` property returns an object with the names of the current active effects.
console.log(`Error with audio effects: ${error.message}`);
242
+
});
243
+
```
244
+
## Best Practices
245
+
The Azure Communication Services WebJS audio effects package provides tools for reducing unwanted sounds. Other measures can be taken to improve audio quality, such as:
246
+
- Encouraging end users to consider using headphones to minimize the need for echo cancellation.
247
+
- Enabling noise suppression tin shared or open work environments.
248
+
- Setting noise suppression as the default option (i.e., having audio effects activated when a user initiates a call). If this feature is enabled automatically at the start of calls, users don't have to activate it manually. Enabling noise suppression and echo cancellation by default may help mitigate audio issues during calls.
249
+
- Test audio effects in different environments to optimize end user experience.
0 commit comments