# AI-Based Classification of Pediatric Breath Sounds: Toward a Tool for Early Respiratory Screening
## 3 Breath Sound Detection  
Over the past two decades, audio signal processing technology has advanced significantly, driven by growing demands. Breath sound recognition applications have emerged across fields like medical diagnostics, pediatric care, and health monitoring. This section presents modified signal processing algorithms designed for breath sound analysis [46]. The  
Figure 4: Group breath sound analysis. (**upper**) Time-domain waveform. (**middle**) Frequency spectrum. (**lower**) Spectrogram.  
Figure 3: Asthma breath sound analysis. (**upper**) Time-domain waveform. (**middle**) Frequency spectrum. (**lower**) Spectrogram.  
first step in classification is detection and segmentation. To detect breath sounds efficiently and accurately, short-time magnitude and short-time energy methods are applied.  
Short-Time Energy and Magnitude Signals  
A breath signal refers to the sound waveform spanning from the start point to the end point of a breath sound segment. Breath and silent segments differ in their short-time characteristics, with the most notable being short-time energy (STE): breath segments exhibit higher STE, while silent segments show lower STE. This distinction allows STE to be used for identifying the boundary points of each breath segment. STE is calculated as the average of the squared sample values within a defined window and is mathematically expressed as [46]  
\[E(n)=\frac{1}{N}\sum_{m=1}^{n-1}[w(m)x(n-m)], \tag{1}\]  
in this context, \(w(m)\) denotes the window coefficient corresponding to the signal sample, where \(m\) is the window index, \(n\) is the sample index, and \(N\) represents the window length.  
Since all breath recordings are down-sampled from 44.1 kHz to 7350 Hz, the window length \(N\) is chosen as 128, covering a 17.4 ms segment of the signal. For each frame, the average energy of the short-time signal is computed. Different window types result in varying STE amplitude levels. The detailed experimental results are provided in Section 6.  
To precisely identify the boundaries of a breath segment, setting an appropriate threshold is essential. STE amplitude values are normalized between 0 and 1 by dividing by the maximum STE value across the entire recording. To remove silent artifacts from low STE and eliminate short high-energy impulse noise, two specific thresholds are defined to detect breath period boundaries. These conditions are as follows:  
1. Normalized \(STE>\) 0.015.
2. Interval between start point and end point of a breath period \(>\) 0.14 s.  
The start and end points of each breath segment are detected using a normalized STE threshold, while an interval time threshold helps to eliminate false breath periods that are too brief. Short-time magnitude, a common time-domain feature for audio signals, measures signal strength in real time and is also well-suited for detecting breath sounds. A simple way to compute the short-time magnitude is to apply a sliding window over the signal and calculate the magnitude within that window. The magnitude of the signal \(x(n)\) is defined as follows [46]:  
\[M_{n}=\sum_{m=-\infty}^{\infty}\|x[m]|w[n-m]\|, \tag{2}\]  
where \(w(m)\) is the window coefficient corresponding with the signal sample.