Audio processing method, device, electronic device and storage medium
By obtaining the noise signal and reverberation duration in the audio signal, calculating the signal-to-noise ratio and noise reduction gain factor, and performing dereverberation processing combined with the reverberation signal, the problem in the existing technology of poor dereverberation effect when noise exists is solved. Improves the quality and intelligibility of audio signals.
Patent Information
- Application Number
- CN202010930871.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-07
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-09-07
AI Technical Summary
In the existing technology, when there is noise in the audio signal, the dereverberation effect is poor, resulting in a high dependence on the signal-to-noise ratio of the audio signal and poor convergence, which affects the quality of the audio signal.
By obtaining the noise signal and reverberation duration in the audio signal to be processed, the signal-to-noise ratio and the noise reduction gain factor are calculated, and the audio signal is dereverberated based on the reverberation signal, and the smoothed gain factor is used for the dereverberation operation. .
When there is noise in the audio signal, it can effectively remove the reverberation, stably reduce the disturbance of the reverberation to the audio signal, improve the quality and intelligibility of the audio signal, and ensure that the audio signal after dereverberation is not distorted.
Smart Images

Figure CN112201267B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of audio technology, and in particular to an audio processing method, device, electronic device and storage medium. Background Art
[0002] Acoustic reverberation is a common physical phenomenon caused by the reflection of sound waves. When using a microphone to collect audio signals, reverberation will interfere with the audio signals. Severe reverberation will cause the intelligibility of the audio signals to decrease. Therefore, dereverberation technology for audio signals has received a certain amount of attention in scenarios such as audio communication and high-quality voice collection and playback.
[0003] In the related art, a dereverberation method based on WPE (Weighted Prediction Error) is usually used to dereverberate the audio signal. However, this method has a high dependence on the signal-to-noise ratio of the audio signal. When there is noise in the audio signal, it will lead to poor convergence of the algorithm, and ultimately lead to poor dereverberation effect. Summary of the invention
[0004] In order to solve the technical problem in the related art that when there is noise in the audio signal, the dereverberation effect of the audio signal is poor, the present disclosure provides an audio processing method, device, electronic device and storage medium. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an audio processing method, including:
[0006] Obtaining the audio signal to be processed;
[0007] Acquire a noise signal included in the audio signal to be processed and a reverberation duration of the audio signal to be processed;
[0008] Determining a signal-to-noise ratio and a noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal, and determining a reverberation signal included in the audio signal to be processed according to the audio signal to be processed and the reverberation duration;
[0009] The audio signal to be processed is dereverberated according to the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal to obtain a dereverberated audio signal.
[0010] Optionally, dereverberating the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal to obtain a dereverberated audio signal includes:
[0011] For any current frame audio signal of the audio signal to be processed, calculating a first gain factor corresponding to the current frame audio signal through an audio signal of the current frame audio signal, a reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor;
[0012] Calculating a second gain factor according to the first gain factor and a noise reduction gain factor corresponding to the current frame audio signal;
[0013] Performing smoothing processing on the first gain factor and the second gain factor to obtain a target gain factor;
[0014] The current frame audio signal is dereverberated by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
[0015] Optionally, when the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation duration of the current frame audio signal is greater than a preset reverberation duration;
[0016] The calculating the second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal includes:
[0017] The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula:
[0018]
[0019] Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal;
[0020] The second gain factor is calculated according to the following formula:
[0021]
[0022] Among them, G tmp is the second gain factor, the G dereverb (n) is the first gain factor corresponding to the current frame audio signal, and the G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
[0023] Optionally, when the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation time of the current frame audio signal is less than a preset reverberation time;
[0024] The calculating the second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal includes:
[0025] The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
[0026] Optionally, determining the reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation duration includes:
[0027] For any current frame audio signal of the audio signal to be processed, calculating the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal;
[0028] Determine the excitation energy vector of the current frame audio signal according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal;
[0029] The reverberation signal of the current frame audio signal is determined according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal.
[0030] Optionally, for any current frame audio signal of the audio signal to be processed, calculating the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal includes:
[0031] When the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, determining the energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal after attenuation to be 0;
[0032] When the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula:
[0033]
[0034] Among them, the R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, the Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and the T1 is the time interval between two adjacent frames of the audio signal to be processed.
[0035] Optionally, determining the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal includes:
[0036] The reverberation signal of the current frame audio signal is calculated according to the following formula:
[0037]
[0038] M = RT60(n) / T1;
[0039] Among them, the Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the first M frames of the current frame audio signal.
[0040] Optionally, obtaining the audio signal to be processed includes:
[0041] Get the original audio signal;
[0042] Performing short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal;
[0043] The time-frequency domain signal is determined as the audio signal to be processed.
[0044] Optionally, the method further includes:
[0045] The noise signal included in the audio signal to be processed is removed by using the noise reduction gain factor.
[0046] According to a second aspect of an embodiment of the present disclosure, there is provided an audio processing device, including:
[0047] An audio signal acquisition module is configured to acquire an audio signal to be processed;
[0048] A noise signal and reverberation duration acquisition module, configured to execute acquisition of the noise signal included in the audio signal to be processed and the reverberation duration of the audio signal to be processed;
[0049] a signal-to-noise ratio and reverberation signal determination module, configured to determine the signal-to-noise ratio and noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal, and to determine the reverberation signal included in the audio signal to be processed according to the audio signal to be processed and the reverberation duration;
[0050] The dereverberation module is configured to dereverberate the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain a dereverberated audio signal.
[0051] Optionally, the dereverberation module includes:
[0052] A first gain factor calculation unit is configured to calculate, for any current frame audio signal of the audio signal to be processed, a first gain factor corresponding to the current frame audio signal through an audio signal of the current frame audio signal, a reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor;
[0053] A second gain factor calculation unit is configured to calculate a second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal;
[0054] a target gain factor calculation unit, configured to perform smoothing processing on the first gain factor and the second gain factor to obtain a target gain factor;
[0055] The dereverberation unit is configured to perform dereverberation on the current frame audio signal by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
[0056] Optionally, when the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation duration of the current frame audio signal is greater than a preset reverberation duration;
[0057] The second gain factor calculation unit is specifically configured to execute:
[0058] The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula:
[0059]
[0060] Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal;
[0061] The second gain factor is calculated according to the following formula:
[0062]
[0063] Among them, G tmp is the second gain factor, the G dereverb (n) is the first gain factor corresponding to the current frame audio signal, and the G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
[0064] Optionally, when the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation time of the current frame audio signal is less than a preset reverberation time;
[0065] The second gain factor calculation unit is specifically configured to execute:
[0066] The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
[0067] Optionally, the signal-to-noise ratio and reverberation signal determination module includes:
[0068] an energy calculation unit, configured to calculate, for any current frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal;
[0069] an excitation energy vector determining unit, configured to determine the excitation energy vector of the current frame audio signal according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal;
[0070] The reverberation signal determination unit is configured to determine the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal.
[0071] Optionally, the energy calculation unit is specifically configured to execute:
[0072] When the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, determining the energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal after attenuation to be 0;
[0073] When the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula:
[0074]
[0075] Among them, the R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, the Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and the T1 is the time interval between two adjacent frames of the audio signal to be processed.
[0076] Optionally, the reverberation signal determining unit is specifically configured to execute:
[0077] The reverberation signal of the current frame audio signal is calculated according to the following formula:
[0078]
[0079] M = RT60(n) / T1;
[0080] Among them, the Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the first M frames of the current frame audio signal.
[0081] Optionally, the audio signal acquisition module is specifically configured to execute:
[0082] Get the original audio signal;
[0083] Performing short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal;
[0084] The time-frequency domain signal is determined as the audio signal to be processed.
[0085] Optionally, the device further comprises:
[0086] The denoising module is configured to remove the noise signal included in the audio signal to be processed by using the noise reduction gain factor.
[0087] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0088] processor;
[0089] a memory for storing instructions executable by the processor;
[0090] The processor is configured to execute the instructions to implement the audio processing method described in the first aspect.
[0091] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the audio processing method described in the first aspect.
[0092] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the audio processing method described in the first aspect.
[0093] The technical solution provided by the embodiment of the present disclosure comprises the steps of obtaining an audio signal to be processed; obtaining a noise signal included in the audio signal to be processed and a reverberation duration of the audio signal to be processed; determining a signal-to-noise ratio and a noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal; and determining a reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation duration; and dereverberating the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain a dereverberated audio signal.
[0094] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 is a flowchart of an audio processing method according to an exemplary embodiment;
[0096] Figure 2 yes Figure 1 A flowchart of an implementation of step S14 in the illustrated embodiment;
[0097] Figure 3 is a flowchart showing an implementation of determining a reverberation signal included in an audio signal to be processed according to the audio signal to be processed and the reverberation duration according to an exemplary embodiment;
[0098] Figure 4 is a schematic diagram showing an audio processing process according to an exemplary embodiment;
[0099] Figure 5 is a block diagram of an audio processing device according to an exemplary embodiment;
[0100] Figure 6 is a block diagram of an electronic device according to an exemplary embodiment;
[0101] Figure 7 is a block diagram of an audio processing device according to an exemplary embodiment;
[0102] Figure 8 is a block diagram of another audio processing device according to an exemplary embodiment. DETAILED DESCRIPTION
[0103] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0104] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0105] In order to solve the technical problem in the related art that when there is noise in the audio signal, the dereverberation effect of the audio signal is poor, the embodiments of the present disclosure provide an audio processing method, device, electronic device and storage medium.
[0106] In the first aspect, an audio processing method provided by an embodiment of the present disclosure is first described in detail.
[0107] like Figure 1 As shown, an audio processing method provided by an embodiment of the present disclosure may include the following steps:
[0108] In step S11, an audio signal to be processed is obtained.
[0109] Specifically, the audio signal to be processed is an audio signal to be dereverberated. In practical applications, the audio signal to be processed usually includes signal components such as a speech signal, a noise signal, and a reverberation signal.
[0110] In one implementation, obtaining the audio signal to be processed may include the following steps, namely, step a1 to step a3:
[0111] Step a1: obtaining an original audio signal.
[0112] Step a2: Perform short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal.
[0113] Step a3: determine the time-frequency domain signal as the audio signal to be processed.
[0114] In this implementation, the original audio signal can be converted into a time-frequency domain signal by short-time Fourier transform, specifically, as shown in the following formula:
[0115] X(n) = STFT(x(t))
[0116] Wherein, x(t) is the time domain audio signal, X(n) is the time-frequency domain audio signal, n is the frame sequence, 0<n≤N, and N is the total number of frames. It should be noted that, since the processing in each frequency band is the same in the embodiment of the present disclosure, the symbol indicating the frequency band information is not reflected in the frequency domain signal. After the original audio signal is converted into the time-frequency domain signal, the time-frequency domain signal can be determined as the audio signal to be processed.
[0117] In step S12, the noise signal included in the audio signal to be processed and the reverberation duration of the audio signal to be processed are obtained.
[0118] Specifically, after obtaining the audio signal to be processed, the noise signal included in the audio signal to be processed can be extracted by methods such as stationary noise estimation based on a time window and noise estimation based on statistics. Those skilled in the art should understand that the specific implementation process of extracting the noise signal based on stationary noise estimation based on a time window or noise estimation based on statistics will not be repeated in the embodiments of the present disclosure. Moreover, the embodiments of the present disclosure do not specifically limit the method for extracting the noise signal included in the audio signal to be processed. In addition, in practical applications, only the stationary noise signal included in the audio signal to be processed can be extracted, without extracting the unsteady noise signal included in the signal to be processed.
[0119] Furthermore, the reverberation time of the audio signal to be processed is obtained by using the attenuation characteristics of the audio signal to be processed. Specifically, the audio signal to be processed can be input into a pre-trained reverberation time estimation model, and the reverberation time estimation model extracts the attenuation characteristics of each frame of audio signal included in the audio signal to be processed, and obtains the reverberation time corresponding to each frame of audio signal based on the attenuation characteristics of each frame of audio signal, that is, the output from the reverberation time estimation model is RT60(n), where RT60(n) is the reverberation time corresponding to each frame of audio signal.
[0120] Of course, the reverberation duration of the audio signal to be processed may also be obtained through other implementations. The embodiment of the present disclosure does not specifically limit the specific implementation of obtaining the reverberation duration of the audio signal to be processed through the attenuation characteristics of the audio signal to be processed.
[0121] In step S13, the signal-to-noise ratio and the noise reduction gain factor of the audio signal to be processed are determined according to the audio signal to be processed and the noise signal, and the reverberation signal included in the audio signal to be processed is determined according to the audio signal to be processed and the reverberation duration.
[0122] Specifically, after obtaining the audio signal to be processed and the noise signal, the audio signal to be processed X(n) and the noise signal Noise(n) can be used to estimate the signal-to-noise ratio and the noise reduction gain factor of each frame of the audio signal included in the audio signal to be processed, and then obtain the signal-to-noise ratio and the noise reduction gain factor of the audio signal to be processed.
[0123] In addition, the signal-to-noise ratio of each frame of the audio signal to be processed may be calculated using the following formula:
[0124]
[0125] Among them, SNR(n) represents the signal-to-noise ratio corresponding to the n-th frame audio signal, X(n) is the signal voltage corresponding to the n-th frame audio signal; Noise(n) is the signal voltage corresponding to the n-th frame noise signal.
[0126] The noise reduction gain factor of each frame of the audio signal included in the audio signal to be processed can be calculated using the following formula:
[0127]
[0128] Furthermore, the reverberation signal of the audio signal to be processed may be determined according to the audio signal to be processed and the reverberation duration. Specifically, after the reverberation duration of each frame of audio signal included in the audio signal to be processed is obtained, the reverberation signal of the audio signal to be processed may be obtained according to the audio signal to be processed and the reverberation duration of each frame of audio signal.
[0129] For a clear description of the solution, a specific implementation method of determining the reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation duration will be described in detail in the following embodiments.
[0130] In step S14, the audio signal to be processed is dereverberated according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain a dereverberated audio signal.
[0131] Specifically, after obtaining the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal of the audio signal to be processed, the audio signal to be processed can be dereverberated according to the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal to obtain the dereverberated audio signal. It can be seen that the technical solution provided by the embodiment of the present disclosure takes the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal into consideration when dereverberating the audio signal to be processed, so that when the audio signal to be processed has noise, the audio signal to be processed can also be dedereverberated well.
[0132] For a clear description of the solution, the specific implementation method of step S14, dereverberating the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain the dereverberated audio signal, will be described in detail in the following embodiments.
[0133] The technical solution provided by the embodiment of the present disclosure comprises the steps of obtaining an audio signal to be processed; obtaining a noise signal included in the audio signal to be processed and a reverberation time of the audio signal to be processed; determining a signal-to-noise ratio and a noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal; and determining a reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation time; and dereverberating the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain a dereverberated audio signal.
[0134] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0135] For a clear description of the solution, the specific implementation method of step S14, dereverberating the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain the dereverberated audio signal, will be described in detail in the following embodiments.
[0136] In one implementation, the audio signal to be processed is de-reverberated according to the signal-to-noise ratio, the noise reduction gain factor, and the reverberation signal to obtain a de-reverberated audio signal, such as Figure 2 As shown, the following steps may be included:
[0137] In step S141, for any current frame audio signal of the audio signal to be processed, a first gain factor corresponding to the current frame audio signal is calculated through the audio signal of the current frame audio signal, the reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor.
[0138] Specifically, the current frame audio signal may be any frame audio signal of the audio signal to be processed. The first gain factor corresponding to the current frame audio signal may be calculated according to the following formula:
[0139]
[0140] Among them, G dereverb (n) is the first gain factor corresponding to the current frame audio signal, |X(n)| 2 is the energy of the current frame audio signal, Sr(n) is the reverberation signal corresponding to the current frame audio signal, lambda is the preset minimum dereverberation gain factor, and the size of lambda can be set according to the maximum limit of dereverberation required, for example, the size of lambda can be 0.1.
[0141] In step S142, a second gain factor is calculated according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal.
[0142] Specifically, after the first gain factor is calculated, the second gain factor may be calculated according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal.
[0143] Furthermore, in order to accurately calculate the second gain factor, the audio signal to be processed can be better de-reverberated in the subsequent steps. In practical applications, when calculating the second gain factor, there are two cases.
[0144] As an implementation method of an embodiment of the present disclosure, the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation time of the current frame audio signal is greater than the preset reverberation time; wherein the preset signal-to-noise ratio may be 20 dB, and the preset reverberation time may be 300 ms. The embodiment of the present disclosure does not specifically limit the preset signal-to-noise ratio and the preset reverberation time.
[0145] At this time, calculating the second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal may include the following steps:
[0146] The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula:
[0147]
[0148] Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal;
[0149] The second gain factor is calculated according to the following formula:
[0150]
[0151] Among them, G tmp is the second gain factor, G dereverb (n) is the first gain factor corresponding to the current frame audio signal, G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
[0152] As another implementation method of the embodiment of the present disclosure, the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation time of the current frame audio signal is less than a preset reverberation time; wherein the preset signal-to-noise ratio may be 20 dB, and the preset reverberation time may be 300 ms. The embodiment of the present disclosure does not specifically limit the preset signal-to-noise ratio and the preset reverberation time.
[0153] At this time, calculating the second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal includes:
[0154] The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
[0155] That is, G tmp =G denoise (n).
[0156] In step S143, the first gain factor and the second gain factor are smoothed to obtain a target gain factor.
[0157] After the first gain factor and the second gain factor are calculated, the first gain factor and the second gain factor may be smoothed to obtain a target gain factor for dereverberation.
[0158] Specifically, the first gain factor and the second gain factor may be smoothed according to the following formula:
[0159] G(n)=smooth*G dereverb (n-1)+(1-smooth)*G tmp .
[0160] It should be noted that when n=1, G dereverb (n-1) is the initialization gain factor, i.e. G dereverb (0)=1. Wherein, smooth is a smoothing coefficient, and the magnitude of the smoothing coefficient may be a value close to 1, such as 0.9.
[0161] In step S144, the current frame audio signal is dereverberated by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
[0162] Specifically, after obtaining the target gain factor G(n) corresponding to the current frame audio signal, the current frame audio signal may be dereverberated using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
[0163] The dedeverberated audio signal corresponding to the current frame audio signal can be obtained according to the following formula:
[0164] Y(n)=G(n)*X(n)
[0165] Y(n) is the dedeverberated audio signal corresponding to the current frame audio signal, G(n) is the target gain factor corresponding to the current frame audio signal, and X(n) is the current frame audio signal.
[0166] Since the current frame audio signal may be any frame audio signal of the audio signal to be processed, after all dereverberated audio signals corresponding to the current frame audio signals are obtained, the dereverberated audio signals of the audio signal to be processed can be obtained.
[0167] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0168] For a clear description of the solution, a specific implementation method of determining the reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation duration will be described in detail in the following embodiments.
[0169] In one implementation, the reverberation signal of the audio signal to be processed is determined according to the audio signal to be processed and the reverberation duration, such as Figure 3 As shown, the following steps may be included:
[0170] In step S131, for any current frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated.
[0171] Specifically, if the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, then the current frame audio signal does not have the previous frame audio signal, and therefore, there is no excitation energy vector of the previous frame audio signal. At this time, the excitation energy vector of the previous frame audio signal can be initialized, that is, Ra(n)=0, and the energy of the excitation energy vector of the previous frame audio signal after attenuation is also 0.
[0172] If the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, then the current frame audio signal has the previous frame audio signal, and therefore, there is also an excitation energy vector of the previous frame audio signal. At this time, the energy of the excitation energy vector of the previous frame audio signal after attenuation is not 0.
[0173] As an implementation of the embodiment of the present disclosure, for any current frame audio signal of the audio signal to be processed, calculating the energy after the attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal may include the following steps, namely step b1 and step b2:
[0174] Step b1: when the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is determined to be 0.
[0175] From the above description, it can be known that when the current audio frame signal is the first audio frame signal, there is no previous audio frame signal for the current audio frame signal, so the attenuated energy of the excitation energy vector of the previous frame of the current audio frame signal can be determined to be 0.
[0176] Step b2, when the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula:
[0177]
[0178] Among them, R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and T1 is the time interval between two adjacent frames of the audio signal to be processed.
[0179] In step S132, the excitation energy vector of the current frame audio signal is determined according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal.
[0180] Specifically, after obtaining the energy of the excitation energy vector of the previous frame audio signal after attenuation and the energy of the current frame audio signal, the energy of the excitation energy vector of the previous frame audio signal after attenuation and the energy of the current frame audio signal are compared, and the maximum value is taken to obtain the excitation energy vector of the current frame audio signal. The specific formula is as follows:
[0181] Ra(n)=max(R(n),|X(n)| 2 )
[0182] Among them, Ra(n) is the excitation energy vector of the current frame audio signal, R(n) is the energy after the excitation energy vector of the previous frame audio signal is attenuated, |X(n)| 2 is the energy of the audio signal of the current frame.
[0183] In step S133, the reverberation signal of the current frame audio signal is determined according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the audio signal to be processed, and the reverberation duration corresponding to the current frame audio signal.
[0184] Specifically, after obtaining the excitation energy vector of the current frame audio signal, the reverberation signal of the current frame audio signal can be obtained through the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the audio signal to be processed, and the reverberation duration corresponding to the current frame audio signal.
[0185] As an implementation of the embodiment of the present disclosure, determining the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the audio signal to be processed, and the reverberation duration corresponding to the current frame audio signal may include the following steps:
[0186] The reverberation signal of the current frame audio signal is calculated according to the following formula:
[0187]
[0188] M = RT60(n) / T1;
[0189] Among them, Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the previous M frames of the current frame audio signal.
[0190] Since the current frame audio signal may be any frame audio signal of the audio signal to be processed, after obtaining the reverberation signals of all the current frame audio signals, the reverberation signals included in the audio signal to be processed may be obtained.
[0191] It can be seen that through the technical solution provided by this embodiment, by estimating the reverberation duration of the audio signal to be processed and using the excitation energy vector, the reverberation signal included in the audio signal to be processed can be accurately and efficiently determined, which is beneficial to the subsequent dereverberation of the audio signal to be processed.
[0192] On the basis of the above embodiment, in order to further improve the signal quality of the audio signal after dereverberation, in one implementation manner, the audio processing method may further include the following steps:
[0193] The noise signal included in the audio signal to be processed is removed by using the noise reduction gain factor.
[0194] In this implementation, not only can the audio signal to be processed be de-reverberated, but also the audio signal to be processed can be de-noised, so that the signal quality of the audio signal obtained after processing is higher.
[0195] In order to describe the scheme clearly, the audio processing signal provided by the embodiment of the present disclosure will be described in detail below with reference to specific examples. Figure 4 shown.
[0196] In practical applications, the following modules may be included: stationary noise estimation module, signal-to-noise ratio estimation module, reverberation time estimation module, reverberation spectrum estimation module, and reverberation elimination module.
[0197] The audio input is the audio signal to be processed collected by the system microphone module, which usually includes signal components such as speech signal, noise signal and reverberation signal.
[0198] Firstly, the audio signal to be processed is input into a stationary noise estimation module, and the stationary noise estimation module is used to estimate the stationary noise signal included in the audio signal to be processed.
[0199] Secondly, the signal-to-noise ratio estimation module uses the noise signal estimation result output by the stationary noise estimation module to estimate the signal-to-noise ratio, and at the same time calculates the gain factor for removing noise, namely the noise reduction gain factor.
[0200] Thirdly, the audio signal to be processed may be input into a reverberation time estimation module, and the reverberation time estimation module is used to estimate the environmental reverberation level of the audio signal to be processed, that is, to estimate the reverberation time RT60 of the audio signal to be processed.
[0201] Then, the reverberation spectrum is estimated using the reverberation time RT60 index obtained by the reverberation time estimation module as a reference to obtain the reverberation spectrum of the audio signal to be processed, that is, to obtain the reverberation signal included in the audio signal to be processed.
[0202] Finally, the reverberation signal and the stationary noise signal in the audio signal to be processed are eliminated simultaneously using the estimated reverberation spectrum, the estimated signal-to-noise ratio, the noise reduction gain factor and other information to obtain the dereverberated output audio, that is, the processed audio signal.
[0203] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation spectrum are taken into consideration, so that when there is a noise signal in the audio signal to be processed, the audio signal to be processed can be de-dereverberated well, and the noise reduction gain factor can be used to denoise the audio signal to be processed. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0204] According to a second aspect of the embodiments of the present disclosure, there is provided an audio processing device, such as Figure 5 As shown, including:
[0205] The audio signal acquisition module 510 is configured to acquire an audio signal to be processed;
[0206] The noise signal and reverberation duration acquisition module 520 is configured to execute acquisition of the noise signal included in the audio signal to be processed and the reverberation duration of the audio signal to be processed;
[0207] The signal-to-noise ratio and reverberation signal determination module 530 is configured to determine the signal-to-noise ratio and the noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal, and determine the reverberation signal included in the audio signal to be processed according to the audio signal to be processed and the reverberation duration;
[0208] The dereverberation module 540 is configured to dereverberate the audio signal to be processed according to the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal to obtain a dereverberated audio signal.
[0209] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0210] Optionally, the dereverberation module includes:
[0211] A first gain factor calculation unit is configured to calculate, for any current frame audio signal of the audio signal to be processed, a first gain factor corresponding to the current frame audio signal through an audio signal of the current frame audio signal, a reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor;
[0212] A second gain factor calculation unit is configured to calculate a second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal;
[0213] a target gain factor calculation unit, configured to perform smoothing processing on the first gain factor and the second gain factor to obtain a target gain factor;
[0214] The dereverberation unit is configured to perform dereverberation on the current frame audio signal by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
[0215] Optionally, when the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation duration of the current frame audio signal is greater than a preset reverberation duration;
[0216] The second gain factor calculation unit is specifically configured to execute:
[0217] The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula:
[0218]
[0219] Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal;
[0220] The second gain factor is calculated according to the following formula:
[0221]
[0222] Among them, G tmp is the second gain factor, the G dereverb (n) is the first gain factor corresponding to the current frame audio signal, and the G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
[0223] Optionally, when the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation time of the current frame audio signal is less than a preset reverberation time;
[0224] The second gain factor calculation unit is specifically configured to execute:
[0225] The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
[0226] Optionally, the signal-to-noise ratio and reverberation signal determination module includes:
[0227] an energy calculation unit, configured to calculate, for any current frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal;
[0228] an excitation energy vector determining unit, configured to determine the excitation energy vector of the current frame audio signal according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal;
[0229] The reverberation signal determination unit is configured to determine the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal.
[0230] Optionally, the energy calculation unit is specifically configured to execute:
[0231] When the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, determining the energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal after attenuation to be 0;
[0232] When the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula:
[0233]
[0234] Among them, the R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, the Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and the T1 is the time interval between two adjacent frames of the audio signal to be processed.
[0235] Optionally, the reverberation signal determining unit is specifically configured to execute:
[0236] The reverberation signal of the current frame audio signal is calculated according to the following formula:
[0237]
[0238] M = RT60(n) / T1;
[0239] Among them, the Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the first M frames of the current frame audio signal.
[0240] Optionally, the audio signal acquisition module is specifically configured to execute:
[0241] Get the original audio signal;
[0242] Performing short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal;
[0243] The time-frequency domain signal is determined as the audio signal to be processed.
[0244] Optionally, the device further comprises:
[0245] The denoising module is configured to remove the noise signal included in the audio signal to be processed by using the noise reduction gain factor.
[0246] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, such as Figure 6 As shown, including:
[0247] Processor 610;
[0248] A memory 620 for storing instructions executable by the processor;
[0249] The processor is configured to execute the instructions to implement the audio processing method described in the first aspect.
[0250] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0251] Figure 7 is a block diagram of an audio processing apparatus 700 according to an exemplary embodiment. For example, the apparatus 700 may be provided as a server. Figure 7 The apparatus 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732 for storing instructions executable by the processing component 722, such as an application. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the audio processing method described in the first aspect.
[0252] The device 700 may also include a power supply component 726 configured to perform power management of the device 700, a wired or wireless network interface 750 configured to connect the device 700 to a network, and an input / output (I / O) interface 758. The device 700 may operate based on an operating system stored in the memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0253] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0254] Figure 8 8 is a block diagram of an audio processing device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0255] Reference Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0256] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0257] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0258] The power supply component 807 provides power to the various components of the device 800. The power supply component 807 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0259] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0260] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0261] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0262] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0263] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0264] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the audio processing method described in the first aspect.
[0265] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above method. Optionally, for example, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0266] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0267] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the audio processing method described in the first aspect.
[0268] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0269] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the audio processing method described in the first aspect.
[0270] It can be seen that, through the technical solution provided by the embodiment of the present disclosure, when dereverberating the audio signal to be processed, the signal-to-noise ratio, the noise reduction gain factor and the reverberation signal are taken into consideration, so that when the audio signal to be processed has a noise signal, the audio signal to be processed can be de-dereverberated well. In addition, the disturbance of the reverberation to the audio signal can be stably reduced, and the audio signal after dereverberation will not be distorted, thereby improving the quality and intelligibility of the audio signal in the real-time communication scenario.
[0271] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0272] The present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An audio processing method, characterized in that: include: Obtaining the audio signal to be processed; Acquire a noise signal included in the audio signal to be processed and a reverberation duration of the audio signal to be processed; Determining a signal-to-noise ratio and a noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal, and determining a reverberation signal included in the audio signal to be processed according to the audio signal to be processed and the reverberation duration; According to the signal-to-noise ratio, the noise reduction gain factor, the reverberation signal, and the audio signal to be processed, a first gain factor and a second gain factor are determined, and the audio signal to be processed is dereverberated according to the first gain factor and the second gain factor to obtain a dereverberated audio signal; the audio signal to be processed includes a current frame audio signal; when the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation time of the current frame audio signal is greater than a preset reverberation time; the second gain factor is calculated in the following manner: The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula: Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal; The second gain factor is calculated according to the following formula: Among them, G tmp is the second gain factor, the G dereverb (n) is the first gain factor corresponding to the current frame audio signal, and the G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
2. The method according to claim 1, characterized in that The step of determining a first gain factor and a second gain factor according to the signal-to-noise ratio, the noise reduction gain factor, the reverberation signal, and the audio signal to be processed, and dereverberating the audio signal to be processed according to the first gain factor and the second gain factor to obtain a dereverberated audio signal includes: For any current frame audio signal of the audio signal to be processed, calculating a first gain factor corresponding to the current frame audio signal through an audio signal of the current frame audio signal, a reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor; Calculating a second gain factor according to the first gain factor and a noise reduction gain factor corresponding to the current frame audio signal; Performing smoothing processing on the first gain factor and the second gain factor to obtain a target gain factor; The current frame audio signal is dereverberated by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
3. The method according to claim 2, characterized in that When the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation time of the current frame audio signal is less than a preset reverberation time; The calculating the second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal includes: The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
4. The method according to claim 1, characterized in that: The step of determining the reverberation signal of the audio signal to be processed according to the audio signal to be processed and the reverberation duration includes: For any current frame audio signal of the audio signal to be processed, calculating the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal; Determine the excitation energy vector of the current frame audio signal according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal; The reverberation signal of the current frame audio signal is determined according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal.
5. The method according to claim 4, characterized in that The step of calculating, for any current frame audio signal of the audio signal to be processed, the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal comprises: When the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, determining the energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal after attenuation to be 0; When the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula: Among them, the R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, the Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and the T1 is the time interval between two adjacent frames of the audio signal to be processed.
6. The method according to claim 5, characterized in that The step of determining the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal comprises: The reverberation signal of the current frame audio signal is calculated according to the following formula: M = RT60(n) / T1; Among them, the Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the first M frames of the current frame audio signal.
7. The method according to any one of claims 1 to 6, characterized in that: The step of obtaining the audio signal to be processed comprises: Get the original audio signal; Performing short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal; The time-frequency domain signal is determined as the audio signal to be processed.
8. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The noise signal included in the audio signal to be processed is removed by using the noise reduction gain factor.
9. An audio processing device, characterized in that: include: An audio signal acquisition module is configured to acquire an audio signal to be processed; A noise signal and reverberation duration acquisition module, configured to execute acquisition of the noise signal included in the audio signal to be processed and the reverberation duration of the audio signal to be processed; a signal-to-noise ratio and reverberation signal determination module, configured to determine the signal-to-noise ratio and noise reduction gain factor of the audio signal to be processed according to the audio signal to be processed and the noise signal, and to determine the reverberation signal included in the audio signal to be processed according to the audio signal to be processed and the reverberation duration; The dereverberation module is configured to determine a first gain factor and a second gain factor according to the signal-to-noise ratio, the noise reduction gain factor, the reverberation signal, and the audio signal to be processed, and dereverberate the audio signal to be processed according to the first gain factor and the second gain factor to obtain a dereverberated audio signal; the audio signal to be processed includes a current frame audio signal; when the signal-to-noise ratio of the current frame audio signal is less than a preset signal-to-noise ratio, and the reverberation time of the current frame audio signal is greater than a preset reverberation time; calculate the second gain factor in the following manner: The dereverberation and denoising proportional factors of the current frame audio signal are calculated according to the following formula: Wherein, gamma is the dereverberation and denoising proportional factor of the current frame audio signal, and SNR(n) is the signal-to-noise ratio corresponding to the current frame audio signal; The second gain factor is calculated according to the following formula: Among them, G tmp is the second gain factor, the G dereverb (n) is the first gain factor corresponding to the current frame audio signal, and the G denoise (n) is the noise reduction gain factor corresponding to the current frame audio signal.
10. The device according to claim 9, characterized in that The dereverberation module comprises: A first gain factor calculation unit is configured to calculate, for any current frame audio signal of the audio signal to be processed, a first gain factor corresponding to the current frame audio signal through an audio signal of the current frame audio signal, a reverberation signal of the current frame audio signal, and a preset minimum dereverberation gain factor; A second gain factor calculation unit is configured to calculate a second gain factor according to the first gain factor and the noise reduction gain factor corresponding to the current frame audio signal; a target gain factor calculation unit, configured to perform smoothing processing on the first gain factor and the second gain factor to obtain a target gain factor; The dereverberation unit is configured to perform dereverberation on the current frame audio signal by using the target gain factor to obtain a dereverberated audio signal corresponding to the current frame audio signal.
11. The device according to claim 10, characterized in that When the signal-to-noise ratio of the current frame audio signal is greater than a preset signal-to-noise ratio, or the reverberation duration of the current frame audio signal is less than a preset reverberation duration; The second gain factor calculation unit is specifically configured to execute: The noise reduction gain factor corresponding to the current frame audio signal is determined as the second gain factor.
12. The device according to claim 9, characterized in that The signal-to-noise ratio and reverberation signal determination module comprises: an energy calculation unit, configured to calculate, for any current frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal; an excitation energy vector determining unit, configured to determine the excitation energy vector of the current frame audio signal according to the maximum value between the attenuated energy of the excitation energy vector of the previous frame audio signal and the energy of the current frame audio signal; The reverberation signal determination unit is configured to determine the reverberation signal of the current frame audio signal according to the excitation energy vector of the current frame audio signal, the time interval between two adjacent frames of the to-be-processed audio signal, and the reverberation duration corresponding to the current frame audio signal.
13. The device according to claim 12, characterized in that The energy calculation unit is specifically configured to execute: When the current frame audio signal of the audio signal to be processed is the first frame audio signal of the audio signal to be processed, determining the energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal after attenuation to be 0; When the current frame audio signal of the audio signal to be processed is not the first frame audio signal of the audio signal to be processed, the energy after attenuation of the excitation energy vector of the previous frame audio signal of the current frame audio signal is calculated according to the following formula: Among them, the R(n) is the attenuated energy of the excitation energy vector of the previous frame audio signal of the current frame audio signal, the Ra(n-1) is the excitation energy vector of the previous frame audio signal of the current frame audio signal, and the T1 is the time interval between two adjacent frames of the audio signal to be processed.
14. The device according to claim 13, characterized in that The reverberation signal determination unit is specifically configured to execute: The reverberation signal of the current frame audio signal is calculated according to the following formula: M = RT60(n) / T1; Among them, the Sr(n) is the reverberation signal of the current frame audio signal, RT60(n) is the reverberation duration corresponding to the current frame audio signal, M is the number of frames corresponding to the reverberation duration corresponding to the current frame audio signal; Ra(nM) is the energy after attenuation of the excitation energy vector of the first M frames of the current frame audio signal.
15. The device according to any one of claims 9 to 14, characterized in that The audio signal acquisition module is specifically configured to execute: Get the original audio signal; Performing short-time Fourier transform on the original audio signal to obtain a time-frequency domain signal of the original audio signal; The time-frequency domain signal is determined as the audio signal to be processed.
16. The device according to any one of claims 9 to 14, characterized in that The device also includes: The denoising module is configured to remove the noise signal included in the audio signal to be processed by using the noise reduction gain factor.
17. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the audio processing method as described in any one of claims 1 to 8.
18. A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the audio processing method according to any one of claims 1 to 8.
