title | titleSuffix | description | author | ms.date | ms.author | services | ms.topic | ms.service | ms.subservice |
---|---|---|---|---|---|---|---|---|---|
Tutorial - Add audio effects suppression ability to your Windows apps |
An Azure Communication Services tutorial on how to enable audio effects |
Learn how to add audio effects in your calls using Azure Communication Services. |
t-leejiyoon |
07/28/2023 |
t-leejiyoon |
azure-communication-services |
include |
azure-communication-services |
calling |
[!INCLUDE Audio filters options]
[!INCLUDE Install SDK]
The audio filter feature enable you to apply different audio preprocessing to outgoing audio. There are two types of audio filters: OutgoingAudioFilters
and LiveOutgoingAudioFilters
. Use OutgoingAudioFilters
to change settings before the call starts and LiveOutgoingAudioFilters
to change settings while a call is in progress.
You first need to import the Calling SDK:
using Azure.Communication;
using Azure.Communication.Calling.WindowsClient;
OutgoingAudioFilters
can be applied when a call starts.
Begin by creating a OutgoingAudioFilters
and passing it into OutgoingAudioOptions as shown in the following code:
var outgoingAudioOptions = new OutgoingAudioOptions();
var filters = new OutgoingAudioFilters()
{
AnalogAutomaticGainControlEnabled = true,
DigitalAutomaticGainControlEnabled = true,
MusicModeEnabled = true,
AcousticEchoCancellationEnabled = true,
NoiseSuppressionMode = NoiseSuppressionMode.High
};
outgoingAudioOptions.Filters = filters;
You can apply LiveOutgoingAudioFilters
after a call begins You can retrieve this object from the call object once the call begins. To change the setting in LiveOutgoingAudioFilters
, set the members inside the class to a valid value and they're applied.
Only a subset of the filters available from OutgoingAudioFilters
are available during an active call: music mode, echo cancellation, and noise suppression mode.
LiveOutgoingAudioFilters filter = call.LiveOutgoingAudioFilters;
filter.MusicModeEnabled = true;
filter.AcousticEchoCancellationEnabled = true;
filter.NoiseSuppressionMode = NoiseSuppressionMode.Auto;