Abstract:Due to the current problem existed in the extraction of vocal recognition features for laying hens relying on domain knowledge, and the single acoustic feature representation ability is insufficient, resulting in limited classification accuracy, a recognition model was proposed based on TFViT-BiLSTM and Wav2Vec2.0. The model performed feature-level fusion by combining the spectrogram features extracted by the time-frequency vision transformer (TFViT) using a multi-head attention mechanism with the Mel-frequency cepstral coefficients processed by a bidirectional long short-term memory network. The fused classification prediction results were then merged with the predictions from the Wav2Vec2.0 model and fed into an XGBoost classifier for decision-level fusion. Specifically, it improved upon the existing ViT model by replacing the standard global self-attention mechanism with a time-frequency attention mechanism, enhancing the model's ability to capture harmonic features of sound. Additionally, a time-frequency convolutional feed-forward network replaced the fully connected multilayer perceptron, effectively capturing the local time-frequency correlations of the spectrogram. The experimental results showed that the constructed model performed excellently on the laying hen audio dataset with a macro accuracy of 97.79%, a macro recall of 97.75%, and a macro F1-score of 0.9778, demonstrating high recognition sensitivity and precision. In the recognition task of three typical types of laying hen vocalizations (screams, laying sounds and distress calls), the model presented differentiated recognition performance for various vocalizations. The model achieved the optimal recognition effect on screams with a precision of 98.38%, a recall of 99.42%, and an F1-score of 0.9884. The recognition performance for laying sounds ranked the second, with a precision of 98.28%, a recall of 98.25%, and an F1-score of 0.9807. Relatively weaker recognition performance was obtained for distress calls, with a precision of 96.71%, a recall of 95.58%, and an F1-score of 0.9643. The research findings can provide effective technical support for the automatic recognition of laying hen vocalizations.