Method and apparatus for detecting a voice activity in an input audio signal
11430461 · 2022-08-30
Assignee
Inventors
Cpc classification
G10L21/0308
PHYSICS
G10L19/22
PHYSICS
International classification
G10L21/0308
PHYSICS
G10L15/20
PHYSICS
G10L19/02
PHYSICS
Abstract
A method for detecting a voice activity in an input audio signal composed of frames includes that a noise characteristic of the input signal is determined based on a received frame of the input audio signal. A voice activity detection (VAD) parameter is derived based on the noise characteristic of the input audio signal using an adaptive function. The derived VAD parameter is compared with a threshold value to provide a voice activity detection decision. The input audio signal is processed according to the voice activity detection decision.
Claims
1. An audio signal encoding method implemented by a signal processing apparatus, the audio signal encoding method comprising: obtaining a frame of an audio signal, wherein the frame comprises a plurality of sub-bands; determining a long-term signal-to-noise ratio of the audio signal; calculating a sub-band specific parameter (sbsp) of each of the sub-bands using an adaptive function, wherein the sbsp of an i.sup.th sub-band sbsp(i) is calculated as follows:
sbsp(i)=(snr(i)+α).sup.β, and wherein i is a sub-band index of the i.sup.th sub-band, snr(i) is a signal-to-noise ratio of the i.sup.th sub-band, (snr(i)+α).sup.β is the adaptive function, α is determined based on the sub-band index i and the long-term signal to noise ratio of the audio signal, and β is determined based on the long-term signal to noise ratio of the audio signal; obtaining a modified segmental signal to noise ratio (mssnr) by summing the sbsp of each of the sub-bands; comparing the mssnr with a threshold value (thr) to provide a voice activity detection decision (VADD), wherein the VADD indicates a voice activity is present or absent in the frame of the audio signal; and encoding the audio signal based on the VADD.
2. The audio signal encoding method of claim 1, wherein
α=g(i,lnsr), and wherein g(i, lsnr) is a non-linear function.
3. The audio signal encoding method of claim 1, wherein determining the long-term signal to noise ratio of the audio signal comprises determining the long-term signal to noise ratio of the audio signal based at least on the frame of the audio signal.
4. The audio signal encoding method of claim 1, further comprising obtaining snr(i).
5. The audio signal encoding method of claim 4, wherein the snr(i) is calculated as follows:
6. The audio signal encoding method of claim 1, wherein comparing the mssnr with the thr to provide the VADD comprises generating the VADD according to:
7. The audio signal encoding method of claim 1, wherein the threshold value is based on the long-term signal to noise ratio of the audio signal.
8. An audio signal processing apparatus, comprising: a memory configured to store program instructions; one or more processors configured to execute the program instructions to cause the audio signal processing apparatus to be configured to: obtain a frame of an audio signal, wherein the frame comprises a plurality of sub-bands; determine a long-term signal to noise ratio of the audio signal; calculate a sub-band specific parameter (sbsp) of each of N sub-bands using an adaptive function, wherein the sbsp of an i.sup.th sub-band sbsp(i) is calculated as follows:
sbsp(i)=(snr(i)+α).sup.β, where i is a sub-band index of the i.sup.th sub-band, snr(i) is a signal to noise ratio of the i.sup.th sub-band, (snr(i)+α).sup.β is the adaptive function, α is determined based on the sub-band index i and the long-term signal to noise ratio of the audio signal, and β is determined based on the long-term signal to noise ratio of the audio signal; obtain a modified segmental signal to noise ratio (mssnr) by summing the calculated sbsp of each sub-band; compare the mssnr with a threshold value (thr) to provide a voice activity detection decision (VADD), wherein the VADD indicates a voice activity is present or absent in the frame of the audio signal; and encode the audio signal based on the VADD.
9. The audio signal processing apparatus of claim 8, wherein
α=g(i,lnsr), where g(i, lsnr) is a non-linear function.
10. The audio signal processing apparatus of claim 8, wherein the program instructions further cause the audio signal processing apparatus to be configured to determine the long-term signal to noise ratio of the audio signal based at least on the frame of the audio signal.
11. The audio signal processing apparatus of claim 8, wherein the program instructions further cause the audio signal processing apparatus to be configured to obtain the snr(i).
12. The audio signal processing apparatus of claim 11, wherein the snr(i) is calculated as follows:
13. The audio signal processing apparatus of claim 8, wherein the program instructions further cause the audio signal processing apparatus to be configured to generate the VADD according to:
14. The audio signal processing apparatus of claim 8, wherein the threshold value is determined based on the long-term signal to noise ratio of the audio signal.
15. A non-transitory computer-readable medium storing computer instructions, that when executed by one or more processors of an audio signal processing apparatus, cause the one or more processors to: obtain a frame of an audio signal, wherein the frame comprises a plurality of sub-bands; determine a long-term signal to noise ratio of the audio signal; calculate a sub-band specific parameter (sbsp) of each sub-band using an adaptive function, wherein the sbsp of an i.sup.th sub-band sbsp(i) is calculated as follows:
sbsp(i)=(snr(i)+α).sup.β, wherein i is a sub-band index of the i.sup.th sub-band, snr(i) is a signal to noise ratio of the i.sup.th sub-band, (snr(i)+α).sup.β is the adaptive function, α is determined based on the sub-band index i and the long-term signal to noise ratio of the audio signal, and β is determined based on the long-term signal to noise ratio of the audio signal; obtain a modified segmental signal to noise ratio (mssnr) by summing the calculated sbsp of each sub-band; compare the mssnr with a threshold value (thr) to provide a voice activity detection decision (VADD), wherein the VADD is used to indicate that a voice activity is present or absent in the frame of the audio signal; and encode the audio signal based on the VADD.
16. The non-transitory computer-readable medium of claim 15, wherein
α=g(i,lnsr), where g(i, lsnr) is a linear or non-linear function.
17. The non-transitory computer-readable medium of claim 15, wherein the instructions further cause the one or more processors to obtain the snr(i).
18. The non-transitory computer-readable medium of claim 17, wherein the snr(i) is calculated as follows:
19. The non-transitory computer-readable medium of claim 15, wherein the instructions further cause the one or more processors to generate the VADD according to:
20. The non-transitory computer-readable medium of claim 15, wherein the threshold value is determined based on the long-term signal to noise ratio of the audio signal.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) In the following, possible implementations of different aspects of the present disclosure are described with reference to the enclosed figures in more detail.
(2)
(3)
(4)
DETAILED DESCRIPTION
(5)
(6) The input audio signal is composed of signal frames. In a first step S1, a noise characteristic of the input audio signal is determined based at least on a received frame of the input audio signal.
(7) In a possible implementation, the input signal is segmented into frames of a predetermined length of e.g. 20 milliseconds (ms), and is inputted frame by frame. In other implementations, the length of the input frame may vary. The noise characteristic of the input audio signal determined in the step S1 may be a long-term signal to noise ratio (LSNR) calculated by a LSNR estimation unit. In another possible implementation, the noise characteristic determined in the step S1 is formed by a background noise variation, calculated by a background noise variation estimation unit which calculates a stationarity or fluctuation ε of the background noise of the input audio signal. It is also possible that the noise characteristic determined in the step S1 includes both the LSNR and the background noise variation.
(8) In a further step S2, the received frame of the input audio signal is divided into several frequency sub-bands.
(9) In a further step S3, a sub-band specific parameter is calculated for each of the sub-bands based on the signal to noise ratio (SNR) of each sub-band using an adaptive function (AF).
(10) In a possible implementation, a power spectrum is obtained for each input frame through a fast Fourier transformation (FFT), and the obtained power spectrum is divided into a predetermined number of sub-bands with non-linear widths. Energies for each sub-band are calculated, wherein the energy for each sub-band of the input frame can in a possible implementation be formed by a smoothed energy that is formed by a weighted average of the energies for the same sub-band between the input frame and at least one previous frame. In a possible implementation of the first aspect of the present disclosure, the sub-band SNR of i.sup.th sub-band (snr(i)) can be calculated as the modified logarithmic SNR of the frequency sub-band:
(11)
wherein E(i) is the energy of i.sup.th sub-band of the input frame, and E.sub.n(i) is the estimated background noise energy of the i.sup.th sub-band. The estimated background noise can be calculated by a background noise estimation unit where the estimated energy of each sub-band of the background noise is calculated by moving-averaging the energies of each sub-band among background noise frames detected. This can be expressed as:
E.sub.n(i)=λ.Math.E.sub.n(i)+(1−λ).Math.E(i),
where E(i) is the energy of the i.sup.th sub-band of the frame detected as background noise, λ is a “forgetting factor” usually in a range between 0.9-0.99.
(12) After having obtained a SNR (snr) for each sub-band of the input frame in step S3, a sub-band specific parameter (sbsp) is calculated in step S4 based on the respective SNR (snr) of the respective sub-band using an adaptive function (AF). In a possible implementation of the method for adaptively detecting a voice activity, in an input audio signal, at least one parameter of the adaptive function (AF) is selected dependent of the determined noise characteristic of the input audio signal. The noise characteristic determined in step S1 can comprise a long term SNR and/or a background noise variation of the input audio signal. The adaptive function (AF) is a non-linear function.
(13) In a possible implementation of the method for adaptively detecting a voice activity in an input audio signal according to the first aspect of the present disclosure, in step S5, a modified segmental SNR (mssnr) is derived by adding the sub-band's specific parameters (sbsp) as follows:
(14)
wherein N is the number of frequency sub-bands into which the input frame is divided, and sbsp(i) is a sub-band specific parameter calculated based on the sub-band's SNR for each sub-band using the adaptive function (AF).
(15) In a possible implementation of the first aspect of the present disclosure, the modified segmental SNR (mssnr) is calculated as follows:
(16)
wherein snr(i) is the SNR of the i.sup.th sub-band of the input frame, N is the number of frequency sub-bands into which the input frame is divided and AF=(ƒ(snr(i))+α).sup.β is the adaptive function used to calculate the sub-band specific parameter sbsp(i), and α, β are two configurable variables of the adaptive function (AF).
(17) In a possible implementation of the first aspect of the present disclosure, the first variable α of the adaptive function (AF) depends on a long term SNR (lsnr) of the input audio signal as follows:
A=g(i,lsnr),
wherein g(i, lsnr) is a linear or non-linear function, and the second variable β of the adaptive function (AF) depends on the long-term SNR (lsnr) and a value φ as follows:
β=h(lsnr,φ),
wherein h(lsnr, φ) is a non-linear function and
φ=ƒ(snr(i))+α.
(18) In a possible implementation of the method according to the first aspect of the present disclosure, the first variable α of the adaptive function (AF) may be calculated by:
α=g(i,lnsr)=a(i)lsnr+b(i),
wherein a(i), b(i) are real numbers depending on a sub-band index i, and the second variable β of the adaptive function (AF) may be calculated by:
(19)
wherein β.sub.1<β.sub.2<β.sub.3 and β.sub.4 and d as well as e.sub.1<e.sub.2 are integer or floating numbers and wherein lsnr is the long-term SNR of the input audio signal.
(20) In a possible specific implementation, β.sub.1=4, β.sub.2=10, β.sub.3=15 and β.sub.4=9. In this specific implementation, d is set to 1, and e.sub.1=8 and e.sub.2=18.
(21) The modified segmental SNR (msnr) is derived in step S5 by adding the sub-band's specific parameters (sbsp). In a further step S6 of the implementation of the method for adaptively detecting a voice activity in an input audio signal as shown in
(22) In a possible implementation, the derived modified segmental SNR (mssnr) is compared with a threshold value thr which is set to:
(23)
wherein k.sub.1>k.sub.2>k.sub.3 and e.sub.1<e.sub.2 are integer or floating numbers, and wherein the VAD decision (VADD) is generated as follows:
(24)
wherein VADD=1 indicates an active frame with voice activity being present, and VADD=0 indicates a passive frame with voice activity being absent.
(25) In a possible specific implementation, k.sub.1=135, k.sub.2=35, k.sub.3=10 and e.sub.1 is set to 8 whereas e.sub.2 is set to 18.
(26) In a further possible implementation of the method for adaptively detecting a voice activity in an input audio signal, the first variable α of the adaptive function (AF) may be calculated by:
A=g(i,lsnr,ε)=a(i)lsnr+b(i)+c(ε),
wherein a(i), b(i) are real numbers depending on a sub-band index i, and c(ε) is a real number depending on the estimated fluctuation of the background noise of the input audio signal, and wherein the second variable β of the adaptive function (AF) may be calculated by:
(27)
wherein φ=ƒ(snr (i))+α and ε is the estimated fluctuation of the background noise and d and e.sub.1<e.sub.2 and p are integer or floating numbers.
(28) In a specific implementation the parameters are set as follows:
β.sub.1=3,β.sub.2=4,β.sub.3=7,β.sub.4=10,β.sub.5=8,β.sub.6=15,β.sub.7=15, and
d=1,e.sub.1=8,e.sub.2=18,p=40.
(29) In an implementation of the method adaptively detecting a voice activity in an input audio signal according to the first aspect of the present disclosure, the derived modified segmental SNR (mssnr) is compared with a threshold value (thr) being set to:
(30)
wherein q.sub.1, q.sub.2, q.sub.3 and r.sub.1, r.sub.2, r.sub.3 and e.sub.1<e.sub.2 and v.sub.1, v.sub.2, v.sub.3 and W.sub.1, W.sub.2, W.sub.3 are integer or floating numbers.
(31) In a specific implementation of the first aspect of the present disclosure, q.sub.1=20, q.sub.2=30, q.sub.3=9 and r.sub.1=30, r.sub.2=10 and r.sub.3=2. Further, v.sub.1=18, v.sub.2=8 and v.sub.3=5 and W.sub.1=8, W.sub.2=10 and W.sub.3=3. Further, the parameters e.sub.1, e.sub.2 are set to e.sub.1=8 and e.sub.2=18.
(32) Accordingly, in a possible embodiment, not only a background noise estimation and a long term SNR estimation is performed but additionally also a background noise variation estimation is performed to determine a background noise fluctuation ε of the background noise of the input audio signal.
(33) Two factors, α, β of the adaptive function (AF) adjust a trade-off of the discriminating power of the modified segmental SNR parameter. Different trade-offs signify that the detection is more favorable for either active or inactive detection for the received frames. Generally the higher the long term SNR of the input audio signal is the more favorable it is to adjust the modified segmental SNR for active detection by means of adjusting the corresponding coefficients α, β of the adaptive function.
(34) The VAD decision performed in step S6 can further go through a hard hang-over procedure. A hard hang-over procedure forces the VAD decisions for several frames to be active immediately after the VAD decision obtained in step S6 changes from active to inactive.
(35) In a possible implementation of the method for adaptively detecting a voice activity in an input audio signal according to the first aspect of the present disclosure, the background noise of the input audio signal is analyzed and a number representing the extent of stationarity or fluctuation of the background noise, denoted by ε, is generated. This fluctuation ε of the background noise can be calculated, for example, by:
ε=ω.Math.ε+(1−ω).Math.ssnr.sub.n,
wherein ω is a forgetting factor usually between 0.9-0.99 and ssnr.sub.n is the summation of snr(i) over all sub-bands of the frame detected as a background frame multiplied by a factor of e.g. 10.
(36)
(37) In a possible implementation of the VAD apparatus 1 according to the second aspect of the present disclosure, the VAD detection apparatus 1 further comprises a noise characteristic determination unit 6 as shown in
(38)