talking/stopped-talking and audiolevel_event on audiobridge

762 views
Skip to first unread message

august black

unread,
Mar 3, 2021, 4:59:51 PM3/3/21
to meetecho-janus
Hi,

I noticed there are some (undocumented) events for talking/stopped-talking on the audiobridge.

Are these what I think they are?

In my testing, I seem to get these events sporadically, but it seems to only fire when I play music through the WebRTC connection.  Even though the music is constant, I get lots of these events starting and stopping talk.  Strangely, when I talk, it doesn't always fire the event.

Also, what does the audiolevel_event parameter of an audiobridge room do?

thanks for any info! -August.

Mirko Brankovic

unread,
Mar 4, 2021, 8:54:41 AM3/4/21
to meetecho-janus
it is documented 

        audiolevel_event = true|false (whether to emit event to other users or not, default=false)
        audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds)
        audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25)

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/CAHjm5xydytcN8-btPPkZCyAQvY4Zq5kYDZ%2BGd2fS7yFWDdxujQ%40mail.gmail.com.


--
Regards,
Mirko

august black

unread,
Mar 4, 2021, 10:05:42 AM3/4/21
to Mirko Brankovic, meetecho-janus
Thanks Mirko,

I didn't quite make the connection between those settings and the {event: "talking"}

This is a really cool feature.



Mirko Brankovic

unread,
Mar 4, 2021, 10:37:57 AM3/4/21
to meetecho-janus
it is measured by webrtc just like your OS mic indicator does it, and advertised to Janus via RTP header. so that all users can get those events.
Problem is that setting is global for the room/ all participants, and different users have different gain on mic set, so you may want to overwrite them per user on join
--
Regards,
Mirko

august black

unread,
Mar 4, 2021, 11:06:50 AM3/4/21
to Mirko Brankovic, meetecho-janus

oh wild!  that is not how I thought it worked.

I was assuming it was a feature of the audiobridge only that tracked the gain per client on the server.

I'll have to investigate.  Thanks for that extra info.

btw.  are the docs in the main git repo?  Would the developers accept pull requests on it?


Mirko Brankovic

unread,
Mar 4, 2021, 11:16:00 AM3/4/21
to meetecho-janus
That i'm not sure, i'm just a contributor :P
--
Regards,
Mirko

Lorenzo Miniero

unread,
Mar 5, 2021, 3:50:05 AM3/5/21
to meetecho-janus
Documentation is generated from the code, so yes, it's on the repo.

L. 

august black

unread,
Mar 5, 2021, 10:09:16 AM3/5/21
to Lorenzo Miniero, meetecho-janus
Thanks Lorenzo, Mirko,

This seems like a very useful feature of the audiobridge plugin.

Does the actual audio level info come from the RTCRtpContributingSource.audioLevel ?


Mirko, can you explain what this means?
audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25)

What is the audio level average?  What does that setting do?
And, then how do you deduce from the levels if a speaker is talking or not?

thanks for any info!  also thanks for the great software.  

best -august.







Mirko Brankovic

unread,
Mar 5, 2021, 11:07:19 AM3/5/21
to meetecho-janus
Yes exactly, dBov, but in rtp it is represented from 0 (maximum volume) to 127 (silence)
So, audio_level_average will take last audio_active_packets (default 100 ~2seconds) and calculate the average audio level, and if it is less then audio_level_average user is talking and if it is higher he stopped talking.
Based on that you will get event (it is up to you (client side) to find a sweet spot between mic gain and background noise, but in my first test 25 was looking as good default value :D (including the silence in between the words)

PS. you have this feature in videoroom also, since it is the same  



--
Regards,
Mirko
Reply all
Reply to author
Forward
0 new messages