  Customizable keyword spotting (KWS) in continuous speech has attracted
increasing attention due to its real-world application potential. While
contrastive learning (CL) has been widely used to extract keyword
representations, previous CL approaches all operate on pre-segmented isolated
words and employ only audio-text representations matching strategy. However,
for KWS in continuous speech, co-articulation and streaming word segmentation
can easily yield similar audio patterns for different texts, which may
consequently trigger false alarms. To address this issue, we propose a novel CL
with Audio Discrimination (CLAD) approach to learning keyword representation
with both audio-text matching and audio-audio discrimination ability. Here, an
InfoNCE loss considering both audio-audio and audio-text CL data pairs is
employed for each sliding window during training. Evaluations on the
open-source LibriPhrase dataset show that the use of sliding-window level
InfoNCE loss yields comparable performance compared to previous CL approaches.
Furthermore, experiments on the continuous speech dataset LibriSpeech
demonstrate that, by incorporating audio discrimination, CLAD achieves
significant performance gain over CL without audio discrimination. Meanwhile,
compared to two-stage KWS approaches, the end-to-end KWS with CLAD achieves not
only better performance, but also significant speed-up.
