{'fraction_non_alphanumeric': 0.030446927374301675, 'fraction_numerical': 0.011843575418994414, 'mean_word_length': 4.731988472622478, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Statistical and Neural Network Based Speech Activity Detection in Non-Stationary Acoustic Environments

Speech activity detection (SAD), which often rests on the fact that the noise is"more"stationary than speech, is particularly challenging in non-stationary environments, because the time variance of the acoustic scene makes it difficult to discriminate speech from noise. We propose two approaches to SAD, where one is based on statistical signal processing, while the other utilizes neural networks. The former employes sophisticated signal processing to track the noise and speech energies and is meant to support the case for a resource efficient, unsupervised signal processing approach. The latter introduces a recurrent network layer that operates on short segments of the input speech to do temporal smoothing in the presence of non-stationary noise. The systems are tested on the Fearless Steps challenge, which consists of the transmission data from the Apollo-11 space mission. The statistical SAD achieves comparable detection performance to earlier proposed neural network based SADs, while the neural network based approach leads to a decision cost function of 1.07% on the evaluation set of the 2020 Fearless Steps Challenge, which sets a new state of the art.


INTRODUCTION
Speech activity detection (SAD) is an integral part of many speech processing pipelines. For example, it is used to define speech on/offsets for diarization [1,2], to reduce the computational effort of speech recognition systems by specifying the temporal regions for ASR decoding [3,4], or to support noise power estimation in speech enhancement algorithms [5]. Indeed, SAD has been the focus of research efforts for years [6,7,8,9].
Traditionally, SAD is formulated as a statistical hypothesis test employing probabilistic models, such as Gaussians, mixtures of Gaussians, or Laplacian distributions [6,10,11,12]. During the last decade, however, deep neural networks (DNNs) have achieved impressive results on some of the more taxing SAD tasks, outperforming the traditional approaches [8,13,14]. Here, SAD is formulated as a supervised learning problem by presenting the speech signal at the network's input and the class labels (speech / no speech) as training targets at the output.
One of these challenging tasks is the SAD on the transmission data from the Apollo-11 mission which is one of the objectives of the Fearless Steps challenge [15]. The signals are degraded due to high channel noise, system noise, attenuated signal bandwidth, analog tape ageing, etc.. Furthermore, the noise conditions and signal-to-noise ratios change rapidly over time and channels. Many characteristics of these signals can also be observed in analog speech transmission over High Frequency (HF) radio bands.
In the 2019 edition of the challenge, the top performing neural network-based system achieved a 66.4 % improvement over the baseline system [14]. The latter consisted of two Gaussian mixture models (GMMs) applied to the one-dimensional principal component analysis (PCA) of a concatenation of multiple high dimensional noise robust features [12]. The neural network, on the contrary, consisted of several convolutional neural network (CNN) layers with subsequent recursive neural network (RNN) layers to exploit temporal information, and employed majority voting on the output of multiple networks. Additionally, a post filter was used to smooth unwanted oscillations in the network's decisions over time.
One should note, however, that the baseline GMM system is rather simplistic. If one used more sophisticated signal processing techniques one should be able to come closer to the performance of the neural network while still requiring considerably less computational and memory resources. To show that this is indeed possible, we present a statistical SAD, which combines multi-layer minimum statistics-based noise estimation and Wiener filter-based enhancement, followed by an energy-based SAD. We show that the presented statistical SAD achieves competitive results compared to those published previously on the Fearless Steps dataset [16,17], thereby closing the gap between statistical [12,16] and neural network based SAD [14,17].
Additionally, we propose an improved neural network based SAD which achieves even better results. It is a CNN-based system inspired by the latest advances in sound event detection [18]. The network topology is similar to the one in [14]. But unlike that system, we introduce a segment RNN which conducts temporal smoothing inside the network rather than by a postfilter. The segment RNN operates on a fixed segmentation of the input signal to control the context observed by the RNN. This is different from other layer types like the hierarchical multiscale RNN [19] and the RNN-based approach presented in [20], which have to learn the segmentation in addition to the segment labeling.
Furthermore, the network calculates multiple predictions per time frame, which are subsequently aggregated. However, instead of using different temporal context lengths as in [21], we aggregate information from different segments with overlapping input frames after the RNN layer for an automatic smoothing. We show that the segment RNN outperforms all previously published results on the fearless dataset w.r.t. the decision cost function (DCF) measure.
The remainder of this paper is structured as follows. In Section 2 the statistical SAD system is described, and in Section 3 the neural network-based SAD is introduced. Section 4 includes an evaluation of the two systems on the Fearless Steps challenge dataset [15].

STATISTICAL SAD
The proposed statistical SAD is following the idea of [22] to conduct a two-stage processing: In the first stage denoising is carried out, and in the second stage a time domain energy criterion is applied to decide on speech activity. Although this SAD works reliably for signals with medium (≥ 5 dB) signal to noise ratios (SNRs) and stationary noise conditions, it fails for the highly non-stationary noise of the Fearless dataset for multiple reasons: The recordings exhibit a large variety of different and changing noise types, and they have much lower SNR values. Additionally, the signal magnitude of the active speakers varies by several orders of magnitude, even in the same recording, making it difficult to decide whether the noise floor or a speaker with low energy signals is observed.
Our approach is depicted in fig. 1: It consists of repeated application of a denoising stage ( fig. 1, green blocks), high-pass and linear predictive coding (LPC) filtering ( fig. 1, yellow blocks), and the statistical SAD ( fig. 1, orange blocks). Each block is described in the following.
As input to the statistical SAD we choose the short time Fourier transform (STFT)-coefficients of the observed signal X t,f with t ∈ [0, T ] as the frame index and f ∈ [0, F ] as the frequency bin index. From these coefficients, the minimum statistics based noise power spectral density (PSD) estimate |V (t, f )| 2 , and |X(t, f )| 2 , i.e., the PSD estimate of the current analysis window, are calculated and the corresponding Wiener filter W (t, f ) is given by: The oversubtraction factor γ is chosen relatively high, γ > 20, to compensate for the bias of underestimating the noise level via minimum statistics and to force the Wiener Filter to aggressively apply noise reduction. Furthermore, W (t, f ) is lower bounded by Gmin to prevent W (t, f ) from becoming negative in case of low noise levels co-occuring with speech absence in the same bin. Noise tracking and Wiener filtering iterate multiple times over the audio signal, decreasing the noise level in each iteration and at the same time keeping the maximum peaks corresponding to speech untouched. Thereby, the SNR is improved with each stage, however, at the cost of deteriorating the audio quality. Since neither a low number of acoustic artifacts (e.g., musical tones), nor superior speech quality are of interest here, this loss is acceptable. After the denoising stage, a linear highpass filter is applied to remove low frequency noise. Furthermore, a simple 1 st -order LPC filter is employed to enhance the well predictable speech signals and to suppress the unpredictable noise.
From the enhanced audio signal the energy per sub-band is calculated, where each sub-band has a bandwidth of 1 kHz. Temporal smoothing with an averaging window of size 0.48 s reduces the subband energy variance. Afterwards, the smoothed sub-band energies are weighted with an exponential decay factor (1/s for the s th subband) and accumulated to a single value per frame, called combined sub-band energy (CSBE)(t).

Adaptive threshold
The CSBE values are the basic information source for deciding whether an active speaker or just noise is observed. However, finding an optimal decision threshold is a nontrivial task. Furthermore, the resulting threshold may be dependent on the dataset. In order to circumvent a fixed threshold, minimum statistics is applied once more. This time, the CSBE values are tracked to find the floor values (F-CSBE), which belong to the non-speech parts of the recordings. Additionally, the mean of all F-CSBE values for each recording can be calculated to get the average CSBE floor value (A-CSBE), i.e., an estimate for the average noise level of the recording. A frame is marked as speech if CSBE exceeds the sum of F-CSBE and A-CSBE by a certain factor.
The described minimum tracking approach delivers an initial estimate of speech activity, but it shows a high sensitivity towards the chosen threshold. To overcome this issue, a statistical model in the log-domain is established. As depicted in fig. 3, the logarithm of the CSBE values is taken and all values smaller than the noise threshold are considered to be caused by noise and thus used to estimate a GMM representing noise components. Similarly, values larger than the chosen speech threshold are considered speech and used to estimate a GMM for speech. The thresholds for speech and noise are derived from the A-CSBE value, adding some additional safety margins.
The final decision of the statistical SAD is derived with a Viterbi decoder operating on an hidden Markov model (HMM) which consists of 5 consecutive states for noise and 5 states for speech, each with probability of 0.9 for staying in the state and 0.1 for state switching. The HMM emission probabilities are given by the aforementioned GMMs.

NEURAL NETWORK-BASED SAD
The neural network architecture is adapted from [18] and consists of multiple CNN blocks with subsequent layers for temporal smoothing, an output activation and max pooling over the feature dimension. Each CNN block consist of two 2D-CNN layers with a 3x3 kernel and a subsequent batch normalization, followed by a single max pooling layer of stride 4 which operates along the feature dimension. In contrast to [18], no pooling along the time dimension is applied to ensure frame-wise outputs. To exploit temporal information, we either use a 1D-CNN structure as in [18] or an RNN layer with a bidirectional gated recurrent unit (GRU) [23] and a subsequent feedforward (FF) layer as classifier to enable the network to use a larger context. The described network structure is shown in fig. 4 and table 1 compares the two options for gathering temporal information.
To enforce temporal smoothing, the common approach is to use Viterbi decoding on an HMM with GMMs emission distributions to model speech and noise statistics, as described in the previous section. However, the smoothing can also be done by the DNN or, more specifically, by the temporal layer. Therefore, we propose a segment RNN as replacement for the temporal layer where each input utterance is segmented into M overlapping chunks of length L with a shift S between segments as outlined in fig. 5. Each segment is processed by an RNN with subsequent classifier layer as specified in table 1. The parameters are shared between the layers to ensure that all segments are processed equally. For each segment only the last output frame is chosen as the prediction for the whole segment. Speech activity is assumed for a segment i if the estimated output yi exceeds a certain threshold α: di = 1 if yi > α 0 if yi ≤ α . Finally, speech presence is declared for a given frame if at least one segment containing that frame indicates speech presence. Thereby, the occurrence of oscillations in the decision signal is reduced at the cost of overestimating the speech activity. Since the segment length L and shift S are fixed, the segment RNN approach may lead to a higher hit rate while also increasing the false alarm rate. However, in most applications a high true positive rate (TPR) is more important than a low false positive rate (FPR). For example, in case of automatic speech recognition (ASR) an overestimation of the length of speech activity is not as harmful as missing part of an utterance. The shift S allows for a complexity reduction since a larger value reduces the

EVALUATION
The presented SAD systems are tuned on the development set of the fearless dataset [15]. As metrics we use precision (P ), recall (R), F1-score= 2 P ·R P +R and DCF with where TP, FP, TN and FN are the number of true positive, false positive, true negative and false negative predictions. The scoring is done with the openSAD evaluation tool [24].

Fearless Steps Dataset
The Fearless Steps dataset [15] consists of 8 kHz recordings from the Apollo 11 mission. The part of the Fearless Steps dataset used during this challenge for training and development consists of 290 speakers with an SNR between 0 dB and 20 dB. Note, that the development set includes 34 unique speakers not seen during training. All examples are 30 min long, and the training set consists of 29.56 % of speech on average, whereas the development set includes an average of 32.87 % of speech. The main challenges of the dataset are, first, that speech activity is typically very short, consisting of one or two words only, and, second, that the noise is highly non-stationary with varying SNR. If not stated otherwise, all experiments are carried out on the development set.

DNN tuning
The input to the DNN is the magnitude spectrum obtained from an STFT with an FFT size of 512 samples, a window length of 50 ms and a frame shift of 10 ms. All networks were trained for 50000 iterations with a batch size of 24 and a learning rate of 0.001 using the Adam optimizer [25]. In fig. 6, the DCF is displayed as a function of the decision threshold α for the first two temporal layer variants described in section 3. According to the figure, RNN and the 1D-CNN achieve similar results with a small edge for the 1D-CNN. In both cases, the threshold can be chosen in a fairly large range without a substantial impact on the performance.
Additionally, two types of temporal smoothing are compared: On one hand, HMM-based smoothing described in section 2 and, on the other hand, a median filter with a fixed window length. It can be observed that the HMM-based approach outperforms the median filter for both the RNN and CNN layer.
In fig. 7, the DCF values achieved with the segment RNN as temporal layer are plotted for different shifts S and lengths L. For each S and L the individual optimal threshold α is chosen. The results are compared to the previously best presented system, the CNN+HMM. It is apparent that the segment RNN clearly outperforms the CNN+HMM SAD estimation for short segment length L. All results with L ≤ 250 ms and S ≤ 150 ms achieve at least a small gain compared to the CNN temporal layer with HMM smoothing. Reducing the shift and length in the segment RNN to 10 ms and 50 ms which equals 1 and 5 frames respectively, results in the lowest DCF. A possible explanation is the non-stationarity of the distortions and that the high overlap between segments due to the small shift successfully smooths the network output.

System comparison
In table 2 the results for all systems tuned to their optimal threshold are shown. The presented statistical SAD achieves a DCF of 2.98 % and thus an improvement of 9.52 % over the challenge baseline in terms of absolute numbers. In comparison, the neural network-based  The two proposed approaches differ in many aspects, e.g. their type of signal processing or their implementations. In table 3 a comparison between the systems in terms of processing time is stated. Please note that the table shows results for systems which are implemented on different tool chains, and that further optimizations on the code may improve the realtime factors. The table shows that all systems allow real time processing.
Although the statistical SAD achieves worse detection rates than the DNN-based method presented here, the approach is interesting because it has a lower real-time factor and because it is an unsupervised learning approach not requiring labeled training data. Arguably, this makes it easier to adapt the system to other data sets.

CONCLUSIONS
This paper proposes a new statistical SAD which achieves competitive results compared to other DNN-based systems. Furthermore, a new DNN-based SAD with a segment RNN-based smoothing is presented which allows to define the context observed by the RNN. This single system approach achieves a DCF value of 1.19 % which is the second best result submitted to the 2020 Fearless Steps Challenge and is only slightly outperformed by a majority voting between a combination of the proposed DNN architectures (DCF: 1.07 %). Hereby, the majority voting results are the best submitted to the 2020 Fearless Steps Challenge, outperforming the baseline by more than 10 % in absolute values.

ACKNOWLEDGEMENT
The authors would like to thank Plath GmbH in Hamburg (Germany) for funding part of the research for this contribution.  [26] Pytorch [26]