.. _noise_environment:
Noise environment
-----------------
Both DPMC (see :class:`dpmcCompensate `) and the approximation of the cross-entropy require samples of the corrupted speech.
.. autoclass:: noise.corrupted_speech_sampler.CorruptedSpeechSampler
:members:
:undoc-members:
.. _mismatch_function:
Mismatch function
^^^^^^^^^^^^^^^^^
The mismatch function for noise-robust speech recognition is a function relating the speech :math:`x`, noise :math:`n`, phase factor :math:`\alpha`, and the noise-corrupted speech :math:`y`.
Additionally, to transform the integral in the likelihood expression, this toolkit introduces a substitute variable :math:`u`.
These are related by
.. math::
\exp (y) &= \exp (x) + \exp (n) + 2 \alpha \exp \Big( \frac12 x + \frac12 n \Big);
\\
u &= n - x.
Since these are deterministically related, each variable can be found from setting three (or two) of the other variables.
The following functions convert between variable settings (not all combinations of variable settings are supported. Trying any of these will trigger an ``assert (False)``\ ).
.. autofunction:: noise.noise_environment.speechFrom
.. autofunction:: noise.noise_environment.noiseFrom
.. autofunction:: noise.noise_environment.observationFrom
.. autofunction:: noise.noise_environment.substituteFrom
Phase factor
^^^^^^^^^^^^
The *phase factor* is an aggregate for the effect of phase differences between speech and noise in the log-spectral domain (see Deng et al, 2004).
Since log-spectral representations of the speech and noise discard phase information, the phase factor is a random variable.
It is approximately Gaussian distributed.
.. autoclass:: noise.phase_factor_gaussian.PhaseFactorGaussianSampler(phaseFactorGaussian, uniformUnitSampler = UniformUnitSampler())
:members:
:undoc-members:
.. autofunction:: noise.phase_factor_gaussian.melFilterVariance
.. autofunction:: speech.mel_filter.melFilter
Cepstrum
^^^^^^^^
This toolkit uses the log-spectral domain, which is related to the more standard cepstral domain by a linear transformation.
.. autofunction:: speech.dct.dct
.. autofunction:: speech.diagonalise_cepstral.diagonaliseCepstral