A voice endpoint detection method and apparatus
By segmenting audio data into frames and calculating correlation values, combined with energy and zero-crossing rate methods, the accuracy and power consumption control issues of speech endpoint detection under low signal-to-noise ratio were solved, achieving higher detection accuracy and lower power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
In low signal-to-noise ratio scenarios, traditional voice endpoint detection methods struggle to accurately distinguish between voice segments and non-voice segments, resulting in high false detection rates and difficulties in power consumption control.
By segmenting audio data into frames and calculating the correlation, energy, and zero-crossing rate between audio frames, combined with preset threshold values, speech endpoint detection is performed, thereby improving the accuracy of detection.
It improves the accuracy of voice endpoint detection, reduces the false detection rate, and lowers power consumption.
Smart Images

Figure CN116189717B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech detection technology, and in particular to a speech endpoint detection method and apparatus. Background Technology
[0002] Speech endpoint detection is a technique used to distinguish between speech segments and non-speech segments, and to accurately locate the start and end points of speech segments.
[0003] In recent years, with the rapid development of intelligent voice terminals, there has been a greater demand and higher requirements for front-end voice endpoint detection. On the one hand, to improve the back-end voice detection rate, endpoint detection needs to ensure the integrity of voice segments and avoid missed voice detection. On the other hand, with the increasing portability and wireless nature of some terminal products on the market, the demand for low power consumption is growing. As a functional module that needs to be constantly running in most applications, the complexity and power consumption control of voice endpoint detection are particularly important. At the same time, to reduce the additional power consumption caused by frequently waking up subsequent modules in unnecessary scenarios, the false detection rate of endpoint detection is also an important indicator. Traditional voice endpoint detection can be mainly divided into two steps: feature extraction and endpoint decision. Feature extraction mainly extracts one or more features that can distinguish voice from noise. Endpoint decision compares the feature values with preset threshold values and finds the start and end endpoints of voice according to certain decision criteria, that is, using energy and zero-crossing rate as feature values for judgment. However, in low signal-to-noise ratio scenarios, the features of voice segments and non-voice segments tend to be similar, and it is difficult to accurately detect voice endpoints using only energy and zero-crossing rate.
[0004] In conclusion, improving the accuracy of voice endpoint detection is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, this application provides a voice endpoint detection method and apparatus, which aims to improve the accuracy of voice endpoint detection.
[0006] Firstly, this application provides a voice endpoint detection method, including:
[0007] The audio data is divided into frames to obtain multiple audio frames;
[0008] Each of the multiple audio frames is taken as a target audio frame. For each target audio frame, the correlation value between the target audio frame and the next audio frame is taken as the correlation value of the target audio frame. The correlation value is the value corresponding to the periodic correlation between the two audio frames.
[0009] Voice endpoint detection is performed based on the relevant values corresponding to the multiple audio frames.
[0010] Optionally, the above methods also include:
[0011] The energy and zero-crossing rate of each target audio frame are calculated.
[0012] The step of detecting voice endpoints based on the correlation values corresponding to the plurality of audio frames includes:
[0013] Voice endpoint detection is performed based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames.
[0014] Optionally, the step of detecting speech endpoints based on the correlation values, energy, and zero-crossing rates corresponding to the plurality of audio frames includes:
[0015] In response to the absence of speech data in the previous audio frame of the target audio frame, it is determined whether the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are all less than the corresponding preset threshold values;
[0016] If so, then it is determined that the target audio frame is not a speech start endpoint and there is no speech data in the target audio frame;
[0017] If not, the correlation value, energy, and zero-crossing rate of the next audio frame of the target audio frame are compared with the corresponding preset threshold value.
[0018] If the next audio frame of the target audio frame satisfies the preset condition that there is voice data, then the next audio frame of the target audio frame is determined to be the voice start endpoint, and there is voice data in the next audio frame of the target audio frame.
[0019] If the next audio frame of the target audio frame satisfies the preset condition that no speech data exists, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the target audio frame.
[0020] Optionally, the step of detecting speech endpoints based on the correlation values, energy, and zero-crossing rates corresponding to the plurality of audio frames includes:
[0021] In response to the presence of speech data in the previous audio frame of the target audio frame, the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are compared with the corresponding preset threshold values.
[0022] If the target audio frame does not meet the preset speech continuity condition, then it is determined whether there is an audio frame that meets the preset speech continuity condition between the next audio frame of the target audio frame and the first farthest audio frame. The first farthest audio frame is the audio frame after the next audio frame of the target audio frame and the time between the next audio frame of the target audio frame and the first farthest audio frame is equal to the first preset time threshold.
[0023] If not, then the next audio frame of the target audio frame is determined to be the speech end endpoint, and the target audio frame does not contain speech data.
[0024] Optionally, after comparing the correlation value, energy, and zero-crossing rate corresponding to the next audio frame of the target audio frame with the corresponding preset threshold value, the method further includes:
[0025] If the next audio frame of the target audio frame does not satisfy the preset condition for the presence of voice data, nor does it satisfy the preset condition for the absence of voice data, then it is determined whether there is an audio frame that satisfies the preset condition for the presence of voice data between the next frame of the target audio frame and the second farthest audio frame. The second farthest audio frame is the audio frame after the next audio frame of the target audio frame and the time between the next audio frame of the target audio frame and the second farthest audio frame is equal to the second preset time threshold.
[0026] If so, then the next audio frame of the target audio frame is determined as the speech start endpoint, and speech data exists in the next audio frame of the target audio frame;
[0027] If not, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the next audio frame of the target audio frame.
[0028] Optionally, the preset conditions for the existence of voice data include:
[0029] The zero-crossing rate of the next audio frame of the target audio frame is not less than a preset threshold value, and at least one of the energy and correlation value of the next audio frame of the target audio frame is not less than a preset threshold value.
[0030] Optionally, the default conditions for the absence of voice data include:
[0031] The zero-crossing rate of the next audio frame of the target audio frame is less than a preset threshold, and at least one of the energy and correlation value of the next audio frame of the target audio frame is less than a preset threshold.
[0032] Optional, preset speech continuity conditions include:
[0033] The zero-crossing rate of the target audio frame is not less than a preset threshold, or the energy and correlation value of the target audio frame are both not less than a preset threshold.
[0034] Secondly, this application provides a voice endpoint detection device, comprising:
[0035] The frame segmentation module is used to segment audio data into frames, resulting in multiple audio frames.
[0036] The setting module is used to take the plurality of audio frames as target audio frames respectively, and for the target audio frame, take the correlation value between the target audio frame and the next audio frame of the target audio frame as the correlation value of the target audio frame, wherein the correlation value is the value corresponding to the periodic correlation between the two audio frames;
[0037] The detection module is used to detect voice endpoints based on the relevant values corresponding to the multiple audio frames.
[0038] Optionally, the above-mentioned device further includes:
[0039] The calculation module is used to calculate the energy and zero-crossing rate of each target audio frame;
[0040] The detection module is specifically used to perform voice endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames.
[0041] This application provides a method for speech endpoint detection. When executing the method, the audio data is first segmented into frames to obtain multiple audio frames. These multiple audio frames are then used as target audio frames. For each target audio frame, the correlation value between the target audio frame and the next audio frame is used as the correlation value of the target audio frame. The correlation value corresponds to the periodic correlation between the two audio frames. Finally, speech endpoint detection is performed based on the correlation values corresponding to the multiple audio frames. In this way, because the correlation between the speech data is high, the accuracy of speech endpoint detection can be improved by performing speech endpoint detection based on the correlation value between the current audio frame and the next audio frame. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A flowchart of a speech detection method provided in this application embodiment;
[0044] Figure 2 A flowchart of another speech detection method provided in this application embodiment;
[0045] Figure 3 This is a schematic diagram of the structure of a voice detection device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. This application provides a method and apparatus for voice endpoint detection, relating to the field of voice detection technology. The above are merely examples and do not limit the application field of the method and apparatus provided in this application.
[0047] Speech endpoint detection is a technique used to distinguish between speech segments and non-speech segments, and to accurately locate the start and end points of speech segments.
[0048] In recent years, with the rapid development of intelligent voice terminals, there has been a greater demand and higher requirements for front-end voice endpoint detection. On the one hand, to improve the back-end voice detection rate, endpoint detection needs to ensure the integrity of voice segments and avoid voice omissions. On the other hand, as some terminal products on the market become more portable and wireless, the demand for low power consumption is increasing. As a function module that needs to be kept running in most applications, the complexity and power consumption control of voice endpoint detection are particularly important. At the same time, to reduce the additional power consumption caused by frequently waking up subsequent modules in unnecessary scenarios, the false detection rate of endpoint detection is also an important indicator.
[0049] Traditional speech endpoint detection can be divided into two main steps: feature extraction and endpoint decision. Feature extraction mainly involves extracting one or more features that distinguish speech from noise. Endpoint decision compares the feature values with preset threshold values and finds the start and end points of speech based on certain decision criteria. That is, it uses energy and zero-crossing rate as feature values for judgment. However, in low signal-to-noise ratio scenarios, the features of speech segments and non-speech segments tend to be similar, making it difficult to accurately detect speech endpoints using only energy and zero-crossing rate.
[0050] The inventors have proposed the technical solution of this application after research. To enable those skilled in the art to better understand the solution, the following detailed description is provided in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. It should be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0051] Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] See Figure 1 , Figure 1 A flowchart of a speech detection method provided in this application embodiment includes:
[0053] S101: Divide the audio data into frames to obtain multiple audio frames.
[0054] Audio signals are characterized by time-varying and non-stationary characteristics, but within a short time range (5-30ms), speech characteristics are relatively stable and can be regarded as a quasi-steady-state process. Therefore, continuous audio data is processed into frames to obtain multiple audio frames for subsequent operations. The frame length of an audio frame is N, including but not limited to 80-480 sampling points.
[0055] S102: Take multiple audio frames as target audio frames respectively, and for each target audio frame, take the correlation value between the target audio frame and the next audio frame as the correlation value of the target audio frame.
[0056] Multiple audio frames are used as target audio frames, each referring to a specific audio frame. For each target audio frame, the correlation value between the target audio frame and its next frame is used as the correlation value of the target audio frame. This correlation value corresponds to the periodic correlation between the two audio frames. Speech, especially voiced sounds, exhibits a significant periodicity in the time domain due to vocal cord vibration, known as the pitch period. Because of the pitch, speech has a stronger correlation than most noise. The periodic correlation is the degree of periodic correlation between the two audio frames. Periodicity is an inherent characteristic of audio frames, and the correlation value reflects the periodic correlation between the target audio frame and the next audio frame. The calculation process for the correlation value of the target audio frame is as follows:
[0057]
[0058] Among them, R m (i) is the correlation value, where m and m+1 represent the m-th and m+1-th frames, respectively, i.e., two adjacent audio frames; x m+1 (n+i) represents the sample point of the nth audio data in the (m+1)th frame after a delay of i time.
[0059] S103: Perform speech endpoint detection based on the correlation values corresponding to multiple audio frames.
[0060] Speech endpoint detection can be accurately performed based on the correlation values corresponding to multiple audio frames. The larger the correlation value, the greater the probability that the target audio frame is speech data; the smaller the correlation value, the less the probability that the target audio frame is speech data.
[0061] This embodiment provides a speech endpoint detection method. First, the audio data is segmented into frames to obtain multiple audio frames. Then, each of these audio frames is used as a target audio frame. For each target audio frame, the correlation value between the target audio frame and the next audio frame is used as the correlation value of the target audio frame. The correlation value corresponds to the periodic correlation between the two audio frames. Finally, speech endpoint detection is performed based on the correlation values of the multiple audio frames. In this way, because the speech data has a high correlation, the accuracy of speech endpoint detection can be improved by performing speech endpoint detection based on the correlation value between the current audio frame and the next audio frame.
[0062] See Figure 2 The figure is a flowchart of another speech detection method provided in an embodiment of this application, including:
[0063] The implementation methods of steps S201 and S202 are the same as those of steps S101 and S102, and will not be repeated here.
[0064] S203: Calculate the energy and zero-crossing rate of each target audio frame.
[0065] The energy calculation process is as follows:
[0066]
[0067] Among them, E m The value represents the energy of the m-th frame; n represents the n-th sampling point in the length of a frame; x m (n) represents the nth sampling point of the mth frame of audio data.
[0068] Zero-crossing rate represents the number of times the time waveform of a signal crosses the horizontal axis (0 value). The more times it crosses zero within a certain time period, the higher the relative frequency. The calculation process for zero-crossing rate is as follows:
[0069]
[0070]
[0071] Where, x m (n) and x m (n+1) represents two adjacent sampling points in the m-th frame of audio data; sign m (n) represents the zero-crossing status of every two adjacent sampling points in the m-th speech frame. If it crosses zero, sign is 1; otherwise, it is 0. m This represents the zero-crossing rate of the m-th frame.
[0072] The zero-crossing rate calculation methods in the embodiments of this application include, but are not limited to, the methods described above. Zero-crossing rate calculation methods that combine other conditions are also within the protection scope of this invention.
[0073] S204: Perform speech endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to multiple audio frames.
[0074] Speech endpoint detection based on the correlation values, energy, and zero-crossing rate of multiple audio frames includes: determining the speech start endpoint in the audio data based on the correlation values, energy, and zero-crossing rate of multiple audio frames, and determining the speech end endpoint in the audio data based on the correlation values, energy, and zero-crossing rate of multiple audio frames.
[0075] Specifically, the speech start endpoint in the audio data is determined based on the correlation values, energy, and zero-crossing rate corresponding to multiple audio frames, including:
[0076] In the initial first frame, we typically assume that the frame is in a noisy environment, meaning it is not a speech endpoint and therefore contains no speech data. In response to the absence of speech data in the previous audio frame of the target audio frame, we determine whether the correlation value, energy, and zero-crossing rate of the target audio frame are all less than their corresponding preset thresholds. If so, we determine that the target audio frame is not a speech start endpoint and therefore contains no speech data.
[0077] If not, it means that the target audio frame may be the speech start point and may contain speech data, but this target audio frame is not used as the speech start point. It is also determined whether the next audio frame of the target audio frame is the speech start point. At this time, the correlation value, energy and zero crossing rate corresponding to the next audio frame of the target audio frame are compared with the corresponding preset threshold value.
[0078] If the next audio frame of the target audio frame meets the preset condition that there is speech data, then the next audio frame of the target audio frame is determined to be the speech start endpoint, and there is speech data in the next audio frame of the target audio frame.
[0079] The preset condition for the existence of voice data is set according to specific circumstances and is used to determine whether there is voice data in the audio frame. For example, the preset condition for the existence of voice data is that the zero-crossing rate corresponding to the next audio frame of the target audio frame is not less than a preset threshold value, and at least one of the energy and correlation value corresponding to the next audio frame of the target audio frame is not less than a preset threshold value. The specific setting of the preset condition for the existence of voice data is not unique.
[0080] If the next audio frame of the target audio frame meets the preset condition that no speech data exists, then the next audio frame of the target audio frame is determined to be not the speech start endpoint, and there is no speech data in the target audio frame.
[0081] The preset condition for the absence of voice data is also set according to specific circumstances. It is used to determine that there is no voice data in the audio frame. In some embodiments, the preset condition for the absence of voice data can be set to the zero-crossing rate corresponding to the next audio frame of the target audio frame being less than a preset threshold value, and at least one of the energy and correlation value corresponding to the next audio frame of the target audio frame being less than the preset threshold value.
[0082] If the next audio frame of the target audio frame does not meet either the preset condition for the presence of voice data or the preset condition for the absence of voice data, it indicates that there may be voice data in the next audio frame of the target audio frame. Further judgment is required, namely, to determine whether there is an audio frame that meets the preset condition for the presence of voice data between the next frame of the target audio frame and the second farthest audio frame. The second farthest audio frame is the audio frame after the next audio frame of the target audio frame and the time between the next audio frame of the target audio frame and the second farthest audio frame is equal to the second preset time threshold.
[0083] If so, then the next audio frame of the target audio frame is determined as the speech start endpoint, and speech data exists in the next audio frame of the target audio frame;
[0084] If not, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the next audio frame of the target audio frame.
[0085] Furthermore, the steps for determining the speech termination endpoints in the audio data based on the correlation values, energy, and zero-crossing rates corresponding to multiple audio frames are as follows:
[0086] In response to the presence of speech data in the previous audio frame of the target audio frame, the correlation value, energy, and zero-crossing rate of the target audio frame are compared with the corresponding preset threshold values.
[0087] If the target audio frame meets the preset speech continuity condition, then the target audio frame is determined to be a continuous audio frame, and speech data exists in the target audio frame;
[0088] The preset speech continuity condition is used to determine whether an audio frame is continuous audio and whether there is audio data. If the audio frame is continuous audio, it means that the audio frame is not the end point of speech and that there is speech data; if the audio frame is not continuous audio, it means that the audio frame is the end point of speech and that there is no speech data. In some embodiments, the preset speech continuity condition can be that the zero-crossing rate corresponding to the target audio frame is not less than a preset threshold value, or that the energy and correlation value corresponding to the target audio frame are both not less than a preset threshold value.
[0089] If the target audio frame does not meet the preset speech continuity condition, it means that the target audio frame may be the end point of speech, but noise interference cannot be ruled out. Therefore, it is necessary to judge the next audio frame of the target audio frame, that is, to judge whether there is an audio frame that meets the preset speech continuity condition between the next audio frame of the target audio frame and the first farthest audio frame. The first farthest audio frame is the audio frame after the next audio frame of the target audio frame, and the time between the next audio frame of the target audio frame and the first farthest audio frame is equal to the first preset time threshold.
[0090] If so, it means that the speech was indeed briefly disturbed by noise, but it did not cause the speech to stop. That is, the next audio frame in the target audio frame is determined to be a continuous audio frame, and the target audio frame contains speech data.
[0091] If not, it means that no audio frame that meets the preset speech continuity condition has appeared within a certain period of time. That is, the next audio frame of the target audio frame is determined to be the speech end point, and there is no speech data in the target audio frame.
[0092] In this embodiment, voice endpoint detection is performed based on the correlation values, energy, and zero-crossing rate corresponding to multiple audio frames, which can maximize the accuracy of voice endpoint detection.
[0093] The above are some specific implementations of the voice endpoint detection method provided in the embodiments of this application. Based on this, this application also provides a corresponding device. The device provided in the embodiments of this application will be described below from the perspective of functional modularity.
[0094] See Figure 3 , Figure 3 This is a schematic diagram of a speech detection device provided in an embodiment of this application. The device 300 includes:
[0095] The frame segmentation module 310 is used to segment audio data into frames to obtain multiple audio frames;
[0096] The setting module 320 is used to set the plurality of audio frames as target audio frames respectively, and to set the correlation value between the target audio frame and the next audio frame of the target audio frame as the correlation value of the target audio frame, wherein the correlation value is the value corresponding to the periodic correlation between the two audio frames;
[0097] The detection module 330 is used to perform voice endpoint detection based on the correlation values corresponding to the multiple audio frames.
[0098] Optionally, the device 300 also includes:
[0099] The calculation module is used to calculate the energy and zero-crossing rate of each target audio frame;
[0100] The detection module 330 is specifically used to perform voice endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames.
[0101] Optional, detection module 330, specifically used for
[0102] In response to the absence of speech data in the previous audio frame of the target audio frame, it is determined whether the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are all less than the corresponding preset threshold values;
[0103] If so, then it is determined that the target audio frame is not a speech start endpoint and there is no speech data in the target audio frame;
[0104] If not, the correlation value, energy, and zero-crossing rate of the next audio frame of the target audio frame are compared with the corresponding preset threshold value.
[0105] If the next audio frame of the target audio frame satisfies the preset condition that there is voice data, then the next audio frame of the target audio frame is determined to be the voice start endpoint, and there is voice data in the next audio frame of the target audio frame.
[0106] If the next audio frame of the target audio frame meets the preset condition that no voice data exists, then it is determined that the next audio frame of the target audio frame is not the voice start endpoint, and there is no voice data in the target audio frame.
[0107] The preset conditions for the existence of voice data include:
[0108] The zero-crossing rate of the next audio frame of the target audio frame is not less than a preset threshold value, and at least one of the energy and correlation value of the next audio frame of the target audio frame is not less than a preset threshold value.
[0109] The preset conditions for the absence of voice data include:
[0110] The zero-crossing rate of the next audio frame of the target audio frame is less than a preset threshold, and at least one of the energy and correlation value of the next audio frame of the target audio frame is less than a preset threshold.
[0111] Optional, the detection module 330 is specifically used for:
[0112] In response to the presence of speech data in the previous audio frame of the target audio frame, the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are compared with the corresponding preset threshold values.
[0113] If the target audio frame does not meet the preset speech continuity condition, then it is determined whether there is an audio frame that meets the preset speech continuity condition between the next audio frame of the target audio frame and the first farthest audio frame. The first farthest audio frame is the audio frame after the next audio frame of the target audio frame, and the time between the next audio frame of the target audio frame and the first farthest audio frame is equal to the first preset time threshold.
[0114] The preset speech continuity conditions include:
[0115] The zero-crossing rate of the target audio frame is not less than a preset threshold value, or the energy and correlation value of the target audio frame are both not less than a preset threshold value.
[0116] If not, then the next audio frame of the target audio frame is determined to be the speech end endpoint, and the target audio frame does not contain speech data.
[0117] Optionally, the detection module 330 is specifically used to: if the next audio frame of the target audio frame does not satisfy the preset condition for the existence of voice data and does not satisfy the preset condition for the absence of voice data, then determine whether there is an audio frame that satisfies the preset condition for the existence of voice data between the next frame of the target audio frame and the second farthest audio frame, wherein the second farthest audio frame is the audio frame after the next audio frame of the target audio frame and the time between the next audio frame of the target audio frame and the second farthest audio frame is equal to the second preset time threshold;
[0118] If so, then the next audio frame of the target audio frame is determined as the speech start endpoint, and speech data exists in the next audio frame of the target audio frame;
[0119] If not, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the next audio frame of the target audio frame.
[0120] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.
[0121] The device includes a memory and a processor. The memory stores instructions or code, and the processor executes the instructions or code to cause the device to perform the method described in any embodiment of this application.
[0122] The computer storage medium stores code, and when the code is run, the device running the code implements the method described in any embodiment of this application.
[0123] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0124] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0125] It should also be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The apparatus embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0126] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting speech endpoints, characterized in that, include: The audio data is divided into frames to obtain multiple audio frames; Each of the multiple audio frames is taken as a target audio frame. For each target audio frame, the correlation value between the target audio frame and the next audio frame is taken as the correlation value of the target audio frame. The correlation value is the value corresponding to the periodic correlation between the two audio frames. Voice endpoint detection is performed based on the relevant values corresponding to the multiple audio frames; The method further includes: The energy and zero-crossing rate of each target audio frame are calculated. The step of detecting voice endpoints based on the correlation values corresponding to the multiple audio frames includes: Voice endpoint detection is performed based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames; The voice endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames includes: In response to the presence of speech data in the previous audio frame of the target audio frame, the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are compared with the corresponding preset threshold values. If the target audio frame does not meet the preset speech continuity condition, then it is determined whether there is an audio frame that meets the preset speech continuity condition between the next audio frame of the target audio frame and the first farthest audio frame. The first farthest audio frame is the audio frame after the next audio frame of the target audio frame, and the time between the next audio frame of the target audio frame and the first farthest audio frame is equal to the first preset time threshold. If not, then the next audio frame of the target audio frame is determined to be the speech end endpoint, and the target audio frame does not contain speech data.
2. The method according to claim 1, characterized in that, The voice endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames includes: In response to the absence of speech data in the previous audio frame of the target audio frame, it is determined whether the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are all less than the corresponding preset threshold values; If so, then it is determined that the target audio frame is not a speech start endpoint and there is no speech data in the target audio frame; If not, the correlation value, energy, and zero-crossing rate of the next audio frame of the target audio frame are compared with the corresponding preset threshold value. If the next audio frame of the target audio frame satisfies the preset condition that there is voice data, then the next audio frame of the target audio frame is determined to be the voice start endpoint, and there is voice data in the next audio frame of the target audio frame. If the next audio frame of the target audio frame satisfies the preset condition that no speech data exists, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the target audio frame.
3. The method according to claim 2, characterized in that, After comparing the correlation value, energy, and zero-crossing rate corresponding to the next audio frame of the target audio frame with the corresponding preset threshold value, the method further includes: If the next audio frame of the target audio frame does not satisfy the preset condition for the presence of voice data, nor does it satisfy the preset condition for the absence of voice data, then it is determined whether there is an audio frame that satisfies the preset condition for the presence of voice data between the next frame of the target audio frame and the second farthest audio frame. The second farthest audio frame is the audio frame after the next audio frame of the target audio frame and the time between the next audio frame of the target audio frame and the second farthest audio frame is equal to the second preset time threshold. If so, then the next audio frame of the target audio frame is determined as the speech start endpoint, and speech data exists in the next audio frame of the target audio frame; If not, then it is determined that the next audio frame of the target audio frame is not the speech start endpoint, and there is no speech data in the next audio frame of the target audio frame.
4. The method according to claim 2, characterized in that, The preset conditions for the existence of voice data include: The zero-crossing rate of the next audio frame of the target audio frame is not less than a preset threshold value, and at least one of the energy and correlation value of the next audio frame of the target audio frame is not less than a preset threshold value.
5. The method according to claim 2, characterized in that, The preset conditions for the absence of voice data include: The zero-crossing rate of the next audio frame of the target audio frame is less than a preset threshold, and at least one of the energy and correlation value of the next audio frame of the target audio frame is less than a preset threshold.
6. The method according to claim 1, characterized in that, The preset speech continuity conditions include: The zero-crossing rate of the target audio frame is not less than a preset threshold, or the energy and correlation value of the target audio frame are both not less than a preset threshold.
7. A voice endpoint detection device, characterized in that, include: The frame segmentation module is used to segment audio data into frames, resulting in multiple audio frames. The setting module is used to take the plurality of audio frames as target audio frames respectively, and for the target audio frame, take the correlation value between the target audio frame and the next audio frame of the target audio frame as the correlation value of the target audio frame, wherein the correlation value is the value corresponding to the periodic correlation between the two audio frames; The detection module is used to detect voice endpoints based on the relevant values corresponding to the multiple audio frames; The device further includes: The calculation module is used to calculate the energy and zero-crossing rate of each target audio frame; The detection module is specifically used to perform voice endpoint detection based on the correlation values, energy, and zero-crossing rate corresponding to the multiple audio frames; The detection module is specifically used for: In response to the presence of speech data in the previous audio frame of the target audio frame, the correlation value, energy, and zero-crossing rate corresponding to the target audio frame are compared with the corresponding preset threshold values. If the target audio frame does not meet the preset speech continuity condition, then it is determined whether there is an audio frame that meets the preset speech continuity condition between the next audio frame of the target audio frame and the first farthest audio frame. The first farthest audio frame is the audio frame after the next audio frame of the target audio frame, and the time between the next audio frame of the target audio frame and the first farthest audio frame is equal to the first preset time threshold. If not, then the next audio frame of the target audio frame is determined to be the speech end endpoint, and the target audio frame does not contain speech data.
Citation Information
Patent Citations
Detection and suppression of returned audio at near-end
CN102025852A
Real-time speech endpoint detection method and device
CN109545188A