Human voice separation and extraction method, device, computer equipment and storage medium
Through pre-trained anti-noise neural network and harmonic recovery neural network, using PSM value and BLSTM model, the problem of voice distortion in the anti-noise process of the voice enhancement system is solved, and more accurate human voice extraction and pure voice separation are achieved.
Patent Information
- Application Number
- CN202010792766.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-08-10
AI Technical Summary
Existing speech enhancement systems tend to suppress part of the human voice during the anti-noise process, resulting in speech distortion and making it difficult to provide a pure speech separation effect.
Using pre-trained anti-noise neural network and harmonic restoration neural network, through short-time Fourier transform and BLSTM model, estimate the correlation between the original amplitude spectrum and the pure amplitude spectrum, obtain the PSM value, perform denoising processing and restore Pure amplitude spectrum to avoid noise loss to speech.
It effectively avoids the loss of speech during noise processing, improves the accuracy of human voice extraction, ensures the protection of speech during the noise reduction process, and provides a purer speech separation effect.
Smart Images

Figure CN111933172B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech recognition technology, and more particularly to a method, device, computer equipment and storage medium for separating and extracting human voice. Background Art
[0002] Speech separation is a technology that separates the main speaker's voice from the audio, mainly including speech enhancement, speaker separation, and de-reverberation. The separation of human voice and ambient sound uses speech enhancement technology to remove ambient noise in the recording and retain the human voice, so as to achieve the purpose of separating pure human voice.
[0003] In the actual processing process, with the development of artificial intelligence, applications based on the separation of human voice and environmental sound have penetrated into people's lives. For speech recognition, on the one hand, it is necessary to improve the speech recognition technology itself, and on the other hand, it is necessary to improve the performance of speech separation to provide the purest speech possible. As the front end of speech recognition. With the rise of deep learning, speech separation has gradually shifted from traditional methods to supervised learning methods. At present, the best speech enhancement system for speech separation, in order to remove noise to the greatest extent when resisting noise, will suppress part of the human voice, causing speech distortion. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a speech extraction method that can overcome the distortion of human voice caused by the suppression of the speech part during the anti-noise process.
[0005] In order to solve the above technical problems, the present application embodiment provides a method for separating and extracting human voice, which adopts the following technical solution:
[0006] A method for separating and extracting human voices comprises the following steps:
[0007] Convert recordings with ambient noise into raw amplitude spectra;
[0008] Inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0;
[0009] Multiply the original amplitude spectrum by the corresponding p-PSM to obtain a denoised amplitude spectrum;
[0010] Inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum;
[0011] The clean amplitude spectrum is converted into speech.
[0012] Further, the step of inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0, specifically includes:
[0013] Inputting the original amplitude spectrum into at least two consecutive layers of BLSTM models, and outputting a first correlation value through the BLSTM model;
[0014] The first correlation values are connected through a connection layer to obtain a p-PSM value corresponding to the preprocessed amplitude spectrum.
[0015] Furthermore, the step of inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to recover the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum specifically includes:
[0016] Inputting the denoised amplitude spectrum into a continuous BLSTM model of at least two layers, and outputting a hidden layer output corresponding to the denoised amplitude spectrum according to the time domain through the BLSTM model;
[0017] The hidden layer outputs are connected through a fully connected layer to obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum.
[0018] In order to solve the above technical problems, the present application also discloses a neural network training method
[0019] A neural network training method, used for training the noise-resistant neural network as described above, is characterized by comprising:
[0020] The speech with ambient sound is converted into a noise reduction training amplitude spectrum through short-time Fourier transform, and the corresponding pure speech is converted into a standard amplitude spectrum through short-time Fourier transform;
[0021] Inputting the denoising training amplitude spectrum into the anti-noise network and outputting the corresponding p-PSM;
[0022] Multiply the noise reduction training network by the p-PSM to obtain an intermediate amplitude spectrum of noise reduction training;
[0023] According to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, the anti-noise neural network is trained through L1 to adjust the anti-noise neural network so that the anti-noise neural network converges. The L1 specifically includes:
[0024] L1=log[HM(t,f)-S1(t,f)] 2
[0025] Among them, HM(t, f) is the middle amplitude spectrum of the noise reduction training, and S1(t, f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training.
[0026] In order to solve the above technical problems, the present application also discloses a neural network training method
[0027] A neural network training method, used for training the harmonic recovery neural network as described above, is characterized by comprising:
[0028] Inputting the denoised amplitude spectrum into a harmonic restoration neural network, the harmonic restoration neural network includes at least two layers of BLSTM models and according to the hidden layer output of each layer, obtaining the restored training intermediate amplitude spectrum corresponding to the hidden layer output through a fully connected layer;
[0029] The loss is calculated by a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is:
[0030] loss = log([H(t,f)-S2(t,f)] 2 )
[0031] Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum;
[0032] The losses corresponding to each layer of the BLSTM model are weighted to obtain the overall loss. The weighted formula is:
[0033]
[0034] Where lossi is the loss of the loss function corresponding to the BLSTM model in the i-th layer, and ai is the adjustment parameter corresponding to lossi;
[0035] Minimize L2.
[0036] In order to solve the above technical problems, the present application discloses a human voice separation and extraction device
[0037] A human voice separation and extraction device, comprising:
[0038] Amplitude spectrum conversion module, used to convert recordings with environmental noise into original amplitude spectrum;
[0039] A p-PSM calculation module, used for inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0;
[0040] A denoising module, used for performing a dot multiplication of the original amplitude spectrum and the corresponding p-PSM to obtain a denoised amplitude spectrum;
[0041] A recovery module, used for inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum through a loss function and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum;
[0042] The speech conversion module is used to convert the pure amplitude spectrum into speech.
[0043] In order to solve the above technical problems, the present application discloses a neural network training device
[0044] A neural network training device, used for training a noise-resistant neural network, comprising:
[0045] The training amplitude spectrum conversion module converts the speech with ambient sound into the noise reduction training amplitude spectrum through short-time Fourier transform, and converts the corresponding pure speech into the standard amplitude spectrum through short-time Fourier transform;
[0046] A training p-PSM determination module, configured to input a noise reduction training amplitude spectrum into the anti-noise network and output a corresponding training p-PSM;
[0047] A training module, used for performing a point multiplication of the noise reduction training network and the p-PSM to obtain an intermediate amplitude spectrum of the noise reduction training;
[0048] The adjustment module adjusts the anti-noise neural network through L1 training according to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, so that the anti-noise neural network converges. The L1 specifically includes:
[0049] L1=log[HM(t,f)-S1(t,f)] 2
[0050] Among them, HM(t, f) is the middle amplitude spectrum of the noise reduction training, and S1(t, f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training.
[0051] In order to solve the above technical problems, the present application discloses a neural network training device
[0052] A neural network training device, used for training and restoring a neural network, comprising:
[0053] A denoising amplitude spectrum processing module is used to input the denoising amplitude spectrum into a harmonic restoration neural network, wherein the harmonic restoration neural network includes at least two layers of BLSTM models, and according to the hidden layer output of each layer, a restored training intermediate amplitude spectrum corresponding to the hidden layer output is obtained through a fully connected layer;
[0054] The hidden layer output loss module is used to calculate the loss through a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is:
[0055] log = log([H(t,f)-S2(t,f)] 2 )
[0056] Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum;
[0057] The total loss module is used to weight the losses corresponding to each layer of the BLSTM model to obtain the overall loss. The weighted formula is:
[0058]
[0059] Where lossi is the loss of the loss function corresponding to the BLSTM model in the i-th layer, and ai is the adjustment parameter corresponding to lossi;
[0060] Adjustment module to minimize L2.
[0061] To solve the above technical problems, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the human voice separation and extraction method as described above are implemented.
[0062] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the human voice separation and extraction method as described above are implemented.
[0063] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: by setting an anti-noise neural network to make a loss on the original amplitude spectrum with environmental noise, the correlation between the original amplitude spectrum and the pure amplitude spectrum is estimated, and the PSM value is obtained. In order to ensure the loss of speech during the noise reduction process, the PSM value is limited to a positive value, namely p-PSM, and the denoised amplitude spectrum with noise removed is obtained by the point product of p-PSM. Then, the denoised amplitude spectrum is restored by setting a harmonic recovery neural network to achieve the restoration of the denoised amplitude spectrum to obtain a pure amplitude spectrum of only speech, which is then converted into speech. This scheme can avoid the loss of speech during noise avoidance, and the human voice extraction is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0066] Figure 2 A flowchart of an embodiment of a method for separating and extracting human voice according to the present application;
[0067] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S200;
[0068] Figure 4 yes Figure 2 A flowchart of a specific implementation of step S400;
[0069] Figure 5 A flowchart of an embodiment of a neural network training method for training a noise-resistant neural network according to the present application;
[0070] Figure 6 A flowchart of an embodiment of a neural network training method for training a harmonic restoration neural network according to the present application;
[0071] Figure 7 A schematic diagram of a structure for voice separation and extraction according to the present application;
[0072] Figure 8 A schematic diagram of the structure of a neural network training device for training a noise-resistant neural network according to the present application;
[0073] Fig. 9 A schematic diagram of the structure of a neural network training device for training a harmonic restoration neural network according to the present application;
[0074] Fig.10 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0077] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0078] Continue to refer Figure 2 , shows a flowchart of an embodiment of a human voice separation and extraction method according to the present application.
[0079] A method for separating and extracting human voices comprises the following steps:
[0080] Step S100: converting the recording with environmental noise into an original amplitude spectrum;
[0081] Specifically, the analog signal received by the audio device is digitized and converted into the original amplitude spectrum through Fourier transform.
[0082] Step S200: inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0;
[0083] Among them, PSM (Phase-Sensitive Mask) is a phase-sensitive mask, which can output the spectrum according to the phase. In this embodiment, PSM can reflect the correlation between the original amplitude spectrum and the spectrum generated by the speech based on the time domain. p-PSM is positive-PSM. Taking a positive value for PSM can reduce the impact of eliminating environmental noise on the speech, thereby reducing the loss of speech in the denoised amplitude spectrum.
[0084] The noisy speech is converted into an amplitude spectrum through short-time Fourier transform, and the phase information is considered for compensation. The p-PSM formula is as follows:
[0085]
[0086] Among them, |S(t,f)| represents the amplitude spectrum of pure speech, |Y(t,f)| represents the amplitude spectrum of noisy speech, θ S Represents the phase angle of pure speech, θ Y represents the phase angle of noisy speech, and (t,f) represents the time-frequency unit. It should be noted that the range of p-PSM is [0,+∞). S With θ Y Under the same circumstances, it is considered that the time-frequency unit has no noise interference, that is, all the information of the time-frequency unit is retained; in θ S With θ Y In the opposite case, it is considered that the noise interference of the time-frequency unit is strong, and the information of the time-frequency unit is removed; in other cases, according to |θ S -θ Y | is used to determine how much information to retain. The smaller the phase difference, the more information of the time-frequency unit is retained. Conversely, the more information of the time-frequency unit is suppressed.
[0087] The obtained p-PSM is a matrix corresponding to the original amplitude spectrum. Each element in the matrix represents the correlation between the corresponding position on the corresponding original amplitude spectrum and the human voice. The noise reduction effect is achieved through p-PSM and the original amplitude spectrum. Compared with the existing scheme, the correlation between the original amplitude spectrum and the human voice is represented by the phase angle. The processing result has less loss to the human voice and the result is more accurate.
[0088] Step S300: multiply the original amplitude spectrum by the corresponding p-PSM to obtain a denoised amplitude spectrum;
[0089] Specifically, the original amplitude spectrum is dot-multiplied with the p-PSM to trim the original spectrum according to the correlation between the original amplitude spectrum and the speech, and finally the denoised amplitude spectrum is obtained.
[0090] Step S400: inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum;
[0091] The denoised amplitude spectrum may lose part of the amplitude corresponding to the speech during the denoising process. The gradient loss is calculated by the gradient loss function, and the denoised amplitude spectrum is corrected by multiple superposition losses to restore the amplitude corresponding to the speech as much as possible, and finally a pure amplitude spectrum is obtained.
[0092] Step S500: converting the pure amplitude spectrum into speech.
[0093] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: by setting an anti-noise neural network to perform loss on the original amplitude spectrum with environmental noise, the correlation between the original amplitude spectrum and the pure amplitude spectrum is estimated, and the PSM value is obtained. In order to ensure the loss of speech during the noise reduction process, the PSM value is limited to a positive value, namely p-PSM, and the denoised amplitude spectrum with noise removed is obtained by the point product of p-PSM. Then, by setting a harmonic recovery neural network to perform gradient loss on the denoised amplitude spectrum, the denoised amplitude spectrum is restored to obtain a pure amplitude spectrum of only speech, which is then converted into speech. This scheme can avoid the loss of speech during noise avoidance, and the human voice extraction is more accurate.
[0094] Further, the step S200 inputs the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0, specifically including:
[0095] Step S201: inputting the original amplitude spectrum into at least two consecutive layers of BLSTM models, and outputting a first correlation value through the BLSTM model;
[0096] The bidirectional long short-term memory network (BLSTM) divides the original amplitude spectrum according to the time domain and inputs it into the BLSTM at the same time. The amplitude spectrum is selected through the bidirectional correlation. Because the ups and downs of human voice have certain regularity and have strong front-to-back correlation in the time domain, while noise is messy and has little front-to-back correlation, BLSTM can strengthen the human voice and remove some noise. Get the first correlation value
[0097] Step S202: Connect the first correlation values through a connection layer to obtain a p-PSM value corresponding to the preprocessed amplitude spectrum.
[0098] The original amplitude spectra of the time domain groups processed by at least two layers of BLSTM are connected through a connection layer to obtain a P-PSM, and the denoised amplitude spectrum is obtained by the dot product of the P-PSM and the original amplitude spectrum.
[0099] Furthermore, the step of inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to recover the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum specifically includes:
[0100] Step S401: inputting the denoised amplitude spectrum into a continuous BLSTM model of at least two layers, and outputting a hidden layer output corresponding to the denoised amplitude spectrum in the time domain through the BLSTM model;
[0101] Step S402: connecting the hidden layer outputs through a fully connected layer to obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum;
[0102] The denoised amplitude spectrum is adjusted through at least one round of BLSTM model in the harmonic restoration network. Each layer of BLSTM model outputs the hidden layer output and serves as the input of the next layer of BLSTM model. Then, the hidden layer output of the last layer of BLSTM model is connected through the fully connected layer to finally complete the denoised amplitude spectrum and obtain a pure amplitude spectrum. The loss of the amplitude spectrum corresponding to the speech in the denoising process is completed, and finally the denoised amplitude spectrum is completed to obtain a pure amplitude spectrum. This solution can improve the accuracy of the pure amplitude spectrum. This solution can reduce the loss of human voice in the denoising process.
[0103] In order to solve the above technical problems, the present application provides a neural network training method, which adopts the following technical solution:
[0104] A neural network training method, used for training the above-mentioned anti-noise neural network, comprises:
[0105] Step Sa1: converting the speech with ambient sound into a noise reduction training amplitude spectrum through short-time Fourier transform, and converting the corresponding pure speech into a standard amplitude spectrum through short-time Fourier transform;
[0106] Step Sa2: input the noise reduction training amplitude spectrum into the anti-noise network, and output the corresponding p-PSM;
[0107] Step Sa3: multiply the noise reduction training network by the p-PSM to obtain the noise reduction training intermediate amplitude spectrum;
[0108] Step Sa4:
[0109] According to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, the anti-noise neural network is trained through L1 to adjust the anti-noise neural network so that the anti-noise neural network converges. The L1 specifically includes:
[0110] L1=log[HM(t,f)-S1(t,f)] 2
[0111] Among them, HM(t, f) is the middle amplitude spectrum of the noise reduction training, and S1(t, f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training.
[0112] Sound waves that conform to the logarithmic law are highly similar to the sounds received by human hearing. The loss of the original amplitude spectrum is calculated through the logarithmic loss function, which can effectively restore the speech spectrum.
[0113] This solution can improve the training accuracy of the denoising application network.
[0114] In order to solve the above technical problems, the present application provides a neural network training method, which adopts the following technical solution:
[0115] A neural network training method, used for training the above harmonic recovery neural network, comprising:
[0116] Step Sb1: inputting the denoised amplitude spectrum into a harmonic restoration neural network, wherein the harmonic restoration neural network includes at least two layers of BLSTM models and according to the hidden layer output of each layer, obtaining the restored training intermediate amplitude spectrum corresponding to the hidden layer output through a fully connected layer;
[0117] Step Sb2:
[0118] The loss is calculated by a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is:
[0119] loss = log([H(t,f)-S2(t,f)] 2
[0120] Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum;
[0121] Step Sb3:
[0122] The losses corresponding to each layer of the BLSTM model are weighted to obtain the overall loss. The weighted formula is:
[0123]
[0124] Among them, i is the loss function corresponding to the BLSTM model in the i-th layer, a i For the i The corresponding adjustment parameters.
[0125] Step Sb4: Minimize L2.
[0126] This scheme can improve the training accuracy of harmonic restoration neural network.
[0127] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0128] In order to solve the above technical problems, the present application embodiment provides a human voice separation and extraction device, which adopts the following technical solution:
[0129] A human voice separation and extraction device, comprising:
[0130] Amplitude spectrum conversion module 100, used to convert the recording with environmental noise into the original amplitude spectrum;
[0131] A p-PSM calculation module 200, for inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0;
[0132] A denoising module 300 is used to perform a dot multiplication of the original amplitude spectrum with the corresponding p-PSM to obtain a denoised amplitude spectrum;
[0133] A recovery module 400 is used to input the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum through a loss function and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum;
[0134] The speech conversion module 500 is used to convert the pure amplitude spectrum into speech.
[0135] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: by setting an anti-noise neural network to perform loss on the original amplitude spectrum with environmental noise, the correlation between the original amplitude spectrum and the pure amplitude spectrum is estimated, and the PSM value is obtained. In order to ensure the loss of speech during the noise reduction process, the PSM value is limited to a positive value, namely p-PSM, and the denoised amplitude spectrum with noise removed is obtained by the point product of p-PSM. Then, by setting a harmonic recovery neural network to perform gradient loss on the denoised amplitude spectrum, the denoised amplitude spectrum is restored to obtain a pure amplitude spectrum of only speech, which is then converted into speech. This scheme can avoid the loss of speech during noise avoidance, and the human voice extraction is more accurate.
[0136] In order to solve the above technical problems, the present application provides a neural network training device, which adopts the following technical solution:
[0137] A neural network training device, used for training a noise-resistant neural network, comprising:
[0138] The training amplitude spectrum conversion module 201 converts the speech with ambient sound into a noise reduction training amplitude spectrum through short-time Fourier transform, and converts the corresponding pure speech into a standard amplitude spectrum through short-time Fourier transform;
[0139] A training p-PSM determination module 202, for inputting a noise reduction training amplitude spectrum into the anti-noise network and outputting a corresponding training p-PSM;
[0140] A training module 203 is used to perform a dot multiplication of the noise reduction training network and the p-PSM to obtain a noise reduction training intermediate amplitude spectrum;
[0141] The adjustment module 204 adjusts the anti-noise neural network by training through L1 according to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, so that the anti-noise neural network converges. The L1 specifically includes:
[0142] L1=log[HM(t,f)-S1(t,f)] 2
[0143] Among them, HM(t, f) is the middle amplitude spectrum of the noise reduction training, and S1(t, f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training.
[0144] In order to solve the above technical problems, the present application provides a neural network training device, which adopts the following technical solution:
[0145] The denoised amplitude spectrum processing module 301 is used to input the denoised amplitude spectrum into the harmonic restoration neural network, wherein the harmonic restoration neural network includes at least two layers of BLSTM models, and according to the hidden layer output of each layer, obtain the restored training intermediate amplitude spectrum corresponding to the hidden layer output through the fully connected layer;
[0146] The hidden layer output loss module 302 is used to calculate the loss through a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is:
[0147] loss = log([H(t,f)-S2(t,f)] 2
[0148] Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum;
[0149] The total loss module 303 is used to weight the losses corresponding to each layer of the BLSTM model to obtain the overall loss. The weighted formula is:
[0150]
[0151] Where lossi is the loss of the loss function corresponding to the BLSTM model in the i-th layer, a i For and loss i The corresponding adjustment parameters;
[0152] The adjustment module 304 is used to minimize L2.
[0153] According to the result of the loss function, the BLSTM model in the harmonic restoration network is adjusted so that the result of the loss function converges and tends to be minimized, and finally the training of the parameters in the BLSM model is realized. This scheme can improve the training accuracy of the harmonic restoration neural network.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0155] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0156] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0157] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0158] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (SmartMediaCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as a program code of a human voice separation extraction method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.
[0159] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the program code stored in the memory 61 or process data, such as running the program code of the human voice separation and extraction method.
[0160] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0161] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores a human voice separation and extraction program, and the human voice separation and extraction program can be executed by at least one processor so that the at least one processor performs the steps of a human voice separation and extraction method as described above.
[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0163] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for separating and extracting human voice, characterized in that: The steps include: Convert recordings with ambient noise into raw amplitude spectra; Inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0; Specifically, the training method of the noise-resistant neural network includes: The speech with ambient sound is converted into a noise reduction training amplitude spectrum through short-time Fourier transform, and the corresponding pure speech is converted into a standard amplitude spectrum through short-time Fourier transform; Inputting the denoising training amplitude spectrum into the anti-noise neural network and outputting the corresponding p-PSM; Multiply the noise reduction training amplitude spectrum by the p-PSM to obtain a noise reduction training intermediate amplitude spectrum; According to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, the anti-noise neural network is trained through L1 to adjust the anti-noise neural network so that the anti-noise neural network converges. The L1 specifically includes: L1=log[HM(t,f)-S1(t,f)] 2 Wherein, HM(t,f) is the middle amplitude spectrum of the noise reduction training, and S1(t,f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training; Multiply the original amplitude spectrum by the corresponding p-PSM to obtain a denoised amplitude spectrum; Inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum; The clean amplitude spectrum is converted into speech.
2. A method for separating and extracting human voice according to claim 1, characterized in that: The step of inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0, specifically includes: Inputting the original amplitude spectrum into at least two consecutive layers of BLSTM models, and outputting a first correlation value through the BLSTM model; The first correlation values are connected through a connection layer to obtain a p-PSM value corresponding to the preprocessed amplitude spectrum.
3. A method for separating and extracting human voice according to claim 1, characterized in that: The step of inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to recover the denoised amplitude spectrum and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum specifically includes: Inputting the denoised amplitude spectrum into a continuous BLSTM model of at least two layers, and outputting a hidden layer output corresponding to the denoised amplitude spectrum according to the time domain through the BLSTM model; The hidden layer outputs are connected through a fully connected layer to obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum.
4. A neural network training method for training the harmonic recovery neural network according to claim 3, characterized in that: include: Inputting the denoised amplitude spectrum into a harmonic restoration neural network, the harmonic restoration neural network includes at least two layers of BLSTM models and according to the hidden layer output of each layer, obtaining the restored training intermediate amplitude spectrum corresponding to the hidden layer output through a fully connected layer; The loss is calculated by a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is: loss=log([H(t,f)-S2(t,f)] 2 ) Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum; The losses corresponding to each layer of the BLSTM model are weighted to obtain the overall loss. The weighted formula is: Among them, loss i is the loss function corresponding to the BLSTM model in the i-th layer, a i For and loss i The corresponding adjustment parameters; Minimize L2.
5. A human voice separation and extraction device, characterized in that: include: Amplitude spectrum conversion module, used to convert recordings with environmental noise into original amplitude spectrum; A p-PSM calculation module, used for inputting the original amplitude spectrum into a pre-trained anti-noise neural network to determine a p-PSM value corresponding to the original amplitude spectrum, wherein the p-PSM value is greater than or equal to 0; The anti-noise neural network is trained by a neural network training device, and the neural network training device includes: A training amplitude spectrum conversion module is used to convert the speech with environmental sound into a noise reduction training amplitude spectrum through short-time Fourier transform, and to convert the corresponding pure speech into a standard amplitude spectrum through short-time Fourier transform; a training p-PSM determination module, for inputting the noise reduction training amplitude spectrum into the anti-noise neural network and outputting the corresponding training p-PSM; A training module, used for performing a dot multiplication of the noise reduction training amplitude spectrum and the p-PSM to obtain a noise reduction training intermediate amplitude spectrum; The adjustment module adjusts the anti-noise neural network through L1 training according to the intermediate amplitude spectrum of the noise reduction training and the corresponding standard amplitude spectrum, so that the anti-noise neural network converges. The L1 specifically includes: L1=log[HM(t,f)-S1(t,f)] 2 Wherein, HM(t,f) is the middle amplitude spectrum of the noise reduction training, and S1(t,f) is the standard amplitude spectrum corresponding to the middle amplitude of the noise reduction training; A denoising module, used for performing a dot multiplication of the original amplitude spectrum and the corresponding p-PSM to obtain a denoised amplitude spectrum; A recovery module, used for inputting the denoised amplitude spectrum into a pre-trained harmonic recovery neural network to restore the denoised amplitude spectrum through a loss function and obtain a pure amplitude spectrum corresponding to the denoised amplitude spectrum; The speech conversion module is used to convert the pure amplitude spectrum into speech.
6. A neural network training device for training the harmonic restoration neural network according to claim 3, characterized in that: include: A denoising amplitude spectrum processing module is used to input the denoising amplitude spectrum into a harmonic restoration neural network, wherein the harmonic restoration neural network includes at least two layers of BLSTM models, and according to each hidden layer output, a restored training intermediate amplitude spectrum corresponding to the hidden layer output is obtained through a fully connected layer; The hidden layer output loss module is used to calculate the loss through a loss function according to the restored training intermediate amplitude spectrum and the standard amplitude spectrum corresponding to the denoised amplitude spectrum. The loss function is: loss=log([H(t,f)-S2(t,f)] 2 ) Wherein, H(t,f) is the intermediate amplitude spectrum of the recovery training, and S2(t,f) is the standard amplitude spectrum corresponding to the denoised amplitude spectrum; The total loss module is used to weight the losses corresponding to each layer of the BLSTM model to obtain the overall loss. The weighted formula is: Among them, loss i is the loss function corresponding to the BLSTM model in the i-th layer, a i For and loss i The corresponding adjustment parameters; Adjustment module to minimize L2.
7. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a human voice separation and extraction method as described in any one of claims 1 to 3 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a human voice separation and extraction method according to any one of claims 1 to 3 are implemented.
