I'm trying to understand spectral subtraction as described in the paper Steven F. Boll - Suppression of Acoustic Noise in Speech Using Spectral Subtraction. However, I'm having some trouble understanding mathematically how the Fourier transform of the noise is estimated. The equations start with noisy signal = signal + noise i.e.
$$x(k) = s(k) + n(k)$$
for $k = 0, 1, ..., L - 1$. Taking their Fourier transforms leads to
$$X(e^{j\omega}) = S(e^{j\omega}) + N(e^{j\omega}).$$
Now, the goal is to estimate $N$ with $\hat{N}$ and this is where I get confused. The paper says
The magnitude $|N(e^{j\omega})|$ of $N(e^{j\omega})$ is replaced by its average value $\mu(e^{j\omega})$ taken during nonspeech activity, and the phase $\theta_N(e^{j\omega})$ of $N(e^{j\omega})$ is replaced by the phase $\theta_x(e^{j\omega})$ of $X(e^{j\omega})$.
I'm trying to put this mathematically but I'm having some trouble. A few lines later it says
$$\hat{S}(e^{j\omega}) = H(e^{j\omega}) X(e^{j\omega})$$
where
$$H(e^{j\omega}) = 1 - \frac{\mu(e^{j\omega})}{|X(e^{j\omega})|}$$ $$\mu(e^{j\omega}) = E\{|N(e^{j\omega})|\}.$$
So, it seems to me like the whole thing is about computing $\mu$ from the nonspeech activity. But, how does one do that?
My first guess was something like this: say that we have nonspeech activity from $a, ..., a + m - 1$ and so we want to use this to "estimate" the noise. So, I thought about essentially "pretending" the noise was
$$\hat{n}(k) = \begin{cases} x(k) & k \in \{a, ..., a + m - 1\}. \\ 0 & \text{otherwise} \end{cases}$$
But, this doesn't make sense since we want to assume stationary noise and this is not stationary. I can't really come up with a reasonable second guess.