Repository navigation
medialink: voice activity passes over a starting microphone's digital silence - #366
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #365.
The first time a P4 board's ES7210 opens after power-up, the first 100 to 280 ms of the stream is digital silence: a run of one repeated sample, then exact zeros, before the room comes through. Both detectors learn the room's quiet from the first frames they hear (audiofeatures primes its floor on the mean of its first 16 slices), so the floor started far below the room, and the room's own hiss read as speech until the floor climbed back, about 3.4 s. Later opens have no silent stretch, which is why only the first one did it.
VoiceActivity.feed()now passes over a frame in which every sample is the same (no real microphone gives 20 ms of that) without feeding it to the detector.Measured on the P4 panel after a fresh boot, from the first open's recording replayed through
VoiceActivity: frames 15 to 185 voiced before, none after. A 25 s recording with no silent stretch gives identical flags old and new. With the peer connected, the old code took a 4.5 s empty turn at startup; the new code took none.The #364 test's click was a frame of one repeated sample, which this now passes over as silence; it is an alternating click now, and still needs
settle_ms.