tune speaker detector more sensitive (#427)

* tune speaker detector more sensitive
This commit is contained in:
cnderrauber
2022-02-10 16:39:59 +08:00
committed by GitHub
parent aadfc97b0b
commit f3572d2654
4 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
if t.Kind() == livekit.TrackType_AUDIO {
t.audioLevelMu.Lock()
t.audioLevel = NewAudioLevel(t.params.AudioConfig.ActiveLevel, t.params.AudioConfig.MinPercentile)
t.audioLevel = NewAudioLevel(t.params.AudioConfig.ActiveLevel, t.params.AudioConfig.MinPercentile, t.params.AudioConfig.UpdateInterval)
buff.OnAudioLevel(func(level uint8, duration uint32) {
t.audioLevelMu.RLock()
defer t.audioLevelMu.RUnlock()