Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Amazon Chime Echo Reduction support in Voice Focus. #1821

Merged
merged 21 commits into from
Nov 23, 2021
Merged

Conversation

dimitarz
Copy link
Contributor

Issue #:

Description of changes:
Adding Echo Reduction improvements to Voice Focus. Echo reduction helps keep echoes—sounds from a user’s loudspeaker that get picked up by their microphone—from circulating back into meeting audio and bringing discussions to a standstill. The echo reduction feature is available in conjunction with the noise reduction provided by Amazon Voice Focus.

Testing:

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

Added an option to enable this via the Demo app. To enable it, start the demo app and click on 'Enable Echo Reduction (new meetings only)'. This will create a new meeting with the correct attributes such that clients which connect can enable Echo Reduction.

To enable the feature, one must create the meeting as follows:

// Create meeting 
const meetingInfo = await chime.createMeeting({
  ...
  MeetingFeatures: {
    Audio: {
      EchoReduction: 'AVAILABLE' 
    }
  } 
}).promise();

// Add attendee 
const attendeeInfo = await chime.createAttendee({...});
const joinInfo = { 
  JoinInfo: {
    Meeting: meetingInfo,
    Attendee: attendeeInfo,
  }
}

The client then has to explicitly turn on Echo Reduction as follows:

// Select the Echo Reduction model
const spec: VoiceFocusSpec = {
  name: 'ns_es',
  ...
};

// Create the Voice Focus device
const transformer = VoiceFocusDeviceTransformer.create(spec, { logger }, joinInfo);

this.audioVideo = this.meetingSession.audioVideo;
const vfDevice = await transformer.createTransformDevice(chosenAudioInput);

// Enable Echo Reduction on this client
await vfDevice.observeMeetingAudio(this.audioVideo);

Checklist:

  1. Have you successfully run npm run build:release locally? Yes.

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? Yes.

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? No and no.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Yes

@dimitarz dimitarz requested a review from a team as a code owner November 22, 2021 20:40
...
}
spec = { ...
name: 'ns_es' // for Echo Reduction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ns_es is for both right VF and Echo Reduction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we update it to mention that. It seems we refer to VF and Echo Reduction everywhere but not here.

};

// Create the Voice Focus device
const transformer = VoiceFocusDeviceTransformer.create(spec, { logger }, joinInfo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these need to be meetingResp and AttendeeResp and not just joinInfo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VoiceFocusDeviceTransformer can handle both a JoinInfo object or individual ones

@@ -17,6 +17,21 @@ const chime = new AWS.Chime({ region: 'us-east-1' });
// Set the AWS SDK Chime endpoint. The global endpoint is https://service.chime.aws.amazon.com.
chime.endpoint = new AWS.Endpoint(process.env.CHIME_ENDPOINT);

const chimeRegional = new AWS.ChimeSDKMeetings({ region: 'us-east-1' });
if (process.env.CHIME_ENDPOINT_REGIONAL) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this defined?


const chimeRegional = new AWS.ChimeSDKMeetings({ region: 'us-east-1' });
const chimeRegionalEndpoint = process.env.REGIONAL_ENDPOINT || 'https://meetings-chime.us-east-1.amazonaws.com';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to defined the endpoint.

// Set the AWS SDK Chime endpoint. The global endpoint is https://service.chime.aws.amazon.com.
const endpoint = process.env.ENDPOINT || 'https://service.chime.aws.amazon.com';
console.info('Using endpoint', endpoint);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be using global endpoint.

ltrung
ltrung previously approved these changes Nov 23, 2021
@ltrung ltrung merged commit 147e7bb into master Nov 23, 2021
@ltrung ltrung deleted the echo_reducer branch November 23, 2021 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants