Method and device for acquiring training data of audio enhancement neural network model
By using noise scaling and sequence offset determined by the signal-to-noise ratio in the audio enhancement neural network model, as well as the room impulse response function to obtain the reverberation signal, the problem of insufficient diversity of training data is solved and the recognition of the model in noisy environments is improved. accuracy and training efficiency.
Patent Information
- Application Number
- CN202310258671.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2024-09-10
AI Technical Summary
Existing audio enhancement neural network model training data lacks diversity, resulting in reduced speech recognition accuracy in noisy environments. Especially in non-open space environments, the randomness of noise signals is insufficient, which affects the model training effect.
By determining the noise scaling factor based on the signal-to-noise ratio, the noise signal is scaled and the sequence is randomly shifted to generate a diverse noise signal, and the reverberation signal is obtained by combining the room impulse response function to enhance the diversity of training data.
It improves the diversity of training data and the randomness of noise signals, enhances the training accuracy and efficiency of the model in non-open space environments, and improves the accuracy of speech recognition.
Smart Images

Figure CN118629413A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning, and in particular, to a method for acquiring training data for an audio enhancement neural network model. Background Art
[0002] Audio enhancement is a technology that extracts the target audio signal from the background noise and suppresses the noise when the audio signal is interfered by various noises. For example, for speech signals, based on the speech enhancement (Speech Enhancement) neural network model, a clean speech signal is extracted from the background noise, so that when the speech signal is interfered by noisy road noise and life noise in a noisy environment, the quality of the speech signal is guaranteed, which is beneficial to the automatic speech recognition (Automatic Speech Recognition) at the back end. For example, when a user uses a voice assistant with the window open in a moving car, the user's voice is easily interfered by wind noise, resulting in a decrease in the accuracy of speech recognition. The accuracy of the back-end speech recognition can be improved through speech enhancement processing.
[0003] The neural network model for audio enhancement needs training data to be trained. The training data is generated by mixing noise signals with different signal-to-noise ratios into the sample audio signal to generate a sample audio signal with a noise signal as the training data.
[0004] The more diverse the sample data contained in the training data, the more conducive it is to the training of the neural network model. Obtaining diverse training data has become a requirement. Summary of the invention
[0005] The present invention provides a method for acquiring training data for an audio enhancement neural network model to increase the diversity of training data.
[0006] A first aspect of the present invention provides a method for acquiring training data for an audio enhancement neural network model, the method comprising:
[0007] A noise scaling factor is determined according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise,
[0008] The first noise signal is scaled by the noise scaling factor to obtain a second noise signal.
[0009] The second noise signal is subjected to a random sequence shift to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
[0010] Preferably, when the audio enhancement neural network model is applied to a non-open space environment, the method further comprises:
[0011] Based on the first sample audio signal, a reverberation signal of the first sample audio signal is obtained by using a room impulse response function, where the reverberation signal is the first sample audio signal with a reverberation effect.
[0012] Mixing the reverberation signal into the second noise signal to obtain a fourth sample audio signal;
[0013] The difference between the first sample audio signal and the fourth sample audio signal is calculated to obtain a fifth noise signal, and the fifth noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
[0014] Preferably, the obtaining of the reverberation signal of the first sample audio signal by using a room impulse response function based on the first sample audio signal comprises:
[0015] The room impulse response function sequence is scaled according to the set scaling factor to obtain the enhanced room impulse response function value.
[0016] Convolving the enhanced room impulse response function value with the first sample audio signal to obtain a reverberation signal of the first sample audio signal,
[0017] The scaling factor is determined according to a randomly set signal-to-noise ratio.
[0018] Preferably, determining the noise scaling factor according to the signal-to-noise ratio of the first sample audio signal and the first noise signal comprises:
[0019] Based on the first sample audio signal, determining a signal energy value of the first sample audio signal,
[0020] Based on the first noise signal, determining a signal energy value of the first noise signal,
[0021] determining a weight for weighting the signal energy of the first noise signal according to a signal-to-noise ratio of the first sample audio signal to the first noise signal,
[0022] The signal energy of the first noise signal is weighted by a weight value,
[0023] The ratio of the signal energy value of the first sample audio signal to the signal energy value of the weighted first noise signal is calculated to obtain a noise scaling factor.
[0024] Preferably, scaling the first noise signal by using a noise scaling factor comprises:
[0025] Calculating the product of the noise scaling factor and the first noise signal to obtain a second noise signal;
[0026] The method further comprises:
[0027] The second noise signal is mixed into the first sample audio signal to obtain a second sample audio signal.
[0028] The third noise signal is mixed into the first sample audio signal to obtain a third sample audio signal.
[0029] Preferably, the method further comprises:
[0030] The reverberation signal is used as sample data in the training data.
[0031] The fourth sample audio signal is used as sample data in the training data,
[0032] The fifth noise signal is mixed into the first sample audio signal to obtain a fifth sample audio signal.
[0033] A second aspect of the present invention provides a method for training an audio enhancement neural network model, the method comprising:
[0034] Selecting second sample data mixed with a second noise signal and third sample data mixed with a third noise signal from the training data and inputting them into the audio enhancement neural network model to be trained,
[0035] adjusting a model parameter of the audio enhancement neural network model according to a loss function value between a predicted audio signal predicted by the audio enhancement neural network model and the first sample audio signal,
[0036] in,
[0037] The training data is obtained according to any of the methods for obtaining training data for an audio enhancement neural network model.
[0038] Preferably, the second sample data mixed with the second noise signal occupies a first proportion in the input sample data, and the third sample data mixed with the third noise signal occupies a second proportion in the input sample data.
[0039] Among them, the first ratio is greater than the second ratio.
[0040] Preferably, when the audio enhancement neural network model works in a non-open space environment, the fifth sample data mixed with the fifth noise signal occupies a third proportion in the input sample data, and the fourth sample data occupies a fourth proportion in the input sample data.
[0041] Among them, the third ratio is smaller than the fourth ratio.
[0042] A third aspect of the present invention provides a device for acquiring training data of an audio enhancement neural network model, the device comprising:
[0043] A noise scaling factor determination module is used to determine a noise scaling factor according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise,
[0044] A noise scaling module is used to scale the first noise signal using a noise scaling factor to obtain a second noise signal.
[0045] The sequence shift module is used to perform random sequence shift on the second noise signal to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
[0046] A fourth aspect of the present invention provides a training device for an audio enhancement neural network model, the device comprising:
[0047] A training input module selects second sample data mixed with a second noise signal and third sample data mixed with a third noise signal from the training data and inputs them into the audio enhancement neural network model to be trained.
[0048] adjusting a model parameter of the audio enhancement neural network model according to a loss function value between a predicted audio signal predicted by the audio enhancement neural network model to be trained and the first sample audio signal,
[0049] in,
[0050] The training data is obtained according to any of the methods for obtaining training data for an audio enhancement neural network model.
[0051] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements any step of the method for acquiring training data for an audio enhancement neural network model and / or any step of the method for training an audio enhancement neural network model.
[0052] The method for acquiring training data for an audio enhancement neural network model provided in an embodiment of the present application scales the source noise signal by a noise scaling factor so that the source noise signal is scrambled, performs a sequence random offset on the difference signal between the target signal and the scaled source noise signal, thereby improving the randomness of the noise signal, and superimposes the noise signal after the sequence random offset on the target signal as training data, thereby making the samples in the training data diverse and greatly enriching the training data. Furthermore, when the audio enhancement neural network model works in a non-open space environment, by enhancing the reverberation signal, the samples of the training data can be made richer, which is beneficial to improving the accuracy and efficiency of model training. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1A flowchart of a method for acquiring training data for an audio enhancement neural network model according to an embodiment of the present application.
[0054] Figure 2 A schematic diagram of a flow chart of obtaining an enhanced noise signal for mixing into a first sample audio signal as sample data in training data in an embodiment of the present application.
[0055] Figure 3 The present invention is a flow chart of applying a speech enhancement neural network model to obtain a reverberation signal in a non-open space environment for mixing into a first sample audio signal as sample data in training data.
[0056] Figure 4 An example plot of an unreinforced room impulse response function.
[0057] Figure 5 This is an example diagram of an enhanced room impulse response function according to an embodiment of the present application.
[0058] Figure 6 A schematic diagram of the audio enhancement neural network model according to an embodiment of the present application.
[0059] Figure 7 A schematic diagram of a device for acquiring training data for an audio enhancement neural network model according to an embodiment of the present application.
[0060] Figure 8 A schematic diagram of a training device for an audio enhancement neural network model according to an embodiment of the present application.
[0061] Fig. 9 Another schematic diagram of an apparatus for acquiring training data for an audio enhancement neural network model and / or an apparatus for training an audio enhancement neural network model according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the objectives, technical means and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings.
[0063] Regardless of whether the audio enhancement neural network model is working in an open space environment or a non-open space environment, it needs to be trained by adding noise to the sample audio signal. The embodiment of the present application uses the enhanced noise signal to enrich the training data. Figure 1 As shown, Figure 1 This is a flow chart of a method for acquiring audio enhancement neural network model training data in an embodiment of the present application. The method includes:
[0064] Step 101: determine a noise scaling factor according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise.
[0065] It should be understood that the first sample audio signal is a useful signal, which is a clean target audio signal that does not contain noise. The target audio signal can be understood as a set signal extracted by the desired audio enhancement neural network model. For example, with speech as the target, the first noise can be understood as a source noise. In view of the fact that the first sample audio signal and the first noise signal can be easily obtained, their signal-to-noise ratio can be determined based on the two signals, so as to determine the noise scaling factor used to scale the first noise based on the signal-to-noise ratio.
[0066] As an example, the noise scaling factor is determined as follows:
[0067] Based on the first sample audio signal, determining a signal energy value of the first sample audio signal,
[0068] Based on the first noise signal, determining a signal energy value of the first noise signal,
[0069] determining a weight for weighting the signal energy of the first noise signal according to a signal-to-noise ratio of the first sample audio signal to the first noise signal,
[0070] The signal energy of the first noise signal is weighted by a weight value,
[0071] The ratio of the signal energy value of the first sample audio signal to the signal energy value of the weighted first noise signal is calculated to obtain a noise scaling factor.
[0072] Step 102: scaling the first noise signal using a noise scaling factor to obtain a second noise signal.
[0073] As an example, the product of the noise scaling factor and the first noise signal is calculated to obtain a second noise signal, which is a pseudo noise signal.
[0074] Step 103: Randomly shift the sequence of the second noise signal to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in the training data.
[0075] As an example, the second noise signal is subjected to a sequence cyclic shift to obtain a third noise signal, and the noise signal is mixed into the first sample audio signal to obtain a third sample audio signal.
[0076] In the above steps, the signals are all digital signals and can be described by sequence values.
[0077] In the embodiment of the present application, the first noise signal is scaled and a sequence random shift is performed based on the scaled noise signal, that is, a third noise signal is obtained, so as to further scramble the second noise signal and improve the randomness of the third noise signal, thereby facilitating the third sample audio signal to have more diversity.
[0078] To facilitate the understanding of the present application, the following explanation is given using the training data of a speech enhancement neural network model with a speech signal as the target signal. It should be understood that the present application is not limited to speech signals, and the training data of an audio enhancement neural network model with any audio signal as the target signal can be applied, including but not limited to the sounds of animals, alarm sounds of machines, music of musical instruments, etc.
[0079] See also Figure 2 As shown, Figure 2 A flowchart of obtaining an enhanced noise signal for mixing into a first sample audio signal as sample data in training data is provided in an embodiment of the present application. The flowchart includes:
[0080] Step 201: determine a noise scaling factor according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise.
[0081] As an example, the first sample audio signal x_clean is a clean speech signal sequence, which can be recorded as x_clean=[x0, x1, ..., xN], and the first noise signal x_noise is composed of a signal sequence, which can be recorded as x_noise=[y 1 0,y 1 1,...,y 1 N],
[0082] According to the definition of signal-to-noise ratio, we can have:
[0083] snr=10log10(clean_spe / noise_spe') (1)
[0084] in,
[0085] The value of snr can be obtained by the signal-to-noise ratio of the first sample audio signal and the first noise signal.
[0086] clean_spe is the energy value of the first sample audio signal,
[0087] noise_spe' is the energy value of the enhanced noise signal, which satisfies the energy value of the first noise signal:
[0088] noise_spe'=alpha×noise_spe (2)
[0089] Wherein, noise_spe is the energy value of the first noise signal, alpha is the noise scaling factor,
[0090] By using the above formulas 1 and 2, we can obtain alpha:
[0091] alpha=clean_spe / (factor×noise_spe)
[0092] Wherein, factor is a weight used to weight the energy value of the first noise signal, which satisfies:
[0093] factor=10 snr / 10
[0094] As an example, the energy value of the first sample audio signal can be obtained by multiplying each speech sequence value in the speech sequence by the sequence value and accumulating the product results of each sequence value, and the energy value of the first noise signal can be obtained by multiplying each noise sequence value in the first noise sequence by the noise sequence value and accumulating the product results of each sequence value, which can be expressed as follows:
[0095] clean_spe=∑(x_clean×x_clean)
[0096] noise_spe=∑(x_noise×x_noise)
[0097] For example, x_clean = [1,2,3,4,5], then x_clean*x_clean = [1,4,9,16,25]
[0098] Step 202: Scale the first noise signal using a noise scaling factor to obtain a second noise signal.
[0099] As an example, the product of the noise scaling factor and the first noise signal is calculated to obtain a second noise signal, which can be understood as a pseudo noise signal and is expressed in a mathematical formula as follows:
[0100] x_noise2=alpha×x_noise
[0101] Among them, x_noise2 is the second noise signal,
[0102] Among them, x_noise2 can be a sequence, recorded as x_noise2 = [y 2 0,y 2 1,...,y 2 n,y 2 n+1,…y 2 N]
[0103] Step 203: Randomly shift the sequence of the second noise signal to obtain a third noise signal.
[0104] As an example, the second noise signal is randomly cyclically shifted so that the noise signal sequence is disrupted. For example, the nth sequence to the Nth sequence is shifted to before the 0th sequence to the n-1th sequence, which is expressed by a mathematical formula:
[0105] x_noise3=x_e(n,n+1,…0,1,…n-1)
[0106] Among them, x_noise3 is the third noise signal, and x_e represents the sequence random cyclic offset operation.
[0107] Step 204: Mix the third noise signal into the first sample audio signal to serve as sample data in the training data.
[0108] As an example, the first sample audio signal is superimposed with the third noise signal to obtain a third sample audio signal. The mathematical expression is:
[0109] x_sample3=x_e′+x_clean
[0110] Here, x_sample3 is a second sample audio signal obtained by mixing a third noise signal into the first sample audio signal.
[0111] Step 205: Mix the second noise signal into the first sample audio signal to serve as sample data in the training data.
[0112] As an example, the first sample audio signal is superimposed with the second noise signal to obtain the second sample audio signal. It can be expressed as:
[0113] x_sample2=x_noise2+x_clean=alpha×x_noise+x_clean
[0114] Wherein, x_sample2 represents the second sample audio signal.
[0115] The above steps 204 and 205 have no particular order and can be executed in parallel.
[0116] In this embodiment, the first noise signal is enhanced to obtain the third sample audio signal. In this way, the training data may include not only sample data in which the second noise signal is mixed in the first sample audio signal, but also the third sample audio data, thereby increasing the diversity of the training samples and the number of samples in the training data.
[0117] In view of the fact that in a non-open space environment, for example, in a room, corridor, vehicle and other space-limited environments, objects in the limited space environment will form a reverberation signal due to the reflection of the audio signal, so the reverberation signal also needs to be mixed into the first sample audio signal.
[0118] See also Figure 3 As shown, Figure 3 A flow chart of applying a speech enhancement neural network model to obtain a reverberation signal in a non-open space environment for mixing into a first sample audio signal as sample data in training data. It includes:
[0119] Steps 301 to 302 are the same as steps 201 to 202.
[0120] Step 303: Based on the first sample audio signal, a reverberation signal of the first sample audio signal is obtained by using a room impulse response function. The reverberation signal is the first sample audio signal with a reverberation sound effect. It can be understood that the reverberation signal includes the first sample audio signal component.
[0121] Among them, the room impulse response function (RIR) is used to simulate the attenuation in a non-open space, which is essentially a filter function. Figure 4 As shown, Figure 4 This is an example diagram of the room impulse response function. The horizontal axis represents time, which is also the discrete sampling point, and the vertical axis represents the RIR function value. It can be seen from the figure that with the passage of time, the amplitude of the RIR function becomes smaller and smaller.
[0122] In this embodiment, the reverberation signal is enhanced by enhancing the room impulse response function. As an example, the room impulse response function rir is an impulse response function sequence, denoted as [rir 0 ,rir 1 ,...,rir M ], among which, rir 0 It can be considered as the attenuation factor of the signal when the sound is directly transmitted from the source to the receiving end. In the embodiment of the present application, the weight of the rir0 function value is set to 1, and other rir function values are randomly scaled according to the set signal-to-noise ratio. For example, the set signal-to-noise ratio range is -20dB-0dB, and the signal-to-noise ratio is randomly set within this range to obtain rir 1 ,...,rir M The scaling factor α 1 ,α 2 ,...,α M , multiply each RIR function value by the scaling factor to obtain the enhanced RIR function value, which can be expressed mathematically as follows:
[0123]
[0124] rir=(rir 0 ,α 1 ri 1 ,α 2 ri 2 ,...,α M ri M )
[0125] where α 1 ,α 2 ,...,α M is the scaling factor, snr is the set signal-to-noise ratio, for example, randomly selected from -20dB-0dB, α=1 at 0dB, and α=0.1 at -20dB.
[0126] See also Figure 5 As shown, Figure 5 This is an example diagram of the enhanced room impulse response function. The horizontal axis in the figure represents time, which is also a discrete sampling point, and the vertical axis represents the RIR function value. It can be seen from the figure that RIR 1 ,...,rir M Function values are randomly scaled up or down.
[0127] The enhanced rir function value is convolved with the first sample audio signal to obtain a reverberation signal, which can be expressed mathematically as follows:
[0128] x_echo = conv(x_clean, rir)
[0129] Among them, x_echo represents the reverberation signal, and conv represents the convolution operation.
[0130] Step 304: mix the reverberation signal into a second noise signal, where the second noise signal includes pseudo noise and the reverberation signal.
[0131] The reverberation signal is mixed into the second noise signal, that is, the reverberation signal is added to the scaled first noise signal (the second noise signal x_noise2), to obtain a fourth sample audio signal, which is expressed as follows:
[0132] x_sample4=alpha×x_noise+x_echo=x_noise2+x_echo
[0133] Here, x_sample4 is the fourth sample audio signal, which includes pseudo noise and reverberation.
[0134] Step 305: Generate a fourth noise signal based on the first sample audio signal and the fourth sample audio signal.
[0135] As an example, the difference between the fourth sample audio signal and the first sample audio signal is calculated to obtain a fourth noise signal, which is expressed as follows:
[0136] x_noise4=x_noisy-x_clean
[0137] Wherein, x_noise4 is the fourth noise signal, which may be a sequence, recorded as x_noise4=[y 4 0,y 4 1,...,y 4 n,y 4 n+1,…y 4 N]
[0138] Step 306: Randomly shift the sequence of the fourth noise signal to obtain a fifth noise signal.
[0139] As an example, the fourth noise signal is randomly cyclically shifted so that the noise signal sequence is disrupted. For example, the nth sequence to the Nth sequence is shifted to before the 0th sequence to the n-1th sequence, which is expressed by a mathematical formula as follows:
[0140] x_noise5=x_e(n,n+1,…0,1,…n-1)
[0141] Among them, x_noise5 is the fifth noise signal.
[0142] Step 307: Use the fourth sample audio signal as sample data in the training data.
[0143] Step 308: Mix the second noise signal into the first sample audio signal to serve as sample data in the training data.
[0144] As an example, the first sample audio signal is superimposed with the second noise signal to obtain the second sample audio signal. It can be expressed as:
[0145] x_sample3=x_noise2+x_clean=alpha×x_noise+x_clean
[0146] Wherein, x_sample3 represents the third sample audio signal.
[0147] Step 309: Use the reverberation signal as sample data in the training data.
[0148] Step 310: Mix the fifth noise signal into the first sample audio signal to obtain a fifth sample audio signal as sample data in the training data.
[0149] As an example, the first sample audio signal is superimposed with the fifth noise signal to obtain a fifth sample audio signal. The mathematical expression is:
[0150] x_sample5=x_noise5+x_clean
[0151] Here, x_sample5 represents the fifth sample audio signal.
[0152] The above steps 307 to 310 have no particular order and can be executed in parallel.
[0153] In this embodiment, the room impulse response function is enhanced to generate a reverberation signal, thereby increasing the diversity of the reverberation signal and providing diverse training data for model training in a non-open space environment.
[0154] After obtaining the training data, the audio enhancement neural network model can be trained using the training data. As an example, see Figure 6 As shown, Figure 6 It is a schematic diagram of a speech enhancement neural network model, which includes: short-time Fourier transform (STFT), an encoder, a multiplier, and an inverse short-time Fourier transform (STFTF), wherein the short-time Fourier transform (STFT) and the encoder are composed of a two-layer GRU network, an FC layer, and a sigmoid function.
[0155] As an example, in each round of training, sample data is selected from the training data, wherein the second sample data occupies a first proportion in the input sample data, and the third sample data occupies a second proportion in the input sample data, and the first proportion is greater than the second proportion. The second sample data and the third sample data are input into the speech enhancement neural network model to be trained, and after short-time Fourier transformation, an amplitude spectrum signal and a phase spectrum signal are obtained. The amplitude spectrum signal is encoded by an encoder to generate a mask, and the mask is multiplied by the amplitude spectrum signal. The multiplication result and the phase spectrum signal are inversely short-time Fourier transformed to obtain a predicted target signal. According to the loss function value between the predicted target signal and the first sample signal, the model parameters of the speech enhancement neural network model to be trained are adjusted, and the training is repeated until the training is completed.
[0156] As another example, for a speech enhancement neural network model applied to a non-open space environment, in each round of training, sample data is selected from the training data, wherein the fifth sample data occupies a third proportion in the input sample data, and the fourth sample data occupies a fourth proportion in the input sample data, and the third proportion is less than the fourth proportion. The fifth sample data and the fourth sample data are input into the speech enhancement neural network model to be trained, and after short-time Fourier transformation, an amplitude spectrum signal and a phase spectrum signal are obtained. The amplitude spectrum signal is encoded by an encoder to generate a mask, and the mask is multiplied by the amplitude spectrum signal. The multiplication result and the phase spectrum signal are inversely short-time Fourier transformed to obtain a predicted target signal. According to the loss function value between the predicted target signal and the first sample signal, the model parameters of the speech enhancement neural network model to be trained are adjusted, and the training is repeated until the training is completed.
[0157] As an example, the loss function value may be a mean square error (MSE) loss function value.
[0158] It should be understood that the training method of the present application embodiment is not limited to Figure 6 The speech enhancement neural network model shown is also applicable to other model structures, and each sample audio signal can be used according to training requirements.
[0159] The model training method in this embodiment, through the mixing of diverse sample data, is conducive to improving the accuracy of the training model, improving the training efficiency, making the model more robust, and having a better suppression effect on noises of different categories and forms, and can improve the audio quality of audio signals picked up in actual scenarios; moreover, the noise is suppressed and the sound quality of the picked up audio is improved. For example, in the speech enhancement model, it can improve the accuracy of back-end speech-related tasks, such as voiceprint recognition, speech recognition, sound conversion, command word recognition and other tasks.
[0160] See also Figure 7 As shown, Figure 7 This is a schematic diagram of a device for acquiring audio enhancement neural network model training data according to an embodiment of the present application, the device comprising:
[0161] A noise scaling factor determination module is used to determine a noise scaling factor according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean signal without noise,
[0162] A noise scaling module is used to scale the first noise signal using a noise scaling factor to obtain a second noise signal.
[0163] The sequence shift module is used to perform random sequence shift on the second noise signal to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
[0164] In an environment where the audio enhancement neural network model is applied to a non-open space, the device further includes:
[0165] A reverberation module is used to obtain a reverberation signal of the first sample audio signal based on the first sample audio signal by using a room impulse response function.
[0166] A superposition module is used to superimpose the reverberation signal and the second noise signal to obtain a fourth sample audio signal.
[0167] The synthesis module is used to calculate the difference between the first sample audio signal and the fourth sample audio signal to obtain a fourth noise signal.
[0168] The sequence shift module is further configured to perform random sequence shift on the fourth noise signal to obtain a fifth noise signal, and the fifth noise signal is used to be mixed into the first sample audio signal to serve as sample data in the training data.
[0169] As another example, in an environment where the audio enhancement neural network model is applied to a non-open space, the device further includes:
[0170] A reverberation module is used to obtain a reverberation signal of the first sample audio signal based on the first sample audio signal by using a room impulse response function.
[0171] The synthesis module is configured to calculate a difference between the first sample audio signal and the reverberation signal, and calculate a difference between the difference and the second noise signal to obtain a fourth noise signal.
[0172] In the case where the audio enhancement neural network model is applied to an open space environment, the device also includes:
[0173] The first generating module is used to mix the second noise signal into the first sample audio signal to obtain a second sample audio signal.
[0174] The third noise signal is mixed into the first sample audio signal to obtain a third sample audio signal.
[0175] In an environment where the audio enhancement neural network model is applied to a non-open space, the device further includes:
[0176] The second generating module is used to use the reverberation signal as training data and the fourth sample audio signal as training data.
[0177] The fifth noise signal is mixed into the first sample audio signal to obtain a fifth sample audio signal.
[0178] See also Figure 8 As shown, Figure 8A schematic diagram of a training device for an audio enhancement neural network model according to an embodiment of the present application, the device comprising:
[0179] A training input module is used to select second sample data mixed with a second noise signal and third sample data mixed with a third noise signal from the training data and input them into the audio enhancement neural network model to be trained.
[0180] The training module is used to adjust the model parameters of the audio enhancement neural network model according to the loss function value between the predicted audio signal predicted by the audio enhancement neural network model and the first sample audio signal.
[0181] The training input module comprises:
[0182] The first training input module is used to select second sample data that occupies a first proportion in the input sample data from the training data, and select third sample data that occupies a second proportion in the input sample data.
[0183] When the audio enhancement neural network model works in a non-open space environment, the training input module includes:
[0184] The second training input module is used to select fifth sample data that occupies a third proportion in the input sample data from the training data, and select fourth sample data that occupies a fourth proportion in the input sample data.
[0185] The training module includes: an audio enhancement neural network model to be trained and
[0186] The loss function value calculation module is used to calculate the loss function value according to the predicted audio signal output by the audio enhancement neural network model and the first sample audio signal.
[0187] See also Fig. 9 As shown, Fig. 9 Another schematic diagram of an apparatus for acquiring audio enhancement neural network model training data and / or an apparatus for training an audio enhancement neural network model according to an embodiment of the present application. The apparatus includes a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to implement the steps of acquiring audio enhancement neural network model training data or the steps of training an audio enhancement neural network model according to an embodiment of the present application.
[0188] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0189] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0190] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of acquiring training data for an audio enhancement neural network model and / or the steps of training an audio enhancement neural network model.
[0191] As for the apparatus / network-side device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0192] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0193] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for acquiring training data for an audio enhancement neural network model, characterized in that: The method includes: A noise scaling factor is determined according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise, The first noise signal is scaled by the noise scaling factor to obtain a second noise signal. The second noise signal is subjected to a random sequence shift to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
2. The acquisition method according to claim 1, characterized in that: In an environment where the audio enhancement neural network model is applied to a non-open space, the method further includes: Based on the first sample audio signal, a reverberation signal of the first sample audio signal is obtained by using a room impulse response function, where the reverberation signal is the first sample audio signal with a reverberation effect. Mixing the reverberation signal into the second noise signal to obtain a fourth sample audio signal; The difference between the first sample audio signal and the fourth sample audio signal is calculated to obtain a fifth noise signal, and the fifth noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
3. The acquisition method according to claim 2, characterized in that: The method of obtaining a reverberation signal of the first sample audio signal by using a room impulse response function based on the first sample audio signal includes: Scale the room impulse response function sequence according to the set scaling factor to obtain the enhanced room impulse response function value. Convolving the enhanced room impulse response function value with the first sample audio signal to obtain a reverberation signal of the first sample audio signal, The scaling factor is determined according to a randomly set signal-to-noise ratio.
4. The acquisition method according to claim 1, characterized in that: The step of determining a noise scaling factor according to a signal-to-noise ratio of the first sample audio signal to the first noise signal comprises: Based on the first sample audio signal, determining a signal energy value of the first sample audio signal, Based on the first noise signal, determining a signal energy value of the first noise signal, determining a weight for weighting the signal energy of the first noise signal according to a signal-to-noise ratio of the first sample audio signal to the first noise signal, The signal energy of the first noise signal is weighted by a weight value, The ratio of the signal energy value of the first sample audio signal to the signal energy value of the weighted first noise signal is calculated to obtain a noise scaling factor.
5. The acquisition method according to claim 1, characterized in that: The step of scaling the first noise signal by using the noise scaling factor includes: Calculating the product of the noise scaling factor and the first noise signal to obtain a second noise signal; The method further comprises: The second noise signal is mixed into the first sample audio signal to obtain a second sample audio signal. The third noise signal is mixed into the first sample audio signal to obtain a third sample audio signal.
6. The acquisition method according to claim 2, characterized in that: The method further comprises: The reverberation signal is used as sample data in the training data. The fourth sample audio signal is used as sample data in the training data, The fifth noise signal is mixed into the first sample audio signal to obtain a fifth sample audio signal.
7. A method for training an audio enhancement neural network model, characterized in that: The method includes: Selecting second sample data mixed with a second noise signal and third sample data mixed with a third noise signal from the training data and inputting them into the audio enhancement neural network model to be trained, adjusting a model parameter of the audio enhancement neural network model according to a loss function value between a predicted audio signal predicted by the audio enhancement neural network model and the first sample audio signal, in, The training data is obtained according to the method for obtaining training data for an audio enhancement neural network model as described in any one of claims 1 to 6.
8. The training method according to claim 7, characterized in that: The second sample data mixed with the second noise signal occupies a first proportion in the input sample data, and the third sample data mixed with the third noise signal occupies a second proportion in the input sample data. Among them, the first ratio is greater than the second ratio.
9. The training method according to claim 7, characterized in that: When the audio enhancement neural network model works in a non-open space environment, the fifth sample data mixed with the fifth noise signal occupies a third proportion in the input sample data, and the fourth sample data occupies a fourth proportion in the input sample data. Among them, the third ratio is smaller than the fourth ratio.
10. A device for acquiring training data of an audio enhancement neural network model, characterized in that: The device includes: A noise scaling factor determination module is used to determine a noise scaling factor according to a signal-to-noise ratio of a first sample audio signal and a first noise signal, wherein the first sample audio signal is a clean target audio signal that does not contain noise, A noise scaling module is used to scale the first noise signal using a noise scaling factor to obtain a second noise signal. The sequence shift module is used to perform random sequence shift on the second noise signal to obtain a third noise signal, and the third noise signal is used to be mixed into the first sample audio signal to serve as sample data in training data.
11. A training device for an audio enhancement neural network model, characterized in that: The device includes: A training input module selects second sample data mixed with a second noise signal and third sample data mixed with a third noise signal from the training data and inputs them into the audio enhancement neural network model to be trained. adjusting a model parameter of the audio enhancement neural network model according to a loss function value between a predicted audio signal predicted by the audio enhancement neural network model to be trained and the first sample audio signal, in, The training data is obtained according to the method for obtaining training data for an audio enhancement neural network model as described in any one of claims 1 to 6.
