# A Novel Method for Broiler Abnormal Sound Detection Using WMFCC and HMM

Authors: Longshen Liu; Bo Li; Ruqian Zhao; Wen Yao; Mingxia Shen; Ji Yang
Journal: Journal of Sensors
 (2020)

---

## Abstract

Broilers produce abnormal sounds such as cough and snore when they suffer from respiratory diseases. The aim of this research work was to develop a method for broiler abnormal sound detection. The sounds were recorded in a broiler house for one week (24/7). There were 20 thousand white feather broilers reared on the floor in a building. Results showed that the developed recognition algorithm, using wavelet transform Mel frequency cepstrum coefficients (WMFCCs), correlation distance Fisher criterion (CDF), and hidden Markov model (HMM), provided an average accuracy, precision, recall, and F1 of 93.8%, 94.4%, 94.1%, and 94.2%, respectively, for broiler sound samples. The results indicate that sound analysis can be used in broiler respiratory assessment in a commercial broiler farm.


---

## Body

## 1. Introduction

With the development of large-scale and intensive broiler industry, problems related to stocking density and poor management have emerged, resulting in increased incidences of respiratory diseases such as Newcastle disease, avian influenza, and infectious bronchitis. Broilers will have abnormal sounds such as cough and snore when they have respiratory diseases. Presently, the mode of detection of respiratory diseases in broilers is by manual sound distinction. However, this technique is time-consuming, labor-intensive, subjective, and has a low degree of real-time detection [1]. If respiratory diseases in broilers are detected manually, it will cause failure to detect and deal with the sick chicken in time. Therefore, effective real-time monitoring of abnormal sounds of broiler respiratory tracts has practical application value for early detection of broiler disease conditions, monitoring of broiler health status, and improving broiler productivity.Vocalizations produced by animals contain a wide variety of information about their health, emotion, and behavior [2]. Based on these findings, there were different methods of animal vocalization analysis reported in recent years [3]. For instance, acoustic technology has been used to assess pig sex, age, distress, heat stress [4–6], and piglet stressful conditions [7, 8]; recognize bovine and pig respiratory disease [9–12]; and monitor cattle, goat, and sheep behaviors and feed intake [13–18]. Similar work has been conducted with poultry. Vocalization-based avian influenza disease, respiratory disease, and abnormal night vocalization detection have also been reported in chickens [19, 20]. The short-term feeding behavior detection of broiler chickens based on a real-time sound processing technology has also been achieved [21, 22]. Goose behavior recognition based on vocalizations has also been demonstrated [23]. An advantage to the technology is the prospect of having noninvasive, real-time, quantitative, accurate devices to detect welfare issues at a relatively low cost [10]. Although these studies have shown that animal sound analysis was useful as an early warning tool to detect stress, behaviors, and diseases in some animal species, few studies have been reported on broiler abnormal sound detection in commercial buildings.Numerous audio features and classifiers have been proposed for use in animal vocalization detection and classification [3]. In particular, Mel frequency cepstrum coefficients (MFCCs) with the classifier such as support vector machine (SVM), hidden Markov model (HMM), or deep neural network (DNN) were commonly used features in animal sound recognition [24–27] because of its strong ability in sound distinction and robustness. However, MFCCs only reflected the static characteristics of acoustic signals. The dynamic characteristics of sound could be obtained by differentiating operation of MFCCs. This would produce more dimensional redundant characteristics. Sound feature selection and improvement should be carried out. Therefore, the objectives of this study were to develop an innovative method to detect abnormal broiler sounds for its respiratory assessment.


## 2. Materials and Methods

### 2.1. Acquisition of Sounds

For sound acquisition, four network microphones (HD-B-1001, Youanhong Technology Limited Company, Shenzhen, China) were used to record sounds of broiler. Sounds in the broiler building were recorded in mono at a sampling frequency of 48 kHz. Broiler sounds were sent to a computer over a local area network. The audio files in the .mp3 format were saved in a computer. The interior of the broiler building and system model was shown in Figure1.Figure 1
System structure. (a) Interior of the broiler building; (b) system model.
(a)
(b)The microphones were positioned approximately 80 cm from the building floor. The four microphones’ position in the broiler building was shown in Figure2. The experiment was conducted in a commercial broiler farm located in Gaomi, Shandong Province, China. A group of 20 thousand Ross 308 white feather broilers aged 30 days was used for the experiment for one week starting from March 29, 2019. The body weight of the broilers was about 1.6~2.2 kg. The broilers were reared on the floor in the building of 14mW×108mL (Figure 1). The temperature in the building was controlled at 20~22°C, and the humidity was 46% to 50%. Broilers were fed ad libitum with compound feed provided in hoppers with natural drinks. Feed was added daily at 09:30 and 16:45. The building was illuminated with energy-saving lamps from 00:00 am to 21:00 for about 21 h of lighting daily during the whole experiment. The light intensity was set at 50 lux. The broiler building was ventilated using negative pressure fans during the experiment.Figure 2
Top view of the four microphones’ position in the broiler building. Blue triangles represent the network microphones.


### 2.2. Sound Analysis and Recognition

In this paper, our task is to detect broiler abnormal sound in a commercial broiler building. The main steps of the proposed algorithm are illustrated in Figure3. The detection system is composed of two parts: the model training part and the testing part for broiler abnormal sound detection. The algorithm was established in MATLAB R2014a (The MathWorks, Inc., Natick, MA).Figure 3
Brief flowchart of the broiler sound signal processing and recognition procedure. The red and blue paths denote the model training and sound detection processes.


#### 2.2.1. Sound Sample Preparation

The sound analysis started with sound sample preparation. The abnormal respiratory broilers were assessed by the veterinary medicine professor and animal science & technology professor. The sound samples were detected and extracted manually from the recorded audio files randomly using Audition CS6 (Adobe Systems Inc., USA). The selected sound segments contained broiler cough, snore, and interfering sounds. The interfering sounds included background noises (e.g., room ventilation) and the sound created by broiler activities (e.g., crowing, feeding).Eight thousand one hundred and fifty sound samples, including 2790 broiler cough samples, 2560 snore samples, and 2800 interfering sound, were manually selected from the sound segments. Four-fifths of the samples were used for training model, and the remaining was used for model testing.


#### 2.2.2. Sound Preprocessing

Sound signal preprocessing included framing, filtering, and endpoint detection of the sound samples. The sound samples, which were nonstationary for longer timescales, were then framed by a moving Hamming window to obtain a short-time stationary signal (10~30 ms). Filtering was done to remove the ambient noise from the sound signals to improve the signal-to-noise ratios. This was performed using Spectral Subtraction method with Minimum Mean Square Error (MMSE) [28]. After that, broiler vocal signals from different sound samples were processed with endpoint detection. This was performed based on cepstrum distance.Endpoint detection test was performed using six sound files. The sound segments were preprocessed by framing and filtering. Detection rate (DER) was used to evaluate the accuracy of endpoint detection algorithm with(1)DER=NDN,where N represents the total number of the abovementioned three types of sounds; ND is the number of sound endpoint detected successfully.


#### 2.2.3. Sound Feature Extraction

In this study, Wavelet Transform (WT) replaced the fast Fourier Transform (FFT) in traditional MFCC feature extraction. The 48-dimensional WMFCCs were extracted from a continuous sound signal as follows:(1)
Framed the continuous sound signal by a moving Hamming window into frames of 512 samples with a frameshift of 128 samples
(2)
Took the Wavelet Transform (WT) to convert each frame of samples from the time domain to the wavelet domain
(3)
Converted the wavelet scale of each frame from linear to Mel scale
(4)
Took the logarithm of the powers at the Mel frequencies
(5)
Took the discrete cosine transform (DCT) for the log Mel spectrum
(6)
Kept the 1-16 coefficients as the original 16-dimensional WMFCCs
(7)
Calculated the first-order delta coefficients (ΔWMFCC) and the second-order delta coefficients (Δ2WMFCC)
(8)
Combined the 16-dimensional original coefficients, 16-dimensionalΔWMFCCs, and 16-dimensional Δ2WMFCCs to get the final 48-dimensional WMFCCs for each sound sample


#### 2.2.4. Sound Feature Selection and Improvement

There were some redundancy coefficients in the 48-dimensional WMFCCs. Because the contribution of different characteristic parameters in recognition is also different, dimensionality reduction was applied by selecting the high-contributing coefficients and excluding the low-contributing coefficients. In this study, principal component analysis (PCA) [29] and correlation distance Fisher criterion (CDF) [30] were, respectively, used and compared to calculate the contribution rate of each coefficient. The parameters were ranked in descending order according to the contribution rate. The top 24 dimensional coefficients were selected to use for the following sound classification.For increasing the contribution of the high-contributing coefficients and reducing the influence of the low-contributing coefficients in classification, the weighted WMFCCs were calculated by multiplying each coefficient by its contribution rate after high-contributing WMFCC selection.


### 2.3. Sound Classification Algorithm

Hidden Markov model (HMM) has a strong capability of pattern classification due to its rich mathematical structure and proven accuracy on critical applications. It was widely used in signal recognition and classification [31, 32]. HMM was used to recognize abnormal broiler sound in this study. A complete specification of a HMM requires three sets of probability measures which are represented by λ=A,B,π. According to prior knowledge, the number of sound hidden states N was initialized to five. The state-transition probability matrix A and the initial state probability distribution π were initialized to nonzero numbers randomly. The observation probability matrix B was described by a Gaussian mixture distribution whose number was three. B was initialized by global mean and variance of training data. The output of HMM was the one with the highest output probability of the input sound sample in each model. There are three basic algorithms in HMM, namely, the Forward-Backward algorithm, Viterbi algorithm, and Baum-Welch algorithm. The details of these algorithms have been described by Rabiner [33]. The overall block diagram of the HMM recognition algorithm was shown in Figure 4.Figure 4
Block diagram of the HMM recognition algorithm.The performance of the classification was measured with the accuracy, precision, recall, and F1 measure.(2)Ai=NTPN×100%,(3)Pi=NTPNTP+NFP×100%,(4)Ri=NTPNTP+NFN×100%.In these formulas, the cough and snore classified as cough and snore by the classifier were the true positives (TP), the unclassified cough and snore were the false negatives (FN), the correctly classified other sounds are the true negatives, and the wrongly classified other sounds were the false positives (FP).N was the total number of the ith class samples. Considering appraisal index P and R comprehensively, F1 measure was calculated according to
(5)F1=2PRP+R×100%.


## 2.1. Acquisition of Sounds

For sound acquisition, four network microphones (HD-B-1001, Youanhong Technology Limited Company, Shenzhen, China) were used to record sounds of broiler. Sounds in the broiler building were recorded in mono at a sampling frequency of 48 kHz. Broiler sounds were sent to a computer over a local area network. The audio files in the .mp3 format were saved in a computer. The interior of the broiler building and system model was shown in Figure1.Figure 1
System structure. (a) Interior of the broiler building; (b) system model.
(a)
(b)The microphones were positioned approximately 80 cm from the building floor. The four microphones’ position in the broiler building was shown in Figure2. The experiment was conducted in a commercial broiler farm located in Gaomi, Shandong Province, China. A group of 20 thousand Ross 308 white feather broilers aged 30 days was used for the experiment for one week starting from March 29, 2019. The body weight of the broilers was about 1.6~2.2 kg. The broilers were reared on the floor in the building of 14mW×108mL (Figure 1). The temperature in the building was controlled at 20~22°C, and the humidity was 46% to 50%. Broilers were fed ad libitum with compound feed provided in hoppers with natural drinks. Feed was added daily at 09:30 and 16:45. The building was illuminated with energy-saving lamps from 00:00 am to 21:00 for about 21 h of lighting daily during the whole experiment. The light intensity was set at 50 lux. The broiler building was ventilated using negative pressure fans during the experiment.Figure 2
Top view of the four microphones’ position in the broiler building. Blue triangles represent the network microphones.


## 2.2. Sound Analysis and Recognition

In this paper, our task is to detect broiler abnormal sound in a commercial broiler building. The main steps of the proposed algorithm are illustrated in Figure3. The detection system is composed of two parts: the model training part and the testing part for broiler abnormal sound detection. The algorithm was established in MATLAB R2014a (The MathWorks, Inc., Natick, MA).Figure 3
Brief flowchart of the broiler sound signal processing and recognition procedure. The red and blue paths denote the model training and sound detection processes.


### 2.2.1. Sound Sample Preparation

The sound analysis started with sound sample preparation. The abnormal respiratory broilers were assessed by the veterinary medicine professor and animal science & technology professor. The sound samples were detected and extracted manually from the recorded audio files randomly using Audition CS6 (Adobe Systems Inc., USA). The selected sound segments contained broiler cough, snore, and interfering sounds. The interfering sounds included background noises (e.g., room ventilation) and the sound created by broiler activities (e.g., crowing, feeding).Eight thousand one hundred and fifty sound samples, including 2790 broiler cough samples, 2560 snore samples, and 2800 interfering sound, were manually selected from the sound segments. Four-fifths of the samples were used for training model, and the remaining was used for model testing.


### 2.2.2. Sound Preprocessing

Sound signal preprocessing included framing, filtering, and endpoint detection of the sound samples. The sound samples, which were nonstationary for longer timescales, were then framed by a moving Hamming window to obtain a short-time stationary signal (10~30 ms). Filtering was done to remove the ambient noise from the sound signals to improve the signal-to-noise ratios. This was performed using Spectral Subtraction method with Minimum Mean Square Error (MMSE) [28]. After that, broiler vocal signals from different sound samples were processed with endpoint detection. This was performed based on cepstrum distance.Endpoint detection test was performed using six sound files. The sound segments were preprocessed by framing and filtering. Detection rate (DER) was used to evaluate the accuracy of endpoint detection algorithm with(1)DER=NDN,where N represents the total number of the abovementioned three types of sounds; ND is the number of sound endpoint detected successfully.


### 2.2.3. Sound Feature Extraction

In this study, Wavelet Transform (WT) replaced the fast Fourier Transform (FFT) in traditional MFCC feature extraction. The 48-dimensional WMFCCs were extracted from a continuous sound signal as follows:(1)
Framed the continuous sound signal by a moving Hamming window into frames of 512 samples with a frameshift of 128 samples
(2)
Took the Wavelet Transform (WT) to convert each frame of samples from the time domain to the wavelet domain
(3)
Converted the wavelet scale of each frame from linear to Mel scale
(4)
Took the logarithm of the powers at the Mel frequencies
(5)
Took the discrete cosine transform (DCT) for the log Mel spectrum
(6)
Kept the 1-16 coefficients as the original 16-dimensional WMFCCs
(7)
Calculated the first-order delta coefficients (ΔWMFCC) and the second-order delta coefficients (Δ2WMFCC)
(8)
Combined the 16-dimensional original coefficients, 16-dimensionalΔWMFCCs, and 16-dimensional Δ2WMFCCs to get the final 48-dimensional WMFCCs for each sound sample


### 2.2.4. Sound Feature Selection and Improvement

There were some redundancy coefficients in the 48-dimensional WMFCCs. Because the contribution of different characteristic parameters in recognition is also different, dimensionality reduction was applied by selecting the high-contributing coefficients and excluding the low-contributing coefficients. In this study, principal component analysis (PCA) [29] and correlation distance Fisher criterion (CDF) [30] were, respectively, used and compared to calculate the contribution rate of each coefficient. The parameters were ranked in descending order according to the contribution rate. The top 24 dimensional coefficients were selected to use for the following sound classification.For increasing the contribution of the high-contributing coefficients and reducing the influence of the low-contributing coefficients in classification, the weighted WMFCCs were calculated by multiplying each coefficient by its contribution rate after high-contributing WMFCC selection.


## 2.2.1. Sound Sample Preparation

The sound analysis started with sound sample preparation. The abnormal respiratory broilers were assessed by the veterinary medicine professor and animal science & technology professor. The sound samples were detected and extracted manually from the recorded audio files randomly using Audition CS6 (Adobe Systems Inc., USA). The selected sound segments contained broiler cough, snore, and interfering sounds. The interfering sounds included background noises (e.g., room ventilation) and the sound created by broiler activities (e.g., crowing, feeding).Eight thousand one hundred and fifty sound samples, including 2790 broiler cough samples, 2560 snore samples, and 2800 interfering sound, were manually selected from the sound segments. Four-fifths of the samples were used for training model, and the remaining was used for model testing.


## 2.2.2. Sound Preprocessing

Sound signal preprocessing included framing, filtering, and endpoint detection of the sound samples. The sound samples, which were nonstationary for longer timescales, were then framed by a moving Hamming window to obtain a short-time stationary signal (10~30 ms). Filtering was done to remove the ambient noise from the sound signals to improve the signal-to-noise ratios. This was performed using Spectral Subtraction method with Minimum Mean Square Error (MMSE) [28]. After that, broiler vocal signals from different sound samples were processed with endpoint detection. This was performed based on cepstrum distance.Endpoint detection test was performed using six sound files. The sound segments were preprocessed by framing and filtering. Detection rate (DER) was used to evaluate the accuracy of endpoint detection algorithm with(1)DER=NDN,where N represents the total number of the abovementioned three types of sounds; ND is the number of sound endpoint detected successfully.


## 2.2.3. Sound Feature Extraction

In this study, Wavelet Transform (WT) replaced the fast Fourier Transform (FFT) in traditional MFCC feature extraction. The 48-dimensional WMFCCs were extracted from a continuous sound signal as follows:(1)
Framed the continuous sound signal by a moving Hamming window into frames of 512 samples with a frameshift of 128 samples
(2)
Took the Wavelet Transform (WT) to convert each frame of samples from the time domain to the wavelet domain
(3)
Converted the wavelet scale of each frame from linear to Mel scale
(4)
Took the logarithm of the powers at the Mel frequencies
(5)
Took the discrete cosine transform (DCT) for the log Mel spectrum
(6)
Kept the 1-16 coefficients as the original 16-dimensional WMFCCs
(7)
Calculated the first-order delta coefficients (ΔWMFCC) and the second-order delta coefficients (Δ2WMFCC)
(8)
Combined the 16-dimensional original coefficients, 16-dimensionalΔWMFCCs, and 16-dimensional Δ2WMFCCs to get the final 48-dimensional WMFCCs for each sound sample


## 2.2.4. Sound Feature Selection and Improvement

There were some redundancy coefficients in the 48-dimensional WMFCCs. Because the contribution of different characteristic parameters in recognition is also different, dimensionality reduction was applied by selecting the high-contributing coefficients and excluding the low-contributing coefficients. In this study, principal component analysis (PCA) [29] and correlation distance Fisher criterion (CDF) [30] were, respectively, used and compared to calculate the contribution rate of each coefficient. The parameters were ranked in descending order according to the contribution rate. The top 24 dimensional coefficients were selected to use for the following sound classification.For increasing the contribution of the high-contributing coefficients and reducing the influence of the low-contributing coefficients in classification, the weighted WMFCCs were calculated by multiplying each coefficient by its contribution rate after high-contributing WMFCC selection.


## 2.3. Sound Classification Algorithm

Hidden Markov model (HMM) has a strong capability of pattern classification due to its rich mathematical structure and proven accuracy on critical applications. It was widely used in signal recognition and classification [31, 32]. HMM was used to recognize abnormal broiler sound in this study. A complete specification of a HMM requires three sets of probability measures which are represented by λ=A,B,π. According to prior knowledge, the number of sound hidden states N was initialized to five. The state-transition probability matrix A and the initial state probability distribution π were initialized to nonzero numbers randomly. The observation probability matrix B was described by a Gaussian mixture distribution whose number was three. B was initialized by global mean and variance of training data. The output of HMM was the one with the highest output probability of the input sound sample in each model. There are three basic algorithms in HMM, namely, the Forward-Backward algorithm, Viterbi algorithm, and Baum-Welch algorithm. The details of these algorithms have been described by Rabiner [33]. The overall block diagram of the HMM recognition algorithm was shown in Figure 4.Figure 4
Block diagram of the HMM recognition algorithm.The performance of the classification was measured with the accuracy, precision, recall, and F1 measure.(2)Ai=NTPN×100%,(3)Pi=NTPNTP+NFP×100%,(4)Ri=NTPNTP+NFN×100%.In these formulas, the cough and snore classified as cough and snore by the classifier were the true positives (TP), the unclassified cough and snore were the false negatives (FN), the correctly classified other sounds are the true negatives, and the wrongly classified other sounds were the false positives (FP).N was the total number of the ith class samples. Considering appraisal index P and R comprehensively, F1 measure was calculated according to
(5)F1=2PRP+R×100%.


## 3. Results and Discussion

### 3.1. Endpoint Detection Test

Endpoints of the three types of sound in the six sound files were detected using the algorithm based on cepstrum distance. The detection rate (DER) was calculated based on equation (1). The achieved results are shown in Table 1.Table 1
Test results of endpoint detection.
Sound types
Number of three types of sounds (N)
Number of successful endpoint detection (ND)
Detection rate (DER)
Cough
1265
1248
98.7%
Snore
1315
1283
97.6%
Interfering
6451
6386
99.0%
Total
9031
8917
98.7%As seen from the table, the average detection rate was 98.7%. Test results show that the proposed endpoint detection algorithm performed well. It is also confirmed by other literature the role of the endpoint detection algorithm for MFCC distance in increasing accuracy [34]. The DER of snore was slightly lower than that of others. The reason was probably that the power of snore was lower than that of others.


### 3.2. Sound Characteristic Analysis

The different contribution rates calculated by PCA and CDF of 48 components were shown in Figure5 in sequence. The contribution rate of the first principal component calculated by PCA and CDF was 13.3% and 11.7%, while the contribution rates of the rest were all lower than 10%. According to the selection criteria, the top half coefficients were selected for the following sound classification. The top 24 components calculated by PCA and CDF were named PWMFCCs and CWMFCCs, respectively. The cumulative contribution rate with 93.8% of PWMFCCs was higher than the cumulative rate with 86.4% of CWMFCCs. The PWMFCCs should be selected as the principal wavelet Mel frequency cepstrum coefficients. In this study, PWMFCCs and CWMFCCs were both selected as features for classification performance comparison.Figure 5
Contribution rate calculated by PCA and CDF of 48 components of WMFCCs.The weighted PWMFCCs and CWMFCCs of the three sound samples were calculated by multiplying each coefficient by its contribution rate. The results of PWMFCCs are shown in Figure6.Figure 6
The characteristics of three sound samples of cough, snore, and interfering sound. (a) MFCCs of cough; (b) WMFCCs of cough; (c) PWMFCCs of cough; (d) CWMFCCs of cough; (e) weighted PWMFCCs of cough; (f) weighted CWMFCCs of cough.
(a)
(b)
(c)
(d)
(e)
(f)As can be seen from Figure6, the dimensionality of coefficients after PCA and CDF selection is half of the origin. The surface chart of the CWMFCCs and the weighted CWMFCCs of cough is more rugged than that of the PWMFCCs and the weighted PWMFCCs, respectively. This shows that the discrimination of coefficients selected by CDF is better than that selected by PCA. Other literatures have also confirmed that CDF selection could select the components that were relatively divisible, because it considered not only the contribution of each dimension coefficient but also the correlation between the coefficients of each dimension coefficient [30].


### 3.3. Abnormal Sound Classification and Recognition Algorithm Evaluation

HMM were trained with different input characteristics, which included MFCCs, WMFCCs, PWMFCCs, CWMFCCs, and weighted PWMFCCs. The HMM were trained using 2232 cough, 2048 snore, and 2240 interfering sound samples. The performance of the HMM was tested by 1630 sound samples, including 558 cough, 512 snore, and 560 interfering sound samples. The classification accuracy of the different input characteristics is shown in Table2.Table 2
Classification accuracy of different input characteristics.
Input characteristics
Dimensions
Accuracy (%)
Cough
Snore
Interfering
Average
MFCCs
48
82.9
79.8
81.2
81.3
WMFCCs
48
87.1
86.5
81.3
85.0
PWMFCCs
24
87.8
84.2
86.5
86.2
CWMFCCs
24
91.3
87.9
90.3
89.8
Weighted CWMFCCs
24
96.7
93.3
91.5
93.8The accuracy of classification using WMFCCs as the input characteristics was better than using MFCCs. Using the top 24 dimensional coefficients selected by PCA and CDF as the input characteristics, the average accuracy of classification was higher than using the 48-dimensional mixing coefficients. The classification average accuracy of input CWMFCCs was 3.6% higher than input PWMFCCs, although the cumulative contribution rate of PWMFCCs was higher than CWMFCCs. The reason probably was that the CDF selection took into account the correlation between coefficients. The overall classification accuracy of input weighted CWMFCCs reached 93.8%. Therefore, the HMM of input weighted CWMFCCs worked well for broiler abnormal sound classification.The classification performance of the HMM input weighted CWMFCCs is shown in Table3.Table 3
Classification performance of the HMM input weighted CWMFCCs.
Performance
P (%)
R (%)
F1 (%)
Cough
97.1
93.2
95.1
Snore
95.7
92.6
94.1
Interfering
90.3
96.5
93.3
Average
94.4
94.1
94.2For the HMM input weighted CWMFCCs, the precision, recall, and F1 on average reached 94.4%, 94.1%, and 94.2%, respectively. Other literatures have also used intelligence methodology to diagnose animal disease. Banakar et al. designed an intelligent device to diagnose avian diseases by using data mining methods and Dempster-Shafer evidence theory (D-S) with 91.15% accuracy [19]. Huang et al. developed an avian influenza detection method using MFCC and SVM with an accuracy rate that ranged between 84% and 90% [35]. Wang et al. assessed air quality based on pigs’ cough sound analysis using MFCC and SVM with an accuracy of 95% [25]. The algorithm attained an accuracy of 94.4% which is lower than values reported for algorithms used to detect pig coughs [25]. It indicated that the classification algorithm could be used for broiler abnormal sound classification effectively.The results of the novel method of abnormal sound detection were affected by many factors, such as ambient noise interference, quality of sound samples, and feature extraction algorithm. In this research, fan noise has some effect on sound quality. In addition, the age, body weight, and type of birds may affect the results of the abnormal sound detection. Other literature has investigated that pig vocalization was different according to age, sex, and distress [4]. Future work can also focus on the specific disease detection of different age, body weight, and types of chicken. The present research gives us inspiration that a lot of useful information can be discovered by analyzing the sound of animals. It is of great significance to the poultry farms.


## 3.1. Endpoint Detection Test

Endpoints of the three types of sound in the six sound files were detected using the algorithm based on cepstrum distance. The detection rate (DER) was calculated based on equation (1). The achieved results are shown in Table 1.Table 1
Test results of endpoint detection.
Sound types
Number of three types of sounds (N)
Number of successful endpoint detection (ND)
Detection rate (DER)
Cough
1265
1248
98.7%
Snore
1315
1283
97.6%
Interfering
6451
6386
99.0%
Total
9031
8917
98.7%As seen from the table, the average detection rate was 98.7%. Test results show that the proposed endpoint detection algorithm performed well. It is also confirmed by other literature the role of the endpoint detection algorithm for MFCC distance in increasing accuracy [34]. The DER of snore was slightly lower than that of others. The reason was probably that the power of snore was lower than that of others.


## 3.2. Sound Characteristic Analysis

The different contribution rates calculated by PCA and CDF of 48 components were shown in Figure5 in sequence. The contribution rate of the first principal component calculated by PCA and CDF was 13.3% and 11.7%, while the contribution rates of the rest were all lower than 10%. According to the selection criteria, the top half coefficients were selected for the following sound classification. The top 24 components calculated by PCA and CDF were named PWMFCCs and CWMFCCs, respectively. The cumulative contribution rate with 93.8% of PWMFCCs was higher than the cumulative rate with 86.4% of CWMFCCs. The PWMFCCs should be selected as the principal wavelet Mel frequency cepstrum coefficients. In this study, PWMFCCs and CWMFCCs were both selected as features for classification performance comparison.Figure 5
Contribution rate calculated by PCA and CDF of 48 components of WMFCCs.The weighted PWMFCCs and CWMFCCs of the three sound samples were calculated by multiplying each coefficient by its contribution rate. The results of PWMFCCs are shown in Figure6.Figure 6
The characteristics of three sound samples of cough, snore, and interfering sound. (a) MFCCs of cough; (b) WMFCCs of cough; (c) PWMFCCs of cough; (d) CWMFCCs of cough; (e) weighted PWMFCCs of cough; (f) weighted CWMFCCs of cough.
(a)
(b)
(c)
(d)
(e)
(f)As can be seen from Figure6, the dimensionality of coefficients after PCA and CDF selection is half of the origin. The surface chart of the CWMFCCs and the weighted CWMFCCs of cough is more rugged than that of the PWMFCCs and the weighted PWMFCCs, respectively. This shows that the discrimination of coefficients selected by CDF is better than that selected by PCA. Other literatures have also confirmed that CDF selection could select the components that were relatively divisible, because it considered not only the contribution of each dimension coefficient but also the correlation between the coefficients of each dimension coefficient [30].


## 3.3. Abnormal Sound Classification and Recognition Algorithm Evaluation

HMM were trained with different input characteristics, which included MFCCs, WMFCCs, PWMFCCs, CWMFCCs, and weighted PWMFCCs. The HMM were trained using 2232 cough, 2048 snore, and 2240 interfering sound samples. The performance of the HMM was tested by 1630 sound samples, including 558 cough, 512 snore, and 560 interfering sound samples. The classification accuracy of the different input characteristics is shown in Table2.Table 2
Classification accuracy of different input characteristics.
Input characteristics
Dimensions
Accuracy (%)
Cough
Snore
Interfering
Average
MFCCs
48
82.9
79.8
81.2
81.3
WMFCCs
48
87.1
86.5
81.3
85.0
PWMFCCs
24
87.8
84.2
86.5
86.2
CWMFCCs
24
91.3
87.9
90.3
89.8
Weighted CWMFCCs
24
96.7
93.3
91.5
93.8The accuracy of classification using WMFCCs as the input characteristics was better than using MFCCs. Using the top 24 dimensional coefficients selected by PCA and CDF as the input characteristics, the average accuracy of classification was higher than using the 48-dimensional mixing coefficients. The classification average accuracy of input CWMFCCs was 3.6% higher than input PWMFCCs, although the cumulative contribution rate of PWMFCCs was higher than CWMFCCs. The reason probably was that the CDF selection took into account the correlation between coefficients. The overall classification accuracy of input weighted CWMFCCs reached 93.8%. Therefore, the HMM of input weighted CWMFCCs worked well for broiler abnormal sound classification.The classification performance of the HMM input weighted CWMFCCs is shown in Table3.Table 3
Classification performance of the HMM input weighted CWMFCCs.
Performance
P (%)
R (%)
F1 (%)
Cough
97.1
93.2
95.1
Snore
95.7
92.6
94.1
Interfering
90.3
96.5
93.3
Average
94.4
94.1
94.2For the HMM input weighted CWMFCCs, the precision, recall, and F1 on average reached 94.4%, 94.1%, and 94.2%, respectively. Other literatures have also used intelligence methodology to diagnose animal disease. Banakar et al. designed an intelligent device to diagnose avian diseases by using data mining methods and Dempster-Shafer evidence theory (D-S) with 91.15% accuracy [19]. Huang et al. developed an avian influenza detection method using MFCC and SVM with an accuracy rate that ranged between 84% and 90% [35]. Wang et al. assessed air quality based on pigs’ cough sound analysis using MFCC and SVM with an accuracy of 95% [25]. The algorithm attained an accuracy of 94.4% which is lower than values reported for algorithms used to detect pig coughs [25]. It indicated that the classification algorithm could be used for broiler abnormal sound classification effectively.The results of the novel method of abnormal sound detection were affected by many factors, such as ambient noise interference, quality of sound samples, and feature extraction algorithm. In this research, fan noise has some effect on sound quality. In addition, the age, body weight, and type of birds may affect the results of the abnormal sound detection. Other literature has investigated that pig vocalization was different according to age, sex, and distress [4]. Future work can also focus on the specific disease detection of different age, body weight, and types of chicken. The present research gives us inspiration that a lot of useful information can be discovered by analyzing the sound of animals. It is of great significance to the poultry farms.


## 4. Conclusions

This paper proposed a novel method to automatically detect broiler abnormal sounds based on a combination of WMFCC and HMM. Three types of sound of broilers were selected for detection including cough, snore, and interfering sounds. HMM were trained and compared with different input characteristics, which included MFCCs, WMFCCs, PWMFCCs, CWMFCCs, and weighted PWMFCCs. The results show that the algorithm could effectively identify broiler abnormal sounds. The classification accuracy, precision, recall, and F1 on average of HMM input weighted CWMFCCs reached 93.8%, 94.4%, 94.1%, and 94.2%, respectively. Therefore, the HMM of input weighted CWMFCCs worked well for broiler abnormal sound classification. Further studies will be the detection of specific disease of different age, body weight, and types of chicken.



---

*Source: 2985478-2020-01-13.xml*