0
votes

I'm working on to implement an audio-only conference app which is something like Google Hangout, but without video.

In Google Hangout, all participants can see which participants is currently speaking, via visual feedback. In other words, when someone starts speaking, their avatar comes foreground of all of participants immediately.

So, here's my questions for Twilio and its client SDKs:

  1. Is there any way to detect current speaker (and give some feedback to users) ?
  2. Is there any way to get input level of a microphone via the SDKs?
1

1 Answers

2
votes

Interesting use cases . I think both these can be achieved with Twilio and here's my views on how to achieve these

  1. Detecting current speaker What you essentially require is a flag that is globally shared across all participants. This flag should have the facility to be dynamically updated in real time by the speaker who is speaking and at the same time push this information , again in real time , to other participants. So , simply put , you want a shared resource where each Twilio Client can 'publish' and 'subscribe' their 'speaking' state. You could achieve it via Twilio Sync . To do that , you could create a list object on Sync and add each participants whose audio level goes above a certain level that you consider them speaking . All Client instances in the conference should be subscribed to this list and so on 'itemAdded' or 'itemRemoved' each instance of client can get a list of participants who are speaking . Based on it , UI changes could be done.

  2. You can get audio level (output and input) at each client instance by querying Twilio Voice Insights .For Audio input level , you will have the value passed in parameter named AudioLevelIn .

Note : Both these products require requesting access .