Query-by-example on-device keyword spotting

Byeonggeun Kim, Mingu Lee, Jinkyu Lee, Yeonseok Kim, Kyuwoong Hwang

Abstract

Personalized wake-word systems allow users to define custom trigger phrases, but implementing these on-device requires high efficiency and robust thresholding without large negative datasets. This paper introduces a Query-by-Example (QbE) system using a small-footprint CTC-based acoustic model and a Finite-State Transducer (FST) decoder. A novel "shuffled audio" technique is proposed to generate synthetic negative examples for threshold estimation. Experimental results on "Hey Snips" and "Hey Snapdragon" datasets demonstrate that the FST-based approach significantly outperforms traditional template-matching methods like Subsequence Dynamic Time Warping (S-DTW), achieving a 3.22% False Rejection Rate at 0.05 false alarms per hour.

Introduction

Modern voice assistants typically rely on fixed wake-words like "Alexa" or "Hey Siri," which are optimized using massive datasets. However, there is growing demand for personalized wake-words that allow users to choose their own trigger phrases. Query-by-Example (QbE) keyword spotting (KWS) addresses this by using a few user-provided enrollment samples as a reference. To be practical for mobile and IoT devices, such systems must operate entirely on-device to ensure privacy and low latency, while remaining computationally efficient.

Methodology

Acoustic Modeling and Decoding

The system utilizes a small-footprint acoustic model (211k parameters) trained with Connectionist Temporal Classification (CTC) to predict posteriorgrams of 39 phonemes. During enrollment, three spoken examples of the custom keyword are used to construct a phonetic hypothesis graph represented as a Finite-State Transducer (FST). At runtime, the log-likelihood of incoming audio is calculated against this FST to determine a match.

Threshold Prediction via Shuffled Audio

A critical challenge in user-specific KWS is setting an appropriate decision threshold without access to a large database of non-keyword speech (negatives). The authors propose a "shuffled audio" technique to generate synthetic negative examples from the enrollment samples. By dividing the enrollment audio into segments and reordering them, the system creates "garbage" audio that retains the user's vocal characteristics and background noise but lacks the semantic content of the keyword.

The shuffled audio technique generates synthetic negative examples by reordering segments of the enrollment query.

These generated negatives are scored against the FST to estimate the distribution of non-keyword scores, allowing for the mathematical derivation of a robust trigger threshold.

Experimental Results

The proposed FST-based system was evaluated against a Subsequence Dynamic Time Warping (S-DTW) baseline using the "Hey Snips" and "Hey Snapdragon" datasets. Background noise was simulated using 24 hours of audio from the WSJ-SI200 dataset.

Performance comparison (DET curves) between the proposed FST-based method and the S-DTW baseline.

As shown in the performance curves, the FST-based approach consistently achieves lower False Rejection Rates (FRR) across various False Alarm (FA) rates. For the "Hey Snapdragon" keyword, the system reached a 3.22% FRR at a strict FA rate of 0.05 per hour, a significant improvement over the 8.01% FRR observed with the S-DTW baseline. The system also demonstrated robustness in noisy environments (0dB to 10dB SNR) and provided more consistent performance across different users.

Conclusion

The presented QbE KWS system offers a privacy-preserving, on-device solution for personalized wake-words. By leveraging a phonetic FST decoder and a novel synthetic negative generation strategy, the system overcomes the limitations of traditional template matching and the "cold-start" threshold problem. Future work includes extending the acoustic model to support multilingual phoneme sets and exploring more sophisticated segment-shuffling techniques to further enhance thresholding accuracy.

Reference: Kim, B., Lee, M., Lee, J., Kim, Y., & Hwang, K. (2020). Query-by-example on-device keyword spotting. arXiv:1910.05171v3 [cs.LG].

Summary updated

BibTeX
@inproceedings{kim2019query,
  author = {Byeonggeun Kim and Mingu Lee and Jinkyu Lee and Yeonseok Kim and Kyuwoong Hwang},
  title = {{Query-by-example on-device keyword spotting}},
  booktitle = {ASRU},
  year = {2019},
  url = {https://openreview.net/forum?id=Wt5Qa8CASOi},
}
Figure