A sliding window processing method for abnormal speech slice recognition
By introducing dynamic adjustment mechanism, overlapping strategy and boundary processing strategy into the sliding window processing method, the recognition accuracy problem of traditional sliding window method when dealing with abnormal speech slices is solved, and more efficient signal details capture and recognition effect is achieved.
Patent Information
- Application Number
- CN202411822726.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
When traditional sliding window method handles abnormal or irregular voice slices, it is difficult to accurately capture signal details, resulting in a decrease in recognition accuracy.
The dynamic adjustment mechanism, overlapping strategy and boundary processing strategy are adopted to adaptively adjust the size and step size of the sliding window, optimize the overlap of the sliding window, and smooth the sliding window boundary and edge data expansion.
It effectively reduces the generation of redundant data, improves the accuracy of signal details capture and recognition accuracy, and significantly improves the recognition effect of abnormal voice slices.
Smart Images

Figure CN119785833A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of sliding window adjustment technology, and more specifically, relates to a sliding window processing method for abnormal speech slice recognition. Background Art
[0002] In the field of speech signal processing and speech recognition, how to accurately slice speech signals and process their boundaries, especially in abnormal or irregular speech slices, is a long-standing technical problem. Traditional speech slicing methods, such as fixed-size sliding window processing, often have difficulty coping with abnormal situations such as rapid changes, background noise, speech pauses, etc. in actual speech signals, which leads to a decrease in recognition accuracy.
[0003] Traditional sliding window methods usually use a fixed-size sliding window to segment the signal. However, actual speech signals often have complex changing characteristics. In areas where speech signals change dramatically (such as emotional fluctuations, fast speech speed, noise interference, etc.) or where background noise is large, a fixed-size sliding window may miss important features or fail to accurately capture the details of the signal; while in areas where the signal is stable or silent, a fixed-size sliding window may cause redundancy, resulting in a waste of computing resources. Summary of the invention
[0004] The present invention provides a sliding window processing method for abnormal speech slice recognition, which is intended to solve the technical problem that the current sliding window method uses a sliding window of a fixed size to segment the signal, resulting in the sliding window causing redundancy or failing to accurately capture signal details.
[0005] A sliding window processing method for abnormal speech slice recognition, including a sliding window dynamic adjustment mechanism, a sliding window overlapping strategy and a sliding window boundary processing strategy;
[0006] The dynamic adjustment mechanism of the sliding window includes adaptive adjustment of the sliding window size and adaptive adjustment of the sliding window step length; wherein the sliding window size is adaptively adjusted to increase the sliding window size in areas where the signal changes drastically or the background noise is large, and to decrease the sliding window size in areas where the signal is stable or silent;
[0007] The adaptive adjustment of the sliding window step size is to adjust the step size based on the change rate of the signal and the energy threshold;
[0008] The sliding window overlap strategy is to adjust the overlap degree based on the voice quality;
[0009] The sliding window boundary processing: performing smoothing processing and edge data expansion processing on the sliding window boundary.
[0010] The present invention effectively solves the problems of redundancy and inaccurate capture of signal details caused by fixed-size sliding windows in traditional sliding window methods by introducing dynamic adjustment mechanisms, overlapping strategies and boundary processing strategies. Specifically, the dynamic adjustment mechanism of the sliding window allows the sliding window size and step size to be adaptively adjusted according to the change of the signal. In areas where the signal changes drastically or the background noise is large, the sliding window size is adaptively increased to ensure that more signal details are captured; while in areas where the signal is stable or silent, the sliding window size is adaptively reduced, thereby reducing the generation of redundant data. In addition, the adaptive adjustment of the sliding window step size is based on the change rate and energy threshold of the signal, which further improves the flexibility and accuracy of the processing. The overlapping strategy adjusts the overlap of the sliding window to ensure that important information can be better captured when the voice quality is high. Finally, the smoothing of the sliding window boundary and the edge data expansion processing further improve the accuracy and stability of signal processing. In summary, the technical solution significantly improves the effect of abnormal voice slice recognition through multi-dimensional optimization, and provides strong support for research and application in related fields.
[0011] Preferably, the adaptive adjustment of the sliding window size comprises the following steps:
[0012] Signal energy change rate: Calculate the energy of the current frame and compare it with the energy of the previous frame to get the change rate:
[0013]
[0014] Where: E(t) represents the signal energy at time point t; x(t+i) represents the amplitude of the signal at time t+i; N represents the length of the sliding window, which is a fixed value initially set and will be adjusted later according to the signal energy change rate;
[0015]
[0016] Where: EVR(t) represents the energy change rate at time t; Δt is the time interval between the previous and next frames;
[0017] Spectrum variation calculation:
[0018]
[0019] Where: S(f, t) represents the spectrum value of frequency f at time t; M represents the frequency resolution of the spectrum; Δt represents the time interval between the previous and next frames;
[0020] Local speech rate calculation:
[0021]
[0022] Where: V(t) represents the speech rate at time t; Δt represents the duration of the current frame; N represents the length of the sliding window;
[0023] Adaptive sliding window size:
[0024] W adjust =W EVR EVR(t)+W SVD SVD(t)+W V V(t);
[0025] Where: WE VR , W SVD and W V Both represent weighting factors;
[0026] ΔW(t)=W adjust W0;
[0027] Where: W0 represents the default sliding window size; ΔW(t) represents the adjusted sliding window size.
[0028] Preferably, when dynamically adjusting the sliding window size, the final sliding window size is obtained by setting the sliding window size limit and smoothing:
[0029] W(t)=min(max(ΔW(t),W min ), W max );
[0030] Where: W min Indicates the minimum value of the sliding window size; W max Indicates the maximum value of the sliding window size; if the adjusted sliding window size exceeds the maximum or minimum value, the maximum or minimum value is used as the boundary value, and the sliding window size adopts the boundary value; if it does not exceed, the calculated sliding window size is adopted;
[0031] Smoothing the sliding window size:
[0032] W smoothed (t) = α·W(t) + (1-α)·W smoothed (t-1);
[0033] Where: W smoothed (t) is the sliding window size after smoothing, which is used as the final sliding window size; α is the smoothing coefficient, which ranges from 0.1 to 0.3.
[0034] Preferably, the calculation method of the adaptive adjustment of the sliding window step size is as follows:
[0035]
[0036] Where: L is the sliding window step size at the current moment; L baseis the default step size; E n Represents the energy characteristics of the nth sliding window; E th represents the energy threshold; α represents the adjustment coefficient related to energy 0≤α≤1; V represents the speech rate; V th represents the speech rate threshold; β represents the adjustment coefficient related to the speech rate, 0≤β≤1;
[0037] Step size limit:
[0038] L = min(max(L, L min ), L max );
[0039] Where: L min Indicates the minimum step length; L max Indicates the maximum step length; the step length is limited to this range through the minimum step length and the maximum step length. If it exceeds the range, the adjacent boundary is used as the step length;
[0040] The formula for calculating speech speed is as follows:
[0041]
[0042] Where: Δt represents the speech frame interval between adjacent sliding windows.
[0043] Preferably, the energy feature is obtained based on short-time Fourier transform, and the specific steps are as follows:
[0044] Divide the signal: divide the signal into multiple small segments based on the Hanning window;
[0045] Perform Fourier transform on each window after segmentation: Perform Fourier transform on each segment of signal x(t) to obtain the spectrum within the window at that moment:
[0046]
[0047] Where: X(f, t) is the time-frequency spectrum, which represents the amplitude of the signal at frequency f and time t; x[n] represents the signal sequence; w[nt] represents the window function; e- j2πfn represents a complex exponential function, which is used to represent frequency components; f represents frequency; t represents time;
[0048] Calculate the energy spectrum: Calculate the energy for each frequency band f:
[0049] E n (f) = |X(f, t)| 2 ;
[0050] Where: |X(f, t)| 2 It represents the square of the amplitude of the spectrum, indicating the energy of the frequency component;
[0051] Total energy calculation: For each sliding window, calculate the total energy of all frequencies within the sliding window:
[0052] E n =∑ f |X(f,t)| 2 ;
[0053] Where: E n Represents the energy characteristics of sliding window n, which represents the total energy of the signal in the sliding window.
[0054] Preferably, the formula for adjusting the overlap based on voice quality is as follows:
[0055]
[0056] Where: O is the current overlap, a ratio between 0 and 1; O high Indicates high overlap, and the value is any value between 0.6-0.75; O low represents the overlap degree, which can be any value between 0.25 and 0.5; E represents the energy characteristic of the current time window; E threshold is the set energy threshold.
[0057] Preferably, the specific steps of the sliding window boundary processing are as follows:
[0058] Dynamic weighting factor setting: Based on the energy characteristics of the current sliding window, a dynamic weighting factor is introduced. The dynamic weighted chair is adjusted according to the position and energy characteristics of the sliding window:
[0059]
[0060] Where: W d (n) represents the dynamic weighting factor of the nth sliding window; E n Represents the energy characteristics of the nth sliding window; n mid Indicates the middle position of the sliding window; N half Indicates the general size of the sliding window; γ indicates the adjustment coefficient, which is between 0 and 1;
[0061] Sliding window weighting: Weight the sliding window based on a dynamic weighting factor:
[0062] w d (n) = W d (n) ·w default (n);
[0063] Where: w default (n) is the standard weighting function when the Hanning window is applied to the non-boundary region;
[0064] Boundary extension: Define the boundary extension area as the L before and after the sliding windowextend When the sliding window approaches the boundary of the signal, the spectrum change rate in the boundary area is first calculated, and different expansion strategies are selected according to the rate:
[0065]
[0066] Where: X(k) represents the spectrum coefficient of the kth frequency point; M represents the number of spectrum points in the front part of the boundary area; P represents the total number of spectrum points in the sliding window;
[0067] According to the calculated spectrum change rate R boundary , choose different expansion methods:
[0068] If the spectrum change rate R boundary If the spectrum change rate threshold is less than or equal to the spectrum change rate threshold, the symmetric expansion strategy is used to expand the amplitude of the boundary symmetry to the front and back L extend sampling points;
[0069] If the spectrum change rate R boundary If the rate of change is greater than the spectrum change rate threshold, a weighted expansion strategy is used to determine the expansion area based on the spectrum change rate as follows:
[0070]
[0071] Where: x(n) represents the value of the original signal at the nth sampling point; N represents the total number of sampling points of the sliding window, which represents the effective part of the signal; L extend Indicates the number of sampling points for boundary extension, indicating the number of points that need to be extended before and after the signal boundary; w extend (n) represents an extended weight factor dynamically adjusted according to the spectrum characteristics, which is used to weight the signal in the extended area;
[0072]
[0073] Where: α represents the adjustment coefficient; R max Indicates the maximum spectrum change rate.
[0074] The beneficial effects of the present invention include:
[0075] The present invention effectively solves the problems of redundancy and inaccurate capture of signal details caused by fixed-size sliding windows in traditional sliding window methods by introducing dynamic adjustment mechanisms, overlapping strategies and boundary processing strategies. Specifically, the dynamic adjustment mechanism of the sliding window allows the sliding window size and step size to be adaptively adjusted according to the change of the signal. In areas where the signal changes drastically or the background noise is large, the sliding window size is adaptively increased to ensure that more signal details are captured; while in areas where the signal is stable or silent, the sliding window size is adaptively reduced, thereby reducing the generation of redundant data. In addition, the adaptive adjustment of the sliding window step size is based on the change rate and energy threshold of the signal, which further improves the flexibility and accuracy of the processing. The overlapping strategy adjusts the overlap of the sliding window to ensure that important information can be better captured when the voice quality is high. Finally, the smoothing of the sliding window boundary and the edge data expansion processing further improve the accuracy and stability of signal processing. In summary, the technical solution significantly improves the effect of abnormal voice slice recognition through multi-dimensional optimization, and provides strong support for research and application in related fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0077] Figure 1 An overall step block diagram provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0078] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0079] See also Figure 1 As shown, the best embodiment of the present invention is further described;
[0080] A sliding window processing method for abnormal speech slice recognition, including a sliding window dynamic adjustment mechanism, a sliding window overlapping strategy and a sliding window boundary processing strategy;
[0081] The dynamic adjustment mechanism of the sliding window includes adaptive adjustment of the sliding window size and adaptive adjustment of the sliding window step length; wherein the sliding window size is adaptively adjusted to increase the sliding window size in areas where the signal changes drastically or the background noise is large, and to decrease the sliding window size in areas where the signal is stable or silent;
[0082] The adaptive adjustment of the sliding window step size is to adjust the step size based on the change rate of the signal and the energy threshold;
[0083] The sliding window overlap strategy is to adjust the overlap degree based on the voice quality;
[0084] The sliding window boundary processing: performing smoothing processing and edge data expansion processing on the sliding window boundary.
[0085] As a possible implementation manner of this embodiment, the adaptive adjustment of the sliding window size includes the following steps:
[0086] Signal energy change rate: Calculate the energy of the current frame and compare it with the energy of the previous frame to get the change rate:
[0087]
[0088] Where: E(t) represents the signal energy at time point t; x(t+i) represents the amplitude of the signal at time t+i; N represents the length of the sliding window, which is a fixed value initially set and will be adjusted later according to the signal energy change rate;
[0089]
[0090] Where: EVR(t) represents the energy change rate at time t; Δt is the time interval between the previous and next frames;
[0091] Spectrum variation calculation:
[0092]
[0093] Where: S(f, t) represents the spectrum value of frequency f at time t; M represents the frequency resolution of the spectrum; Δt represents the time interval between the previous and next frames;
[0094] Local speech rate calculation:
[0095]
[0096] Where: V(t) represents the speech rate at time t; Δt represents the duration of the current frame; N represents the length of the sliding window;
[0097] Adaptive sliding window size:
[0098] W adjust =W EVR EVR(t)+W SVD SVD(t)+W V V(t);
[0099] Where: W EVR , W SVDand W V Both represent weighting factors;
[0100] ΔW(t)=W adjust W0;
[0101] Where: W0 represents the default sliding window size; ΔW(t) represents the adjusted sliding window size.
[0102] As a possible implementation of this embodiment, when dynamically adjusting the sliding window size, the final sliding window size is obtained by setting a sliding window size limit and smoothing:
[0103] W(t)=min(max(ΔW(t),W min ), W max );
[0104] Where: W min Indicates the minimum value of the sliding window size; W max Indicates the maximum value of the sliding window size; if the adjusted sliding window size exceeds the maximum or minimum value, the maximum or minimum value is used as the boundary value, and the sliding window size adopts the boundary value; if it does not exceed, the calculated sliding window size is adopted;
[0105] Smoothing the sliding window size:
[0106] W smoothed (t) = α·W(t) + (1-α)·W smoothed (t-1);
[0107] Where: W smoothed (t) is the sliding window size after smoothing, which is used as the final sliding window size; α is the smoothing coefficient, which ranges from 0.1 to 0.3.
[0108] As a possible implementation of this embodiment, the calculation method of the adaptive adjustment of the sliding window step size is as follows:
[0109]
[0110] Where: L is the sliding window step size at the current moment; L base is the default step size; E n Represents the energy characteristics of the nth sliding window; E th represents the energy threshold; α represents the adjustment coefficient related to energy 0≤α≤1; V represents the speech rate; V th represents the speech rate threshold; β represents the adjustment coefficient related to the speech rate, 0≤β≤1;
[0111] Step size limit:
[0112] L = min(max(L, L min ), Lmax );
[0113] Where: L min Indicates the minimum step length; L max Indicates the maximum step length; the step length is limited to this range through the minimum step length and the maximum step length. If it exceeds the range, the adjacent boundary is used as the step length;
[0114] The formula for calculating speech speed is as follows:
[0115]
[0116] Where: Δt represents the speech frame interval between adjacent sliding windows.
[0117] As a possible implementation of this embodiment, the energy feature is obtained based on short-time Fourier transform, and the specific steps are as follows:
[0118] Divide the signal: divide the signal into multiple small segments based on the Hanning window;
[0119] Perform Fourier transform on each window after segmentation: Perform Fourier transform on each segment of signal x(t) to obtain the spectrum within the window at that moment:
[0120]
[0121] Where: X(f, t) is the time-frequency spectrum, which represents the amplitude of the signal at frequency f and time t; x[n] represents the signal sequence; w[nt] represents the window function; e -j2πfn represents a complex exponential function, which is used to represent frequency components; f represents frequency; t represents time;
[0122] Calculate the energy spectrum: Calculate the energy for each frequency band f:
[0123] E n (f) = |X(f, t)| 2 ;
[0124] Where: |X(f, t)| 2 It represents the square of the amplitude of the spectrum, indicating the energy of the frequency component;
[0125] Total energy calculation: For each sliding window, calculate the total energy of all frequencies within the sliding window:
[0126] E n =∑ f |X(f,t)| 2 ;
[0127] Where: E n Represents the energy characteristics of sliding window n, which represents the total energy of the signal in the sliding window.
[0128] As a possible implementation of this embodiment, the formula for adjusting the overlap based on speech quality is as follows:
[0129]
[0130] Where: O is the current overlap, a ratio between 0 and 1; O high Indicates high overlap, and the value is any value between 0.6-0.75; O low Indicates low overlap, and its value is any value between 0.25 and 0.5; E represents the energy characteristic of the current time window; E threshold is the set energy threshold.
[0131] As a possible implementation of this embodiment, the specific steps of the sliding window boundary processing are as follows:
[0132] Dynamic weighting factor setting: Based on the energy characteristics of the current sliding window, a dynamic weighting factor is introduced. The dynamic weighted chair is adjusted according to the position and energy characteristics of the sliding window:
[0133]
[0134] Where: W d (n) represents the dynamic weighting factor of the nth sliding window; E n Represents the energy characteristics of the nth sliding window; n mid Indicates the middle position of the sliding window; N half Indicates the general size of the sliding window; γ indicates the adjustment coefficient, which is between 0 and 1;
[0135] Sliding window weighting: Weight the sliding window based on a dynamic weighting factor:
[0136] w d (n) = W d (n) ·w default (n);
[0137] Where: w default (n) is the standard weighting function when the Hanning window is applied to the non-boundary region;
[0138] Boundary extension: Define the boundary extension area as the L before and after the sliding window extend When the sliding window approaches the boundary of the signal, the spectrum change rate in the boundary area is first calculated, and different expansion strategies are selected according to the rate:
[0139]
[0140] Where: X(k) represents the spectrum coefficient of the kth frequency point; M represents the number of spectrum points in the front part of the boundary area; P represents the total number of spectrum points in the sliding window;
[0141] According to the calculated spectrum change rate R boundary , choose different expansion methods:
[0142] If the spectrum change rate R boundary If the spectrum change rate threshold is less than or equal to the spectrum change rate threshold, the symmetric expansion strategy is used to expand the amplitude of the boundary symmetry to the front and back L extend sampling points;
[0143] If the spectrum change rate R boundary If the rate of change is greater than the spectrum change rate threshold, a weighted expansion strategy is used to determine the expansion area based on the spectrum change rate as follows:
[0144]
[0145] Where: x(n) represents the value of the original signal at the nth sampling point; N represents the total number of sampling points of the sliding window, which represents the effective part of the signal; L extend Indicates the number of sampling points for boundary extension, indicating the number of points that need to be extended before and after the signal boundary; w extend (n) represents an extended weight factor dynamically adjusted according to the spectrum characteristics, which is used to weight the signal in the extended area;
[0146]
[0147] Where: α represents the adjustment coefficient; R max Indicates the maximum spectrum change rate.
[0148] In this embodiment, first, the adaptive adjustment of the sliding window size dynamically adjusts the sliding window size by calculating the signal energy change rate, spectrum change degree and speech speed and other features, combined with weighting coefficients (such as energy change rate EVR, spectrum change degree SVD and speech speed V). In this way, in areas where the signal changes drastically or the background noise is large, the sliding window size is adaptively increased to ensure that sufficient information is captured; while in areas where the signal is relatively stable, the sliding window size is reduced to effectively reduce redundancy.
[0149] Secondly, the adaptive adjustment of the sliding window step size is based on the energy characteristics of the signal and the change in speech speed. The step size is adjusted so that a smaller step size is used in areas with greater speech changes to ensure that more detailed speech information is captured; while a larger step size is used in areas with less speech changes to improve processing efficiency. In addition, the step size is also limited by the set maximum and minimum values to avoid the step size being too large or too small to affect the processing effect.
[0150] Furthermore, the sliding window overlap strategy dynamically adjusts the overlap degree according to the energy characteristics of the speech. When the signal energy is high, the overlap degree is large to ensure the continuity and integrity of the information; while in the area with lower energy, a smaller overlap degree is used to reduce redundant calculations.
[0151] Finally, dynamic weighting factors and boundary expansion strategies are introduced for the processing of sliding window boundaries. For sliding windows close to the signal boundary, a smooth boundary weighting and expansion strategy is adopted to avoid inaccurate recognition caused by sudden changes in the signal at the boundary. By calculating the spectrum change rate, symmetric expansion or weighted expansion is selected to ensure smooth boundary processing and signal integrity.
[0152] In summary, this method solves the technical difficulties of the traditional sliding window method in capturing signal details, reducing redundancy, and improving recognition accuracy through flexible adaptive adjustment and fine boundary processing, and improves the recognition performance of abnormal speech slices.
[0153] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A sliding window processing method for abnormal speech slice recognition, characterized in that: Including the dynamic adjustment mechanism of sliding window, sliding window overlapping strategy and sliding window boundary processing strategy; The dynamic adjustment mechanism of the sliding window includes adaptive adjustment of the sliding window size and adaptive adjustment of the sliding window step length; wherein the sliding window size is adaptively adjusted to increase the sliding window size in areas where the signal changes drastically or the background noise is large, and to decrease the sliding window size in areas where the signal is stable or silent; The adaptive adjustment of the sliding window step size is to adjust the step size based on the change rate of the signal and the energy threshold; The sliding window overlap strategy is to adjust the overlap degree based on the voice quality; The sliding window boundary processing: performing smoothing processing and edge data expansion processing on the sliding window boundary.
2. The sliding window processing method for abnormal speech edge trimming recognition according to claim 1 is characterized in that: The adaptive adjustment of the sliding window size comprises the following steps: Signal energy change rate: Calculate the energy of the current frame and compare it with the energy of the previous frame to get the change rate: Where: E(t) represents the signal energy at time point t; x(t+i) represents the amplitude of the signal at time t+i; N represents the length of the sliding window, which is a fixed value initially set and will be adjusted later according to the signal energy change rate; Where: EVR(t) represents the energy change rate at time t; Δt is the time interval between the previous and next frames; Spectrum variation calculation: Where: S(f,t) represents the spectrum value of frequency f at time t; M represents the frequency resolution of the spectrum; Δt represents the time interval between the previous and next frames; Local speech rate calculation: Where: V(t) represents the speech rate at time t; Δt represents the duration of the current frame; N represents the length of the sliding window; Adaptive sliding window size: W adjust =W EVR ·EVR(t)+W SVD ·SVD(t)+W V ·V(t); Where: W EVR , W SVD and W V Both represent weighting factors; ΔW(t)=W adjust ·W0; Where: W0 represents the default sliding window size; ΔW(t) represents the adjusted sliding window size.
3. The sliding window processing method for abnormal speech slice recognition according to claim 2 is characterized in that: When dynamically adjusting the sliding window size, the final sliding window size is obtained by setting the sliding window size limit and smoothing: W(t)=min(max(ΔW(t),W min ),W max ); Where: W min Indicates the minimum value of the sliding window size; W max Indicates the maximum value of the sliding window size; if the adjusted sliding window size exceeds the maximum or minimum value, the maximum or minimum value is used as the boundary value, and the sliding window size adopts the boundary value; if it does not exceed, the calculated sliding window size is adopted; Smoothing the sliding window size: W smoothed (t)=α·W(t)+(1-α)·W smoothed (t-1); Where: w smoothed (t) is the sliding window size after smoothing, which is used as the final sliding window size; α is the smoothing coefficient, which ranges from 0.1 to 0.
3.
4. The sliding window processing method for abnormal speech slice recognition according to claim 1 is characterized in that: The calculation method of the adaptive adjustment of the sliding window step size is as follows: Where: L is the sliding window step size at the current moment; L base is the default step size; E n Represents the energy characteristics of the nth sliding window; E th represents the energy threshold; α represents the adjustment coefficient related to energy 0≤α≤1; V represents the speech rate; V th represents the speech rate threshold; β represents the adjustment coefficient related to the speech rate, 0≤β≤1; Step size limit: L=min(max(L,L min ),L max ); Where: L min Indicates the minimum step length; L max Indicates the maximum step length; the step length is limited to this range through the minimum step length and the maximum step length. If it exceeds the range, the adjacent boundary is used as the step length; The formula for calculating speech speed is as follows: Where: Δt represents the speech frame interval between adjacent sliding windows.
5. The sliding window processing method for abnormal speech slice recognition according to claim 4 is characterized in that: The energy feature is obtained based on short-time Fourier transform, and the specific steps are as follows: Divide the signal: divide the signal into multiple small segments based on the Hanning window; Perform Fourier transform on each window after segmentation: Perform Fourier transform on each segment of signal x(t) to obtain the spectrum within the window at that moment: Where: X(f,t) is the time-frequency spectrum, which represents the amplitude of the signal at frequency f and time t; x[n] represents the signal sequence; w[nt] represents the window function; e -j2πfn represents a complex exponential function, which is used to represent frequency components; f represents frequency; t represents time; Calculate the energy spectrum: Calculate the energy for each frequency band f: E n (f)=|X(f,t)| 2 ; Where: |X(f,t)| 2 It represents the square of the amplitude of the spectrum, indicating the energy of the frequency component; Total energy calculation: For each sliding window, calculate the total energy of all frequencies within the sliding window: E n =∑ f |X(f,t)| 2 ; Where: E n Represents the energy characteristics of sliding window n, which represents the total energy of the signal in the sliding window.
6. The sliding window processing method for abnormal speech slice recognition according to claim 1, characterized in that: The formula for adjusting the overlap based on speech quality is as follows: Where: O is the current overlap, a ratio between 0 and 1; O high Indicates high overlap, and the value is any value between 0.6-0.75; O low It represents the overlap degree, which can be any value between 0.25 and 0.5; E represents the energy characteristic of the current time window; E threshold is the set energy threshold.
7. The sliding window processing method for abnormal speech slice recognition according to claim 1 is characterized in that: The specific steps of the sliding window boundary processing are as follows: Dynamic weighting factor setting: Based on the energy characteristics of the current sliding window, a dynamic weighting factor is introduced. The dynamic weighted chair is adjusted according to the position and energy characteristics of the sliding window: Where: W d (n) represents the dynamic weighting factor of the nth sliding window; E n Represents the energy characteristics of the nth sliding window; n mid Indicates the middle position of the sliding window; N half Indicates the general size of the sliding window; γ indicates the adjustment coefficient, which is between 0 and 1; Sliding window weighting: Weight the sliding window based on a dynamic weighting factor: w d (n)=W d (n)·w default (n); Where: w default (n) is the standard weighting function when the Hanning window is applied to the non-boundary region; Boundary extension: Define the boundary extension area as the L before and after the sliding window extend When the sliding window approaches the boundary of the signal, the spectrum change rate in the boundary area is first calculated, and different expansion strategies are selected according to the rate: Where: X(k) represents the spectrum coefficient of the kth frequency point; M represents the number of spectrum points in the front part of the boundary area; P represents the total number of spectrum points in the sliding window; According to the calculated spectrum change rate R boundary , choose different expansion methods: If the spectrum change rate R boundary If the spectrum change rate threshold is less than or equal to the spectrum change rate threshold, the symmetric expansion strategy is used to expand the amplitude of the boundary symmetry to the front and back L extend sampling points; If the spectrum change rate R boundary If the rate of change is greater than the spectrum change rate threshold, a weighted expansion strategy is used to determine the expansion area based on the spectrum change rate as follows: Where: x(n) represents the value of the original signal at the nth sampling point; N represents the total number of sampling points of the sliding window, which represents the effective part of the signal; L extend Indicates the number of sampling points for boundary extension, indicating the number of points that need to be extended before and after the signal boundary; w extend (n) represents an extended weight factor dynamically adjusted according to the spectrum characteristics, which is used to weight the signal in the extended area; Where: α represents the adjustment coefficient; R max Indicates the maximum spectrum change rate.