aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
715 stars 472 forks source link

Can i split audio streams? #632

Open rusicsemenov opened 4 years ago

rusicsemenov commented 4 years ago

What are you trying to do?

I'm trying split audio streams, for private conversation

How can the documentation be improved to help your use case?

Do can add example for split audio

simmkyu commented 4 years ago

Chime SDK doesn't support API for splitting audio streams.

For a private conversation, you might consider creating a new meeting with specific attendees.

Assume that your service has the control plane managing external attendees. From the Chime SDK perspective, they are external attendees. To link this external attendee to a Chime SDK attendee, you can pass ExternalUserId in CreateAttendee API of AWS SDK.

If an external attendee A requests to have a private conversation with an external attendee B. Your control plane can create a new Chime SDK meeting with these two external attendees. The downside with this approach is that you can't have two sessions simultaneously in one browser tab. (In Safari, having two meetings in two different tabs is also limited. When you enable a video in one tab, another tab's video will go black due to browser limitations.)

AymericG commented 4 years ago

Similar question:

I am trying to create a spatial chat app where the volume of each participant is relative to their distance to my avatar.

Is there a way to control the volume of each attendee individually?

Code6226 commented 3 years ago

I would also like to be able to get the audio MediaStream per attendee, or be able to bind an audio element per attendee (instead of only one audio element for everybody).

hamaike-biz commented 3 years ago

What's going on with this question?

michhyun1 commented 3 years ago

I think @simmkyu answered the question in this issue: https://github.com/aws/amazon-chime-sdk-js/issues/613

Please let us know if you need any other clarification.

OliverEberlei commented 3 years ago

Is this something you are considering to add in the future? You are mixing the audio streams for every user anyway, aren't you? Since every user gets a downmix of all audio channels, minus their own audio, afaik.

Having the ability to specify individual volumes from each user to each other user would be amazing!

Example: User A thinks User B is too loud, so they want to reduce the volume of User B in their own mixed signal to 50%, but this would only apply to User A. They would need to tell the server: Please mix User B in my downmix at 50%.

Functionality like this would add a whole bunch of useful possibilites with one single API. For example:

dnnejo commented 3 years ago

Thank you for the interest in the SDK and feature suggestion, we will keep this issue open till this request is fulfilled.

anrice commented 3 years ago

We're looking for the same feature in order to start using the Chime SDK.

michhyun1 commented 3 years ago

@anrice this is not currently supported - you can refer to this issue #613 as a workaround if that works for you.

rushkeldon commented 3 years ago

Our product absolutely NEEDS the ability for each attendee to be able to control the volume level of each attendee - just in their client session, not globally. One way to implement this would be to have an option for audio to be included in the video for attendees that have video - and of course - be exclude from the central meeting audio stream being played in the bound

michhyun1 commented 3 years ago

@rushkeldon We're currently tracking this feature request in our project board: https://github.com/orgs/aws/projects/12#card-64569170

evandroguedes commented 3 years ago

I think this article can be helpful to add spatial audio on Chime SDK in the future https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics :) @michhyun1

haifengx commented 3 years ago

@evandroguedes thanks for sharing. SDK's existing single mixed audio stream should be compatible with the PannerNode Web API you mentioned. But I agree builders could benefit from split audio streams for more sophisticated spatial audio calculation with more than two channels.

Thanks again for sharing your needs and use cases. This issue is being tracked internally and on the project board as well.

paquinmathieu commented 2 years ago

being able to have multiple audio stream would be very interesting with meeting replication for multi languages events

dobeerman commented 2 years ago

Am I correct, that as of now we do have only two channels and for a 1:1 meetings we are able to process two streams independently, right?

Aeramor commented 2 years ago

Am I correct, that as of now we do have only two channels and for a 1:1 meetings we are able to process two streams independently, right?

I'm assuming this as well, we're about to start testing.

Throwing my 2c in: I would love to see chime add support for arbitrary number of streams (video/audio) per participant (understood billing would need to change) and allow participants to subscribe to a/v streams independently. This is not to say each audio stream wouldn't be mixed with everyone transmitting on that stream. (would also love to be able to selectively mute/change volume of each person on the front end though like discord).

Use case example: Large meeting with multiple real time translators. A1 = english A2 = spanish etc etc.

federicosolfa commented 1 year ago

We are developing a multilingual conference platform and need to manage the audio of both speakers and translators. Specifically, we require the ability to lower the speaker audio so that participants can hear the translator's audio clearly and without interference.

How could we achieve this with AWS Chime? We are considering using AWS Elemental MediaConvert, but this would require creating N audio tracks, one for each participant, in order to remove their own voice from the audio track. It would be convenient to manage this client-side by receiving multiple audio tracks.

Yadukrish commented 1 year ago

We are also working on a multilingual conference platform and we need to manage audio of each attendee at client side. Currently we are getting all the participants audio mixed together as a single stream, if we can manage volume of each attendee in that stream through sdk will be great, or if we can get audio stream of each attendee separately we can do the mixing as per our needs at client side as well. Is there any update on this feature request?