Signal processing method, signal processing device, electronic equipment and storage medium
By generating a mask vector for the first amplitude spectrum of the signal to be processed, and adjusting the mask vector according to the signal-to-noise ratio, the signal is processed, and the signal is solved, and a more efficient signal denoising and signal enhancement effect is achieved.
Patent Information
- Application Number
- CN202311062598.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-25
AI Technical Summary
The existing noise reduction algorithms tend to cause signal distortion when processing noise-bound signals, especially in the case of low signal-to-noise ratio, making it difficult to effectively remove noise and retain pure signals.
The target mask vector is obtained by generating the mask vector of the first amplitude spectrum of the to-process signal and adjusting the mask vector according to the signal-to-noise ratio. Then, the first amplitude spectrum is processed using the target mask vector to obtain the second amplitude spectrum of the pure signal, and finally the processed target signal is obtained based on the second amplitude spectrum and the phase spectrum.
It effectively avoids distortion of the target signal after enhanced processing, improves the reliability of signal processing, and improves the user experience.
Smart Images

Figure CN119513483A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a signal processing method, a signal processing device, an electronic device, and a storage medium. Background Art
[0002] In application scenarios such as smart homes and car calls, noise is one of the common and unavoidable interferences. At present, noise reduction algorithms have been widely studied and have made great progress. Generally, noise reduction algorithms can be divided into traditional noise reduction algorithms and methods based on deep learning (Neural Network, NN). According to the different training objectives of the network, NN-based noise reduction methods can be divided into mapping-based methods and mask-based methods. Among them, the mapping-based method refers to a method that uses the amplitude spectrum of pure speech as the training target. The mask-based method refers to a method that uses the mask as the training target. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a signal processing method, a signal processing device, an electronic device and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a signal processing method is provided, the method comprising:
[0005] Generate a mask vector of a first amplitude spectrum of a signal to be processed;
[0006] determining a signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum;
[0007] Adjusting the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector;
[0008] Processing the first amplitude spectrum using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed;
[0009] A processed target signal is obtained according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
[0010] Optionally, adjusting the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector includes:
[0011] According to the signal-to-noise ratio, construct a mapping function with the signal-to-noise ratio as an independent variable;
[0012] The mask vector is adjusted by using the mapping function to obtain an adjusted target mask vector.
[0013] Optionally, the mapping function is:
[0014]
[0015] Among them, a, b, c, d, and α are arbitrary constants, Mask1 represents the target mask vector, and SNR represents the signal-to-noise ratio.
[0016] Optionally, determining the signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum includes:
[0017] Determining a third amplitude spectrum of a pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum;
[0018] A signal-to-noise ratio of the signal to be processed is determined according to the first amplitude spectrum and the third amplitude spectrum.
[0019] Optionally, the signal to be processed is a signal with additive noise; the amplitude spectrum includes N frequency points and the amplitude value at each frequency point, where N is an integer greater than 1;
[0020] The step of determining the signal-to-noise ratio of the signal to be processed according to the first amplitude spectrum and the third amplitude spectrum includes:
[0021] For each of the frequency points, obtaining a first amplitude value at the frequency point from the first amplitude spectrum, obtaining a second amplitude value at the frequency point from the third amplitude spectrum, and determining a difference between the first amplitude value and the second amplitude value as noise at the frequency point;
[0022] The signal-to-noise ratio at each frequency point of the signal to be processed is determined according to the noise at each frequency point and the second amplitude value at each frequency point.
[0023] Optionally, the mask vector includes a mask value at each of the frequency points; and determining, according to the mask vector and the first amplitude spectrum, a third amplitude spectrum of a pure signal included in the signal to be processed includes:
[0024] For each frequency point, the product of the mask value at the frequency point and the first amplitude value at the frequency point is determined as the second amplitude value at the frequency point in the third amplitude spectrum to obtain a third amplitude spectrum of the pure signal included in the signal to be processed.
[0025] Optionally, generating a mask vector of a first amplitude spectrum of a signal to be processed includes:
[0026] Acquire a first amplitude spectrum of the signal to be processed;
[0027] The first amplitude spectrum is input into a pre-trained mask generation model to obtain a mask vector of the first amplitude spectrum output by the mask generation model.
[0028] Optionally, the signal to be processed is an audio signal to be processed.
[0029] According to a second aspect of an embodiment of the present disclosure, there is provided a signal processing device, including:
[0030] A generating module, configured to generate a mask vector of a first amplitude spectrum of a signal to be processed;
[0031] A first determination module is configured to determine a signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum;
[0032] an adjustment module, configured to adjust the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector;
[0033] a processing module, configured to process the first amplitude spectrum using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed;
[0034] The second determination module is configured to obtain a processed target signal according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
[0035] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] The processor is configured to execute the steps of the signal processing method described in the first aspect of the present disclosure.
[0039] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the signal processing method provided in the first aspect of the present disclosure are implemented.
[0040] By adopting the above technical solution, after generating the mask vector of the first amplitude spectrum of the signal to be processed, the mask vector is adjusted according to the signal-to-noise ratio of the signal to be processed to obtain the target mask vector, and then the first amplitude spectrum is processed by the target mask vector to obtain the second amplitude spectrum, and finally, the enhanced target signal is obtained according to the second amplitude spectrum and the phase spectrum of the signal to be processed. In this way, the distortion of the enhanced target signal is avoided, the reliability of signal processing is improved, and the user experience is enhanced.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0043] Figure 1 The figure is a flowchart of a signal processing method according to an exemplary embodiment.
[0044] Figure 2 It is a schematic diagram showing a signal processing method according to an exemplary embodiment.
[0045] Figure 3 is a waveform diagram of a mapping function according to an exemplary implementation.
[0046] Figure 4 It is a block diagram of a signal processing device according to an exemplary embodiment.
[0047] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment.
[0048] Figure 6 is a block diagram of another electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0050] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0051] At present, the signal post-processing method mainly processes the signal obtained after enhancement processing, for example, using methods such as Wiener filtering and spectrum reconstruction. Among them, enhancement processing includes noise reduction processing. Wiener filter is a minimum mean square error filter that can restore additive noise signals. Its basic idea is to filter the noisy signal under a known signal-to-noise ratio to achieve the purpose of restoring the original signal. Wiener filtering can be applied to many fields, such as image processing, speech processing, and signal processing. Its main advantages are simple and easy to understand, easy to operate and implement, but its disadvantages are that the filtering effect is better under high signal-to-noise ratio conditions, while distortion or noise amplification problems will occur under low signal-to-noise ratio conditions. Common spectrum reconstruction algorithms include Linear Prediction Coding (LPC), One-sided Autocorrelation (OSA), Adaptive Reconstruction Filter (ARF), etc. These algorithms can extract the spectrum information of unknown signals to a certain extent, thus having certain spectrum reconstruction capabilities. Spectrum reconstruction algorithms can infer the spectral information of unknown signals through known information, thereby improving signal quality, reliability and availability. They are widely used in audio, image, video and other data processing fields. However, spectrum reconstruction algorithms are relatively complex.
[0052] In view of this, the present disclosure provides a signal processing method, a signal processing device, an electronic device and a storage medium. Before the signal is enhanced, the mask vector used to remove signal noise is adjusted, and the signal is processed according to the adjusted mask vector to avoid distortion of the target signal after the enhanced processing, improve the reliability of signal processing, and thus enhance the user experience.
[0053] Figure 1 FIG. 1 is a flow chart of a signal processing method according to an exemplary embodiment. Figure 1 As shown, the signal processing method may include the following steps.
[0054] In step S11, a mask vector of a first amplitude spectrum of a signal to be processed is generated.
[0055] In the present disclosure, the mask vector may be any one of an ideal binary mask (IBM) vector, an ideal ratio mask (IRM) vector, and a spectral magnitude mask (SMM) vector. The signal to be processed may be an image signal to be processed, an audio signal to be processed, and the like.
[0056] In one embodiment, the specific implementation of step S11 is: obtaining a first amplitude spectrum of the signal to be processed; inputting the first amplitude spectrum into a pre-trained mask generation model to obtain a mask vector of the first amplitude spectrum output by the mask generation model.
[0057] Usually, the signal to be processed is mostly a time domain signal, and the amplitude spectrum is the frequency domain representation of the signal, which describes the amplitude of the signal at different frequencies or frequency points. The size of the amplitude value in the amplitude spectrum determines the energy distribution of the signal at different frequencies or frequency points. In the amplitude spectrum, the amplitude value corresponding to each frequency or frequency point characterizes the intensity of the signal at the frequency or frequency point. Therefore, in this embodiment, the signal to be processed is converted to the frequency domain to obtain the first amplitude spectrum of the signal to be processed. For example, in this method, the short-time Fourier transform STFT can be used to convert the signal to be processed to the frequency domain to obtain the first amplitude spectrum, or other spectrum analysis methods can be used to obtain the first amplitude spectrum.
[0058] It should be understood that the phase spectrum of the signal to be converted can also be obtained. Among them, the size of the phase spectrum determines the phase offset of the signal at different frequencies or frequency points, which is also one of the important characteristics of the signal. In the phase spectrum, the phase value corresponding to each frequency or frequency point represents the phase offset of the signal at the frequency or frequency point. The acquisition of the phase spectrum can also be achieved by short-time Fourier transform STFT or other spectrum analysis methods.
[0059] In this embodiment, after obtaining the first amplitude spectrum, the first amplitude spectrum can be input into a pre-trained mask generation model to obtain a mask vector of the first amplitude spectrum. The mask generation model is obtained by training a neural network using the sample amplitude spectrum as a model input parameter and the annotated mask vector as a model output parameter. The specific training method belongs to a relatively mature technology in the field and is not limited in this disclosure.
[0060] First, it should be understood that, in addition to obtaining the mask vector using the mask generation model, the mask vector of the first amplitude spectrum may also be obtained using the mask generation algorithm in the related art, and the present disclosure does not limit this.
[0061] Secondly, it should be understood that the function of the mask vector generated in step S11 is to remove noise in the signal to be processed. Therefore, each mask value included in the mask vector can be considered as a coefficient of the corresponding amplitude value in the first amplitude spectrum, and the value range of the mask value is [0,1].
[0062] In step S12, the signal-to-noise ratio of the signal to be processed is determined according to the mask vector and the first amplitude spectrum.
[0063] In step S13, the mask vector is adjusted according to the signal-to-noise ratio to obtain an adjusted target mask vector.
[0064] Whether the mask vector is generated using a mask generation model or other algorithms are used to obtain the mask vector, considering the accuracy of the model or algorithm, the generated mask vector usually introduces the problem of signal distortion. Therefore, when the mask vector is used to enhance the signal to be processed, the processed signal will be distorted, resulting in low signal processing efficiency. Taking the signal to be processed as an audio signal as an example, signal distortion will also lead to poor sound quality and poor audio realism, resulting in a poor user experience. Therefore, in the present disclosure, before the signal to be processed is enhanced, the mask vector needs to be processed, for example, the mask value included in the mask vector is adjusted.
[0065] The signal-to-noise ratio is used to characterize the ratio of the pure signal strength to the noise signal strength. Therefore, the signal-to-noise ratio can be used to characterize which frequency points in the first amplitude spectrum have greater noise intensity and which frequency points have greater pure signal intensity, and then the mask vector can be adjusted according to the signal-to-noise ratio to obtain a more accurate target mask vector. A pure signal refers to a signal without noise.
[0066] In step S14, the first amplitude spectrum is processed using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed.
[0067] For example, the target mask vector may be multiplied by the first amplitude spectrum to obtain a second amplitude spectrum of a pure signal included in the signal to be processed.
[0068] In step S15, a processed target signal is obtained according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
[0069] For example, an inverse short-time Fourier transform (ISTFT) is performed on the second amplitude spectrum and the phase spectrum to obtain a processed target signal, wherein the target signal is a signal after enhancement processing.
[0070] Figure 2 FIG. 1 is a schematic diagram of a signal processing method according to an exemplary embodiment. Figure 2 As shown, first, the signal to be processed is subjected to a short-time Fourier transform STFT to obtain the first amplitude spectrum and phase spectrum of the signal to be processed. Next, the first amplitude spectrum is input into the mask generation model to obtain the mask vector output by the mask generation model. After that, the mask vector is adjusted to obtain the target mask vector. Then, the first amplitude spectrum is processed using the target mask vector to obtain the second amplitude spectrum. Finally, the second amplitude spectrum and phase spectrum are subjected to an inverse short-time Fourier transform ISTFT to obtain the enhanced target signal.
[0071] By adopting the above technical solution, after generating the mask vector of the first amplitude spectrum of the signal to be processed, the mask vector is adjusted according to the signal-to-noise ratio of the signal to be processed to obtain the target mask vector, and then the first amplitude spectrum is processed by the target mask vector to obtain the second amplitude spectrum, and finally, the enhanced target signal is obtained according to the second amplitude spectrum and the phase spectrum of the signal to be processed. In this way, the distortion of the enhanced target signal is avoided, the reliability of signal processing is improved, and the user experience is enhanced.
[0072] Figure 1 The specific implementation method of determining the signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum in step S12 is: determining the third amplitude spectrum of the pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum; determining the signal-to-noise ratio of the signal to be processed according to the first amplitude spectrum and the third amplitude spectrum.
[0073] In one embodiment, the amplitude spectrum includes N frequency points and the amplitude value at each frequency point, where N is an integer greater than 1. That is, the first amplitude spectrum, the second amplitude spectrum, and the third amplitude spectrum all include N frequency points and the amplitude value at each frequency point. Correspondingly, the mask vector includes the mask value at each frequency point. For example, N is 257, that is, the amplitude spectrum includes 257 frequency points and the amplitude value at each frequency point, and the mask vector includes 257 mask values.
[0074] In this embodiment, the specific method of determining the third amplitude spectrum of the pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum is: for each frequency point, the product of the mask value at the frequency point and the first amplitude value at the frequency point is determined as the second amplitude value at the frequency point in the third amplitude spectrum, so as to obtain the third amplitude spectrum of the pure signal included in the signal to be processed. The first amplitude value is obtained from the first amplitude spectrum.
[0075] For example, assuming that the first amplitude value at the kth frequency point in the first amplitude spectrum is recorded as M[k], the mask value at the kth frequency point in the mask vector is recorded as mask[k], and the second amplitude value at the kth frequency point in the third amplitude spectrum is recorded as Y[k], then the second amplitude value Y[k] at the kth frequency point is obtained by the following formula Y[k]=M[k]*mask[k], where k is an integer and has a value range of [1, N]. In this way, according to the above method, the second amplitude value at each frequency point can be obtained, and then the third amplitude spectrum of the pure signal included in the signal to be processed can be obtained.
[0076] First of all, it should be understood that when calculating the second amplitude value at each frequency point, the first amplitude spectrum is processed according to the mask vector. Therefore, the obtained third amplitude spectrum is the amplitude spectrum after preliminary denoising, that is, the amplitude spectrum of the pure signal included in the signal to be processed.
[0077] Secondly, it should be understood that since distortion is introduced when generating the mask vector, distortion also exists in the third amplitude spectrum obtained above. Therefore, in the present disclosure, the third amplitude spectrum and phase spectrum are not directly subjected to inverse short-time Fourier transform to obtain the enhanced target signal.
[0078] In another embodiment, the signal to be processed is a signal with additive noise, that is, the signal to be processed is a signal with noise superimposed on a pure signal. Accordingly, according to the first amplitude spectrum and the third amplitude spectrum, the specific method of determining the signal-to-noise ratio of the signal to be processed is: for each frequency point, obtain the first amplitude value at the frequency point from the first amplitude spectrum, obtain the second amplitude value at the frequency point from the third amplitude spectrum, and determine the difference between the first amplitude value and the second amplitude value as the noise at the frequency point; according to the noise at each frequency point and the second amplitude value at each frequency point, determine the signal-to-noise ratio at each frequency point of the signal to be processed.
[0079] Since the signal to be processed is a signal with additive noise, the difference between the first amplitude spectrum of the signal to be processed and the third amplitude spectrum of the pure signal can be determined as the noise of the signal to be processed. For example, the noise at the kth frequency point is calculated by the following formula: N[k]=M[k]-Y[k]=M[k]-M[k]*mask[k]. Afterwards, the signal-to-noise ratio at each frequency point of the signal to be processed is determined according to the noise at each frequency point and the second amplitude value at each frequency point through the signal-to-noise ratio formula. For example, the signal-to-noise ratio SNR[k] at the kth frequency point is calculated by the following signal-to-noise ratio formula:
[0080]
[0081] After the signal-to-noise ratio of the signal to be processed is determined in the above manner, the mask vector is adjusted according to the signal-to-noise ratio to obtain an adjusted target mask vector.
[0082] As mentioned above, the signal-to-noise ratio at each frequency point is used to characterize the ratio of the pure signal strength to the noise signal strength at the frequency point. The larger the signal-to-noise ratio, the greater the pure signal strength at the frequency point and the smaller the noise signal strength. In order to enhance the pure signal strength at the frequency point, the mask value at the frequency point is larger, and more pure signals are retained. Similarly, the smaller the signal-to-noise ratio, the greater the noise signal strength at the frequency point and the smaller the pure signal strength. In order to remove the noise at the frequency point, the mask value at the frequency point is smaller, and more noise is removed.
[0083] Therefore, in one embodiment, the mask vector is adjusted according to the signal-to-noise ratio, and the specific implementation method of obtaining the adjusted target mask vector is as follows: first, the corresponding relationship between the signal-to-noise ratio and the adjustment parameter is preset. Among them, in this corresponding relationship, when the signal-to-noise ratio is greater than 0dB, the adjustment parameter can be a positive number, that is, for the frequency point where the pure signal strength is greater than the noise signal strength, the corresponding mask value is increased. When the signal-to-noise ratio is less than 0dB, the adjustment parameter is a negative number, that is, for the frequency point where the noise signal strength is greater than the pure signal strength, the corresponding mask value is reduced. Afterwards, for each frequency point, according to the signal-to-noise ratio at the frequency point, the adjustment parameter corresponding to the signal-to-noise ratio is determined, and the sum of the adjustment parameter and the mask value at the frequency point in the mask vector is determined as the target mask value of the frequency point. In this way, the target mask value at each frequency point can be obtained, and then the target mask vector can be obtained.
[0084] It should be understood that in this embodiment, a corresponding adjustment parameter may be set for each signal-to-noise ratio, or one adjustment parameter may be set for a signal-to-noise ratio greater than 0 dB and another adjustment parameter may be set for a signal-to-noise ratio less than 0 dB, and the present disclosure does not specifically limit this.
[0085] Considering that there are many signal-to-noise ratios, if a corresponding adjustment parameter is set for each signal-to-noise ratio, the setup workload and the subsequent search workload are both large. If an adjustment parameter is set for a signal-to-noise ratio greater than 0dB and a signal-to-noise ratio less than 0dB respectively, the accuracy of adjusting the mask vector is low, and signal distortion cannot be effectively avoided. Therefore, in another embodiment, the specific implementation method of adjusting the mask vector according to the signal-to-noise ratio to obtain the adjusted target mask vector is as follows: constructing a mapping function with the signal-to-noise ratio as an independent variable according to the signal-to-noise ratio; adjusting the mask vector through the mapping function to obtain the adjusted target mask vector. By way of example, the mapping function may be an S-type function.
[0086] For example, the mapping function is:
[0087]
[0088] Among them, a, b, c, d, and α are arbitrary constants, Mask1 represents the target mask vector, and SNR represents the signal-to-noise ratio.
[0089] It should be understood that for each frequency point, the signal-to-noise ratio at the frequency point can be substituted into the above formula to obtain the target mask value at the frequency point, and then the target mask vector can be obtained. For example, by substituting the signal-to-noise ratio SNR[k] at the kth frequency point into the above formula, the target mask value Mask1[k] at the kth frequency point can be obtained. The specific values of a, b, c, d, and α can be adjusted according to actual needs.
[0090] Figure 33 is a waveform diagram of a mapping function according to an exemplary implementation. Assuming that in the above mapping function, a=1, b=1, c=e, d=0, α=10, where e is a natural constant, the waveform diagram of the mapping function is shown in FIG3. Figure 3 In , the horizontal axis represents the signal-to-noise ratio, and the vertical axis represents the target mask value. Figure 3 As can be seen from the waveform shown, when the signal-to-noise ratio is 0dB, that is, when the pure signal strength at a certain frequency point is the same as the noise signal strength, the target mask value is about 0.5. When the signal-to-noise ratio is greater than 0dB, the target mask value increases with the increase of the signal-to-noise ratio, and more pure signals can be retained. When the signal-to-noise ratio is less than 0dB, the target mask value decreases with the increase of the absolute value of the signal-to-noise ratio, and more noise can be removed.
[0091] By adopting the above technical solution, the mask vector is adjusted using a mapping function to obtain a target mask vector, the first amplitude spectrum is processed based on the target mask vector to obtain a second amplitude spectrum of a pure signal, and the processed target signal is obtained based on the second amplitude spectrum and the phase spectrum. In this way, during the signal processing process, more pure signals can be retained while removing noise to the greatest extent, further avoiding distortion of the target signal, thereby improving the reliability of signal processing and enhancing the user experience.
[0092] Based on the same inventive concept, the present disclosure also provides a signal processing device. Figure 4 FIG. 1 is a block diagram of a signal processing device according to an exemplary embodiment. Figure 4 As shown, the signal processing device 400 may include:
[0093] A generating module 401 is configured to generate a mask vector of a first amplitude spectrum of a signal to be processed;
[0094] A first determination module 402 is configured to determine a signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum;
[0095] An adjustment module 403 is configured to adjust the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector;
[0096] The processing module 404 is configured to process the first amplitude spectrum using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed;
[0097] The second determination module 405 is configured to obtain a processed target signal according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
[0098] Optionally, the adjustment module 403 includes:
[0099] A construction submodule, configured to construct a mapping function with the signal-to-noise ratio as an independent variable according to the signal-to-noise ratio;
[0100] The adjustment submodule is configured to adjust the mask vector through the mapping function to obtain an adjusted target mask vector.
[0101] Optionally, the mapping function is:
[0102]
[0103] Among them, a, b, c, d, and α are arbitrary constants, Mask1 represents the target mask vector, and SNR represents the signal-to-noise ratio.
[0104] Optionally, the first determining module 402 includes:
[0105] A first determination submodule is configured to determine a third amplitude spectrum of a pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum;
[0106] The second determination submodule is configured to determine the signal-to-noise ratio of the signal to be processed according to the first amplitude spectrum and the third amplitude spectrum.
[0107] Optionally, the signal to be processed is a signal with additive noise; the amplitude spectrum includes N frequency points and an amplitude value at each frequency point, N is an integer greater than 1; the second determination submodule is configured to: for each frequency point, obtain the first amplitude value at the frequency point from the first amplitude spectrum, obtain the second amplitude value at the frequency point from the third amplitude spectrum, and determine the difference between the first amplitude value and the second amplitude value as the noise at the frequency point; determine the signal-to-noise ratio at each frequency point of the signal to be processed based on the noise at each frequency point and the second amplitude value at each frequency point.
[0108] Optionally, the mask vector includes a mask value at each of the frequency points; the first determination submodule is configured to: for each of the frequency points, determine the product of the mask value at the frequency point and the first amplitude value at the frequency point as the second amplitude value at the frequency point in the third amplitude spectrum, so as to obtain the third amplitude spectrum of the pure signal included in the signal to be processed.
[0109] Optionally, the generating module 401 is configured to: obtain a first amplitude spectrum of the signal to be processed; input the first amplitude spectrum into a pre-trained mask generation model to obtain a mask vector of the first amplitude spectrum output by the mask generation model.
[0110] Optionally, the signal to be processed is an audio signal to be processed.
[0111] Regarding the signal processing device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the signal processing method provided by the present disclosure are implemented.
[0113] Figure 5 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0114] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0115] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the signal processing method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0116] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0117] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0118] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0119] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0120] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0121] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0122] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0123] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned signal processing method.
[0124] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the electronic device 800 to complete the above signal processing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0125] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above-mentioned signal processing method when executed by the programmable device.
[0126] Figure 6 1 is a block diagram of another electronic device according to an exemplary embodiment. For example, the device 1900 may be provided as a server. Figure 6 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above-mentioned signal processing method.
[0127] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or similar.
[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0129] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A signal processing method, characterized in that: The method comprises: Generate a mask vector of a first amplitude spectrum of a signal to be processed; determining a signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum; Adjusting the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector; Processing the first amplitude spectrum using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed; A processed target signal is obtained according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
2. The signal processing method according to claim 1, characterized in that: The step of adjusting the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector includes: According to the signal-to-noise ratio, construct a mapping function with the signal-to-noise ratio as an independent variable; The mask vector is adjusted by using the mapping function to obtain an adjusted target mask vector.
3. The signal processing method according to claim 2, characterized in that: The mapping function is: Among them, a, b, c, d, and α are arbitrary constants, Mask1 represents the target mask vector, and SNR represents the signal-to-noise ratio.
4. The signal processing method according to claim 1, characterized in that: The step of determining the signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum includes: Determining a third amplitude spectrum of a pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum; A signal-to-noise ratio of the signal to be processed is determined according to the first amplitude spectrum and the third amplitude spectrum.
5. The signal processing method according to claim 4, characterized in that: The signal to be processed is a signal with additive noise; the amplitude spectrum includes N frequency points and the amplitude value at each frequency point, where N is an integer greater than 1; The step of determining the signal-to-noise ratio of the signal to be processed according to the first amplitude spectrum and the third amplitude spectrum includes: For each of the frequency points, obtaining a first amplitude value at the frequency point from the first amplitude spectrum, obtaining a second amplitude value at the frequency point from the third amplitude spectrum, and determining a difference between the first amplitude value and the second amplitude value as noise at the frequency point; The signal-to-noise ratio at each frequency point of the signal to be processed is determined according to the noise at each frequency point and the second amplitude value at each frequency point.
6. The signal processing method according to claim 5, characterized in that: The mask vector includes a mask value at each of the frequency points; and determining a third amplitude spectrum of a pure signal included in the signal to be processed according to the mask vector and the first amplitude spectrum, comprises: For each frequency point, the product of the mask value at the frequency point and the first amplitude value at the frequency point is determined as the second amplitude value at the frequency point in the third amplitude spectrum to obtain a third amplitude spectrum of the pure signal included in the signal to be processed.
7. The signal processing method according to any one of claims 1 to 6, characterized in that: The step of generating a mask vector of a first amplitude spectrum of a signal to be processed comprises: Acquire a first amplitude spectrum of the signal to be processed; The first amplitude spectrum is input into a pre-trained mask generation model to obtain a mask vector of the first amplitude spectrum output by the mask generation model.
8. The signal processing method according to claim 1, characterized in that: The signal to be processed is an audio signal to be processed.
9. A signal processing device, characterized in that: include: A generating module, configured to generate a mask vector of a first amplitude spectrum of a signal to be processed; A first determination module is configured to determine a signal-to-noise ratio of the signal to be processed according to the mask vector and the first amplitude spectrum; an adjustment module, configured to adjust the mask vector according to the signal-to-noise ratio to obtain an adjusted target mask vector; a processing module, configured to process the first amplitude spectrum using the target mask vector to obtain a second amplitude spectrum of a pure signal included in the signal to be processed; The second determination module is configured to obtain a processed target signal according to the second amplitude spectrum and the phase spectrum of the signal to be processed.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the steps of the signal processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the signal processing method described in any one of claims 1 to 8 are implemented.