Ahmed
(Ahmed)
December 24, 2023, 1:55am
1
Hi , i created a room with audiolevel_event is set to true and i can see the room in my config
room-1234 :
{
description = “RTC”;
sampling_rate = “16000”;
secret = “***”;
audiolevel_ext = “yes”;
audiolevel_event = “yes”;
audio_active_packets = “100”;
audio_level_average = “25”;
};
but it seems i never receive any event in my websocket related to audio level while user speaking . any idea why ?
Have you tried to use true value, like in samole config?
# room-<unique room ID>: {
# description = "This is my awesome room"
# is_private = true|false (whether this room should be in the public list, default=true)
# secret = "<optional password needed for manipulating (e.g. destroying) the room>"
# pin = "<optional password needed for joining the room>"
# sampling_rate = <sampling rate> (e.g., 16000 for wideband mixing)
# spatial_audio = true|false (if true, the mix will be stereo to spatially place users, default=false)
# audiolevel_ext = true|false (whether the ssrc-audio-level RTP extension must
# be negotiated/used or not for new joins, default=true)
# 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)
# default_expectedloss = percent of packets we expect participants may miss, to help with FEC (default=0, max=20; automatically used for forwarders too)
# default_bitrate = default bitrate in bps to use for the all participants (default=0, which means libopus decides; automatically used for forwarders too)
# record = true|false (whether this room should be recorded, default=false)
# record_file = "/path/to/recording.wav" (where to save the recording)
# record_dir = "/path/to/" (path to save the recording to, makes record_file a relative path if provided)
# mjrs = true|false (whether all participants in the room should be individually recorded to mjr files, default=false)
# mjrs_dir = "/path/to/" (path to save the mjr files to)
# allow_rtp_participants = true|false (whether participants should be allowed to join
I am having the same struggle here.
I have “audiolevel_event = true” and “events = true” but I am not seeing the event. I have this set in both janus.plugin.audiobridge.jcfg and janus.plugin.videoroom.jcfg
I do see this in the server debug
[rtp.c:janus_rtp_header_extension_parse_audio_level:222] c2 --> v=1, level=66
[rtp.c:janus_rtp_header_extension_parse_audio_level:222] c3 --> v=1, level=67
[rtp.c:janus_rtp_header_extension_parse_audio_level:222] c1 --> v=1, level=65
[rtp.c:janus_rtp_header_extension_parse_audio_level:222] bc --> v=1, level=60
How can use this data to make an audio level indicator in the browser? I am trying with the demo mvideoroom.js
How can I capture this event?
lorenzo
(Lorenzo Miniero)
November 13, 2024, 8:58am
4
You have to edit the audio_active_packets
and audio_level_average
properties as well, otherwise the levels you’re sending may not pass the threshold that’s considered speech activity. More details in the configuration file:
# audiolevel_ext = true|false (whether the ssrc-audio-level RTP extension must
# be negotiated/used or not for new publishers, default=true)
# 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)
1 Like