twilio / rtc-diagnostics

Other
46 stars 14 forks source link

[CLIENT-7686] Add `low-audio-level` detection. #34

Closed mhuynh5757 closed 4 years ago

mhuynh5757 commented 4 years ago

Contributing to Twilio

All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

Pull Request Details

JIRA link(s):

Description

This PR adds silence detection to the InputTest. The logic of silence detection is as follows: Find at least 3 seconds worth of volume samples. Calculate the standard deviation of the samples. If the standard deviation is <= 2.55 (1% of the max of 255), then we have constantAudio If we have constantAudio and the average of those samples is also <= 2.55, then we have low audio.

Burndown

Before review

Before merge

charliesantos commented 4 years ago

@mhuynh5757 please fix conflicts