Skip to content

Commit 9fa927e

Browse files
authored
Updated for clarity
1 parent 2e8e547 commit 9fa927e

File tree

1 file changed

+15
-9
lines changed
  • articles/communication-services/tutorials/audio-quality-enhancements/includes

1 file changed

+15
-9
lines changed

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ ms.subservice: calling
1414

1515
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. It makes audio calls clearer and better by eliminating background noise, making 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 coffee shop with considerable noise, turning on noise suppression can make the call experience better.
1616

17-
## Using audio effects - **Noise Suppression**
18-
### Install the npm package
17+
## Using audio effects - install the calling effects npm package
1918
> [!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.1` or newer. The GA (stable) version **`1.28.4`** and above 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 higher also support noise suppression.
19+
> 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.1` or newer. The GA (stable) version **`1.28.4`** and above 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 higher also support noise suppression.
2120
>
2221
> Current browser support for adding audio noise suppression effects is only available on Chrome and Edge Desktop browsers.
2322
@@ -37,7 +36,7 @@ Use the `npm install` command to install the Azure Communication Services Audio
3736
```console
3837
3938
```
40-
### Loading the Noise Suppression effects library
39+
## Loading the Noise Suppression effects library
4140
To use `noise suppression` audio effects within the Azure Communication Calling SDK, you need the `LocalAudioStream` that is currently in the call. You need access to the `AudioEffects` API of the `LocalAudioStream` to start and stop audio effects.
4241
```js
4342
import * as AzureCommunicationCallingSDK from '@azure/communication-calling';
@@ -65,7 +64,7 @@ audioEffectsFeatureApi.on('effectsError', (error: AudioEffectErrorPayload) => {
6564
console.log(`Error with audio effects: ${error.message}`);
6665
});
6766
```
68-
### Checking what noise suppression effects are currently active
67+
## Checking what audio effects are active
6968
At anytime if you want to check what **noise suppression** effects are currently active, you can use the `activeEffects` property.
7069
The `activeEffects` property returns an object with the names of the current active effects.
7170
```js
@@ -79,7 +78,7 @@ const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
7978

8079
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
8180
if (isDeepNoiseSuppressionSupported) {
82-
console.log('Noise supression is supported in browser environment');
81+
console.log('Noise supression is supported in local browser environment');
8382
}
8483

8584
// To start ACS Deep Noise Suppression,
@@ -94,12 +93,12 @@ await audioEffectsFeatureApi.stopEffects({
9493

9594
```
9695

97-
### Start a call with Noise Suppression automatically enabled
96+
## Start a call with Noise Suppression automatically enabled
9897
To start a call with **noise suppression** turned on, you can create a new `LocalAudioStream` with a `AudioDeviceInfo` (the LocalAudioStream source <u>shouldn't</u> be a raw `MediaStream` to use audio effects), and pass it in the `CallStartOptions.audioOptions`:
9998
```js
10099
// As an example, here we are simply creating a LocalAudioStream using the current selected mic on the DeviceManager
101100
const audioDevice = deviceManager.selectedMicrophone;
102-
const localAudioStreamWithEffects = new .LocalAudioStream(audioDevice);
101+
const localAudioStreamWithEffects = new AzureCommunicationCallingSDK.LocalAudioStream(audioDevice);
103102
const audioEffectsFeatureApi = localAudioStreamWithEffects.feature(AzureCommunicationCallingSDK.Features.AudioEffects);
104103

105104
// Start effect
@@ -122,10 +121,17 @@ There are situations where a user might start a call and not have **noise suppre
122121
// Create the noise supression instance
123122
const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
124123

124+
// Get the LocalAudioStream from the localAudioStream collection on the call object
125+
// 'call' here represents the call object.
126+
const localAudioStreamInCall = call.localAudioStreams[0];
127+
128+
// Get the audio effects feature API from LocalAudioStream
129+
const audioEffectsFeatureApi = localAudioStreamInCall.feature(AzureCommunicationCallingSDK.Features.AudioEffects);
130+
125131
// 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
126132
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
127133
if (isDeepNoiseSuppressionSupported) {
128-
console.log('Noise supression is supported in browser environment');
134+
console.log('Noise supression is supported in the current browser environment');
129135
}
130136

131137
// To start ACS Deep Noise Suppression,

0 commit comments

Comments
 (0)