Skip to content

Commit

Permalink
[DNS] stabilize feature (#5265)
Browse files Browse the repository at this point in the history
* stabilize DNS

* update API

* Change files

* upload beta API

* update API

* remove beta tags

* remove more beta tags

* last beta

---------

Signed-off-by: Donald McEachern <[email protected]>
  • Loading branch information
dmceachernmsft authored Oct 10, 2024
1 parent 75b4a55 commit 17d42f1
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "DNS",
"comment": "We are excited to announce that the Azure Communication Services Web UI Library now supports Deep Noise Suppression. This feature enables noise suppression algorithms to filter out background noise, ensuring that only the speaker's voice is heard clearly. Developers can use this functionality today through our composites (e.g CallComposite, CallWithChatComposite). ",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions common/config/babel/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ module.exports = {
"remote-ufd",
// Feature for showing dtmp dialer by default
"dtmf-dialer-on-by-default",
// Deep Noise Suppression feature
"DNS",
// Feature for together mode
"together-mode"
],
Expand Down Expand Up @@ -94,6 +92,8 @@ module.exports = {
"notifications",
// Feature for tracking beta start call identifier
'start-call-beta',
// Deep Noise Suppression feature
"DNS",
// Soft Mute feature for ACS calls and Interop calls
"soft-mute"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export type VideoBackgroundEffectsDependency = {
/**
* Dependency type to be injected for deep noise suppression
*
* @beta
* @public
*/
export type DeepNoiseSuppressionEffectDependency = {
deepNoiseSuppressionEffect: AudioEffectsStartConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,13 @@ export interface CallAdapterCallOperations {
setSpokenLanguage(language: string): Promise<void>;
startCamera(options?: VideoStreamOptions): Promise<void>;
startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;
// @beta
startNoiseSuppressionEffect(): Promise<void>;
startScreenShare(): Promise<void>;
startSpotlight(userIds?: string[]): Promise<void>;
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;
stopAllSpotlight(): Promise<void>;
stopCamera(): Promise<void>;
stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;
// @beta
stopNoiseSuppressionEffect(): Promise<void>;
stopScreenShare(): Promise<void>;
stopSpotlight(userIds?: string[]): Promise<void>;
Expand Down Expand Up @@ -1230,15 +1228,13 @@ export interface CallWithChatAdapterManagement {
startCall(participants: (MicrosoftTeamsAppIdentifier | PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[], options?: StartCallOptions): Call | undefined;
startCamera(options?: VideoStreamOptions): Promise<void>;
startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;
// @beta
startNoiseSuppressionEffect(): Promise<void>;
startScreenShare(): Promise<void>;
startSpotlight(userIds?: string[]): Promise<void>;
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;
stopAllSpotlight(): Promise<void>;
stopCamera(): Promise<void>;
stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;
// @beta
stopNoiseSuppressionEffect(): Promise<void>;
stopScreenShare(): Promise<void>;
stopSpotlight(userIds?: string[]): Promise<void>;
Expand Down Expand Up @@ -1381,20 +1377,17 @@ export interface CallWithChatClientState {
alternateCallerId?: string;
call?: CallState;
chat?: ChatThreadClientState;
// @beta
deepNoiseSuppressionOnByDefault?: boolean;
devices: DeviceManagerState;
displayName: string | undefined;
environmentInfo?: EnvironmentInfo;
hideAttendeeNames?: boolean;
// @beta
hideDeepNoiseSuppressionButton?: boolean;
isTeamsCall: boolean;
isTeamsMeeting: boolean;
latestCallErrors: AdapterErrors;
latestCallNotifications: AdapterNotifications;
latestChatErrors: AdapterErrors;
// @beta
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
reactions?: ReactionResources;
Expand Down Expand Up @@ -2649,7 +2642,7 @@ export type DeclarativeCallAgent = CallAgent & IncomingCallManagement;
// @public
export type DeclarativeTeamsCallAgent = TeamsCallAgent & TeamsIncomingCallManagement;

// @beta
// @public
export type DeepNoiseSuppressionEffectDependency = {
deepNoiseSuppressionEffect: AudioEffectsStartConfig;
};
Expand Down Expand Up @@ -3752,17 +3745,14 @@ export interface MicrophoneButtonContextualMenuStyles extends IContextualMenuSty
// @public
export interface MicrophoneButtonProps extends ControlBarButtonProps {
enableDeviceSelectionMenu?: boolean;
// @beta
isDeepNoiseSuppressionOn?: boolean;
microphones?: OptionsDevice[];
// @beta
onClickNoiseSuppression?: () => void;
onSelectMicrophone?: (device: OptionsDevice) => Promise<void>;
onSelectSpeaker?: (device: OptionsDevice) => Promise<void>;
onToggleMicrophone?: () => Promise<void>;
selectedMicrophone?: OptionsDevice;
selectedSpeaker?: OptionsDevice;
// @beta
showNoiseSuppressionButton?: boolean;
speakers?: OptionsDevice[];
strings?: Partial<MicrophoneButtonStrings>;
Expand All @@ -3781,11 +3771,8 @@ export type MicrophoneButtonSelector = (state: CallClientState, props: CallingBa

// @public
export interface MicrophoneButtonStrings {
// @beta
deepNoiseSuppressionOffAnnouncement?: string;
// @beta
deepNoiseSuppressionOnAnnouncement?: string;
// @beta
deepNoiseSuppressionTitle?: string;
microphoneActionTurnedOffAnnouncement?: string;
microphoneActionTurnedOnAnnouncement?: string;
Expand Down Expand Up @@ -3939,10 +3926,10 @@ export type OnRenderAvatarCallback = (
userId?: string, options?: CustomAvatarOptions,
defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => JSX.Element | undefined;

// @beta
// @public
export const onResolveDeepNoiseSuppressionDependency: () => Promise<DeepNoiseSuppressionEffectDependency>;

// @beta
// @public
export const onResolveDeepNoiseSuppressionDependencyLazy: () => Promise<DeepNoiseSuppressionEffectDependency>;

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import { AddPhoneNumberOptions } from '@azure/communication-calling';
import { AudioDeviceInfo } from '@azure/communication-calling';
import { AudioEffectsStartConfig } from '@azure/communication-calling';
import { BackgroundBlurConfig } from '@azure/communication-calling';
import { BackgroundBlurEffect } from '@azure/communication-calling';
import { BackgroundReplacementConfig } from '@azure/communication-calling';
Expand Down Expand Up @@ -291,12 +292,14 @@ export interface CallAdapterCallOperations {
setSpokenLanguage(language: string): Promise<void>;
startCamera(options?: VideoStreamOptions): Promise<void>;
startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;
startNoiseSuppressionEffect(): Promise<void>;
startScreenShare(): Promise<void>;
startSpotlight(userIds?: string[]): Promise<void>;
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;
stopAllSpotlight(): Promise<void>;
stopCamera(): Promise<void>;
stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;
stopNoiseSuppressionEffect(): Promise<void>;
stopScreenShare(): Promise<void>;
stopSpotlight(userIds?: string[]): Promise<void>;
stopVideoBackgroundEffects(): Promise<void>;
Expand All @@ -322,6 +325,9 @@ export type CallAdapterClientState = {
cameraStatus?: 'On' | 'Off';
videoBackgroundImages?: VideoBackgroundImage[];
onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
deepNoiseSuppressionOnByDefault?: boolean;
hideDeepNoiseSuppressionButton?: boolean;
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
acceptedTransferCallState?: CallState;
hideAttendeeNames?: boolean;
Expand Down Expand Up @@ -853,6 +859,7 @@ export interface CallingHandlers extends CommonCallingHandlers {
// @public
export type CallingHandlersOptions = {
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
};

// @public
Expand Down Expand Up @@ -1001,12 +1008,14 @@ export interface CallWithChatAdapterManagement {
startCall(participants: (MicrosoftTeamsAppIdentifier | PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[], options?: StartCallOptions): Call | undefined;
startCamera(options?: VideoStreamOptions): Promise<void>;
startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;
startNoiseSuppressionEffect(): Promise<void>;
startScreenShare(): Promise<void>;
startSpotlight(userIds?: string[]): Promise<void>;
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;
stopAllSpotlight(): Promise<void>;
stopCamera(): Promise<void>;
stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;
stopNoiseSuppressionEffect(): Promise<void>;
stopScreenShare(): Promise<void>;
stopSpotlight(userIds?: string[]): Promise<void>;
stopVideoBackgroundEffects(): Promise<void>;
Expand Down Expand Up @@ -1140,13 +1149,16 @@ export interface CallWithChatClientState {
alternateCallerId?: string;
call?: CallState;
chat?: ChatThreadClientState;
deepNoiseSuppressionOnByDefault?: boolean;
devices: DeviceManagerState;
displayName: string | undefined;
hideAttendeeNames?: boolean;
hideDeepNoiseSuppressionButton?: boolean;
isTeamsCall: boolean;
isTeamsMeeting: boolean;
latestCallErrors: AdapterErrors;
latestChatErrors: AdapterErrors;
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
reactions?: ReactionResources;
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
Expand Down Expand Up @@ -1772,6 +1784,11 @@ export type CommonCallAdapterOptions = {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveDependency?: () => Promise<VideoBackgroundEffectsDependency>;
};
deepNoiseSuppressionOptions?: {
onResolveDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
deepNoiseSuppressionOnByDefault?: boolean;
hideDeepNoiseSuppressionButton?: boolean;
};
onFetchProfile?: OnFetchProfileCallback;
callingSounds?: CallingSounds;
reactionResources?: ReactionResources;
Expand Down Expand Up @@ -1888,6 +1905,8 @@ export interface CommonCallingHandlers {
// (undocumented)
onStartLocalVideo: () => Promise<void>;
// (undocumented)
onStartNoiseSuppressionEffect: () => Promise<void>;
// (undocumented)
onStartScreenShare: () => Promise<void>;
// (undocumented)
onStartSpotlight: (userIds?: string[]) => Promise<void>;
Expand All @@ -1896,6 +1915,8 @@ export interface CommonCallingHandlers {
// (undocumented)
onStopCaptions: () => Promise<void>;
// (undocumented)
onStopNoiseSuppressionEffect: () => Promise<void>;
// (undocumented)
onStopScreenShare: () => Promise<void>;
// (undocumented)
onStopSpotlight: (userIds?: string[]) => Promise<void>;
Expand Down Expand Up @@ -2212,6 +2233,7 @@ export const createDefaultChatHandlers: (chatClient: StatefulChatClient, chatThr
// @public
export const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: {
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
}) => TeamsCallingHandlers;

// @public
Expand Down Expand Up @@ -2300,6 +2322,11 @@ export type DeclarativeCallAgent = CallAgent & IncomingCallManagement;
// @public
export type DeclarativeTeamsCallAgent = TeamsCallAgent & TeamsIncomingCallManagement;

// @public
export type DeepNoiseSuppressionEffectDependency = {
deepNoiseSuppressionEffect: AudioEffectsStartConfig;
};

// @public
export const DEFAULT_COMPONENT_ICONS: {
ChatMessageOptions: React_2.JSX.Element;
Expand Down Expand Up @@ -3265,12 +3292,15 @@ export interface MicrophoneButtonContextualMenuStyles extends IContextualMenuSty
// @public
export interface MicrophoneButtonProps extends ControlBarButtonProps {
enableDeviceSelectionMenu?: boolean;
isDeepNoiseSuppressionOn?: boolean;
microphones?: OptionsDevice[];
onClickNoiseSuppression?: () => void;
onSelectMicrophone?: (device: OptionsDevice) => Promise<void>;
onSelectSpeaker?: (device: OptionsDevice) => Promise<void>;
onToggleMicrophone?: () => Promise<void>;
selectedMicrophone?: OptionsDevice;
selectedSpeaker?: OptionsDevice;
showNoiseSuppressionButton?: boolean;
speakers?: OptionsDevice[];
strings?: Partial<MicrophoneButtonStrings>;
styles?: Partial<MicrophoneButtonStyles>;
Expand All @@ -3288,6 +3318,9 @@ export type MicrophoneButtonSelector = (state: CallClientState, props: CallingBa

// @public
export interface MicrophoneButtonStrings {
deepNoiseSuppressionOffAnnouncement?: string;
deepNoiseSuppressionOnAnnouncement?: string;
deepNoiseSuppressionTitle?: string;
microphoneActionTurnedOffAnnouncement?: string;
microphoneActionTurnedOnAnnouncement?: string;
microphoneAriaDescription?: string;
Expand Down Expand Up @@ -3420,6 +3453,12 @@ export type OnRenderAvatarCallback = (
userId?: string, options?: CustomAvatarOptions,
defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => JSX.Element | undefined;

// @public
export const onResolveDeepNoiseSuppressionDependency: () => Promise<DeepNoiseSuppressionEffectDependency>;

// @public
export const onResolveDeepNoiseSuppressionDependencyLazy: () => Promise<DeepNoiseSuppressionEffectDependency>;

// @public
export const onResolveVideoEffectDependency: () => Promise<VideoBackgroundEffectsDependency>;

Expand Down
9 changes: 0 additions & 9 deletions packages/react-components/src/components/MicrophoneButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,16 @@ export interface MicrophoneButtonStrings {
/* @conditional-compile-remove(DNS) */
/**
* Title for deep noise suppression button
* @beta
*/
deepNoiseSuppressionTitle?: string;
/* @conditional-compile-remove(DNS) */
/**
* Noise Suppression turned on string for announcer
* @beta
*/
deepNoiseSuppressionOnAnnouncement?: string;
/* @conditional-compile-remove(DNS) */
/**
* Noise Suppression turned off string for announcer
* @beta
*/
deepNoiseSuppressionOffAnnouncement?: string;
}
Expand Down Expand Up @@ -182,22 +179,16 @@ export interface MicrophoneButtonProps extends ControlBarButtonProps {
/* @conditional-compile-remove(DNS) */
/**
* Whether the deep noise suppression is on or off
*
* @beta
*/
isDeepNoiseSuppressionOn?: boolean;
/* @conditional-compile-remove(DNS) */
/**
* Callback when noise suppression is clicked
*
* @beta
*/
onClickNoiseSuppression?: () => void;
/* @conditional-compile-remove(DNS) */
/**
* Show/Hide the deep noise suppression button
*
* @beta
*/
showNoiseSuppressionButton?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,6 @@ export type CommonCallAdapterOptions = {
/* @conditional-compile-remove(DNS) */
/**
* `DeepNoiseSuppressionEffect` options to be used for noise suppression.
* @beta
*/
deepNoiseSuppressionOptions?: {
onResolveDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,17 @@ export type CallAdapterClientState = {
/* @conditional-compile-remove(DNS) */
/**
* Dependency to be injected for deep noise suppression effect.
* @beta
*/
onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
/* @conditional-compile-remove(DNS) */
/**
* State to track whether the noise suppression should be on by default.
* @beta
* @default true
*/
deepNoiseSuppressionOnByDefault?: boolean;
/* @conditional-compile-remove(DNS) */
/**
* State to track whether to hide the noise suppression button.
* @beta
* @default false
*/
hideDeepNoiseSuppressionButton?: boolean;
Expand Down Expand Up @@ -741,14 +738,12 @@ export interface CallAdapterCallOperations {
/**
* Start the noise suppression effect.
*
* @beta
*/
startNoiseSuppressionEffect(): Promise<void>;
/* @conditional-compile-remove(DNS) */
/**
* Stop the noise suppression effect.
*
* @beta
*/
stopNoiseSuppressionEffect(): Promise<void>;
/**
Expand Down
Loading

0 comments on commit 17d42f1

Please sign in to comment.