Skip to content

Commit e2068e4

Browse files
Merge pull request #273345 from garchiro7/origin/native-audio-filters
Update the docs for native SDKs
2 parents 42091d6 + bba005f commit e2068e4

File tree

10 files changed

+358
-117
lines changed

10 files changed

+358
-117
lines changed

articles/communication-services/concepts/voice-video-calling/calling-sdk-features.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Once you start development, check out the [known issues page](../known-issues.md
3232
| Calling | [npm](https://www.npmjs.com/package/@azure/communication-calling) | [NuGet](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient) | [GitHub](https://github.com/Azure/Communication/releases) | [Maven](https://search.maven.org/artifact/com.azure.android/azure-communication-calling/)| |
3333
| UI Library| [npm](https://www.npmjs.com/package/@azure/communication-react) | - | [GitHub](https://github.com/Azure/communication-ui-library-ios) | [GitHub](https://github.com/Azure/communication-ui-library-android) | [GitHub](https://github.com/Azure/communication-ui-library), [Storybook](https://azure.github.io/communication-ui-library/?path=/story/overview--page) |
3434

35-
**Key features**
35+
**Key features**
3636
- **Device Management and Media** - The Calling SDK provides facilities for binding to audio and video devices, encodes content for efficient transmission over the communications dataplane, and renders content to output devices and views that you specify. APIs are also provided for screen and application sharing.
3737
- **PSTN** - The Calling SDK can initiate voice calls with the traditional publicly switched telephone network, [using phone numbers you acquire in the Azure portal](../../quickstarts/telephony/get-phone-number.md) or programmatically. You can also bring your own numbers using session border controllers.
3838
- **Teams Meetings & Calling** - The Calling SDK can [join Teams meetings](../../quickstarts/voice-video-calling/get-started-teams-interop.md) and interact with the Teams voice and video dataplane.
@@ -96,10 +96,11 @@ The following list presents the set of features that are currently available in
9696
| | Set / update scaling mode | ✔️ | ✔️ | ✔️ | ✔️ |
9797
| | Render remote video stream | ✔️ | ✔️ | ✔️ | ✔️ |
9898
| Video Effects | [Background Blur](../../quickstarts/voice-video-calling/get-started-video-effects.md) | ✔️ | ✔️ | ✔️ | ✔️ |
99-
| | Custom background image | ✔️ ||||
100-
| Audio Effects | [Music Mode](./music-mode.md) || ✔️ | ✔️ | ✔️ |
101-
| | [Audio filters](../../how-tos/calling-sdk/manage-audio-filters.md) || ✔️ | ✔️ | ✔️ |
102-
| | [Noise Supression](../../tutorials/audio-quality-enhancements/add-noise-supression.md) | ✔️ ||||
99+
| | Custom background image | ✔️ | ✔️ | ✔️ | ✔️ |
100+
| [Audio Effects](../../tutorials/audio-quality-enhancements/add-noise-supression.md) | [Music Mode](./music-mode.md) || ✔️ | ✔️ | ✔️ |
101+
| | Echo cancellation || ✔️ | ✔️ | ✔️ |
102+
| | Noise supression | ✔️ | ✔️ | ✔️ | ✔️ |
103+
| | Automatic gain control (AGC) || ✔️ | ✔️ | ✔️ |
103104
| Notifications <sup>4</sup> | [Push notifications](../../how-tos/calling-sdk/push-notifications.md) | ✔️ | ✔️ | ✔️ | ✔️ |
104105

105106
<sup>1</sup> The capability to Mute Others is currently in public preview.

articles/communication-services/concepts/voice-video-calling/known-issues-native.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services: azure-communication-services
77

88
ms.author: micahvivion
99
ms.date: 03/20/2024
10-
ms.topic: release-notes
10+
ms.topic: conceptual
1111
ms.service: azure-communication-services
1212
---
1313

articles/communication-services/concepts/voice-video-calling/music-mode.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ ms.custom: template-how-to
1313

1414
# Music Mode
1515

16-
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
17-
1816
The **music mode** enhances the audio quality for music playback and performance within virtual environments, ensuring clarity and depth in sound reproduction; currently supports a 32-kHz sampling rate at 128 kbps when network bandwidth allows; when network bandwidth is insufficient, the bitrate can be reduced to as low as 48 kbps.
1917

2018
This feature is designed to elevate the audio quality for calls, ensuring the audio is crispy and offering a richer and more immersive audio experience. Also, it reduces audio compression to maintain the original sound, making it ideal for applications ranging from live musical performances and remote music education or music sessions.
@@ -30,10 +28,10 @@ We recommend using high-quality external loudspeakers, professional microphones,
3028

3129
The Calling native SDK provides an additional set of audio filters that bring a richer experience during the call:
3230

33-
- Analog Automatic gain control
34-
- Digital Automatic gain control
3531
- Echo cancellation. *You can only toggle echo cancellation only if music mode is enabled*
3632
- Noise suppression. *The currently available modes are `Off`, `Auto`, `Low`, and `High`*
33+
- Analog Automatic gain control
34+
- Digital Automatic gain control
3735

3836
## Next steps
39-
- [Learn how to setup audio filters](../../how-tos/calling-sdk/manage-audio-filters.md)
37+
- [Learn how to setup audio filters](../../tutorials/audio-quality-enhancements/add-noise-supression.md)

articles/communication-services/toc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ items:
284284
href: tutorials/collecting-user-feedback/collecting-user-feedback.md
285285
- name: Audio quality enhancements
286286
items:
287-
- name: Enabling noise supression
287+
- name: Enabling audio effects
288288
href: tutorials/audio-quality-enhancements/add-noise-supression.md
289289
- name: Virtual appointments
290290
items:
@@ -316,8 +316,6 @@ items:
316316
href: how-tos/cte-calling-sdk/manage-calls.md
317317
- name: Manage Teams meeting Lobby
318318
href: how-tos/calling-sdk/lobby.md
319-
- name: Manage Audio Filters
320-
href: how-tos/calling-sdk/manage-audio-filters.md
321319
- name: PowerPoint Live
322320
href: how-tos/calling-sdk/powerpoint-live.md
323321
- name: Record calls
@@ -777,14 +775,14 @@ items:
777775
- name: Tuning video quality
778776
href: concepts/voice-video-calling/video-constraints.md
779777
displayName: diagnostics, diagnose, feedback, quality, reliability, users, call, quick, satisfaction, improve, issues
778+
- name: SDK best practices
779+
href: concepts/best-practices.md
780+
displayName: best, practices, before, you, start, diagnostics, diagnose, feedback, quality, reliability, users, call, quick, satisfaction, improve, issues
780781
- name: Networking and Data
781782
items:
782783
- name: Network recommendations
783784
href: concepts/voice-video-calling/network-requirements.md
784785
displayName: best, practices, before, you, start, diagnostics, diagnose, feedback, quality, reliability, users, call, quick, satisfaction, improve, issues
785-
- name: SDK best practices
786-
href: concepts/best-practices.md
787-
displayName: best, practices, before, you, start, diagnostics, diagnose, feedback, quality, reliability, users, call, quick, satisfaction, improve, issues
788786
- name: Call networking internals
789787
href: concepts/call-flows.md
790788
- name: Call flow topologies
@@ -837,6 +835,8 @@ items:
837835
items:
838836
- name: WebJS calling SDK
839837
href: concepts/voice-video-calling/known-issues-webjs.md
838+
- name: Native calling SDK
839+
href: concepts/voice-video-calling/known-issues-native.md
840840
- name: Call Automation
841841
href: concepts/voice-video-calling/known-issues-call-automation.md
842842
- name: Chat
@@ -1109,7 +1109,7 @@ items:
11091109
items:
11101110
- name: Overview
11111111
href: resources/troubleshooting/voice-video-calling/video-issues/overview.md
1112-
- name: The user can not see video from the remote participant
1112+
- name: The user cannot see video from the remote participant
11131113
items:
11141114
- name: Subscribing to a video that is unavailable
11151115
href: resources/troubleshooting/voice-video-calling/video-issues/subscribing-video-not-available.md
Lines changed: 16 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Tutorial - Add audio noise suppression ability to your Web calls
3-
titleSuffix: An Azure Communication Services tutorial on how to enable advanced noise suppression
2+
title: Tutorial - Add audio filters to improve the quality in your audio calling experience
3+
titleSuffix: An Azure Communication Services tutorial on how to enable advanced audio filters
44
description: Learn how to add audio effects in your calls using Azure Communication Services.
55
author: sloanster
66

@@ -10,106 +10,23 @@ ms.topic: tutorial
1010
ms.service: azure-communication-services
1111
ms.subservice: calling
1212
ms.custom: mode-other
13+
zone_pivot_groups: acs-plat-web-ios-android-windows
1314
---
14-
# Add audio quality enhancements to your audio calling experience
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. 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.
16-
17-
[!INCLUDE [Public Preview](../../includes/public-preview-include-document.md)]
18-
19-
## Using audio effects - **noise suppression**
20-
### Install the npm package
21-
Use the `npm install` command to install the Azure Communication Services Audio Effects SDK for JavaScript.
22-
> [!IMPORTANT]
23-
> This tutorial uses the Azure Communication Services Calling SDK version of `1.24.1-beta.1` (or greater) and the Azure Communication Services Calling Audio Effects SDK version greater than or equal to `1.1.0-beta.1` (or greater).
24-
```console
25-
npm install @azure/communication-calling-effects --save
26-
```
27-
> [!NOTE]
28-
> The calling effect library cannot be used standalone and can only work when used with the Azure Communication Calling client library for WebJS (https://www.npmjs.com/package/@azure/communication-calling).
29-
30-
You can find more [details ](https://www.npmjs.com/package/@azure/communication-calling-effects) on the calling effects npm package page.
31-
32-
> [!NOTE]
33-
> Current browser support for adding audio noise suppression effects is only available on Chrome and Edge Desktop Browsers.
34-
35-
> You can learn about the specifics of the [calling API](/javascript/api/azure-communication-services/@azure/communication-calling/?view=azure-communication-services-js&preserve-view=true).
36-
37-
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.
38-
```js
39-
import * as AzureCommunicationCallingSDK from '@azure/communication-calling';
40-
import { DeepNoiseSuppressionEffect } from '@azure/communication-calling-effects';
41-
42-
// Get the LocalAudioStream from the localAudioStream collection on the call object
43-
// 'call' here represents the call object.
44-
const localAudioStreamInCall = call.localAudioStreams[0];
45-
46-
// Get the audio effects feature API from LocalAudioStream
47-
const audioEffectsFeatureApi = localAudioStreamInCall.feature(SDK.Features.AudioEffects);
4815

49-
// Subscribe to useful events that show audio effects status
50-
audioEffectsFeatureApi.on('effectsStarted', (activeEffects: ActiveAudioEffects) => {
51-
console.log(`Current status audio effects: ${activeEffects}`);
52-
});
53-
54-
55-
audioEffectsFeatureApi.on('effectsStopped', (activeEffects: ActiveAudioEffects) => {
56-
console.log(`Current status audio effects: ${activeEffects}`);
57-
});
58-
59-
60-
audioEffectsFeatureApi.on('effectsError', (error: AudioEffectErrorPayload) => {
61-
console.log(`Error with audio effects: ${error.message}`);
62-
});
63-
```
64-
65-
At anytime if you want to check what **noise suppression** effects are currently active, you can use the `activeEffects` property.
66-
The `activeEffects` property returns an object with the names of the current active effects.
67-
```js
68-
// Using the audio effects feature api
69-
const currentActiveEffects = audioEffectsFeatureApi.activeEffects;
70-
```
71-
72-
### Start a call with Noise Suppression enabled
73-
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`:
74-
```js
75-
// As an example, here we are simply creating a LocalAudioStream using the current selected mic on the DeviceManager
76-
const audioDevice = deviceManager.selectedMicrophone;
77-
const localAudioStreamWithEffects = new SDK.LocalAudioStream(audioDevice);
78-
const audioEffectsFeatureApi = localAudioStreamWithEffects.feature(SDK.Features.AudioEffects);
79-
80-
// Start effect
81-
await audioEffectsFeatureApi.startEffects({
82-
noiseSuppression: deepNoiseSuppression
83-
});
84-
85-
// Pass the LocalAudioStream in audioOptions in call start/accept options.
86-
await call.startCall({
87-
audioOptions: {
88-
muted: false,
89-
localAudioStreams: [localAudioStreamWithEffects]
90-
}
91-
});
92-
```
16+
# Add audio quality enhancements to your audio calling experience
9317

94-
### How to turn on Noise Suppression during an ongoing call
95-
There are situations where a user might start a call and not have **noise suppression** turned on, but their current environment might get noisy resulting in them needing to turn on **noise suppression**. To turn on **noise suppression**, you can use the `audioEffectsFeatureApi.startEffects` API.
96-
```js
97-
// Create the noise supression instance
98-
const deepNoiseSuppression = new DeepNoiseSuppressionEffect();
18+
::: zone pivot="platform-web"
19+
[!INCLUDE [Audio effects for Web](./includes/web.md)]
20+
::: zone-end
9921

100-
// 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
101-
const isDeepNoiseSuppressionSupported = await audioEffectsFeatureApi.isSupported(deepNoiseSuppression);
102-
if (isDeepNoiseSuppressionSupported) {
103-
console.log('Noise supression is supported in browser environment');
104-
}
22+
::: zone pivot="platform-android"
23+
[!INCLUDE [Audio effects for Android](./includes/android.md)]
24+
::: zone-end
10525

106-
// To start ACS Deep Noise Suppression,
107-
await audioEffectsFeatureApi.startEffects({
108-
noiseSuppression: deepNoiseSuppression
109-
});
26+
::: zone pivot="platform-ios"
27+
[!INCLUDE [Audio effects for iOS](./includes/ios.md)]
28+
::: zone-end
11029

111-
// To stop ACS Deep Noise Suppression
112-
await audioEffectsFeatureApi.stopEffects({
113-
noiseSuppression: true
114-
});
115-
```
30+
::: zone pivot="platform-windows"
31+
[!INCLUDE [Audio effects for Windos](./includes/windows.md)]
32+
::: zone-end
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Tutorial - Add audio effects suppression ability to your Android apps
3+
titleSuffix: An Azure Communication Services tutorial on how to enable audio effects
4+
description: Learn how to add audio effects in your calls using Azure Communication Services.
5+
author: zehangzheng
6+
7+
ms.date: 10/6/2023
8+
ms.author: zehangzheng
9+
services: azure-communication-services
10+
ms.topic: include
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
[!INCLUDE [Audio filters options](./native-audio-filters.md)]
16+
17+
[!INCLUDE [Install SDK](../../../how-tos/calling-sdk/includes/install-sdk/install-sdk-android.md)]
18+
19+
The audio filter feature allows different audio preprocessing options to be applied to outgoing audio. There are two types of audio filters: `OutgoingAudioFilters` and `LiveOutgoingAudioFilters`, with `OutgoingAudioFilters` changing settings before the call starts and `LiveOutgoingAudioFilters` changing settings while a call is in progress.
20+
21+
You first need to import the Calling SDK and the associated classes:
22+
23+
```csharp
24+
import com.azure.android.communication.calling.OutgoingAudioOptions;
25+
import com.azure.android.communication.calling.OutgoingAudioFilters;
26+
import com.azure.android.communication.calling.LiveOutgoingAudioFilters;
27+
```
28+
29+
## Before call starts
30+
31+
`OutgoingAudioFilters` can be applied when a call starts.
32+
33+
Begin by creating a `OutgoingAudioFilters` and passing it into OutgoingAudioOptions as shown in the following code:
34+
35+
```java
36+
OutgoingAudioOptions outgoingAudioOptions = new OutgoingAudioOptions();
37+
OutgoingAudioFilters filters = new OutgoingAudioFilters();
38+
filters.setNoiseSuppressionMode(NoiseSuppressionMode.HIGH);
39+
filters.setAnalogAutomaticGainControlEnabled(true);
40+
filters.setDigitalAutomaticGainControlEnabled(true);
41+
filters.setMusicModeEnabled(true);
42+
filters.setAcousticEchoCancellationEnabled(true);
43+
outgoingAudioOptions.setAudioFilters(filters);
44+
```
45+
46+
## During the call
47+
48+
`LiveOutgoingAudioFilters` can be applied after a call has started. You can retrieve this object from the call object once the call has started. To change the setting in `LiveOutgoingAudioFilters`, set the members inside the class to a valid value and they're applied.
49+
50+
Only a subset of the filters available from `OutgoingAudioFilters` are available during an active call: music mode, echo cancellation, and noise suppression mode.
51+
52+
```java
53+
LiveOutgoingAudioFilters filters = call.getLiveOutgoingAudioFilters();
54+
filters.setMusicModeEnabled(false);
55+
filters.setAcousticEchoCancellationEnabled(false);
56+
filters.setNoiseSuppressionMode(NoiseSuppressionMode.HIGH);
57+
```

0 commit comments

Comments
 (0)