Calling startSpeakingWhileMutedDetection multiple types without awaiting leads to multiple sound detectors being set up. Calling stopSpeakingWhileMutedDetection afterwords cleans up only one of them.
Since startSpeakingWhileMutedDetection is called in a callback to an Rx observable, it's very possible that multiple sound detectors will be set up when the state updates fire rapidly.
Calling
startSpeakingWhileMutedDetection
multiple types without awaiting leads to multiple sound detectors being set up. CallingstopSpeakingWhileMutedDetection
afterwords cleans up only one of them.Since
startSpeakingWhileMutedDetection
is called in a callback to an Rx observable, it's very possible that multiple sound detectors will be set up when the state updates fire rapidly.This fix prevents that.