{'fraction_non_alphanumeric': 0.03842337375964719, 'fraction_numerical': 0.014388092613009922, 'mean_word_length': 4.462511291779585, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deep Learning Based Two-dimensional Speaker Localization With Large Ad-hoc Microphone Arrays

Deep learning based speaker localization has shown its advantage in reverberant scenarios. However, it mostly focuses on the direction-of-arrival (DOA) estimation subtask of speaker localization, where the DOA instead of the 2-dimensional (2D) coordinates is obtained only. To obtain the 2D coordinates of multiple speakers with random positions, this paper proposes a deep-learning-based 2D speaker localization method with large ad-hoc microphone arrays, where an ad-hoc microphone array is a set of randomly-distributed microphone nodes with each node set to a traditional microphone array, e.g. a linear array. Specifically, a convolutional neural network is applied to each node to get the direction-of-arrival (DOA) estimation of speech sources. Then, a triangulation and clustering method integrates the DOA estimations of the nodes for estimating the 2D positions of the speech sources. To further improve the estimation accuracy, we propose a softmax-based node selection algorithm. Experimental results with large-scale ad-hoc microphone arrays show that the proposed method achieves significantly better performance than conventional methods in both simulated and real-world environments. The softmax-based node selection further improves the performance.


I. INTRODUCTION
Speaker localization aims to localize the positions of speakers with the knowledge of speech signals recorded by microphones. It finds wide applications in robotics [1], teleconferencing [2], speech separation [3], etc. It is a challenging task in adverse acoustic environments with strong reverberation and noise interference. Conventional speaker localization only requires to obtain the directions of speech sources, which is also known as the direction-of-arrival (DOA) estimation. Representative methods include the multiple signal classification (MUSIC) [4] and the steered response power with phase transform (SRP-PHAT) [5].
Recently, with the fast development of deep-learning-based speech separation and enhancement [6], deep-learning-based DOA estimation has received much attention [7]- [15]. Some methods use deep models to estimate noise-robust variables which are then used in conventional DOA estimators [8]. Some methods formulated the DOA estimation as a classification problem of azimuth classes [7]. Spatial acoustic features like generalized cross correlation [7], phase spectrograms [9], spatial pseudo-spectrum [10], and circular harmonic features [15] are usually extracted as the input of deep models. Convolutional neural networks are popular deep models for the DOA estimation [9], [10], [12], [14]. Under the above directions, many generalized problems were explored [10]- [13]. They show improved performance over conventional approaches.
However, in many applications, obtaining a speaker's 2dimensional (2D) or 3-dimensional coordinate is more helpful than merely obtaining the DOA. Ad-hoc microphone arrays may be able to address the problem. An ad-hoc microphone array is a group of randomly distributed cooperative microphone nodes, each of which contains a single microphone or a traditional microphone array, like a uniform linear array. The advantages of ad-hoc microphone arrays lie in that (i) they can be easily deployed and widespread in real world by organizing online devices, and (ii) they can reduce the occurrence probability of far-field speech signal processing.
However, existing methods based on ad-hoc microphone arrays are mostly classic signal processing methods [16], which may encounter unrealistic assumptions and inaccurate parameter estimations. To our knowledge, deep-learning-based methods were studied only with distributed microphone nodes [17]- [19]. The work [17] trains multiple deep-learning-based nodes jointly, and predicts the 2D coordinates of speakers directly. [18] formulated the 2D localization as a classification problem of spatial grids. [19] gets the 2D coordinates by the triangulation of two distributed nodes. Although the pioneering works have shown the potential of the deep-learning-based methods, their studies were conducted with limited number of nodes (e.g. two nodes), and required additional restrictions, such as that the nodes in both training and test were fixed at the same positions [17], [18], or the spatial patterns of the nodes in both training and test should be the same [19], which do not reflect the flexibility of ad-hoc microphone arrays. As in other studies on ad-hoc arrays, e.g. [20]- [23], an ad-hoc array that yields its advantages and superior performance over conventional fixed arrays should be able to manage massive number of nodes, as well as random positions and spatial patterns of the nodes.
To promote the advantages of ad-hoc arrays, in this paper, we propose a deep-learning-based method with large adhoc microphone arrays for the 2D speaker localization. The proposed method uses convolution neural networks to estimate the DOA at each node of an ad-hoc microphone array. Then, it uses a triangulation method to obtain a roughly estimated speaker position from every two nodes. Finally, clustering is applied to get the final accurate speaker positions from the large number of roughly estimated positions.  time complexity and improve the estimation accuracy, node selection algorithms are also explored. Experimental results show that the proposed method is significantly better than conventional methods. The models trained with simulated data behave well in real-world test data.

II. PROPOSED METHOD
The diagram of the proposed method is shown in Fig. 1. It consists of a feature extraction module, a DOA estimation module, a node selection algorithm, and a triangulation and clustering method, which are described respectively as follows.

A. Feature extraction and DOA estimation
Suppose a room contains an ad-hoc microphone array of N nodes and B speakers, where each node consists of a conventional array of M microphones. In this subsection, we focus on presenting the process of the DOA estimation at a single node, given that the process is the same for all nodes.
The short-time Fourier transform (STFT) of a speech recording at the ith microphone of an ad-hoc node is: where Y i (t, f ) is the STFT at the tth frame and f th frequency bin, and A i (t, f ) and φ i (t, f ) are the magnitude and phase components of the STFT respectively, ∀i ∈ 1, . . . , M , ∀t ∈ 1, . . . , T , and ∀f ∈ 1, . . . , F where T is the number of the time frames of the recording and F is the number of frequency bins. We group the phase spectrograms of all microphones of the node into an M × F × T matrix, denoted as Φ.
The deep-learning-based DOA estimation is formulated as a classification problem of L azimuth angles in the full azimuth range. Specifically, we put Φ into a convolutional neural network (CNN). The reason for using CNN is that the kernel of CNN can learn the information between different microphones at every frequency bin. We denote the t-th time frame of Φ as Φ t , then the output of the CNN at the frame can be denoted as p(θ l |Φ t ), where θ l represents the l-th azimuth class of the DOA. The sentence-level posterior probability of DOA can be expressed asp If B > 1, then the DOA estimation at the node is formulated as a multi-label classification problem [9], where the highest B probabilities are the estimated DOAs of the B speakers. In this paper, we take the linear array as the case of study at each node, and set L = 37 in the 180 • full azimuth range.

B. Node selection
Ad-hoc microphone array is distributed in a large acoustic scene. When a node is far from speech sources, the signalto-noise ratio (SNR) of the signal collected by the node is low. Our studies show that (i) the SNR strongly affects the accuracy of the DOA estimation at the node, and (ii) taking all nodes whose SNRs vary in a large range in the 2D coordinate estimation of the speech sources results in a large deviation of the estimation. Therefore, we need to pick only the nodes with high SNRs into the process of the 2D coordinate estimation. As the first study of the node selection problem for the deep-learning-based speaker localization, we follow the K-best node selection method in [24]. To prevent training an additional deep model for the SNR estimation [24], we select the nodes according to the softmax outputs of the CNN models. Specifically, suppose the maximum of the posterior probability values produced by the CNN at the n-th node isp n = max (p n (θ 1 ) , . . . ,p n (θ l ) . . . ,p n (θ L )), wherê p n (θ l ) is thep (θ l ) of Eq. (2) at the n-th node. Then, we pick the K nodes that yield the top K largest values among {p n } N n=1 . When the number of speakers B > 1, we average the top B largest posterior probability values at each node, and then pick the K nodes as that when B = 1.

C. Triangulation for a rough estimation of speaker positions
We use a triangulation method to get the 2D coordinates of speakers [16]. It regards the estimated DOAs as bearing lines, and takes the cross between the bearing lines as the speaker positions. Specifically, we build a coordinate system in the room. Suppose the 2D coordinate of the n-th node is l n = [x n , y n ], and the angle of the node with respect to the room coordinate system is β n . Suppose the ground-truth 2D coordinate of the b-th speaker is We denote the DOA estimation of the b-th speaker by the n-th node asθ (b,n) . Note that, the proposed algorithm does a "ghost" speaker a true speaker Fig. 2: The "ghost" speaker problem caused by linear arrays.
not have to know which speaker the estimationθ (b,n) belongs to; the index b is only used to remind that the proposed algorithm is suitable for multi-speaker localization. The 2D speaker localization problem is formulated as estimating c b given as an estimation of c b , and defineα (b,n) as an angle between l n andĉ b in the coordinate system: Under the constraint that the n-th node is a linear array, we can obtainα (b,n) by: Note that, when other types of arrays, such as circular arrays, are used, a similar derivation can be conducted. Although we may use multiple ad-hoc nodes simultaneously to estimate the positions of the speakers, the noise and reverberation of the room makes the exact estimation of the speaker positions impossible.
In practice, the triangulation method can only get an area where a speaker may locate. To address this issue, we use two nodes for the triangulation at a time, which delivers an estimated position [x b ,ŷ b ] as illustrated in Fig. 1. Suppose the n 1 -th and n 2 -th nodes are used, then the estimated position of the b-th speaker is obtained by: . (5) By this way, every two nodes can get a number of roughlyestimated speaker positions. Specifically, it is well known that linear arrays cause the problem of "ghost" speakers, as illustrated in Fig. 2. Therefore, every two nodes may yield at most B 2 roughly-estimated speaker positions when there are no "ghost" speakers, and (2B) 2 positions when the "ghost" speakers exist. In other words, the triangulation does not address the multi-speaker localization problem. This difficulty can be solved by the following clustering strategy.

D. Clustering on the rough speaker positions
To get accurate speaker positions from the rough estimations, we conduct kernel mean-shift clustering method on the rough estimations. Mean shift clustering is a nonparametric clustering algorithm. It first finds the area of the data points with the highest intensity and then gets the cluster centers by a mean shift procedure. Here we choose the Gaussian kernel mean shift clustering [25], which takes the cluster centers {ĉ b } B b=1 as the accurately estimated speaker positions. The advantages of the clustering strategy are that (i) a biased DOA estimation of a single node has little negative effect on the global speaker localization; (ii) the inability of the triangulation on the multi-speaker localization and "ghost" speaker problems can be easily addressed.

III. EXPERIMENTS ON SIMULATED DATA
We constructed two training sets. (i) Two-source training set: It contains 46620 training environments, each of which consists of 2 speakers speaking simultaneously; (ii) Mixedsource training set: It contains 18000 environments with 1 speaker, 36000 environments with 2 speakers, and 54000 environments with 3 speakers. Each environment randomly picks one of the 5 rooms with sizes of 6×6×2.7m, 5×4×2.7m, 10 × 6 × 2.7m, 8 × 3 × 2.7m, and 8 × 5 × 2.7m respectively. Its reverberation time T 60 was selected randomly from 0.3 to 1.0s. The room impulse response was simulated by the image source model 1 . The 462 training speakers of the TIMIT speech corpus, each of which uttering 10 sentences, was used as the clean speech sources. Each sound source of an environment utters one sentence. A uniform linear array (ULA) with 4 microphones was placed randomly in the room. The intermicrophone distance of the ULA was set to 8cm. The full 180 • azimuth range in front of the ULA was divided evenly into 37 azimuth angles, i.e. L = 37, each of which corresponds to a range of 5 • . The sound sources were placed 1m or 2m away from the center of the ULA in each direction. The heights of both the ULA and the sound sources were set to 1.25m. The white noise was added by the noise generators from AudioLabs 2 . The SNR at the ULA was uniformly sampled from 0 to 30dB.
We constructed 200 test environments in a room of 5 × 7 × 2.5m with T 60 set to 0.4s. For each environment, we placed 1 to 3 speakers, and an ad-hoc microphone array of 20 randomly distributed nodes, where each node is a ULA of the same configuration as that in the training data. The 168 test speakers of TIMIT were used as the clean speech sources. We added isotropic noise fields in the room with the SNR at the sound sources set to 30dB or 40dB.
The sampling rate of the speech recordings is 16kHz. The number of STFT points was set to 512 with a frame overlap rate of 50%. We excluded the lowest frequency sub-band of STFT, and extracted the phase spectrogram of the STFT feature from each of the four microphones of a ULA, which results in a 4 × 256 phase map, as the input of the CNN-based DOA estimation. The CNN is a 37-class classifier, see [26] 3 for its detailed setting. The Gaussian kernel bandwidth of the mean shift clustering was set to 0.18m.   We created two conventional algorithms based on ad-hoc microphone arrays as the comparison baselines. They have the same structure as the proposed method, except that the CNNbased DOA estimation was replaced by conventional broadband DOA estimation methods-MUSIC and SRP-PHAT. We employed pyroomacoustics [27] to implement MUSIC and SRP-PHAT. The azimuth range of the ULAs of the baselines was divided into 180 azimuth angles, each of which corresponds to a range of 1 • . We used mean absolute error (MAE) between the ground-truth source position (x, y) and the predicted source position (x,ŷ) as the evaluation metric, which is calculated by MAE = (x − x) 2 + (ŷ − y) 2 .
Results: We first conducted a comparison in the situation where all ad-hoc nodes were selected for the speaker localization. From the comparison results in Table I, we see that MU-SIC and SRP-PHAT yield poor performance in the stronglyreverberant and noisy environment, while the proposed CNNbased method is significantly better than the baselines, no matter how the training datasets were constructed.
To demonstrate the importance of the ad-hoc node selection scheme, we compared the all node selection method with the K-best node selection method where K was set to 14, 16, and 18 respectively. From the results in Table II, we see that the K-best node selection outperforms the all node selection method in three out of six test scenarios, which indicates that (i) the K-best node selection method is effective, and (ii) advanced node selection methods beyond the K-best method need further investigation.

IV. EXPERIMENTS ON REAL-WORLD DATA
We recorded a real-world data set named Libri-adhoc-nodes10. It contains an office room and a conference room.
Here we used the conference room as the test scenario. Fig.  3 shows the recording environment of the conference room. The size of the conference room is 4.26 × 5.16 × 3.16m with T 60 ≈ 1.06s. The room has 10 ad-hoc nodes, each of which contains a ULA that has the same configuration as the simulated data. It records the 'test-clean' subset of the Librispeech data replayed by a loudspeaker in the room, which  contains 20 male speakers and 20 female speakers. The ad-hoc nodes and the loudspeaker have the same height of 1.3m. The detailed description of the data and its open source will be released in another publication. To simulate the test scenarios of multiple sound sources, we summed the recordings that were generated from different loudspeaker positions. Results: We evaluated the proposed method trained on the simulated data on the real-world test data. From the comparison results in Table III, we see that the proposed method significantly outperforms the two baseline methods, even if the the proposed method was trained with simulated data. The performance degradation of the proposed method on the test scenarios of 2 or more sound sources is mainly caused by the exponentially increased number of ghost speakers.

V. CONCLUSIONS
In this paper, we have developed a deep-learning-based speaker localization method with large-scale ad-hoc microphone arrays. It first applies a CNN-based DOA estimation algorithm for each ad-hoc node. Then, it selects highlyaccurate nodes for the triangulation method to generate a number of roughly estimated speaker positions. Finally, it gets the accurate speaker positions by clustering the massive roughly estimated positions. We have created two comparison baselines based on MUSIC and SRP-PHAT respectively. The comparison results on both simulated data and real-world data demonstrate the effectiveness and generalization ability of the proposed method on the 2D speaker localization problem.