The invention discloses a lightweight abnormal
sound event detection method based on a self-adaptive width self-attention mechanism. The method comprises the following steps: firstly, performing
signal processing on an audio with a
label to obtain a certain time-
frequency characteristic representation of the audio; secondly, the feature representation (generally a vector or a matrix) with the
label is taken as input to be given to the adaptive width self-attention mechanism model, then the adaptive width self-attention mechanism model has a defined
loss function and a randomly initialized attention weight, the loss value of the
label is calculated according to an adaptive self-attention mechanism
algorithm, and the self-adaptive width self-attention mechanism model is used as a self-adaptive width self-attention mechanism model; next, the self-adaptive attention weight is updated by using a
back propagation algorithm, and updating iteration is continuously performed on three input weights of attention until a
loss function reaches a minimum or ideal state; and finally, storing the weight parameter at the moment by using a lightweight method, and predicting a section of unlabeled audio by taking the weight parameter as a model, so as to quickly and accurately detect the abnormal sound event.