Preprint
Article

This version is not peer-reviewed.

Who Pressed First? Deep, Classical and Template-Based Classifiers for Near-Simultaneous Sound Events from a Single Microphone

Submitted:

24 October 2026

Posted:

26 October 2026

You are already at the latest version

Abstract
Competitive games with robots or interactive systems often need to decide which player pressed a buzzer first. With a single microphone, this means classifying overlapping sound events whose onsets may differ by only tens of milliseconds. We compare five classifiers for this task: a convolutional recurrent neural network with attention (CRNN), a Transformer, a Random Forest, a support vector machine (SVM) and a training-free frequency-domain cross-correlation (CC) method that matches Mel-spectrograms against class templates. A dataset of 600 single presses from four electronic buzzers and 1,950 synthetic overlaps (offsets 0–0.5 s) was recorded in a 35 m² room. Each method was evaluated on accuracy for single, near-simultaneous and simultaneous presses, robustness to offset and noise, end-to-end latency, synthetic-to-real transfer and feature representation. The Random Forest achieved the highest mean accuracy (99.3%) with 20.3 ms latency. The CRNN and Transformer were near-perfect on single sounds but reached only 55.5% and 84.2% on simultaneous presses, with latencies above 190 ms. CC ranked third (90.0%) but needed no training, ran in 23.4 ms, stayed at about 0.97 on single sounds at every noise level tested, and transferred best from synthetic to real recordings (0.91, against 0.33–0.66 for the learned models). Under matched real data, the learned models were slightly ahead (CRNN and Random Forest 0.98, CC 0.95). No method dominated. For structured, reproducible sounds deployed in changing rooms, template correlation offers the best balance of speed, robustness and data efficiency. Learned models are preferable where in-room training data are available or sounds overlap heavily in noise.
Keywords: 
;  ;  ;  ;  ;  ;  ;  

1. Introduction

Many interactive systems must decide who acted first. Quiz games hosted by social robots or screens are a common case: teams press buzzers, and the system grants the turn to the fastest [1,2,3,4]. Wired buzzer systems solve this electrically, but they tie the game to dedicated hardware. Detecting the presses acoustically, with the microphone a robot or laptop already has, makes the setup portable. It also turns a simple timing problem into a hard sound event detection task.
Three properties make the task hard. First, presses are often near-simultaneous. Players react within tens of milliseconds of each other, so two buzzer sounds overlap almost completely in a single-channel recording. Second, the decision must be fast: a host that answers several hundred milliseconds late feels sluggish, and in a competition, delays can look like favouritism. Third, the system is deployed in rooms it was not trained in, with different reverberation, distances and background noise.
Sound event detection research offers two broad approaches [5,6]. Learned models, from convolutional recurrent networks to Transformers, lead benchmarks on large datasets [7,8,9]. Their accuracy, however, depends on how well deployment conditions match training data, and their inference cost can be high on embedded hardware [10,11,12]. Classical learners such as Random Forests and SVMs are cheaper and often competitive on small datasets [13,14]. Template matching by cross-correlation needs no training and can be recalibrated in a new room with a few recordings [15,16,17]. It is limited to sounds that repeat closely, which is exactly what electronic buzzers do.
Comparisons between these families usually report accuracy on isolated, curated events. They rarely examine overlapping events with controlled onset offsets, latency on commodity hardware, and transfer to real recordings together. These are the properties that decide whether a first-responder detector is usable.
This paper addresses that gap with a controlled comparison of five classifiers on the same buzzer dataset:
  • A CRNN with temporal attention, a Transformer, a Random Forest, an SVM and a training-free frequency-domain cross-correlation (CC) method, all evaluated under one protocol.
  • A dataset of single, near-simultaneous and simultaneous buzzer events with controlled onset offsets from 0 to 0.5 s, plus real recordings with naturally varying offsets.
  • An evaluation along six dimensions that matter for deployment: accuracy by event type, accuracy across onset offsets, noise robustness, end-to-end latency, synthetic-to-real transfer and feature representation.
  • Practical guidance on which method to choose under which deployment conditions.
Section 2 reviews related work. Section 3 describes the dataset, features and metrics, and Section 4 the five methods. Section 5 reports results, and Section 6 discusses them and concludes.

3. Dataset, Features and Evaluation

3.1. Sound Sources and Recording

Four commercial electronic buzzer buttons served as sound sources, labelled Siren, Laser, Buzzer and Charge (Figure 1). Each emits a fixed electronic tone pattern, so repeated presses of the same buzzer produce nearly identical signals. Variability between recordings therefore comes mainly from the room: reverberation, distance, angle and background noise.
Recordings were made with a single omnidirectional USB microphone, 1.2 m above the floor, in a 35 m² room. Buzzers were placed 1–2 m from the microphone at angles of 0°, 30°, 45°, 60° and 90°. Everyday background sounds such as shuffling, quiet talk and typing were left in. Audio was captured at 44.1 kHz, 16-bit, mono.

3.2. Pre-Processing

Each recording went through three steps (Figure 2a): silence trimming with an amplitude threshold of 0.01, z-score normalisation to remove level differences between recordings, and manual checking of labels and duration.

3.3. Single, Near-Simultaneous and Simultaneous Events

We recorded 150 single presses per buzzer (600 in total). To model competitive responses, pairs of Siren and Laser recordings were mixed with controlled onset offsets Δt of 0.05, 0.1, 0.2, 0.3, 0.4 and 0.5 s in both orders (near-simultaneous), and with Δt = 0 (simultaneous). Each mixture was labelled by which sound started first: SirenFirst, LaserFirst or Tie (Figure 2b). Table 1 summarises the dataset.
The real recordings were used only for the transfer test (Section 5.5). They contain Laser and Charge presses made by people, so their onset offsets were not controlled.

3.4. Feature Extraction

We computed four representations for every event (Figure 3): the short-time Fourier transform (STFT) magnitude, a 128-band Mel-spectrogram, Mel-frequency cepstral coefficients (MFCCs), and an early fusion of all three. All used a 512-sample window (about 23.2 ms) and a 256-sample hop (about 11.6 ms). Each representation was normalised before training or correlation. Unless stated otherwise, results use the Mel-spectrogram, the default input for all five methods.

3.5. Evaluation Protocol

Table 2 lists the evaluation measures. For the learned models, the train/validation/test stratified 70/15/15 split, and splits were made per recording so that mixtures of the same press never appear in both training and test. Each accuracy value is the mean of five runs; for learned models, runs differ in weight initialisation and data shuffling. For CC, runs differ in noise realisation and window alignment. Near-simultaneous accuracy was computed per offset and then averaged over the six offsets. All experiments ran on a workstation with an Intel Core i7 (12th gen, 2.5 GHz), 32 GB RAM and an NVIDIA RTX 3060 (12 GB). The full pipeline is shown in Figure 4.

4. Classification Methods

All five methods receive the same normalised Mel-spectrogram of 128 bands × 107 frames. For overlapping events they output one of three classes (LaserFirst, SirenFirst, Tie); for single events, one of four buzzer classes. separate models were trained for the single-sound and the overlap tasks. Table 3 summarises the configurations.

4.1. CRNN with Attention

The CRNN follows the convolutional–recurrent design of Cakir et al. [7] with an added temporal attention layer (Figure 5). Two convolutional blocks, each with a 3 × 3 convolution (32 and 64 filters, ReLU) and 2 × 2 max-pooling, learn local time–frequency patterns such as onsets and energy changes. The resulting 32 × 26 × 64 map is reshaped into 26-time steps and projected to 64 dimensions by a time-distributed dense layer. An LSTM with 64 units [23] models’ temporal context across these steps. A dense layer scores each LSTM output; the scores are normalised into attention weights, and the weighted sum forms a context vector that emphasises the most informative frames. Two dense layers (64 and 32 units, with dropout) and a softmax output complete the network, which has 189,380 trainable parameters. It was trained with Adam [28] (learning rate 0.001), categorical cross-entropy, batch size 16 and up to 50 epochs, with early stopping on validation accuracy.

4.2. Transformer

The Transformer treats each of the 107 frames as a 128-dimensional token [24,25,29]. Sinusoidal positional encodings are added so that the model can use temporal order. Two Transformer blocks, each with eight-head self-attention and a 128-unit feed-forward layer, relate every frame to every other frame. Global average pooling over time gives a 128-dimensional summary, followed by dense layers of 64 and 32 units (ReLU, dropout 0.2) and a softmax output. The model has 605,123 trainable parameters.

4.3. Random Forest and SVM

The Random Forest [26,30] uses 100 trees grown with the Gini criterion, bootstrap sampling and √n candidate features per split; predictions are combined by majority vote. The SVM [27] uses an RBF kernel with C = 1.0 and γ = “scale”. The normalised Mel-spectrogram used as the input vector for both.

4.4. Frequency-Domain Cross-Correlation

The CC method requires no training. Each class k has one reference template: a normalised Mel-spectrogram Tk (f, n) of a clean example of that class, where f indexes Mel bands and n frames. For an incoming event with spectrogram S (f, n), the correlation is computed along time only, summing over Mel bands:
R k τ =   ∑ f ∑ n S f ,   n   T k ( f ,   n + τ )
The class score is the peak over lags, scaled to the range 0–1 by a reference value:
s ^ k =   m a x τ   R k ( τ ) R r e f ,                   R r e f =   9000
Rref is the peak score of a clean template matched against itself. The event is assigned to the class with the highest score. If no score exceeds θ = 0.78 (a raw score of 7,000), the event is rejected as silence or noise. For overlapping events, the LaserFirst, SirenFirst and Tie templates differ in which buzzer’s spectral pattern starts first. The correlation therefore resolves the order by selecting the closest template (Figure 6). Because frames advance in 11.6 ms steps, the timing resolution of this method is about one hop. Table 4 shows example scores.

5. Results

5.1. Overall Accuracy

The Random Forest achieved the highest mean accuracy (99.3%), followed by the Transformer (94.0%), CC (90.0%), the SVM (85.1%) and the CRNN (84.4%) (Table 5). The ranking hides a clear split by event type. All methods classified single presses well (97.4–99.8%). The differences came from simultaneous presses: the CRNN reached only 55.5% and the SVM 60.3%, while the Random Forest reached 99.1% and CC 81.9%.

5.2. Accuracy Across Onset Offsets

Accuracy for near-simultaneous events rose with the offset for every method (Figure 7). The deep models were most sensitive to small offsets and approached 0.97–0.99 at 0.4–0.5 s. The classical models degraded more gradually and levelled off once the offset exceeded 0.2 s [30]. CC was lowest at the smallest offset and improved steadily with larger offsets, as expected from its frame-level timing resolution [31]. Normalisation improved all methods, by more than 0.20 at small offsets for CC and the CRNN [32].

5.3. Noise Robustness

With additive Gaussian noise from 5 to 25 dB SNR, the methods behaved differently for single and overlapping events (Figure 8). For single events, CC stayed at about 0.97 at every noise level. The learned models fell to 0.25–0.30, close to chance for four classes, because they were trained on clean recordings without noise augmentation. For overlapping events, the CRNN was best (0.70 at 5 dB rising to 0.76 at 25 dB). CC stayed between 0.64 and 0.70, ahead of the Random Forest (≤ 0.56), the Transformer (0.38–0.49) and the SVM (about 0.36).

5.4. Latency

The Random Forest (20.3 ms) and CC (23.4 ms) were about ten times faster end-to-end than the CRNN (226.6 ms) and the Transformer (191.7 ms) (Table 6). Only these two stayed below 50 ms at the 95th percentile. Normalisation did not reduce mean latency, but it stabilised the SVM: without it, the SVM’s 95th-percentile latency was about 247 ms, against 55 ms with it.

5.5. Synthetic-to-Real Transfer

When models trained on synthetic mixtures were tested on real recordings, CC was clearly best with 0.91 (Table 7). The learned models fell to 0.33–0.66. When the learned models were trained and tested on real recordings, they recovered: the CRNN and Random Forest reached 0.98, slightly above CC (0.95), which used the same templates in both conditions.

5.6. Feature Representation

All methods reached at least 0.92 with every feature representation (Figure 9). Mel-spectrograms and fused features were best, at about 0.99 for the CRNN and Random Forest and 0.97 for CC. The spread across feature types was below 0.03 for every method. For CC, fusion averaged the correlation scores computed separately for each feature type.

6. Discussion

6.1. No Single Winner

No method was best on every measure. On matched data, the Random Forest was the strongest overall, combining 99.3% mean accuracy with 20 ms latency. The deep models matched it on single and near-simultaneous presses but failed on ties, where the two sounds overlap completely and the order cue disappears. The CRNN identified only 55.5% of ties correctly, so almost every second simultaneous press would be awarded to one team. Their latencies of about 200 ms, with 95th percentiles above 360 ms, are also long for a game host that should react at once.
CC ranked third on matched data but had the most stable profile. It needed no training, ran in 23 ms, kept about 0.97 on single sounds in heavy noise and lost the least when moved from synthetic to real recordings. Its weak point is very small offsets, where its 11.6 ms frame resolution and the blending of the two spectra limit how well the templates can separate the orders.

6.2. Why Template Matching Transfers Well

The transfer results are the most relevant for deployment. Every learned model lost between a third and two-thirds of its accuracy when trained on synthetic mixtures and tested on real ones. Synthetic mixtures differ from real presses in reverberation, relative level and exact timing, and the learned models fitted these differences. CC compares the structure of the whole spectrogram with a template, so it depends less on such details. Electronic buzzers make this possible, because each press repeats the same signal. This is a boundary condition of the result, not a general advantage of correlation.

6.3. Choosing a Method

Table 8 turns the results into guidance.

6.4. Limitations

The study used four buzzer types in one room with one microphone. Overlaps were synthesised from two of the buzzers; real overlaps were tested only in the transfer experiment. Noise was additive Gaussian noise rather than recorded classroom noise, and the learned models were not trained with noise augmentation, which explains part of their weakness under noise. The learned models were not domain-adapted or fine-tuned on a few real examples, which could narrow the transfer gap. CC depends on sounds with a stable signature; it is not suited to speech, claps or other variable sounds without adaptive templates. Finally, the frame-level timing of the frequency-domain method limits its resolution for very close presses. A dedicated time-domain onset estimator could address this and is left for future work.

7. Conclusion

We compared five classifiers for deciding, from a single microphone, which of two buzzers sounded first. The Random Forest was the most accurate on matched data, deep models struggled with simultaneous presses and were slow, and frequency-domain cross-correlation offered the best balance of latency, noise robustness and transfer without any training. For interactive systems deployed in changing rooms with structured sounds, template correlation is a strong default. Learned models are worth their cost when in-room training data exist or when heavy noise and overlap dominate. Future work should test real classroom noise, more sound types and hybrid systems that combine template matching with a light learned model.

References

  1. Belpaeme, T.; Kennedy, J.; Ramachandran, A.; Scassellati, B.; Tanaka, F. Social robots for education: A review. Sci. Robot. 2018, 3(21), eaat5954. [Google Scholar] [CrossRef] [PubMed]
  2. Francese, R.; Ciobanu, M. G.; De Santis, L.; Tortora, G. Supporting team-based learning through robot-mediated quizzes: An educational study with Furhat. In Proceedings of the 16th Biannual Conference of the Italian SIGCHI Chapter, 2025; pp. 1–10. [Google Scholar] [CrossRef]
  3. Tutul, R.; Pinkwart, N. Design and evaluation of a sound-driven robot quiz system with fair first-responder detection and gamified multimodal feedback. Robotics 2025, 14(9), 123. [Google Scholar] [CrossRef]
  4. Buchem, I.; Tutul, R.; Jakob, A.; Pinkwart, N. Non-verbal sound detection by humanoid educational robots in game-based learning: Multiple-talker tracking in a buzzer quiz game with the Pepper robot. In Robotics in Education (RiE 2023); Springer, 2023; Volume LNNS 747. [Google Scholar] [CrossRef]
  5. Virtanen, T.; Plumbley, M. D.; Ellis, D. (Eds.) Computational analysis of sound scenes and events; Springer, 2018. [Google Scholar] [CrossRef]
  6. Mesaros, A.; Heittola, T.; Virtanen, T.; Plumbley, M. D. Sound event detection: A tutorial. IEEE Signal Process. Mag. 2021, 38(5), 67–83. [Google Scholar] [CrossRef]
  7. Cakir, E.; Parascandolo, G.; Heittola, T.; Huttunen, H.; Virtanen, T. Convolutional recurrent neural networks for polyphonic sound event detection. IEEE/ACM Trans. Audio Speech Lang. Process. 2017, 25(6), 1291–1303. [Google Scholar] [CrossRef]
  8. Hershey, S.; Chaudhuri, S.; Ellis, D. P. W.; Gemmeke, J. F.; Jansen, A.; Moore, R. C.; et al. CNN architectures for large-scale audio classification. Proceedings of IEEE ICASSP 2017, 2017; pp. 131–135. [Google Scholar] [CrossRef]
  9. Gong, Y.; Chung, Y.-A.; Glass, J. AST: Audio Spectrogram Transformer. Proceedings of Interspeech 2021, 2021; pp. 571–575. [Google Scholar] [CrossRef]
  10. Gairí, P.; Pallejà, T.; Tresanchez, M. Environmental sound recognition on embedded devices using deep learning: A review. Artif. Intell. Rev. 2025, 58(6), 163. [Google Scholar] [CrossRef]
  11. Mohaimenuzzaman, M.; Bergmeir, C.; West, I.; Meyer, B. Environmental sound classification on the edge: A pipeline for deep acoustic networks on extremely resource-constrained devices. Pattern Recognit. 133 2023, 109025. [Google Scholar] [CrossRef]
  12. Nogueira, A. F. R.; Oliveira, H. S.; Machado, J. J. M.; Tavares, J. M. R. S. Sound classification and processing of urban environments: A systematic literature review. Sensors 2022, 22(22), 8608. [Google Scholar] [CrossRef] [PubMed]
  13. Florentino, A. L.; Diniz, E. L.; Aquino-Jr, P. T. A dataset for environmental sound recognition in embedded systems for autonomous vehicles. Sci. Data 2025, 12(1), 1148. [Google Scholar] [CrossRef] [PubMed]
  14. Park, S.; Ahn, J.; Kim, D.; Cha, H. Duration-aware sound event detection on ultra-low-power sensor devices. ACM Trans. Embed. Comput. Syst. 2025, 24(6), 1–26. [Google Scholar] [CrossRef]
  15. Hajihashemi, V.; Gharahbagh, A. A.; Machado, J. J. M.; Tavares, J. M. R. S. Audio event detection based on cross correlation in selected frequency bands of spectrogram. In Information Systems and Technologies (WorldCIST 2023); Springer, 2024; Volume LNNS 802. [Google Scholar] [CrossRef]
  16. Plenkers, K.; Ritter, J. R. R.; Schindler, M. Low signal-to-noise event detection based on waveform stacking and cross-correlation: Application to a stimulation experiment. J. Seismol. 17 2013, 27–49. [Google Scholar] [CrossRef]
  17. Lewis, J. P. Fast normalized cross-correlation. Proceedings of Vision Interface, 1995; pp. 120–123. [Google Scholar]
  18. Piczak, K. J. ESC: Dataset for environmental sound classification. In Proceedings of the 23rd ACM International Conference on Multimedia, 2015; pp. 1015–1018. [Google Scholar] [CrossRef]
  19. Mondal, S.; Das Barman, A. Deep learning technique based real-time audio event detection experiment in a distributed system architecture. Comput. Electr. Eng. 102 2022, 108252. [Google Scholar] [CrossRef]
  20. Jo, H.-M.; Kim, T.-W.; Kwak, K.-C. Sound source localization using deep learning for human–robot interaction under intelligent robot environments. Electronics 2025, 14(5), 1043. [Google Scholar] [CrossRef]
  21. Boztas, G. Sound source localization for auditory perception of a humanoid robot using deep neural networks. Neural Comput. Appl. 2023, 35(9), 6801–6811. [Google Scholar] [CrossRef]
  22. Ahn, S.; Kim, J.-H.; Heo, J.; Ahn, S.-H. Human–robot and robot–robot sound interaction using a 3-dimensional acoustic ranging (3DAR) in audible and inaudible frequency. Robot. Comput.-Integr. Manuf. 94 2025, 102970. [Google Scholar] [CrossRef]
  23. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9(8), 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  24. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A. N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems 30; 2017; pp. 5998–6008. [Google Scholar]
  25. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; et al. An image is worth 16×16 words: Transformers for image recognition at scale. International Conference on Learning Representations (ICLR 2021), 2021. [Google Scholar] [CrossRef]
  26. Breiman, L. Random forests. Mach. Learn. 2001, 45(1), 5–32. [Google Scholar] [CrossRef]
  27. Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20(3), 273–297. [Google Scholar] [CrossRef]
  28. Kingma, D. P.; Ba, J. Adam: A method for stochastic optimization. International Conference on Learning Representations (ICLR 2015), 2015. [Google Scholar] [CrossRef]
  29. Tutul, R.; Buchem, I.; Jakob, A.; Pinkwart, N. Millisecond-Level Sound Order Classification via Amplitude-Filtered Random Forest for Human-Robot Interaction. 2025 International Conference on Artificial Intelligence, Computer, Data Sciences and Applications (ACDSA), Antalya, Turkiye, 2025; pp. 1–6. [Google Scholar] [CrossRef]
  30. Tutul, R.; Jakob, A.; Buchem, I. A dynamic template adaptation approach for noise-robust sound classification and distance determination in single-channel audio. Int. J. Sci. Technol. Eng. Amp Math. 2025, 5(1), 22–41. [Google Scholar] [CrossRef]
  31. Tutul, R.; Khan, U.; Jakob, A.; Buchem, I. Deep Learning for Real-Time Sound Order Recognition in Human-Robot Interaction (Version 1). arXiv 2026. [Google Scholar] [CrossRef]
  32. Tutul, R. When the Robot Gets It Wrong: Detection Reliability and Player Motivation in a Robot-Hosted Buzzer Quiz Game. Preprints 2026, 2026101921. [Google Scholar] [CrossRef]
Figure 1. The four electronic buzzer buttons used as sound sources: Siren, Laser, Buzzer and Charge.
Figure 1. The four electronic buzzer buttons used as sound sources: Siren, Laser, Buzzer and Charge.
Preprints 240248 g001
Figure 2. (a) Original, trimmed and normalised waveforms of the four buzzer sounds. (b) Siren–Laser mixtures at increasing onset offsets and at zero offset (tie). Source: (a) dissertation Figure 3.2; (b) dissertation Figure 3.3, or slide 29 of the defence deck.
Figure 2. (a) Original, trimmed and normalised waveforms of the four buzzer sounds. (b) Siren–Laser mixtures at increasing onset offsets and at zero offset (tie). Source: (a) dissertation Figure 3.2; (b) dissertation Figure 3.3, or slide 29 of the defence deck.
Preprints 240248 g002
Figure 3. STFT, Mel-spectrogram and MFCC representations of (a) the four single sounds and (b) LaserFirst, SirenFirst and Tie events at 0.05 s offset.
Figure 3. STFT, Mel-spectrogram and MFCC representations of (a) the four single sounds and (b) LaserFirst, SirenFirst and Tie events at 0.05 s offset.
Preprints 240248 g003
Figure 4. Evaluation pipeline: recording, pre-processing, feature extraction, classification by each method and computation of the measures in Table 2.
Figure 4. Evaluation pipeline: recording, pre-processing, feature extraction, classification by each method and computation of the measures in Table 2.
Preprints 240248 g004
Figure 5. Architecture of the CRNN with attention: Mel-spectrogram input (128 × 107 × 1), two convolution and pooling blocks, time-distributed dense layer, LSTM, temporal attention, dense classification head with softmax.
Figure 5. Architecture of the CRNN with attention: Mel-spectrogram input (128 × 107 × 1), two convolution and pooling blocks, time-distributed dense layer, LSTM, temporal attention, dense classification head with softmax.
Preprints 240248 g005
Figure 6. Frequency-domain cross-correlation decision for an overlapping event. The input Mel-spectrogram is correlated with the A-first, Tie and B-first templates. The highest scaled score (0.89, B first) decides the class; the other scores are 0.68 (Tie) and 0.65 (A first).
Figure 6. Frequency-domain cross-correlation decision for an overlapping event. The input Mel-spectrogram is correlated with the A-first, Tie and B-first templates. The highest scaled score (0.89, B first) decides the class; the other scores are 0.68 (Tie) and 0.65 (A first).
Preprints 240248 g006
Figure 7. Accuracy for near-simultaneous events as a function of onset offset (0.05–0.5 s), with and without normalisation: (a) CRNN and Transformer, (b) Random Forest and SVM, (c) cross-correlation.
Figure 7. Accuracy for near-simultaneous events as a function of onset offset (0.05–0.5 s), with and without normalisation: (a) CRNN and Transformer, (b) Random Forest and SVM, (c) cross-correlation.
Preprints 240248 g007
Figure 8. Accuracy under additive Gaussian noise (5–25 dB SNR) for (a) overlapping events and (b) single events.
Figure 8. Accuracy under additive Gaussian noise (5–25 dB SNR) for (a) overlapping events and (b) single events.
Preprints 240248 g008
Figure 9. Accuracy of each method with STFT, Mel-spectrogram, MFCC and fused features.
Figure 9. Accuracy of each method with STFT, Mel-spectrogram, MFCC and fused features.
Preprints 240248 g009
Table 1. Dataset composition.
Table 1. Dataset composition.
Event type Labels Construction Count
Single Siren, Laser, Buzzer, Charge Isolated presses, 150 per buzzer 600
Near-simultaneous SirenFirst, LaserFirst Two presses mixed at Δt = 0.05–0.5 s, both orders 1,800
Simultaneous Tie Two presses mixed at Δt = 0 150
Real recordings LaserFirst, ChargeFirst, Tie Two buzzers pressed by people, natural offsets 200
Table 2. Evaluation measures.
Table 2. Evaluation measures.
Measure Definition Why it matters for first-responder detection
Accuracy (%) Share of correctly classified test events, by event type Basic reliability of the decision
Offset robustness Accuracy at each onset offset from 0.05 to 0.5 s Ability to separate close responses
Noise robustness Accuracy with additive Gaussian noise at 5–25 dB SNR Classroom and room noise
Latency (ms) Mean, model-only and 95th-percentile time from waveform to decision Responsiveness of the host
Transfer Accuracy when trained on synthetic mixtures and tested on real recordings Deployment in new rooms
Feature dependence Accuracy with STFT, Mel, MFCC and fused features Sensitivity to input design
Table 3. Configuration of the five methods.
Table 3. Configuration of the five methods.
Method Key settings Trainable parameters Training data needed
CRNN + attention 2 conv blocks (32, 64 filters), LSTM 64, attention, dense 64–32 189,380 Full labelled training set
Transformer 2 blocks, 8 heads, feed-forward 128, dense 64–32 605,123 Full labelled training set
Random Forest 100 trees, Gini, √n features per split – Full labelled training set
SVM RBF kernel, C = 1.0, γ = scale – Full labelled training set
Cross-correlation Mel templates, time-lag correlation, θ = 0.78 None One template per class
Table 4. Example CC scores for three overlapping test events at 0.3 s offset (scaled by R_ref = 9000; raw scores in parentheses). The highest score in each row is the prediction.
Table 4. Example CC scores for three overlapping test events at 0.3 s offset (scaled by R_ref = 9000; raw scores in parentheses). The highest score in each row is the prediction.
True class LaserFirst SirenFirst Tie
LaserFirst 0.85 (7,611) 0.63 (5,696) 0.73 (6,591)
SirenFirst 0.63 (5,669) 0.97 (8,719) 0.69 (6,203)
Tie 0.70 (6,324) 0.66 (5,956) 0.95 (8,561)
Table 5. Classification accuracy (%) by event type, mean of five runs. Best value per column in bold.
Table 5. Classification accuracy (%) by event type, mean of five runs. Best value per column in bold.
Method Single Near-simultaneous (0.05–0.5 s) Simultaneous (tie) Mean
CRNN + attention 99.8 98.6 55.5 84.4
Transformer 99.7 98.1 84.2 94.0
Random Forest 99.2 99.8 99.1 99.3
SVM (RBF) 97.4 97.4 60.3 85.1
Cross-correlation 97.5 90.7 81.9 90.0
Table 6. Latency in milliseconds. End-to-end covers waveform loading, feature extraction, normalisation and prediction; model-only covers prediction from precomputed features.
Table 6. Latency in milliseconds. End-to-end covers waveform loading, feature extraction, normalisation and prediction; model-only covers prediction from precomputed features.
Method Mean end-to-end Mean model-only 95th percentile end-to-end
CRNN + attention 226.6 204.8 362.9
Transformer 191.7 176.3 372.0
Random Forest 20.3 10.4 33.2
SVM (RBF) 41.9 16.1 55.4
Cross-correlation 23.4 8.8 45.6
Table 7. Accuracy when trained on synthetic mixtures or real recordings and tested on real recordings with natural (uncontrolled) onset offsets.
Table 7. Accuracy when trained on synthetic mixtures or real recordings and tested on real recordings with natural (uncontrolled) onset offsets.
Training → testing CRNN Transformer Random Forest SVM Cross-correlation
Synthetic → real 0.66 0.50 0.64 0.33 0.91
Real → real 0.98 0.94 0.98 0.81 0.95
Table 8. Which method suits which deployment condition, based on Table 5, Table 6 and Table 7 and Figure 7 and Figure 8.
Table 8. Which method suits which deployment condition, based on Table 5, Table 6 and Table 7 and Figure 7 and Figure 8.
Condition Recommended Reason
Labelled recordings from the target room are available Random Forest Highest accuracy on matched data (99.3%) at 20 ms
No training data from the target room; room changes often Cross-correlation Best synthetic-to-real transfer (0.91); a few templates recalibrate it
Strong broadband noise, mostly single presses Cross-correlation About 0.97 on single sounds at 5–25 dB SNR
Heavy noise with many overlapping presses CRNN, if latency allows Best overlapping-event accuracy in noise (0.70–0.76)
Strict latency budget (< 50 ms at the 95th percentile) Random Forest or cross-correlation Only methods below 50 ms at the 95th percentile
Decisions must be explainable to players Cross-correlation Each decision traces to a visible correlation peak
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.