Skip to content

Commit ffcb74a

Browse files
authored
Update web.md
1 parent 1baab3e commit ffcb74a

File tree

1 file changed

+107
-44
lines changed
  • articles/communication-services/tutorials/audio-quality-enhancements/includes

1 file changed

+107
-44
lines changed

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

Lines changed: 107 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,84 @@ author: sloanster
66
ms.author: micahvivion
77

88
services: azure-communication-services
9-
ms.date: 11/05/2024
9+
ms.date: 06/28/2025
1010
ms.topic: include
1111
ms.service: azure-communication-services
1212
ms.subservice: calling
1313
---
1414

15-
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+
1. **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.
21+
Key traits that noise suppression does:
22+
- Removes continuous or predictable noises.
23+
- Enhances speech clarity.
24+
- Typically works on the speaker’s end before sending the audio out.
25+
26+
2. **Echo cancellation** eliminates 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+
- Eliminates acoustic feedback.
29+
- Essential in speakerphone or open mic setups.
30+
- Reduces listener fatigue and confusion caused by hearing your own voice returned.
1631

1732
## Use audio effects: Install the calling effects npm package
1833

1934
> [!IMPORTANT]
20-
> 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-
>
22-
> Current browser support for adding audio noise suppression effects is available only on Chrome and Edge desktop browsers.
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.
2336
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.
37+
> [!IMPORTANT]
38+
> **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 do note that to use echo effects you must use latest 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.
2539
26-
Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
40+
> [!NOTE]
41+
> - Current browser support for adding audio noise suppression effects is available only on Chrome and Edge desktop browsers.
42+
> - The Calling audio effects library is not a standalone module and cannot function independently. To utilize its capabilities—such as noise suppression and echo removal the effects package must be integrated with the Azure Communication Services Calling client library for WebJS.
43+
> - 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.
2744
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.
45+
## Step 1: Install the Audio Effects Package
46+
Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
2947

3048
```console
3149
@azure/communication-calling-effects/v/latest
3250
```
3351

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.
52+
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.
3553

3654
```console
3755
@azure/communication-calling-effects/v/next
3856
```
3957

40-
## Load the noise suppression effects library
41-
58+
## Enable Audio Effects
4259
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.
4360

61+
### Initialize the Audio Effects Feature
4462
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.
4563

4664
```js
65+
import { createAzureCommunicationCallingWithAudioEffects } from '@azure/communication-calling-effects';
66+
67+
const callClient = createAzureCommunicationCallingWithAudioEffects();
68+
```
69+
This wraps the standard CallClient with audio effects capabilities.
70+
71+
### Enable Noise Suppression
72+
```js
73+
const deviceManager = await callClient.getDeviceManager();
74+
await deviceManager.askDevicePermission({ audio: true });
75+
76+
const selectedMicrophone = (await deviceManager.getMicrophones())[0];
77+
78+
const audioEffects = await deviceManager.createAudioEffects(selectedMicrophone);
79+
80+
// Enable noise suppression
81+
await audioEffects.setFeature({ featureName: 'noiseSuppression', enabled: true });
82+
```
83+
### Enable Echo Cancellation
84+
85+
=========================================
86+
4787
import * as AzureCommunicationCallingSDK from '@azure/communication-calling';
4888
import { DeepNoiseSuppressionEffect } from '@azure/communication-calling-effects';
4989

@@ -69,42 +109,11 @@ audioEffectsFeatureApi.on('effectsError', (error: AudioEffectErrorPayload) => {
69109
console.log(`Error with audio effects: ${error.message}`);
70110
});
71111
```
72-
73-
## Check what audio effects are active
74-
75-
To check what noise suppression effects are currently active, you can use the `activeEffects` property.
76-
77-
The `activeEffects` property returns an object with the names of the current active effects.
78-
79-
```js
80-
// Use the audio effects feature API.
81-
const currentActiveEffects = audioEffectsFeatureApi.activeEffects;
82-
83-
// Create the noise suppression instance.
84-
const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
85-
// We recommend that you check support for the effect in the current environment by using the isSupported API
86-
// method. Remember that noise suppression is only supported on desktop browsers for Chrome and Edge.
87-
88-
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
89-
if (isDeepNoiseSuppressionSupported) {
90-
console.log('Noise suppression is supported in local browser environment');
91-
}
92-
93-
// To start Communication Services Deep Noise Suppression
94-
await audioEffectsFeatureApi.startEffects({
95-
noiseSuppression: deepNoiseSuppression
96-
});
97-
98-
// To stop Communication Services Deep Noise Suppression
99-
await audioEffectsFeatureApi.stopEffects({
100-
noiseSuppression: true
101-
});
102-
103-
```
112+
=====================================
104113
105114
## Start a call with noise suppression automatically enabled
106115
107-
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`:
116+
To initiate a call with noise suppression enabled, create a new `LocalAudioStream` property using `AudioDeviceInfo`. Ensure that the `LocalAudioStream` source is not set as a raw `MediaStream` property to support audio effects. Then, include this property within `CallStartOptions.audioOptions` when starting the call.
108117
109118
```js
110119
// As an example, here we're simply creating LocalAudioStream by using the current selected mic on DeviceManager.
@@ -157,6 +166,60 @@ await audioEffectsFeatureApi.stopEffects({
157166
noiseSuppression: true
158167
});
159168
```
169+
## To start or stop audio effects packages during a call
170+
To start Azure Communication Services Deep Noise Suppression
171+
```js
172+
await audioEffectsFeatureApi.startEffects({
173+
noiseSuppression: deepNoiseSuppression
174+
});
175+
```
176+
177+
To stop Azure Communication Services Deep Noise Suppression
178+
```js
179+
await audioEffectsFeatureApi.stopEffects({
180+
noiseSuppression: true
181+
});
182+
```
183+
184+
To start Azure Communication Services echo cancelation
185+
```js
186+
await audioEffectsFeatureApi.startEffects({
187+
noiseSuppression: echoCancellation
188+
});
189+
```
190+
191+
To stop Azure Communication Services echo cancelation
192+
```js
193+
await audioEffectsFeatureApi.stopEffects({
194+
echoCancellation: true
195+
});
196+
```
197+
198+
## Check what audio effects are active
199+
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.
200+
201+
```js
202+
// Use the audio effects feature API.
203+
const currentActiveEffects = audioEffectsFeatureApi.activeEffects;
204+
205+
// Create the noise suppression instance.
206+
const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
207+
// We recommend that you check support for the effect in the current environment by using the isSupported API
208+
// method. Remember that noise suppression is only supported on desktop browsers for Chrome and Edge.
209+
210+
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
211+
if (isDeepNoiseSuppressionSupported) {
212+
console.log('Noise suppression is supported in local browser environment');
213+
}
214+
```
215+
216+
## Best Practices
217+
The ACS audio effects package provides tools for reducing unwanted sounds. Additional measures can be taken to improve audio quality, such as:
218+
- Encouraging end users to consider using headphones to minimize the need for echo cancellation.
219+
- Enabling noise suppression tin shared or open work environments.
220+
- 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 do not have to activate it manually. Enabling noise suppression and echo cancellation by default may help mitigate audio issues during calls.
221+
- Test audio effects in different environments to optimize user experience.
222+
160223

161224
## Related content
162225

0 commit comments

Comments
 (0)