A Mobile Application for Sound Event Detection

Yingwei Fu, Kele Xu, Haibo Mi, Huaimin Wang, Dezhi Wang, Boqing Zhu

Introduction

Sound Event Detection (SED) is the computational task of identifying the presence of specific sounds within an audio stream and determining their temporal boundaries. While early research focused on monophonic detection—where only the dominant sound is identified—real-world environments are inherently polyphonic. In everyday scenarios, sounds like sirens, footsteps, and vehicle engines often overlap, requiring more sophisticated modeling.

State-of-the-art solutions for polyphonic SED typically utilize Convolutional Recurrent Neural Networks (CRNNs). However, these models are often prohibitively large, requiring millions of parameters and significant computational resources, which limits their deployment on mobile and embedded devices. This paper presents a high-performance SED system specifically optimized for Android hardware through a novel multi-model distillation technique.

System Architecture

The proposed system is divided into two primary phases: Offline Training and Online Detection. This separation ensures that the heavy computational load of training complex models is handled by powerful servers, while the mobile device only performs efficient inference.

The system architecture consists of an offline training phase using multi-model distillation and an online detection phase deployed as an Android library.

Multi-Model Distillation

The core innovation lies in the offline training phase. Knowledge distillation typically involves a large "teacher" model guiding a smaller "student" model. In this work, the authors employ multiple complex teacher models—one based on ResNet50 and another on Xception, both integrated with Bi-directional Gated Recurrent Units (Bi-GRU).

By using frame-level predictions from these diverse architectures as supervision, the "Compact CRNN" student model learns to approximate the high-level logic of the larger networks. This approach allows the student to benefit from an ensemble-like knowledge base while maintaining a significantly smaller parameter footprint.

Feature Engineering

To capture the nuances of audio events, the system converts raw audio signals into time-frequency (T-F) features, specifically log-mel band energy. A critical addition is the calculation of "delta features," which represent the rate of change in energy over time. These features provide the model with essential temporal context, helping it distinguish between sounds that may have similar spectral profiles but different temporal evolutions.

Mobile Implementation and User Interface

The optimized compact model is integrated into an Android library for real-time deployment. The application captures audio via the device's microphone, processes it using Fast Fourier Transforms (FFT), and performs inference in 10-second windows.

The SED mobile application interface allows users to start detection, select models, and view statistics.

As shown in the user interface, the application provides a user-friendly way to interact with the SED system. Users can select different models or tasks, view real-time waveforms, and access statistics. Furthermore, the app includes an upload feature, allowing users to contribute labeled data back to a server to facilitate iterative model improvement.

Experimental Evaluation

The models were trained and evaluated using the DCASE 2017 Challenge Task 4 dataset, a subset of Google’s AudioSet. This dataset contains over 51,000 training clips across 17 sound categories, including various warning and vehicle sounds. Audio was re-sampled to 22.05 kHz prior to feature extraction.

Key Results

  • Superior Performance: Surprisingly, the Compact CRNN achieved a Segment-based Instance-based Average (SIA) F1 score of 50.9%, outperforming both the ResNet50 teacher (47.0%) and the Xception teacher (50.6%). This indicates that the distillation process effectively concentrated the strengths of multiple architectures into the student model.
  • Efficiency: The compact model operates with only hundreds of thousands of parameters, a massive reduction from the tens of millions found in standard CRNNs. This enables low-latency inference on standard mobile hardware.
  • Real-Time Capability: The system successfully processes audio and outputs detection results within 10-second windows, making it suitable for near real-time environmental monitoring.

Conclusion and Future Work

This research demonstrates that high-performance polyphonic sound event detection is achievable on mobile devices through strategic model compression. By leveraging multi-model distillation, the authors created a student model that is not only efficient but also more accurate than its complex teachers.

Future work will focus on reducing detection latency for high-stakes applications like hazard warnings and improving robustness against the ambient noise inherent in mobile recording environments. Additionally, the authors plan to implement a feedback loop where user-labeled data from the mobile application is used to iteratively refine the models in diverse real-world settings.

Summary updated

BibTeX
@inproceedings{fu2019mobile,
  author = {Yingwei Fu and Kele Xu and Haibo Mi and Huaimin Wang and Dezhi Wang and Boqing Zhu},
  title = {{A Mobile Application for Sound Event Detection}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/941},
}
Figure