Azure / communication-ui-library

UI Library for Azure Communication Services helps developers build communication applications with ease. From turn-key composites to UI components that can be composited together.
https://aka.ms/acsstorybook
MIT License
161 stars 67 forks source link

Audio Noise Suppression in 1.19.0-beta.1 #5078

Open realjesset opened 2 weeks ago

realjesset commented 2 weeks ago

Describe the bug; what happened? I am unable to add noise suppression to the call when using call composite What are the steps to reproduce the issue? use call composite and the audio from participants are echo-y What behavior did you expect? participants except calls to have good audio In what environment did you see the issue?

Is there any additional information? calling-effects library has deep noise cancelation but I when I try to apply it, it doesn't seem to be working https://learn.microsoft.com/en-us/javascript/api/azure-communication-services/@azure/communication-calling-effects/deepnoisesuppressioneffect?view=azure-communication-services-js

Screenshot 2024-08-27 at 6 06 23 PM
mgamis-msft commented 2 weeks ago

Hi @realjesset, thanks for filing an issue. I will consult with our engineer for deep noise suppression whether it is possible to add DNS to our latest beta. Note: we are currently adding deep noise suppression to our adapter for an upcoming release

mgamis-msft commented 2 weeks ago

Hi @realjesset, I just want to double check that deep noise suppression is being started. Could you add this line after calling startEffects?

console.log('after noise suppression- active effects', localAudioStreamWithEffects.feature(Features.AudioEffects).activeEffects);

You should see something like this in your browser console: image

If it is being started, it might be an issue with the @azure/communication-calling-effects package if it is still not working.

realjesset commented 2 weeks ago

yes I am getting the same console log as you are for the microphone

mgamis-msft commented 2 weeks ago

@realjesset I tested your code locally and found that deep noise suppression does not work for me as well. When I debugged, in the adapter code, the local audio stream effects of the call after it started. I found that deep noise suppression was not active, only browser noise suppression. image It looks like creating local audio streams from devices obtained from the adapter state and then starting deep noise suppression on that new instance of local audio stream does not persist in the call the adapter is subscribed to.

We are currently working on adding deep noise suppression to the UI library. Would it be alright if we could have deep noise suppression available as a function on our call and callwithchat adapter in our next stable version in about 2 weeks or the next beta version in about a month? You would start deep noise suppression like so:

await adapter.startNoiseSuppressionEffect();