Method for detecting audio signal and apparatus

Embodiments disclosed herein provide a method for detecting an audio signal and an apparatus, where the method includes determining an input audio signal as a to-be-determined audio signal; determining an enhanced segmental signal-to-noise ratio (SSNR) of the audio signal, where the enhanced SSNR is greater than a reference SSNR; and comparing the enhanced SSNR with a voice activity detection (VAD) decision threshold to determine whether the audio signal is an active signal. According to the method and the apparatus provided in the embodiments, an active voice and an inactive voice can be accurately distinguished.

TECHNICAL FIELD

Embodiments of the present invention relate to the field of signal processing technologies, and more specifically, to a method for detecting an audio signal and an apparatus.

BACKGROUND

Voice activity detection (VAD) is a key technology widely used in fields such as voice communications and man-machine interaction. The VAD may also be referred to as sound activity detection (SAD). The VAD is used to detect whether there is an active signal in an input audio signal, where the active signal is relative to an inactive signal (such as environmental background noise and a mute voice). Typical active signals include a voice, music, and the like. A principle of the VAD is that one or more feature parameters are extracted from an input audio signal, one or more feature values are determined according to the one or more feature parameters, and then the one or more feature values are compared with one or more thresholds.

In the prior art, an active signal detection method based on a segmental signal-to-noise ratio (SSNR) includes: dividing an input audio signal into multiple sub-band signals on a frequency band, calculating energy of the audio signal on each sub-band, and comparing the energy of the audio signal on each sub-band with estimated energy of a background noise signal on each sub-band, so as to obtain a signal-to-noise ratio (SNR) of the audio signal on each sub-band; and then determining an SSNR according to a sub-band SNR of each sub-band, and comparing the SSNR with a preset VAD decision threshold, where if the SSNR exceeds the VAD decision threshold, the audio signal is an active signal, or if the SSNR does not exceed the VAD decision threshold, the audio signal is an inactive signal.

A typical method for calculating the SSNR is to add up all sub-band SNRs of the audio signal, and a result obtained is the SSNR. For example, the SSNR may be determined using formula 1.1:

where k indicates the kthsub-band, snr(k) indicates a sub-band SNR of the kthsub-band, and N indicates a total quantity of sub-bands into which the audio signal is divided.

When the foregoing method for calculating the SSNR is used to detect an active voice, misdetection of an active voice may occur.

SUMMARY

Embodiments disclosed herein provide a method for detecting an audio signal and an apparatus, which can accurately distinguish between an active voice and an inactive voice.

According to a first aspect, an embodiment provides a method for detecting an audio signal, where the method includes: determining an input audio signal as a to-be-determined audio signal; determining an enhanced segmental signal-to-noise ratio (SSNR) of the audio signal, where the enhanced SSNR is greater than a reference SSNR; and comparing the enhanced SSNR with a voice activity detection (VAD) decision threshold to determine whether the audio signal is an active signal.

With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal according to a sub-band signal-to-noise ratio (SNR) of the audio signal.

With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal.

With reference to the second possible implementation manner or the third possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the determining an enhanced SSNR of the audio signal includes: determining a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than the first preset threshold is greater than a weight of a sub-band SNR of another sub-band; and determining the enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal.

With reference to the first aspect or any possible implementation manner of the first possible implementation manner of the first aspect to the fifth possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, the determining an enhanced SSNR of the audio signal includes: determining a reference SSNR of the audio signal; and determining the enhanced SSNR according to the reference SSNR of the audio signal.

With reference to the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect, the determining the enhanced SSNR according to the reference SSNR of the audio signal includes: determining the enhanced SSNR using the following formula: SSNR′=x*SSNR+y, where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and x and y indicate enhancement parameters.

With reference to the seventh possible implementation manner of the first aspect, in a ninth possible implementation manner of the first aspect, the determining the enhanced SSNR according to the reference SSNR of the audio signal includes: determining the enhanced SSNR using the following formula: SSNR′=f(x)*SSNR+h(y), where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and f(x) and h(y) indicate enhancement functions.

With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a tenth possible implementation manner of the first aspect, before the comparing the enhanced SSNR with a VAD decision threshold, the method further includes: using a preset algorithm to reduce the VAD decision threshold, so as to obtain a reduced VAD decision threshold; and the comparing the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal includes: comparing the enhanced SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

According to a second aspect, an embodiment provides a method for detecting an audio signal, where the method includes: determining an input audio signal as a to-be-determined audio signal; determining a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than a first preset threshold is greater than a weight of a sub-band SNR of another sub-band; determining an enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal, where the enhanced SSNR is greater than a reference SSNR; and comparing the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

With reference to the second aspect, in a first possible implementation manner of the second aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

According to a third aspect, an embodiment provides a method for detecting an audio signal, where the method includes: determining an input audio signal as a to-be-determined audio signal; acquiring a reference SSNR of the audio signal; using a preset algorithm to reduce a reference VAD decision threshold, so as to obtain a reduced VAD decision threshold; and comparing the reference SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

With reference to the third aspect, in a first possible implementation manner of the third aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

With reference to the first possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

With reference to the third aspect, in a fifth possible implementation manner of the third aspect, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal.

According to a fourth aspect, an embodiment provides an apparatus, where the apparatus includes: a first determining unit, configured to determine an input audio signal as a to-be-determined audio signal; a second determining unit, configured to determine an enhanced SSNR of the audio signal, where the enhanced SSNR is greater than a reference SSNR; and a third determining unit, configured to compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band signal-to-noise ratio SNR of the audio signal.

With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

With reference to the first possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

With reference to the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal.

With reference to the second possible implementation manner of the fourth aspect or the third possible implementation manner of the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the second determining unit is configured to determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than the first preset threshold is greater than a weight of a sub-band SNR of another sub-band; and determine the enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal.

With reference to the fourth aspect or any possible implementation manner of the first possible implementation manner of the fourth aspect to the fifth possible implementation manner of the fourth aspect, in a seventh possible implementation manner of the fourth aspect, the second determining unit is configured to determine a reference SSNR of the audio signal; and determine the enhanced SSNR according to the reference SSNR of the audio signal.

With reference to the seventh possible implementation manner of the fourth aspect, in an eighth possible implementation manner of the fourth aspect, the second determining unit is configured to determine the enhanced SSNR using the following formula: SSNR′=x*SSNR+y, where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and x and y indicate enhancement parameters.

With reference to the seventh possible implementation manner of the fourth aspect, in a ninth possible implementation manner of the fourth aspect, the second determining unit is configured to determine the enhanced SSNR using the following formula: SSNR′=f (x)*SSNR+h(y), where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and f(x) and h(y) indicate enhancement functions.

With reference to the fourth aspect or any one of the foregoing possible implementation manners of the fourth aspect, in a tenth possible implementation manner of the fourth aspect, the apparatus further includes a fourth determining unit, where the fourth determining unit is configured to use a preset algorithm to reduce the VAD decision threshold, so as to obtain a reduced VAD decision threshold; and the third determining unit is configured to compare the enhanced SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

According to a fifth aspect, an embodiment provides an apparatus, where the apparatus includes: a first determining unit, configured to determine an input audio signal as a to-be-determined audio signal; a second determining unit, configured to determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than a first preset threshold is greater than a weight of a sub-band SNR of another sub-band, and determine an enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal, where the enhanced SSNR is greater than a reference SSNR; and a third determining unit, configured to compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band signal-to-noise ratio SNR of the audio signal.

With reference to the first possible implementation manner of the fifth aspect, in a second possible implementation manner of the fifth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the fifth aspect, in a third possible implementation manner of the fifth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

According to a sixth aspect, an embodiment provides an apparatus, where the apparatus includes: a first determining unit, configured to determine an input audio signal as a to-be-determined audio signal; a second determining unit, configured to acquire a reference SSNR of the audio signal; a third determining unit, configured to use a preset algorithm to reduce a reference VAD decision threshold, so as to obtain a reduced VAD decision threshold; and a fourth determining unit, configured to compare the reference SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

With reference to the first possible implementation manner of the sixth aspect, in a second possible implementation manner of the sixth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

With reference to the first possible implementation manner of the sixth aspect, in a third possible implementation manner of the sixth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

With reference to the first possible implementation manner of the sixth aspect, in a fourth possible implementation manner of the sixth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

With reference to the sixth aspect, in a fifth possible implementation manner of the sixth aspect, the first determining unit is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal.

According to the method provided in the embodiments disclosed herein, a feature of an audio signal may be determined, an enhanced SSNR is determined in a corresponding manner according to the feature of the audio signal, and the enhanced SSNR is compared with a VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in the embodiments disclosed herein, with reference to the accompanying drawings. The described embodiments are merely some but not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments herein without creative efforts shall fall within the protection scope of the present description.

FIG. 1is a flowchart of a method for detecting an audio signal according to an embodiment. A manner of properly increasing an SSNR is used so that the SSNR may be greater than a VAD decision threshold. Therefore, misdetections of an active signal can be effectively reduced.

101. Determine an input audio signal as a to-be-determined audio signal.

102. Determine an enhanced segmental signal-to-noise ratio (SSNR) of the audio signal, where the enhanced SSNR is greater than a reference SSNR.

103. Compare the enhanced SSNR with a voice activity detection (VAD) decision threshold to determine whether the audio signal is an active signal.

In this embodiment, when the enhanced SSNR is compared with the VAD decision threshold, a reference VAD decision threshold may be used, or a reduced VAD decision threshold (obtained after a reference VAD decision threshold is reduced using a preset algorithm) may be used. The reference VAD decision threshold may be a default VAD decision threshold. The reference VAD decision threshold may be pre-stored, or may be temporarily obtained through calculation, where the reference VAD decision threshold may be calculated using an existing technology. When the reference VAD decision threshold is reduced using the preset algorithm, the preset algorithm may be multiplying the reference VAD decision threshold by a coefficient that is less than 1, or another algorithm may be used. This embodiment imposes no limitation on a used specific algorithm.

When a conventional SSNR calculation method is used to calculate SSNRs of some audio signals, the SSNRs of these audio signals may be lower than a preset VAD decision threshold. However, these audio signals may actually comprise active audio signals. This is caused by features of these audio signals. For example, in a case in which an environmental SNR is relatively low, a sub-band SNR of a high-frequency part is significantly reduced. In addition, because a psychoacoustic theory is generally used to perform sub-band division, the sub-band SNR of the high-frequency part has relatively low contribution to an SSNR. In this case, for some signals, such as an unvoiced signal whose energy is mainly centralized at a relatively high frequency part, an SSNR obtained through calculation using the conventional SSNR calculation method, may be lower than the VAD decision threshold, which causes misdetection of an active signal. In another example, for some audio signals, distribution of energy of these audio signals is relatively flat on a spectrum but overall energy of these audio signals is relatively low. Therefore, in the case in which an environmental SNR is relatively low, an SSNR obtained through calculation using the conventional SSNR calculation method may be lower than the VAD decision threshold misdetection.

FIG. 2is a flowchart of a method for detecting an audio signal according to an embodiment.

201. Determine a sub-band SNR of an input audio signal.

A spectrum of the input audio signal is divided into N sub-bands, where N is a positive integer greater than 1. Specifically, a psychoacoustic theory may be used to divide the spectrum of the audio signal. In a case in which the psychoacoustic theory is used to divide the spectrum of the audio signal, the lower the frequency of a sub-band is, the narrower the bandwidth of the sub-band is, and the higher the frequency of a sub-band is, the wider the bandwidth of the sub-band is Certainly, the spectrum of the audio signal may also be divided in another manner, for example, a manner of evenly dividing the spectrum of the audio signal into N sub-bands. A sub-band SNR of each sub-band of the input audio signal is calculated, where the sub-band SNR is a ratio of energy of the sub-band to energy of background noise on the sub-band. The energy of the background noise on the sub-band generally is an estimated value obtained by estimation by a background noise estimator. How to use the background noise estimator to estimate background noise energy corresponding to each sub-band is a well-known technology of this field. Therefore, no details need to be described herein. A person skilled in the art may understand that the sub-band SNR may be a direct energy ratio, or may be another expression manner of a direct energy ratio, such as a logarithmic sub-band SNR. In addition, a person skilled in the art may further understand that the sub-band SNR may also be a sub-band SNR obtained after linear or nonlinear processing is performed on a direct sub-band SNR, or may be another transformation of the sub-band SNR. The direct energy ratio of the sub-band SNR is shown in the following formula:
snr(k)=E(k)/En(k)  Formula 1.2
where snr(k) indicates a sub-band SNR of the kthsub-band, and E(k) and En(k) respectively indicate energy of the kthsub-band and energy of background noise on the kthsub-band. A logarithmic sub-band SNR may be indicated as: snrlog(k)=10×log10snr(k), where snrlog(k) indicates a logarithmic sub-band SNR of the kthsub-band, and snr(k) indicates a sub-band SNR that is of the kthsub-band and obtained through calculation using formula 1.2. A person skilled in the art may further understand that sub-band energy used to calculate a sub-band SNR may be energy of the input audio signal on a sub-band, or may be energy obtained after energy of the background noise on a sub-band is subtracted from energy of the input audio signal on the sub-band. Calculation of the SNR is proper without departing from meaning of the SNR.

202. Determine the input audio signal as a to-be-determined audio signal.

Optionally, in an embodiment, the determining the input audio signal as a to-be-determined audio signal may include: determining the audio signal as a to-be-determined audio signal according to the sub-band SNR that is of the audio signal and determined in step201.

Optionally, in an embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining the input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in another embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining the input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity. In this embodiment, a high-frequency end and a low-frequency end of one frame of audio signal are relative, that is, a part having a relatively high frequency is the high-frequency end, and a part having a relatively low frequency is the low-frequency end.

Optionally, in another embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining the input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for acquiring the second quantity is similar to a method for acquiring the first quantity. The second quantity may be the same as the first quantity, or the second quantity may be different from the first quantity. Similarly, for the third quantity, in the large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are less than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are less than the second preset threshold is greater than the third quantity. For the fourth quantity, in a large quantity of noise signal frames, statistics about a quantity of sub-bands whose sub-band SNRs are less than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these noise sample frames and whose sub-band SNRs are less than the third preset threshold is greater than the fourth quantity

Optionally, in another embodiment, whether the input audio signal is a to-be-determined audio signal may be determined by determining whether the input audio signal is an unvoiced signal. In this case, the sub-band SNR of the audio signal does not need to be determined when whether the audio signal is a to-be-determined audio signal is being determined. In other words, step201does not need to be performed in this case. Specifically, the determining the input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a time-domain zero-crossing rate (ZCR) of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

203. Determine an enhanced SSNR of the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The reference SSNR may be an SSNR obtained through calculation using formula 1.1. It can be seen from formula 1.1 that weighting processing is not performed on a sub-band SNR of any sub-band when the reference SSNR is being calculated, that is, weights of sub-band SNRs of all sub-bands are equal when the reference SSNR is being calculated.

Optionally, in an embodiment, in a case in which the quantity of high-frequency end sub-bands is greater than the first quantity, where the high-frequency end sub-bands are in the audio signal and the SNRs of the high-frequency end sub-bands are greater than the first preset threshold, or in a case in which the quantity of high-frequency end sub-bands is greater than the second quantity and the quantity of low-frequency end sub-bands is greater than the third quantity, where the high-frequency end sub-bands and the low-frequency end sub-bands are in the audio signal, the SNRs of the high-frequency end sub-bands are greater than the first preset threshold, and the SNRs of the low-frequency end sub-bands are less than the second preset threshold, the step of determining an enhanced SSNR of the audio signal includes: determining a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a high-frequency end sub-band whose sub-band SNR is greater than the first preset threshold is greater than a weight of a sub-band SNR of another sub-band; and determining the enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal.

For example, if the audio signal is divided into 20 sub-bands, that is, sub-band 0 to sub-band 19, according to the psychoacoustic theory, and signal-to-noise ratios of sub-band 18 and sub-band 19 are both greater than a first preset value T1, four sub-bands, that is, sub-band 20 to sub-band 23, may be added. Specifically, sub-band 18 and sub-band 19 whose signal-to-noise ratios are greater than T1 may be respectively divided into sub-band 18a, sub-band 18b, and sub-band 18c; and sub-band 19a, sub-band 19b, and sub-band 19c. In this case, sub-band 18 may be considered as a mother sub-band of sub-band 18a, sub-band 18b, and sub-band 18c, and sub-band 19 may be considered as a mother sub-band of sub-band 19a, sub-band 19b, and sub-band 19c. Values of signal-to-noise ratios of sub-band 18a, sub-band 18b, and sub-band 18c are the same as a value of the signal-to-noise ratio of their mother sub-band, and values of signal-to-noise ratios of sub-band 19a, sub-band 19b, and sub-band 19c are the same as a value of the signal-to-noise ratio of their mother sub-band. In this way, the 20 sub-bands that are originally obtained through division are re-divided into 24 sub-bands. Because VAD is designed still according to the 20 sub-bands during active signal detection, the 24 sub-bands need to be mapped back to the 20 sub-bands to determine the enhanced SSNR. In conclusion, when the enhanced SSNR is determined by increasing the quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold, calculation may be performed using the following formula:

SSNR′=2024×[2×(snr⁡(18)+snr⁡(19))+∑k=019⁢snr⁡(k)]Formula⁢⁢1.3where SSNR′ indicates the enhanced SSNR, and snr(k) indicates a sub-band SNR of the kthsub-band.

If an SSNR obtained through calculation using formula 1.1 is the reference SSNR, the reference SSNR obtained through calculation is

∑k=019⁢snr⁡(k).
Obviously, for an audio signal of a first type, a value of the enhanced SSNR obtained through calculation using formula 1.3 is greater than a value of the reference SSNR obtained through calculation using formula 1.1.

For another example, if the audio signal is divided into 20 sub-bands, that is, sub-band 0 to sub-band 19, according to the psychoacoustic theory, snr(18) and snr(19) are both greater than a first preset value T1, and snr(0) to snr(17) are all less than a second preset threshold T2, the enhanced SSNR may be determined using the following:

where SSNR′ indicates the enhanced SSNR, snr(k) indicates a sub-band SNR of the kthsub-band, a1and a2are weight increasing parameters, and values of a1and a2make a1×snr(18)+a2×snr(19) greater than snr(18)+snr(19). Obviously, a value of the enhanced SSNR obtained through calculation using formula 1.4 is greater than the value of the reference SSNR obtained through calculation using formula 1.1.

Optionally, in another embodiment, the determining an enhanced SSNR of the audio signal includes: determining a reference SSNR of the audio signal, and determining the enhanced SSNR according to the reference SSNR of the audio signal.

Optionally, the enhanced SSNR may be determined using the following formula:
SSNR′=x*SSNR+yFormula 1.5

where SSNR indicates the reference SSNR of the audio signal, SSNR′ indicates the enhanced SSNR, and x and y indicate enhancement parameters. For example, a value of x may be 1.05, and a value of y may be 1. A person skilled in the art may understand that, values of x and y may be other proper values that make the enhanced SSNR greater than the reference SSNR properly.

Optionally, the enhanced SSNR may be determined using the following formula:
SSNR′=f(x)*SSNR+h(y)  Formula 1.6

where SSNR indicates an original SSNR of the audio signal, SSNR′ indicates the enhanced SSNR, and f(x) and h(y) indicate enhancement functions. For example, f(x) and h(y) may be functions related to a LSNR of the audio signal, where the LSNR of the audio signal is an average SNR or a weighted SNR within a relatively long period of time. For example, when the lsnr is greater than 20, f(lsnr) may be equal to 1.1, and y(lsnr) may be equal to 2. When the lsnr is less than 20 and greater than 15, f(lsnr) may be equal to 1.05, and y(lsnr) may be equal to 1. When the lsnr is less than 15, f(lsnr) may be equal to 1, and y(lsnr) may be equal to 0. A person skilled in the art may understand that, f(x) and h(y) may be in other proper forms that make the enhanced SSNR greater than the reference SSNR properly.

204. Compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

Specifically, when the enhanced SSNR is compared with the VAD decision threshold, if the enhanced SSNR is greater than the VAD decision threshold, it is determined that the audio signal is an active signal. If the enhanced SSNR is not greater than the VAD decision threshold, it is determined that the audio signal is an inactive signal.

Optionally, in another embodiment, before the comparing the enhanced SSNR with a VAD decision threshold, the method may further include: using a preset algorithm to reduce the VAD decision threshold, so as to obtain a reduced VAD decision threshold. In this case, the comparing the enhanced SSNR with a VAD decision threshold includes: comparing the enhanced SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal. A reference VAD decision threshold may be a default VAD decision threshold, and the reference VAD decision threshold may be pre-stored, or may be temporarily obtained through calculation, where the reference VAD decision threshold may be calculated using an existing well-known technology. When the reference VAD decision threshold is reduced using the preset algorithm, the preset algorithm may be multiplying the reference VAD decision threshold by a coefficient that is less than 1, or another algorithm may be used. This embodiment imposes no limitation on a specific algorithm being used. The VAD decision threshold may be properly reduced using the preset algorithm, so that the enhanced SSNR is greater than the reduced VAD decision threshold. Therefore, misdetection of an active signal can be reduced.

According to the method shown inFIG. 2, a feature of an audio signal is determined, an enhanced SSNR is determined in a corresponding manner according to the feature of the audio signal, and the enhanced SSNR is compared with a VAD decision threshold. In this way, misdetection of an active signal can be reduced.

FIG. 3is a flowchart of a method for detecting an audio signal according to an embodiment.

301. Determine an input audio signal comprises as a to-be-determined audio signal.

302. Determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than a first preset threshold is greater than a weight of a sub-band SNR of another sub-band.

303. Determine an enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The reference SSNR may be an SSNR obtained through calculation using formula 1.1. It can be seen from formula 1.1 that weighting processing is not performed on a sub-band SNR of any sub-band when the reference SSNR is being calculated, that is, weights of sub-band SNRs of all sub-bands are equal when the reference SSNR is being calculated.

For example, if the audio signal is divided into 20 sub-bands, that is, sub-band 0 to sub-band 19, according to a psychoacoustic theory, and signal-to-noise ratios of sub-band 18 and sub-band 19 are both greater than a first preset value T1, four sub-bands, that is, sub-band 20 to sub-band 23, may be added. Specifically, sub-band 18 and sub-band 19 whose signal-to-noise ratios are greater than T1 may be respectively divided into sub-band 18a, sub-band 18b, and sub-band 18c; and sub-band 19a, sub-band 19b, and sub-band 19c. In this case, sub-band 18 may be considered as a mother sub-band of sub-band 18a, sub-band 18b, and sub-band 18c, and sub-band 19 may be considered as a mother sub-band of sub-band 19a, sub-band 19b, and sub-band 19c. Values of signal-to-noise ratios of sub-band 18a, sub-band 18b, and sub-band 18c are the same as a value of the signal-to-noise ratio of their mother sub-band, and values of signal-to-noise ratios of sub-band 19a, sub-band 19b, and sub-band 19c are the same as a value of the signal-to-noise ratio of their mother sub-band. In this way, the 20 sub-bands that are originally obtained through division are re-divided into 24 sub-bands. Because VAD is designed still according to the 20 sub-bands during active signal detection, the 24 sub-bands need to be mapped back to the 20 sub-bands to determine the enhanced SSNR. In conclusion, when the enhanced SSNR is determined by increasing a quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold, calculation may be performed by using the following formula:

where SSNR′ indicates the enhanced SSNR, and snr(k) indicates a sub-band SNR of the kthsub-band.

If an SSNR obtained through calculation by using formula 1.1 is the reference SSNR, the reference SSNR obtained through calculation is

∑k=019⁢snr⁡(k).
Obviously, for an audio signal of a first type, a value of the enhanced SSNR obtained through calculation by using formula 1.3 is greater than a value of the reference SSNR obtained through calculation by using formula 1.1.

For another example, if the audio signal is divided into 20 sub-bands, that is, sub-band 0 to sub-band 19, according to the psychoacoustic theory, snr(18) and snr(19) are both greater than a first preset value T1, and snr(0) to snr(17) are all less than a second preset threshold T2, the enhanced SSNR may be determined by using the following formula:

where SSNR′ indicates the enhanced SSNR, snr(k) indicates a sub-band SNR of the kthsub-band, a1and a2are weight increasing parameters, and values of a1and a2make a1×snr(18)+a2×snr(19) greater than snr(18)+snr(19). Obviously, a value of the enhanced SSNR obtained through calculation by using formula 1.4 is greater than the value of the reference SSNR obtained through calculation by using formula 1.1.

304. Compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

Specifically, when the enhanced SSNR is compared with the VAD decision threshold, if the enhanced SSNR is greater than the VAD decision threshold, it is determined that the audio signal is an active signal; or if the enhanced SSNR is not greater than the VAD decision threshold, it is determined that the audio signal is an inactive signal.

According to the method shown inFIG. 3, a feature of an audio signal may be determined, an enhanced SSNR is determined in a corresponding manner according to the feature of the audio signal, and the enhanced SSNR is compared with a VAD decision threshold. Therefore, misdetection of an active signal can be reduced.

Further, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining the audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a first quantity.

Optionally, in another embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the step of determining the audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands is greater than a second quantity and a quantity of low-frequency end sub-bands is greater than a third quantity, where the high-frequency end sub-bands and the low-frequency end sub-bands are in the audio signal, the SNRs of the high-frequency end sub-bands are greater than the first preset threshold, and the SNRs of the low-frequency end sub-bands are less than a second preset threshold.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The first quantity, the second quantity, and the third quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for acquiring the second quantity is similar to a method for acquiring the first quantity. The second quantity may be the same as the first quantity, or the second quantity may be different from the first quantity. Similarly, for the third quantity, in the large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are less than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are less than the second preset threshold is greater than the third quantity.

In embodiments ofFIG. 1toFIG. 3, whether an input audio signal is an active signal is determined in a manner of using an enhanced SSNR. In a method shown inFIG. 4, whether an input audio signal is an active signal is determined in a manner of reducing a VAD decision threshold.

FIG. 4is a flowchart of a method for detecting an audio signal according to an embodiment.

401. Determine an input audio signal as a to-be-determined audio signal.

Optionally, in an embodiment, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal according to the sub-band SNR that is of the audio signal and determined in step201.

Optionally, in an embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in another embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

Optionally, in another embodiment, in a case in which the audio signal is determined as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for acquiring the second quantity is similar to a method for acquiring the first quantity. The second quantity may be the same as the first quantity, or the second quantity may be different from the first quantity. Similarly, for the third quantity, in the large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are less than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are less than the second preset threshold is greater than the third quantity. For the fourth quantity, in a large quantity of noise signal frames, statistics about a quantity of sub-bands whose sub-band SNRs are less than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these noise sample frames and whose sub-band SNRs are less than the third preset threshold is greater than the fourth quantity

Optionally, in another embodiment, whether the input audio signal is a to-be-determined audio signal may be determined by determining whether the input audio signal is an unvoiced signal. In this case, the sub-band SNR of the audio signal does not need to be determined when whether the audio signal is a to-be-determined audio signal is being determined. In other words, step201does not need to be performed in this case. Specifically, the determining an input audio signal as a to-be-determined audio signal includes: determining the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a time-domain ZCR of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

402. Acquire a reference SSNR of the audio signal.

Specifically, the reference SSNR may be an SSNR obtained through calculation by using formula 1.1.

403. Use a preset algorithm to reduce a reference VAD decision threshold, so as to obtain a reduced VAD decision threshold.

Specifically, the reference VAD decision threshold may be a default VAD decision threshold, and the reference VAD decision threshold may be pre-stored. Alternatively, the reference VAD decision threshold may be temporarily obtained through calculation, where the reference VAD decision threshold may be calculated by using an existing well-known technology. When the reference VAD decision threshold is reduced by using the preset algorithm, the preset algorithm may be multiplying the reference VAD decision threshold by a coefficient that is less than 1, or another algorithm may be used. This embodiment imposes no limitation on a used specific algorithm. The VAD decision threshold may be properly reduced by using the preset algorithm, so that an enhanced SSNR is greater than the reduced VAD decision threshold. Therefore, a proportion of misdetection of an active signal can be reduced.

404. Compare the reference SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

When a conventional SSNR calculation method is used to calculate SSNRs of some audio signals, the SSNRs of these audio signals may be lower than a preset VAD decision threshold. However, actually, these audio signals are active audio signals. This is caused by features of these audio signals. For example, in a case in which an environmental SNR is relatively low, a sub-band SNR of a high-frequency part is significantly reduced. In addition, because a psychoacoustic theory is generally used to perform sub-band division, the sub-band SNR of the high-frequency part has relatively low contribution to an SSNR. In this case, for some signals, such as an unvoiced signal, whose energy is mainly centralized at a relatively high frequency part, an SSNR obtained through calculation by using the conventional SSNR calculation method may be lower than the VAD decision threshold, which causes misdetection of an active signal. For another example, for some audio signals, distribution of energy of these audio signals is relatively flat on a spectrum but overall energy of these audio signals is relatively low. Therefore, in the case in which an environmental SNR is relatively low, an SSNR obtained through calculation by using the conventional SSNR calculation method may be lower than the VAD decision threshold. In the method shown inFIG. 4, a manner of reducing a VAD decision threshold is used, so that an SSNR obtained through calculation by using the conventional SSNR calculation method is greater than the VAD decision threshold. Therefore, a proportion of misdetection of an active signal can be effectively reduced.

FIG. 5is a block diagram of an apparatus according to an embodiment. The apparatus shown inFIG. 5can perform all steps shown inFIG. 1orFIG. 2. As shown inFIG. 5, an apparatus500includes a first determining unit501, a second determining unit502, and a third determining unit503.

The first determining unit501is configured to determine an input audio signal as a to-be-determined audio signal.

The second determining unit502is configured to determine an enhanced segmental signal-to-noise ratio (SSNR) of the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The third determining unit503is configured to compare the enhanced SSNR with a voice activity detection (VAD) decision threshold to determine whether the audio signal is an active signal.

The apparatus500shown inFIG. 5may determine a feature of an input audio signal, determine an enhanced SSNR in a corresponding manner according to the feature of the audio signal, and compare the enhanced SSNR with a VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

Optionally, in an embodiment, the first determining unit501is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, in a case in which the first determining unit501determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit501is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in another embodiment, in a case in which the first determining unit501determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit501is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

Optionally, in another embodiment, in a case in which the first determining unit501determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit501is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

Optionally, in another embodiment, the first determining unit501is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a time-domain ZCR of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of voice samples including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for determining the second quantity is similar to a method for determining the first quantity. The second quantity may be the same as the first quantity, or may be different from the first quantity. Similarly, for the third quantity, in the large quantity of voice samples including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are greater than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the second preset threshold is greater than the third quantity. For the fourth quantity, in the large quantity of voice samples including noise, statistics about a quantity of sub-bands whose sub-band SNRs are greater than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the third preset threshold is greater than the fourth quantity.

Further, the second determining unit502is configured to determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a high-frequency end sub-band whose sub-band SNR is greater than the first preset threshold is greater than a weight of a sub-band SNR of another sub-band, and determine the enhanced SSNR according to the SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal.

Optionally, in an embodiment, the second determining unit502is configured to determine a reference SSNR of the audio signal, and determine the enhanced SSNR according to the reference SSNR of the audio signal.

The reference SSNR may be an SSNR obtained through calculation by using formula 1.1. When the reference SSNR is being calculated, weights of sub-band SNRs that are of all sub-bands and that are included in the SSNR are the same in the SSNR.

Optionally, in another embodiment, the second determining unit502is configured to determine the enhanced SSNR by using the following formula:
SSNR′=x*SSNR+yFormula 1.7
where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and x and y indicate enhancement parameters. For example, a value of x may be 1.05, and a value of y may be 1. A person skilled in the art may understand that, values of x and y may be other proper values that make the enhanced SSNR greater than the reference SSNR properly.

Optionally, in another embodiment, the second determining unit502is configured to determine the enhanced SSNR by using the following formula:
SSNR′=f(x)*SSNR+h(y)  Formula 1.8
where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and f(x) and h(y) indicate enhancement functions. For example, f(x) and h(y) may be functions related to a LSNR of the audio signal, where the LSNR of the audio signal is an average SNR or a weighted SNR within a relatively long period of time. For example, when the lsnr is greater than 20, f(lsnr) may be equal to 1.1, and y(lsnr) may be equal to 2; when the lsnr is less than 20 and greater than 15, f(lsnr) may be equal to 1.05, and y(lsnr) may be equal to 1; and when the lsnr is less than 15, f(lsnr) may be equal to 1, and y(lsnr) may be equal to 0. A person skilled in the art may understand that, f(x) and h(y) may be in other proper forms that make the enhanced SSNR greater than the reference SSNR properly.

The third determining unit503is configured to compare the enhanced SSNR with the VAD decision threshold to determine, according to a result of the comparison, whether the audio signal is an active signal. Specifically, if the enhanced SSNR is greater than the VAD decision threshold, it is determined that the audio signal is an active signal, or if the enhanced SSNR is less than the VAD decision threshold, it is determined that the audio signal is an inactive signal.

Optionally, in another embodiment, a preset algorithm may also be used to reduce a reference VAD decision threshold to obtain a reduced VAD decision threshold, and the reduced VAD decision threshold is used to determine whether the audio signal is an active signal. In this case, the apparatus500may further include a fourth determining unit504, where the fourth determining unit504is configured to use a preset algorithm to reduce the VAD decision threshold, so as to obtain a reduced VAD decision threshold. In this case, the third determining unit503is configured to compare the enhanced SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

FIG. 6is a block diagram of another apparatus according to an embodiment. The apparatus shown inFIG. 6can perform all steps shown inFIG. 3. As shown inFIG. 6, an apparatus600includes a first determining unit601, a second determining unit602, and a third determining unit603.

The first determining unit601is configured to determine an input audio signal as a to-be-determined audio signal.

The second determining unit602is configured to determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than a first preset threshold is greater than a weight of a sub-band SNR of another sub-band, and determine an enhanced SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The third determining unit603is configured to compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

The apparatus600shown inFIG. 6may determine a feature of an input audio signal, determine an enhanced SSNR in a corresponding manner according to the feature of the audio signal, and compare the enhanced SSNR with a VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

Further, the first determining unit601is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, the first determining unit601is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a first quantity.

Optionally, in another embodiment, the first determining unit601is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The first quantity, the second quantity, and the third quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for acquiring the second quantity is similar to a method for acquiring the first quantity. The second quantity may be the same as the first quantity, or the second quantity may be different from the first quantity. Similarly, for the third quantity, in the large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are less than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are less than the second preset threshold is greater than the third quantity.

FIG. 7is a block diagram of an apparatus according to an embodiment. The apparatus shown inFIG. 7can perform all steps shown inFIG. 1orFIG. 2. As shown inFIG. 7, an apparatus700includes a processor701and a memory702. The processor701may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logic component, a discrete gate or a transistor logic component, or a discrete hardware component, which may implement or perform the methods, the steps, and the logical block diagrams disclosed in the embodiments. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the methods disclosed in the embodiments may be directly executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art, such as a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory, an electrically-erasable programmable memory, or a register. The storage medium is located in the memory702. The processor701reads an instruction from the memory702, and completes the steps of the foregoing methods in combination with the hardware.

The processor701is configured to determine an input audio signal as a to-be-determined audio signal.

The processor701is configured to determine an enhanced SSNR of the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The processor701is configured to compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

The apparatus700shown inFIG. 7may determine a feature of an input audio signal, determine an enhanced SSNR in a corresponding manner according to the feature of the audio signal, and compare the enhanced SSNR with a VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

Optionally, in an embodiment, the processor701is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, in a case in which the processor701determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor701is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in another embodiment, in a case in which the processor701determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor701is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

Optionally, in another embodiment, in a case in which the processor701determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor701is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

Optionally, in another embodiment, the processor701is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a time-domain ZCR of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of voice samples including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for determining the second quantity is similar to a method for determining the first quantity. The second quantity may be the same as the first quantity, or may be different from the first quantity. Similarly, for the third quantity, in the large quantity of voice samples including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are greater than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the second preset threshold is greater than the third quantity. For the fourth quantity, in the large quantity of voice samples including noise, statistics about a quantity of sub-bands whose sub-band SNRs are greater than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the third preset threshold is greater than the fourth quantity.

Further, the processor701is configured to determine a weight of a sub-band SNR of each sub-band in the audio signal, where a weight of a high-frequency end sub-band whose sub-band SNR is greater than the first preset threshold is greater than a weight of a sub-band SNR of another sub-band, and determine the enhanced SSNR according to the SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal.

Optionally, in an embodiment, the processor701is configured to determine a reference SSNR of the audio signal, and determine the enhanced SSNR according to the reference SSNR of the audio signal.

The reference SSNR may be an SSNR obtained through calculation by using formula 1.1. When the reference SSNR is being calculated, weights of sub-band SNRs that are of all sub-bands and that are included in the SSNR are the same in the SSNR.

Optionally, in another embodiment, the processor701is configured to determine the enhanced SSNR by using the following formula:
SSNR′=x*SSNR+yFormula 1.7
where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and x and y indicate enhancement parameters. For example, a value of x may be 1.07, and a value of y may be 1. A person skilled in the art may understand that, values of x and y may be other proper values that make the enhanced SSNR greater than the reference SSNR properly.

Optionally, in another embodiment, the processor701is configured to determine the enhanced SSNR by using the following formula:
SSNR′=f(x)*SSNR+h(y)  Formula 1.8
where SSNR indicates the reference SSNR, SSNR′ indicates the enhanced SSNR, and f(x) and h(y) indicate enhancement functions. For example, f(x) and h(y) may be functions related to a LSNR of the audio signal, where the LSNR of the audio signal is an average SNR or a weighted SNR within a relatively long period of time. For example, when the lsnr is greater than 20, f(lsnr) may be equal to 1.1, and y(lsnr) may be equal to 2; when the lsnr is less than 20 and greater than 17, f(lsnr) may be equal to 1.07, and y(lsnr) may be equal to 1; and when the lsnr is less than 17, f(lsnr) may be equal to 1, and y(lsnr) may be equal to 0. A person skilled in the art may understand that, f(x) and h(y) may be in other proper forms that make the enhanced SSNR greater than the reference SSNR properly.

The processor701is configured to compare the enhanced SSNR with the VAD decision threshold to determine, according to a result of the comparison, whether the audio signal is an active signal. Specifically, if the enhanced SSNR is greater than the VAD decision threshold, it is determined that the audio signal is an active signal, or if the enhanced SSNR is less than the VAD decision threshold, it is determined that the audio signal is an inactive signal.

Optionally, in another embodiment, a preset algorithm may also be used to reduce a reference VAD decision threshold to obtain a reduced VAD decision threshold, and the reduced VAD decision threshold is used to determine whether the audio signal is an active signal. In this case, the processor701may be further configured to use a preset algorithm to reduce the VAD decision threshold, so as to obtain a reduced VAD decision threshold. In this case, the processor701is configured to compare the enhanced SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

FIG. 8is a block diagram of another apparatus according to an embodiment. The apparatus shown inFIG. 8can perform all steps shown inFIG. 3. As shown inFIG. 8, an apparatus800includes a processor801and a memory802. The processor801may be a general-purpose processor, a DSP, an ASIC, a FPGA or another programmable logic component, a discrete gate or a transistor logic component, or a discrete hardware component, which may implement or perform the methods, the steps, and the logical block diagrams disclosed in the embodiments. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments may be directly executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art, such as a RAM, a flash memory, a ROM, a programmable read-only memory, an electrically-erasable programmable memory, or a register. The storage medium is located in the memory802. The processor801reads an instruction from the memory802, and completes the steps of the foregoing methods in combination with the hardware.

The processor801is configured to determine an input audio signal as a to-be-determined audio signal.

The processor801is configured to determine a weight of a sub-band signal-to-noise ratio SNR of each sub-band in the audio signal, where a weight of a sub-band SNR of a high-frequency end sub-band whose sub-band SNR is greater than a first preset threshold is greater than a weight of a sub-band SNR of another sub-band, and determine an enhanced segmental signal-to-noise ratio SSNR according to the sub-band SNR of each sub-band and the weight of the sub-band SNR of each sub-band in the audio signal, where the enhanced SSNR is greater than a reference SSNR.

The processor801is configured to compare the enhanced SSNR with a VAD decision threshold to determine whether the audio signal is an active signal.

The apparatus800shown inFIG. 8may determine a feature of an input audio signal, determine an enhanced SSNR in a corresponding manner according to the feature of the audio signal, and compare the enhanced SSNR with a VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

Further, the processor801is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band signal-to-noise ratio SNR of the audio signal.

Optionally, in an embodiment, the processor801is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band signal-to-noise ratios SNRs are greater than the first preset threshold is greater than a first quantity.

Optionally, in another embodiment, the processor801is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than the first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The first quantity, the second quantity, and the third quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for acquiring the second quantity is similar to a method for acquiring the first quantity. The second quantity may be the same as the first quantity, or the second quantity may be different from the first quantity. Similarly, for the third quantity, in the large quantity of unvoiced sample frames including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are less than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these unvoiced sample frames and whose sub-band SNRs are less than the second preset threshold is greater than the third quantity.

FIG. 9is a block diagram of another apparatus according to an embodiment. An apparatus900shown inFIG. 9can perform all steps shown inFIG. 4.

As shown inFIG. 9, the apparatus900includes a first determining unit901, a second determining unit902, a third determining unit903, and a fourth determining unit904.

The first determining unit901is configured to determine an input audio signal as a to-be-determined audio signal.

The second determining unit902is configured to acquire a reference SSNR of the audio signal.

Specifically, the reference SSNR may be an SSNR obtained through calculation by using formula 1.1.

The third determining unit903is configured to use a preset algorithm to reduce a reference VAD decision threshold, so as to obtain a reduced VAD decision threshold.

Specifically, the reference VAD decision threshold may be a default VAD decision threshold, and the reference VAD decision threshold may be pre-stored, or may be temporarily obtained through calculation, where the reference VAD decision threshold may be calculated by using an existing well-known technology. When the reference VAD decision threshold is reduced by using the preset algorithm, the preset algorithm may be multiplying the reference VAD decision threshold by a coefficient that is less than 1, or another algorithm may be used. This embodiment imposes no limitation on a used specific algorithm. The VAD decision threshold may be properly reduced by using the preset algorithm, so that the enhanced SSNR is greater than the reduced VAD decision threshold. Therefore, a proportion of misdetection of an active signal can be reduced.

The fourth determining unit904is configured to compare the reference SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

Optionally, in an embodiment, the first determining unit901is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, in a case in which the first determining unit901determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit901is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in an embodiment, in a case in which the first determining unit901determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit901is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

Optionally, in an embodiment, in a case in which the first determining unit901determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the first determining unit901is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

Optionally, in an embodiment, the first determining unit901is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a ZCR of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of voice samples including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for determining the second quantity is similar to a method for determining the first quantity. The second quantity may be the same as the first quantity, or may be different from the first quantity. Similarly, for the third quantity, in the large quantity of voice samples including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are greater than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the second preset threshold is greater than the third quantity. For the fourth quantity, in the large quantity of voice samples including noise, statistics about a quantity of sub-bands whose sub-band SNRs are greater than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the third preset threshold is greater than the fourth quantity.

The apparatus900shown inFIG. 9may determine a feature of an input audio signal, reduce a reference VAD decision threshold according to the feature of the audio signal, and compare an enhanced SSNR with a reduced VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

FIG. 10is a block diagram of another apparatus according to an embodiment. An apparatus1000shown inFIG. 10can perform all steps shown inFIG. 4. As shown inFIG. 10, the apparatus1000includes a processor1001and a memory1002. The processor1001may be a general-purpose processor, a DSP, an ASIC, a FPGA or another programmable logic component, a discrete gate or a transistor logic component, or a discrete hardware component, which may implement or perform the methods, the steps, and the logical block diagrams disclosed in the embodiments. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the methods disclosed in the embodiments may be directly executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art, such as a RAM, a flash memory, a ROM, a programmable read-only memory, an electrically-erasable programmable memory, or a register. The storage medium is located in the memory1002. The processor1001reads an instruction from the memory1002, and completes the steps of the foregoing methods in combination with the hardware.

The processor1001is configured to determine an input audio signal as a to-be-determined audio signal.

The processor1001is configured to acquire a reference SSNR of the audio signal.

Specifically, the reference SSNR may be an SSNR obtained through calculation by using formula 1.1.

The processor1001is configured to use a preset algorithm to reduce a reference VAD decision threshold, so as to obtain a reduced VAD decision threshold.

Specifically, the reference VAD decision threshold may be a default VAD decision threshold, and the reference VAD decision threshold may be pre-stored, or may be temporarily obtained through calculation, where the reference VAD decision threshold may be calculated by using an existing well-known technology. When the reference VAD decision threshold is reduced by using the preset algorithm, the preset algorithm may be multiplying the reference VAD decision threshold by a coefficient that is less than 1, or another algorithm may be used. This embodiment of imposes no limitation on a used specific algorithm. The VAD decision threshold may be properly reduced by using the preset algorithm, so that an enhanced SSNR is greater than the reduced VAD decision threshold. Therefore, a proportion of misdetection of an active signal can be reduced.

The processor1001is configured to compare the reference SSNR with the reduced VAD decision threshold to determine whether the audio signal is an active signal.

Optionally, in an embodiment, the processor1001is configured to determine the audio signal as a to-be-determined audio signal according to a sub-band SNR of the audio signal.

Optionally, in an embodiment, in a case in which the processor1001determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor1001is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a first quantity.

Optionally, in an embodiment, in a case in which the processor1001determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor1001is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of high-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are greater than a first preset threshold is greater than a second quantity, and a quantity of low-frequency end sub-bands that are in the audio signal and whose sub-band SNRs are less than a second preset threshold is greater than a third quantity.

Optionally, in an embodiment, in a case in which the processor1001determines the audio signal as a to-be-determined audio signal according to the sub-band SNR of the audio signal, the processor1001is configured to determine the audio signal as a to-be-determined audio signal in a case in which a quantity of sub-bands that are in the audio signal and whose values of sub-band SNRs are greater than a third preset threshold is greater than a fourth quantity.

Optionally, in an embodiment, the processor1001is configured to determine the audio signal as a to-be-determined audio signal in a case in which it is determined that the audio signal is an unvoiced signal. Specifically, a person skilled in the art may understand that there may be multiple methods for detecting whether the audio signal is an unvoiced signal. For example, whether the audio signal is an unvoiced signal may be determined by detecting a ZCR of the audio signal. Specifically, in a case in which the ZCR of the audio signal is greater than a ZCR threshold, it is determined that the audio signal is an unvoiced signal, where the ZCR threshold is determined according to a large quantity of experiments.

The first preset threshold and the second preset threshold may be obtained by means of statistics collection according to a large quantity of voice samples. Specifically, statistics about sub-band SNRs of high-frequency end sub-bands are collected in a large quantity of unvoiced samples including background noise, and the first preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the high-frequency end sub-bands in these unvoiced samples are greater than the first preset threshold. Similarly, statistics about sub-band SNRs of low-frequency end sub-bands are collected in these unvoiced samples, and the second preset threshold is determined according to the sub-band SNRs, so that sub-band SNRs of most of the low-frequency end sub-bands in these unvoiced samples are less than the second preset threshold.

The third preset threshold is also obtained by means of statistics collection. Specifically, the third preset threshold is determined according to sub-band SNRs of a large quantity of noise signals, so that sub-band SNRs of most of sub-bands in these noise signals are less than the third preset threshold.

The first quantity, the second quantity, the third quantity, and the fourth quantity are also obtained by means of statistics collection. The first quantity is used as an example, where in a large quantity of voice samples including noise, statistics about a sub-band quantity of high-frequency end sub-bands whose sub-band SNRs are greater than the first preset threshold are collected, and the first quantity is determined according to the quantity, so that a quantity of high-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the first preset threshold is greater than the first quantity. A method for determining the second quantity is similar to a method for determining the first quantity. The second quantity may be the same as the first quantity, or may be different from the first quantity. Similarly, for the third quantity, in the large quantity of voice samples including noise, statistics about a sub-band quantity of low-frequency end sub-bands whose sub-band SNRs are greater than the second preset threshold are collected, and the third quantity is determined according to the quantity, so that a quantity of low-frequency end sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the second preset threshold is greater than the third quantity. For the fourth quantity, in the large quantity of voice samples including noise, statistics about a quantity of sub-bands whose sub-band SNRs are greater than the third preset threshold are collected, and the fourth quantity is determined according to the quantity, so that a quantity of sub-bands that are in most of these voice samples and whose sub-band SNRs are greater than the third preset threshold is greater than the fourth quantity.

The apparatus1000shown inFIG. 10may determine a feature of an input audio signal, reduce a reference VAD decision threshold according to the feature of the audio signal, and compare an enhanced SSNR with a reduced VAD decision threshold, so that a proportion of misdetection of an active signal can be reduced.

In addition, functional units in the embodiments disclosed herein may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

The foregoing descriptions are merely specific embodiments, and are not intended to limit the protection scope. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the disclosed embodiments shall fall within the protection scope.