in an example , time and frequency domain speech enhancement is implemented on a platform having a programmable device , such a pc or a smartphone running an os . echo cancellation is done first in time domain to cancel a dominant portion of the echo . residual echo is cancelled jointly with noise reduction during a subsequent frequency domain stage . the time domain block uses a dual band , shorter length adaptive filter for faster convergence . non - linear residual echo is cancelled based on an echo estimate and an error signal from the adaptive filters . a controller locates regions that had residual echo suppressed and which do not have speech and injects comfort noise . the controller can be full - duplex and operate non - linearly . an agc selectively amplifies the frequency bins , based on the gain function used by the residual echo and noise canceller .