Stereo noise reduction method and device and storage medium
Through neural network model processing, single-channel noise audio training data is used to determine the amplitude mask, and the two audio signals in stereo are reduced, solving the problem of noise signal interference in stereo recording and video, and realizing the fidelity of the target voice signal The retention of degree and spatial characteristics improves the recording and video experience.
Patent Information
- Application Number
- CN202410931313.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-11-05
AI Technical Summary
In stereo recording and video scenes, affected by the environment, the recorded stereo may contain noisy signals, resulting in a decrease in fidelity of the target voice signal, and it is difficult to retain the spatial characteristics of the stereo, affecting the recording and video experience.
The audio noise reduction method based on the neural network model is adopted to determine the appropriate amplitude mask through single-channel noise audio training data, and the two audio signals are processed to achieve noise reduction while retaining the spatial characteristics of stereo sound. The method includes microphone state judgment, frequency domain feature processing and energy selection to determine noise-containing audio and use neural network models to calculate and apply amplitude mask.
Under the conditions of ensuring the fidelity of the target voice signal, it effectively reduces noise, preserves the spatial characteristics of stereo, improves the recording and video experience, and is suitable for different recording and video scenes.
Smart Images

Figure CN118899004A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202310481612.6, and the original application date is April 27, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of audio processing technology, and in particular to a stereo noise reduction method, device and storage medium. Background Art
[0003] With the development of stereo technology, various terminal devices with stereo recording and playback have been favored by users. Take stereo in audio and video recording as an example. In this scenario, stereo is specifically two-channel audio received by two or more microphones in different positions. Compared with mono audio and video recording scenes, stereo audio and video recording scenes can present the spatial characteristics of audio and have richer recording effects.
[0004] However, in the scenario of audio and video recording, due to environmental influences, the recorded stereo may include not only the target speech signal but also noise signals other than the target speech signal.
[0005] Therefore, there is an urgent need to provide a noise reduction method for recorded stereo, which can achieve noise reduction processing while ensuring the fidelity of the target speech signal in the stereo, while preserving the spatial characteristics of the stereo and improving the recording experience. Summary of the invention
[0006] In order to solve the above technical problems, the present application provides a stereo noise reduction method, device and storage medium, which aims to achieve noise reduction processing under the condition of ensuring the fidelity of the target speech signal in stereo, while preserving the spatial characteristics of stereo and improving the recording and video recording experience.
[0007] In the first aspect, the present application provides a stereo noise reduction method. The method is applied to a terminal device, comprising: displaying a first interface, the first interface displays an audio noise reduction option; when the audio noise reduction option is in the first state, when a click operation on the audio noise reduction option is received, the audio noise reduction option is switched to the second state, and the audio noise reduction function is turned on; after the audio noise reduction function is turned on, the noisy frequency is determined according to the microphone state of the first microphone, the microphone state of the second microphone, the first audio signal collected by the first microphone, and the second audio signal collected by the second microphone; wherein the first microphone and the second microphone are microphones located at different positions; the noisy frequency is input into a neural network model to obtain an amplitude mask of the noisy frequency; wherein the neural network model is trained using noisy frequency training data, and the noisy frequency training data is obtained by fusing noise data on a single-channel noise-free frequency; the first audio signal and the second audio signal are masked using an amplitude mask to obtain a de-noised stereo.
[0008] Therefore, after the audio noise reduction function is turned on, the amplitude mask suitable for the first audio signal and the second audio signal is determined by adopting a neural network model obtained by training based on single-channel noisy audio training data, and then the two audio signals are processed using the same amplitude mask. In this way, while the noise of the two audio signals in the stereo is reduced, the spatial characteristics of the stereo are preserved, thereby improving the recording and video recording experience.
[0009] According to a first aspect, noisy frequency is determined based on a microphone state of a first microphone, a microphone state of a second microphone, a first audio signal collected by the first microphone, and a second audio signal collected by the second microphone, including: when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is operating normally, determining the noisy frequency based on the first audio signal and the second audio signal; when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is abnormal, determining the first audio signal as noisy frequency; when the microphone state of the first microphone indicates that the first microphone is abnormal and the microphone state of the second microphone indicates that the second microphone is operating normally, determining the second audio signal as noisy frequency.
[0010] Therefore, it can be better applied to various practical scenarios.
[0011] According to the first aspect, or any implementation method of the first aspect above, when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is operating normally, determining the noisy frequency signal based on the first audio signal and the second audio signal, including: when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is operating normally, performing mean processing on the frequency domain characteristics of the first audio signal and the frequency domain characteristics of the second audio signal; and using the audio signal corresponding to the frequency domain characteristics obtained after the mean processing as the noisy frequency signal.
[0012] Therefore, the mean of the frequency domain characteristics of the two normal audio signals is selected as the noisy frequency, so that the amplitude mask of the noisy frequency determined by the neural network model can better reflect the frequency domain relationship between the clean audio signal (which can be understood as the target audio signal, or the audio signal to be retained) and the noisy audio signal (the audio signal to be suppressed or removed) in the two audio signals, thereby ensuring that the target speech signal in the denoised stereo obtained by subsequent masking based on the amplitude mask corresponding to the noisy frequency meets the required fidelity, while preserving the spatial characteristics of the stereo.
[0013] According to the first aspect, or any implementation method of the first aspect above, when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is operating normally, determining the noisy frequency based on the first audio signal and the second audio signal, including: when the microphone state of the first microphone indicates that the first microphone is operating normally and the microphone state of the second microphone indicates that the second microphone is operating normally, selecting a low-energy audio signal from the first audio signal and the second audio signal as the noisy frequency.
[0014] Since the energy difference corresponding to the target audio signal in the first audio signal and the second audio signal collected by the first microphone and the second microphone is usually small, the main factor causing the large difference in the signal-to-noise ratio between the two is the noise energy. Therefore, by selecting an audio signal with lower overall energy as the noisy frequency to determine the amplitude mask, harmonic distortion can be reduced, so that the target audio signal in the denoised stereo obtained by masking based on the amplitude mask can obtain a better guarantee effect.
[0015] According to the first aspect, or any implementation of the first aspect above, the method also includes: when the microphone status of the first microphone indicates that the first microphone is abnormal, and the microphone status of the second microphone indicates that the second microphone is abnormal, a prompt window is displayed in the first interface; wherein the prompt window displays prompt information that both the first microphone and the second microphone are abnormal.
[0016] Therefore, by displaying relevant prompt information on the first interface when both microphones have abnormalities, it is possible to prevent users from using the abnormal microphone to record audio or video without knowing it, which would result in the final recorded audio or video file having no sound or containing only interference audio.
[0017] According to the first aspect, or any implementation method of the first aspect above, after turning on the audio noise reduction function, the method also includes: when receiving a click operation on the audio noise reduction option, the audio noise reduction option is switched to a first state, and the audio noise reduction function is turned off; after turning off the audio noise reduction function, synthesizing un-noised stereo according to the first audio signal and the second audio signal.
[0018] Therefore, during the process of recording and video recording, the audio noise reduction option available for user operation is always displayed, so that the user can choose to turn on or off the audio noise reduction function as needed during the process of recording and video recording, thereby better meeting the user's usage needs for different scenarios.
[0019] According to the first aspect, or any implementation of the first aspect above, the first interface also displays an end recording option; the method also includes: after the audio noise reduction function is turned on, when a click operation on the end recording option is received, the audio noise reduction option is restored to the first state, and the audio noise reduction function is turned off.
[0020] Therefore, no matter what state the audio noise reduction option is in before the recording is finished, the audio noise reduction option is restored to the first state by default after each recording is finished. In this way, in the implementation method, there is no need to additionally maintain and manage the file recording the state information of the audio noise reduction option.
[0021] According to the first aspect, or any implementation of the first aspect above, the first interface also displays an option to end recording; the method also includes: after turning on the audio noise reduction function, when a click operation on the option to end recording is received, recording a second state; when re-triggering the recording, directly turning on the audio noise reduction function according to the recorded second state.
[0022] Therefore, after each recording is completed, the audio noise reduction option maintains the current state and continues the state when the next recording starts, so that it can better adapt to the user's actual usage habits.
[0023] According to the first aspect, or any implementation of the first aspect above, the sampling frequency of the noisy frequency training data is 16kHz, and the bandwidth of the amplitude mask determined by the neural network model obtained by training with the noisy frequency training data is between 0kHz and 8kHz.
[0024] According to the first aspect, or any implementation method of the first aspect above, a noisy frequency is input into a neural network model to obtain an amplitude mask of the noisy frequency, including: when the sampling frequency of the noisy frequency is 16kHz, the frequency domain features corresponding to the noisy frequency are input into the neural network model to obtain an amplitude mask with a bandwidth between 0kHz and 8kHz; and the obtained amplitude mask with a bandwidth between 0kHz and 8kHz is used as the amplitude mask of the noisy frequency.
[0025] Since the neural network model is trained using noisy audio training data with a sampling frequency of 16 kHz, for a stereo noise reduction scenario with a sampling frequency of 16 kHz, the amplitude mask determined by the neural network model can be directly used as the amplitude mask of the noisy audio without any other processing, which is convenient and fast.
[0026] According to the first aspect, or any implementation of the first aspect above, the method also includes: when the sampling frequency of the noisy frequency is 32kHz or 48kHz, inputting the frequency domain features corresponding to the noisy frequency into the neural network model to obtain an amplitude mask with a bandwidth between 0kHz and 8kHz; using the average value of the amplitude mask with a bandwidth between 0kHz and 8kHz output by the neural network model as the amplitude mask corresponding to the bandwidth above 8kHz; fusing the amplitude mask with a bandwidth between 0kHz and 8kHz output by the neural network model and the amplitude mask corresponding to the bandwidth above 8kHz according to a set gain ratio to obtain an amplitude mask corresponding to a bandwidth near 8kHz; using the amplitude mask with a bandwidth between 0kHz and 8kHz, the amplitude mask corresponding to the bandwidth near 8kHz, and the amplitude mask corresponding to the bandwidth above 8kHz as the amplitude mask of the noisy frequency.
[0027] Since the neural network model is trained with noisy audio training data with a sampling frequency of 16kHz, the neural network model trained with noisy audio training data with a sampling frequency of 16kHz is still applicable to stereo noise reduction scenarios with a sampling frequency of 32kHz or 48kHz, since human voices are mainly concentrated in the mid- and low-frequency range. However, in order to adapt to the bandwidth above 8kHz, the frequency band is expanded based on the amplitude mask determined by the neural network model, thereby ensuring the continuity of the spectrum.
[0028] According to the first aspect, or any implementation method of the first aspect above, noise data is fused on a single-channel noise-free frequency, including: dividing the single-channel noise-free frequency and noise data into the same number of noise-free frequency time frames and noise audio time frames according to the same time period; for the noise-free frequency time frames and the noise audio time frames at the same moment, superimposing the frequency domain features in the noise-free frequency time frames and the frequency domain features in the noise audio time frames.
[0029] According to the first aspect, or any implementation of the first aspect above, the neural network model includes a convolutional network layer, a long short-term memory network layer and a fully connected network layer arranged in sequence; wherein the convolutional network layer is used to obtain the timing features between frames in the noisy frequency spectrum, and the fully connected network layer is used to map the local features of the frequency domain features obtained by the convolutional network layer and the timing features obtained by the long short-term memory network layer to the feature dimensions corresponding to the amplitude mask.
[0030] According to the first aspect, or any implementation of the first aspect above, the first microphone is located at the top of the terminal device, and the second microphone is located at the bottom of the terminal device.
[0031] According to the first aspect, or any implementation method of the first aspect above, the terminal device establishes a communication link with the left earphone and the right earphone of the true wireless earphone respectively; the first microphone is located in the left earphone, and the second microphone is located in the right earphone.
[0032] According to the first aspect, or any implementation of the first aspect above, the first interface is a video recording interface corresponding to the camera application.
[0033] According to the first aspect, or any implementation of the first aspect above, the first interface is a recording interface corresponding to the recording application.
[0034] In a second aspect, the present application provides a terminal device. The terminal device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device executes instructions of the method in the first aspect or any possible implementation of the first aspect.
[0035] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0036] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0037] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0038] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0039] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0040] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.
[0041] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the hardware structure of a terminal device is shown as an example;
[0043] Figures 2 to 5 This is a schematic diagram of a user interface for exemplarily showing how to turn on or off an audio noise reduction function in a stereo recording scenario;
[0044] Figure 6 A schematic diagram of a user interface for exemplarily turning on or off an audio noise reduction function;
[0045] Figure 7 A schematic diagram of a flow chart of a stereo noise reduction method provided by an embodiment of the present application;
[0046] Figure 8 A schematic diagram of a stereo noise reduction processing logic provided by an embodiment of the present application is exemplarily shown;
[0047] Fig. 9 A schematic diagram of another stereo noise reduction processing logic provided by an embodiment of the present application is exemplarily shown;
[0048] Fig.10 The diagram is a schematic diagram showing an exemplary interaction between a terminal device and a server;
[0049] Fig.11 A schematic diagram of the software structure of a terminal device is shown as an example;
[0050] Fig.12 The figure is a schematic diagram showing an exemplary interaction between software and hardware. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0053] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0054] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0055] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0056] In order to better understand the technical solution provided by the embodiments of the present application, before describing the technical solution of the embodiments of the present application, the hardware structure of the terminal device (such as a mobile phone, a tablet computer, etc.) to which the embodiments of the present application are applicable is first described in conjunction with the accompanying drawings.
[0057] It should be noted that the technical solution provided in the embodiments of the present application is particularly applicable to terminal devices capable of stereo recording, such as mobile phones, tablet computers, etc., which are provided with at least two microphones located in different positions, or mobile phones, tablet computers, smart watches, etc., which are connected to stereo headphones. For the sake of convenience, the following description takes a mobile phone as an example.
[0058] Exemplarily, for a mobile phone with two microphones, one microphone (microphone) is arranged at the bottom of the mobile phone, such as on both sides or one side of the charging port; the other microphone is arranged at the top of the mobile phone, such as near the rear camera, or near the earpiece on the front of the mobile phone.
[0059] For example, for a stereo headset connected to a mobile phone, such as a True Wireless Stereo headset (TWS headset). Specifically in this application, the following descriptions of the embodiments take TWS headsets as two microphones for collecting audio signals as an example.
[0060] In addition, it should be noted that since the technical solution provided in the embodiment of the present application is a noise reduction processing solution for stereo, in order to achieve stereo recording, when the TWS headset is used as two microphones to collect audio signals, it is necessary to ensure that both the left and right headsets of the TWS headset are successfully connected to the mobile phone.
[0061] See also Figure 1 The mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0062] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor (Modem), a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc., which are not listed one by one here and the present application does not limit this.
[0063] The controller as the processing unit mentioned above may be the nerve center and command center of the mobile phone 100. In practical applications, the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0064] The above-mentioned modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal, and transmit the demodulated low-frequency baseband signal to the baseband processor for processing.
[0065] The baseband processor mentioned above is used to process the low-frequency baseband signal transmitted by the regulator, and transmit the processed low-frequency baseband signal to the application processor.
[0066] It should be noted that in some implementations, the baseband processor may be integrated into the modem, that is, the modem may have the function of the baseband processor.
[0067] The application processor mentioned above is used to output sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or to display images or videos through the display screen 194.
[0068] The digital signal processor mentioned above is used to process digital signals. Specifically, in addition to processing digital image signals, the digital signal processor can also process other digital signals. For example, when the mobile phone 100 is selecting a frequency point, the digital signal processor can be used to perform Fourier transform on the frequency point energy. Specifically, in the technical solution provided in the present application, the digital signal processor can be used to perform Fourier transform on the frequency point energy of a 48kHz audio signal to obtain a 24kHz spectrum.
[0069] Regarding the neural network processor mentioned above, specifically in the technical solution provided by this application, it can be used to train the neural network model for stereo noise reduction processing mentioned in the embodiment of this application. Understandably, in order to reduce the resource occupation of the mobile phone 100, the neural network model can also be trained by a cloud server or other server and sent to the mobile phone 100.
[0070] The video codec mentioned above is used to compress or decompress digital video. For example, the mobile phone 100 can support one or more video codecs. In this way, the mobile phone 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0071] The ISP mentioned above is used to output the digital image signal to the DSP for processing. Specifically, the ISP is used to process the data fed back by the camera 193. For example, when taking a photo or recording a video, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some implementations, the ISP can be set in the camera 193.
[0072] The DSP mentioned above is used to convert digital image signals into image signals in standard RGB, YUV and other formats.
[0073] In addition, it should be noted that, regarding the processor 110 including the above-mentioned processing units, in some implementations, different processing units may be independent devices. That is, each processing unit may be regarded as a processor. In other implementations, different processing units may also be integrated into one or more processors. For example, in some implementations, the modem processor may be an independent device. In other implementations, the modem processor may be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.
[0074] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0075] In addition, the processor 110 may further include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc., which are not listed here one by one, and the present application does not limit this.
[0076] In addition, the processor 110 may also be provided with a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0077] Continue to see Figure 1 The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0078] Continue to see Figure 1 , the internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, and the stereo recording function mentioned in the embodiment of the present application, etc.). The data storage area may store data created during the use of the mobile phone 100 (such as stereo audio data recorded based on the technical solution provided in the embodiment of the present application), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0079] Continue to see Figure 1 , the charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 can receive charging input from the wired charger through the USB interface 130. In some wireless charging implementations, the charging management module 140 can receive wireless charging input through the wireless charging coil of the mobile phone 100. While the charging management module 140 is charging the battery 142, it can also power the terminal device through the power management module 141.
[0080] Continue to see Figure 1, the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other implementations, the power management module 141 can also be set in the processor 110. In some other implementations, the power management module 141 and the charging management module 140 can also be set in the same device.
[0081] Continue to see Figure 1 The wireless communication function of the mobile phone 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0082] It should be noted that antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other implementations, the antenna can be used in combination with a tuning switch.
[0083] Continue to see Figure 1 , the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0084] Continue to see Figure 1The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0085] It should be noted that in the following implementation, the neural network model used for stereo noise reduction can be obtained by training a cloud server or other server. For this implementation scenario, the mobile phone 100 can communicate with a cloud server or other server that provides a neural network through the mobile communication module 150 or the wireless communication module 160. For example, the mobile phone 100 can send a request to obtain or update the neural network model to the cloud server through the mobile communication module 150. Accordingly, the cloud server can send the trained neural network model to the mobile phone 100 according to the request of the mobile phone 100.
[0086] In addition, it should be noted that in the scenario where the neural network model is trained by a cloud server (or other server), the cloud server can customize the neural network model suitable for different mobile phones 100 according to the customization requirements corresponding to mobile phones 100 with different configurations, and update and iterate the training of the neural network model based on the noise reduction results fed back by different mobile phones 100.
[0087] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0088] Continue to see Figure 1The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, etc. For example, the mobile phone 100 may implement audio functions through the application processor and the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, etc. in the audio module 170, such as recording and video recording functions.
[0089] In the process of realizing the audio function through the application processor and the audio module 170, the audio module 170 can be used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some implementations, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0090] Specifically in the embodiment of the present application, the mobile phone 100 capable of stereo recording needs to include at least two microphones 170C. The arrangement positions of the two microphones 170C can be found above and will not be described in detail here.
[0091] Continue to see Figure 1 The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and are not limited in this application.
[0092] Continue to see Figure 1 The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The mobile phone 100 may receive key input and generate key signal input related to user settings and function control of the mobile phone 100.
[0093] Continue to see Figure 1 , the motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
[0094] Continue to see Figure 1 The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0095] Continue to see Figure 1, the camera 193 is used to capture still images or videos. The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor. Specifically, the object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some implementations, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0096] Continue to see Figure 1 , the display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The mobile phone 100 can implement a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0097] The hardware structure of the mobile phone 100 is introduced here. It should be understood that: Figure 1 The illustrated mobile phone 100 is merely an example, and in a specific implementation, the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0098] based on Figure 1 With the mobile phone of the structure shown, when the user uses the mobile phone to record audio or video, he can receive two-channel audio through two microphones located at different positions, or a TWS headset connected to the mobile phone 100, thereby achieving stereo recording.
[0099] However, in the scene of recording or video recording, due to the influence of the environment, the recorded stereo may include not only the target voice signal, but also the noise signal other than the target voice signal. In order to improve the user experience, this application provides a stereo noise reduction method, which aims to achieve noise reduction processing under the condition of ensuring the fidelity of the target voice signal in stereo, while preserving the spatial characteristics of stereo and improving the recording or video recording experience.
[0100] Exemplarily, based on the stereo noise reduction method provided in the embodiment of the present application, in recording and video recording scenarios where the user wants to retain the human voice (target voice signal) and eliminate or suppress sounds other than the human voice (noise signal), such as interviews, speeches, meetings and other scenarios, the user can turn on the audio noise reduction function, so that the terminal device can, after turning on the audio noise reduction function, use a neural network model obtained by training based on single-channel noisy audio training data to determine an amplitude mask suitable for noise reduction processing of two audio signals collected by two microphones or the left and right earphones of the TWS earphones, and then use the same amplitude mask to process the two audio signals, thereby achieving noise reduction for the two audio signals in the stereo while preserving the spatial characteristics of the stereo, thereby improving the recording and video recording experience.
[0101] Exemplarily, based on the stereo noise reduction method provided in the embodiments of the present application, in recording and video recording scenarios where the user wishes to retain noise, such as concerts, outdoors, and other scenarios where the user wishes to retain the sounds of musical instruments or nature, the user can turn off the audio noise reduction function, thereby enabling the terminal device to directly synthesize stereo with the original recorded audio.
[0102] Taking a mobile phone as an example, in practical applications, the changes in the user interface involved in the recording and video recording scene implemented by the stereo noise reduction method provided in the embodiment of the present application are as follows, for example Figures 2 to 5 shown.
[0103] See also Figure 2 In (1), an interface of a mobile phone (interface 10a) is exemplarily shown. Figure 2 In (1), the interface 10 may include one or more controls, such as a power icon, a network icon, and various application icons, etc. The application icons include, for example, a camera application icon S1, a setting application icon S2, a recorder application icon, etc.
[0104] For example, when the user clicks the icon S1 of the camera application in the interface 10a, the mobile phone will start the camera application in response to the operation, and the interface will change from Figure 2 The interface 10a shown in (1) is switched to Figure 2 Interface 10b shown in (2).
[0105] See also Figure 2In (2), the interface 10b may include one or more controls, for example, including but not limited to: a preview window S3, a shutter control S4, a front and rear camera switching control S5, a shooting mode list S6, a magnification selection list S7, a function option list (the content displayed in the area above the preview window S3), a picture viewing control (the control on the left side of the shutter control S4), etc.
[0106] Among them, the preview window S3 can display the image collected by the camera in real time. The shutter control S4 can monitor the user operation that triggers the photo shooting. That is, when the mobile phone detects the user operation acting on the shutter control S4, it will respond to the operation to take a photo and store the captured image in the gallery application. The front and rear camera switching control S5 can realize the switching of the front and rear cameras in response to the user's operation behavior when the user clicks it. For example, when the front camera is currently in use, after the user clicks the front and rear camera switching control S5, the mobile phone will switch to the rear camera for shooting in response to the operation behavior. The shooting mode list S6 displays the shooting modes that can be selected by the user, such as aperture mode, night scene mode, portrait mode, photo mode, video mode, smile mode, etc. The magnification selection list S7 displays the magnification that can be selected by the user, such as 0.6 times (ultra-wide angle), 1 times (main lens), 2.5 times (telephoto lens), 10 times (ultra-telephoto lens), etc.
[0107] For example, Figure 2 In the interface 10b shown in (2), it is taken as an example that the shooting mode selected in the shooting mode list S6 is "photographing" and the magnification selected in the magnification selection list S7 is 1.
[0108] For example, when the user slides the shooting mode in the shooting mode list S6 to the left, slides "Video" to Figure 2 In the example, the mobile phone selects the position of "Photo" in (2) or directly clicks the "Video" option in the shooting mode list S6. In response to the operation, the shooting mode of the mobile phone switches from "Photo" mode to "Video" mode. Figure 3 As shown in (1).
[0109] In addition, it is understandable that recording is a continuous action, so when the shooting mode is switched to "Record" mode, the shutter control S4 will switch to Figure 3 The video recording control S4' shown in (1).
[0110] For example, when the user clicks the video control S4', the mobile phone will start recording (recording the sound and picture of the current environment) in response to the operation behavior, and the interface of the mobile phone will also switch from the interface 10b to the video interface, such as Figure 3 Interface 10c shown in (2).
[0111] It should be noted that in order to implement the stereo noise reduction method provided in the embodiment of the present application in the video recording mode, an option for the user to turn on or off the audio noise reduction function may be set in the interface 10c. Figure 3 In (2), for example, the interface 10c corresponding to the video recording mode may include, in addition to a preview window S3 for displaying the recording screen, a front and rear camera switching control S5, and a magnification selection list S7, an audio noise reduction option S8, a recording time display control S9, a photo control S10 for capturing a frame in the video recording, and controls S4" for operating during the video recording process.
[0112] Understandably, during the recording process, the user may pause the recording midway, or directly end the recording. Therefore, in order to facilitate the user to click different controls as needed, the control S4" may include a control S4-1" for pausing the recording and a control S4-2" for ending the recording.
[0113] In addition, it should be noted that for the audio noise reduction option S8, different states can be set, and then the audio noise reduction function can be turned on or off through one option. Specifically in this embodiment, the style shown in the audio noise reduction option S8 indicates that it is in the first state, and the style shown in the audio noise reduction option S8' indicates that it is in the second state.
[0114] Exemplarily, when the audio noise reduction option is in the first state, it can be agreed that the mobile phone turns off the audio noise reduction function, that is, during the recording process, the mobile phone will not use the stereo noise reduction method provided in the embodiment of the present application to reduce the noise of the two audio signals collected by the two microphones, and then obtain the stereo after noise reduction, but directly perform stereo synthesis based on the two audio signals collected by the two microphones (hereinafter this scenario will be referred to as the original sound mode).
[0115] Exemplarily, when the audio noise reduction option is in the second state, it can be agreed that the mobile phone has turned on the audio noise reduction function, that is, during the recording process, the mobile phone will use the stereo noise reduction method provided in the embodiment of the present application to reduce the noise of the two audio signals collected by the two microphones, and then obtain the stereo sound after noise reduction (hereinafter this scenario will be referred to as the noise reduction mode).
[0116] Based on the above description of the audio noise reduction option status, when starting recording, the corresponding interface is Figure 3 In the interface 10c shown in (2), when the audio noise reduction option is in the S8 style, the mobile phone recognizes that the state of the audio noise reduction option is the first state mentioned above, and therefore the original sound mode is used for recording.
[0117] For example, during the video recording process, for example, 5 seconds are recorded (see Figure 4At the time "00:00:05" shown in S9 in (1), the user clicks the audio noise reduction option of style S8. Based on the above description, it can be seen that in response to this operation, the mobile phone switches the audio noise reduction option from the first state to the second state, that is, from the style shown in S8 to Figure 4 The S8' shown in (1) above is used to turn on the audio noise reduction function. At this point, the phone stops recording in the original sound mode and instead uses the noise reduction mode to record.
[0118] For example, in some implementations, when the audio noise reduction function is turned on, a pop-up window may be displayed in the interface 10c to remind the user that the audio noise reduction function is currently turned on, such as Figure 4 The prompt message "Audio noise reduction is turned on" shown in (1).
[0119] In addition, in order not to affect the user's use and avoid the prompt information blocking the video screen for a long time, the display time of the prompt information can be set, for example, 2 seconds. Accordingly, after the prompt information is displayed in the interface 10c for 2 seconds, it will automatically disappear from the interface 10c. Figure 4 In (2), at the time "00:00:07" shown in S9, that is, 2 seconds after the audio noise reduction function is turned on, the prompt message disappears.
[0120] For example, during the video recording process, for example, 5 minutes and 25 seconds are recorded (see Figure 5 At the time "00:05:25" shown in S9 in (1), the user clicks the audio noise reduction option of style S8'. Based on the above description, it can be seen that in response to this operation, the mobile phone will switch the audio noise reduction option from the second state to the first state, that is, from the style shown in S8' to the style of S8, thereby turning off the audio noise reduction function. At this time, the mobile phone will stop recording in the noise reduction mode and instead use the original sound mode for recording.
[0121] For example, in some implementations, when the audio noise reduction function is turned off, a pop-up window may be displayed in the interface 10c to remind the user that the audio noise reduction function is currently turned off, such as Figure 5 The prompt message "Audio noise reduction is turned off" shown in (1).
[0122] In addition, in order not to affect the user's use and avoid the prompt information blocking the video screen for a long time, the display time of the prompt information can be set, for example, 2 seconds. Accordingly, after the prompt information is displayed in the interface 10c for 2 seconds, it will automatically disappear from the interface 10c. Figure 5 In (2), at the time "00:05:27" shown in S9, that is, 2 seconds after the audio noise reduction function is turned off, the prompt message disappears.
[0123] Therefore, by adding an audio noise reduction option for turning on or off the audio noise reduction function in the interface 10c, it is convenient for the user to turn on or off the audio noise reduction function at any time as needed during the recording process, and then based on the stereo noise reduction method provided in the embodiment of the present application, the switching between the original sound mode recording and the noise reduction mode recording is realized. That is, based on the stereo noise reduction method provided in the embodiment of the present application, not only can the stereo corresponding to a complete recording and video recording be a stereo after noise reduction, but also the stereo corresponding to a complete recording and video recording can be a stereo without noise reduction, and also the stereo corresponding to a complete recording and video recording can be a stereo part with both noise reduction and a stereo part without noise reduction, so as to be better suitable for actual stereo recording scenes.
[0124] In addition, it should be noted that when the user clicks on S4-2", i.e., the end recording option, during the recording process, the mobile phone will end the recording in response to the operation, and the recorded content will also be saved in the gallery application of the mobile phone. When the recording is ended, in one implementation, the mobile phone can directly restore the audio noise reduction option to the first state and turn off the audio noise reduction function. That is, the mobile phone does not save the state corresponding to the audio noise reduction function during the recording process. Regardless of whether the audio noise reduction option is in the first state (such as style S8) or in the second state (such as style S8') when the recording is ended, the mobile phone will set the state of the audio noise reduction option to the first state when the recording is ended. That is, based on this implementation, the user Figure 4 (2) shown in the interface 10c (the audio noise reduction option is in the second state), or in Figure 5 In the interface 10c (the audio noise reduction option is in the first state) shown in (1), click S4-2 to return to Figure 3 After the interface 10b shown in (1) is displayed, when the user clicks S4' in the interface 10b again, the mobile phone responds to the operation and enters the interface 10c corresponding to the video recording, and the audio noise reduction option is still the style shown in S8.
[0125] Exemplarily, in another implementation, when the recording ends, the mobile phone can record (save) the status corresponding to the audio noise reduction function during the recording process. When the recording is subsequently re-triggered (a new recording task is started), the mobile phone will directly modify the status of the audio noise reduction option according to the status information recorded when the recording ended last time, and then record according to the mode corresponding to the modified status.
[0126] For example, based on this implementation, users can Figure 4 In the interface 10c (the audio noise reduction option is in the second state) shown in (2), click S4-2" to return to Figure 3After the user clicks S4' in the interface 10b again, the mobile phone responds to the operation and enters the interface 10c corresponding to the video recording. The audio noise reduction option is directly the style shown in S8'. In this way, the mobile phone can directly use the noise reduction mode for recording.
[0127] For example, based on this implementation, the user Figure 5 In the interface 10c (the audio noise reduction option is in the first state) shown in (1), click S4-2 to return to Figure 3 After the user clicks S4' in the interface 10b again, the mobile phone responds to the operation and enters the interface 10c corresponding to the video recording, and the audio noise reduction option is still the style shown in S8. In this way, the mobile phone can directly use the original sound mode for recording.
[0128] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0129] For example, in another implementation, the entry to enable the audio noise reduction function can be integrated into the interface corresponding to the setting application. For this implementation, before starting recording, you need to go to the interface corresponding to the setting application and enable the audio noise reduction function. For example, the user needs to click Figure 2 An icon S2 of a setting application is displayed in the interface 10a shown in (1).
[0130] For example, after the user clicks S2, the mobile phone responds to the operation behavior and starts the setting application, switching from interface 10a to interface 10b. Figure 6 Interface 10d shown in (1).
[0131] See also Figure 6 In (1), the interface 10d may include one or more controls, including but not limited to: account center, flight mode, stereo noise reduction option 10d-1, WLAN, Bluetooth, notification, application, display and brightness, sound and vibration, system and update, battery, storage, security and other control options.
[0132] For example, in this embodiment, the style shown in the stereo noise reduction option 10d-1 indicates that the audio noise reduction function is not turned on. When the user clicks the stereo noise reduction option 10d-1, the mobile phone responds to the operation behavior and turns on the audio noise reduction function. The stereo noise reduction option 10d-1 will be switched to Figure 6 The pattern of the stereo noise reduction option 10d-1' is shown in (2).
[0133] Exemplarily, when the stereo noise reduction option is the style shown in 10d-1', when the user records a video through the camera application, the video will be recorded in the noise reduction mode.
[0134] Exemplarily, when the stereo noise reduction option is in the style shown in 10d-1, when the user records a video through the camera application, the video will be recorded in the original sound mode.
[0135] For example, in one implementation, the audio noise reduction function is turned on or off by setting the stereo noise reduction option provided in the application, and the audio noise reduction option may not be displayed in the interface 10c during the recording process, such as S8 or S8' mentioned above. Therefore, during the recording process, the user cannot dynamically switch between the noise reduction mode and the original sound mode. If it is necessary to switch between the noise reduction mode and the original sound mode, it is necessary to pause the recording through S4-1", then enter the interface 10d, operate the stereo noise reduction option, and switch between the noise reduction mode and the original sound mode.
[0136] Exemplarily, in another implementation, the stereo noise reduction option provided in interface 10d and the audio noise reduction option provided in the above-mentioned interface 10c can be bound. That is, when the stereo noise reduction option in interface 10d is in the style of 10d-1, when the user records a video through the camera application, after entering interface 10c by clicking S4', the audio noise reduction option displayed in interface 10c will be in the style of S8. When the user clicks S8 to switch the audio noise reduction option to the style of S8', the stereo noise reduction option will also automatically switch to the style of 10d-1'. That is, the status of the stereo noise reduction option and the audio noise reduction option remain synchronized.
[0137] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0138] In order to better understand the stereo noise reduction method provided in the embodiment of the present application, the stereo noise reduction method provided in the embodiment of the present application is specifically described by taking the example of a user turning on or off the audio noise reduction function through the audio noise reduction option shown in the above interface 10c.
[0139] See also Figure 7 The stereo noise reduction method provided in the embodiment of the present application specifically includes:
[0140] 101, displaying a first interface, wherein the first interface displays an audio noise reduction option.
[0141] For example, in some implementations, the first interface may be, for example, the video recording interface corresponding to the camera application in the above embodiment, i.e., interface 10c. Accordingly, when the first interface is the above-mentioned interface 10c, the audio noise reduction option displayed in the first interface is the audio noise reduction option of the style S8 or S8' displayed in interface 10c.
[0142] Exemplarily, in some other implementations, the first interface may also be a recording interface corresponding to a recorder application. For the implementation scenario where the first interface is a recording interface corresponding to a recorder application, in order to implement the stereo noise reduction method provided in the embodiment of the present application, an audio noise reduction option such as style S8 or S8' may also be set in the recording interface, and then the audio noise reduction function may be turned on or off by operating the audio noise reduction option. Thus, when the audio noise reduction function is turned on, the above-mentioned noise reduction mode is used for recording based on the audio noise reduction method provided in the embodiment of the present application. Otherwise, the above-mentioned original sound mode is used for recording.
[0143] For the sake of convenience of explanation, this embodiment takes the first interface as a video recording interface corresponding to the camera application, that is, the interface 10c mentioned above as an example.
[0144] 102. When the audio noise reduction option is in the first state, when a click operation on the audio noise reduction option is received, the audio noise reduction option is switched to the second state, and the audio noise reduction function is turned on.
[0145] It can be known from the description of the above embodiments that when the audio noise reduction option is in the style of S8, that is, in the first state, it indicates that the audio noise reduction function is not turned on. When the audio noise reduction option is in the style of S8', that is, in the second state, it indicates that the audio noise reduction function is turned on. Based on this, when the audio noise reduction option is in the first state, that is, the style of S8, when a click operation on the audio noise reduction option is received, the mobile phone responds to the operation, and the audio noise reduction option will switch to the second state, that is, from the style of S8 to the style of S8'. After the audio noise reduction option is switched to the second state, the audio noise reduction function will be turned on, and the mobile phone can use the noise reduction model for recording.
[0146] Specifically, regarding the above-mentioned stereo noise reduction method provided in the embodiment of the present application, the specific implementation process of recording in the noise reduction mode when the audio noise reduction function is turned on can be achieved through steps 103 to 105.
[0147] 103 . After the audio noise reduction function is turned on, determine a noisy frequency according to a microphone state of the first microphone, a microphone state of the second microphone, a first audio signal collected by the first microphone, and a second audio signal collected by the second microphone.
[0148] For example, in some implementations, the first microphone may be, for example, a terminal device currently recording video, such as a microphone on the top of a mobile phone. The second microphone may be, for example, a microphone on the bottom of the mobile phone. For the specific positions of the microphones at the top and bottom, please refer to the description of the above embodiment, which will not be repeated here.
[0149] Exemplarily, in other implementations, when a terminal device currently recording video, such as a mobile phone, establishes communication links with a true wireless headset, such as a left earphone and a right earphone of a TWS headset, respectively, the first microphone may be, for example, a microphone located in the left earphone, and the second microphone may be, for example, a microphone located in the right earphone.
[0150] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment, and is not the only limitation to this embodiment. It is sufficient to ensure that the synthesized stereo audio signals come from microphones at different positions.
[0151] In addition, it should be noted that the neural network model used to determine the amplitude mask of the noisy frequency in step 104 is obtained by training with the noisy frequency training data, and the noisy frequency training data is obtained by fusing the noise data on the noise-free frequency of a single channel, that is, the noisy frequency input to the neural network model should be a single-channel audio. However, the currently collected audio signal has two channels (i.e., dual channels), so in order to ensure that the amplitude mask is obtained using the neural network model obtained by training based on the single-channel audio data, it is necessary to determine one audio signal based on the two audio signals.
[0152] Exemplarily, the above-mentioned fusion of noise data on the noise-free frequency of a single channel specifically refers to dividing the noise-free frequency and noise data of a single channel into the same number of noise-free frequency time frames and noise audio time frames according to the same time period. Then, for the noise-free frequency time frames and the noise audio time frames at the same moment, the frequency domain features in the noise-free frequency time frames and the frequency domain features in the noise audio time frames are superimposed. That is, the fusion mentioned here is the fusion of different audio signals in the time domain.
[0153] For the sake of convenience, the first audio signal collected by the first microphone is used as the left channel input, and the second audio signal collected by the second microphone is used as the right channel input. Figure 8, when receiving the first audio signal input from the left channel and the second audio signal input from the right channel, the audio signals of the two channels are fused in combination with the microphone states of the microphones corresponding to the two audio signals, and then the noisy audio that can be input into the neural network model is determined. In this way, the neural network model can determine the amplitude mask suitable for the first audio signal and the second audio signal based on the noisy audio of the input single channel. The audio noise reduction module can mask the first audio signal and the second audio signal based on the same amplitude mask determined by the neural network model. In this way, after masking with the same amplitude mask, the left channel output and the right channel output are the noise-reduced audio signals. In this way, through the cooperation of the left channel and the right channel, a noise-reduced stereo sound can be obtained.
[0154] It should be noted that the so-called amplitude mask is specifically used to describe clean speech, that is, the relationship between noise-free frequency (target audio signal, or clean speech, human voice, etc.) and noise-containing frequency (various noises, such as wind noise, road noise, music sound, etc., audio except the target audio signal) in the frequency domain.
[0155] In addition, it should be noted that when the amplitude mask describes the relationship in the frequency domain, the masking based on the amplitude mask can be understood as spectrum masking. The so-called spectrum masking means that at the same frequency, the strong sound signal will mask the weak sound signal. Therefore, within a certain threshold, some weak sound signals can be directly eliminated, thereby achieving audio noise reduction.
[0156] Exemplarily, when the microphone status of the first microphone indicates that the first microphone is operating normally (such as not being blocked and can pick up sound normally), and the microphone status of the second microphone indicates that the second microphone is operating normally, that is, when the two channel input audio streams are normal, the noisy frequency can be determined based on the first audio signal and the second audio signal.
[0157] For example, in some implementations, the frequency domain features (amplitude spectrum) of the first audio signal and the frequency domain features of the second audio signal may be averaged, and then the audio signal corresponding to the frequency domain features obtained after the average processing is used as the noisy audio.
[0158] In addition, it is understandable that the difference in human voice energy in the left and right channels of stereo is generally small, but the difference in noise energy in the left and right channels is large in some scenarios. Therefore, the difference in signal-to-noise ratio between the left and right channels lies mainly in the noise energy. Therefore, using the audio signal with low energy as the noisy frequency signal and calculating the amplitude mask through the neural network model can reduce harmonic distortion and obtain better fidelity. Therefore, in other implementations, the energy of the two channels can be calculated, and the audio signal with low energy can be selected from the first audio signal and the second audio signal as the noisy frequency signal.
[0159] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0160] Exemplarily, when the audio stream inputted by one channel is normal and the audio stream inputted by another channel is abnormal, the audio signal corresponding to the channel with the normal audio stream may be selected as the noisy audio.
[0161] For example, when the microphone state of the first microphone indicates that the first microphone operates normally and the microphone state of the second microphone indicates that the second microphone is abnormal (eg, blocked or broken), the first audio signal is determined to be noisy audio.
[0162] For another example, when the microphone state of the first microphone indicates that the first microphone is abnormal and the microphone state of the second microphone indicates that the second microphone is operating normally, the second audio signal is determined to be a noisy audio signal.
[0163] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0164] For example, in an extreme case, such as when the audio streams of both channels are abnormal, in one implementation, the two methods for determining noisy audio given when the audio streams of both channels are normal can be used to determine the noisy audio. In another implementation, a prompt window can also be displayed in the current interface, such as the first interface, and prompt information indicating that both the first microphone and the second microphone are abnormal can be displayed in the prompt window, so as to prevent the user from using an abnormal microphone for recording without knowing it, which will result in no sound in the final recorded audio and video file, or all of it is interference audio.
[0165] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0166] 104, input the noisy frequency into the neural network model to obtain an amplitude mask of the noisy frequency.
[0167] It can be understood that the neural network model is pre-trained and placed in the terminal device based on the above-mentioned noisy frequency training data. Specifically in this embodiment, the neural network model includes a convolutional network (CNN) layer, a long short-term memory network (LSTM) layer and a fully connected network (LN) layer arranged in sequence. That is, the neural network model in this embodiment is a CRNN (Convolutional Recurrent Neural Network) structure.
[0168] In order to explain the construction process of the neural network model, the following is an explanation from two aspects: the training phase and the testing phase.
[0169] Training phase:
[0170] Collect clean speech (noise-free) from a single channel, and fuse noise data from different scenes (such as noise data without human voice, wind noise, road noise, music, etc.) with different signal-to-noise ratios and amplitudes to form noisy audio training data. Then, use this type of noisy audio training data to iteratively train the model that satisfies the above neural network structure and can reflect the loss function of the time-frequency domain relationship until the convergence condition is met.
[0171] Exemplarily, during the training process, the clean speech may be x(t) and the noise data may be n(t), then the noisy audio training data y(t) may be expressed as y(t)=x(t)+n(t).
[0172] For example, when training a neural network model based on noisy audio training data, each piece of noisy audio training data can be divided into time frames according to a preset time period, and then the frequency domain features (amplitude spectrum) are extracted from each time frame. Then, the amplitude spectrum corresponding to the current frame and the consecutive frames of noisy audio training data before and after is recorded as Y = [Y1(f),…,Y t (f),…,Y T (f)] H ∈R T×F .
[0173] Among them, T represents the number of frames, F represents the number of frequency points, and Y t (f) represents the frequency domain amplitude of the current frame.
[0174] For example, after the sample Y is input into the neural network model, it is processed by the CNN layer, LSTM layer and LN layer in the neural network model, and the current frame Y is output. t (f) The corresponding amplitude mask mask(f).
[0175] Based on this, the loss function can be expressed as:
[0176]
[0177] in, Mask the amplitude mask output by the neural network model, that is, the speech after noise reduction processing, which can be specifically expressed as
[0178] Based on this relationship, in the process of iterative training of the CRNN structure model based on noisy training data, by minimizing the above loss function, a neural network model that meets the iteration requirements can be obtained.
[0179] For specific details on training the neural network model, please refer to the relevant literature on the CRNN structure model, which will not be repeated here.
[0180] Testing phase:
[0181] It should be noted that when the sampling rate of the noisy frequency training data does not match the sampling rate of the noisy frequency test data, in order to enable the neural network model to output an amplitude mask suitable for the noisy frequency test data, a frequency band extension process can be performed. Specifically, the amplitude mask obtained by the neural network model is extended to the full frequency band of the noisy frequency test data.
[0182] Understandably, since the sampling frequency of the current noisy audio training data is mostly 16kHz, and the bandwidth of the amplitude mask determined by the neural network model obtained by training the corresponding noisy audio training data with a sampling frequency of 16kHz is usually 0kHz to 8kHz. Therefore, for noisy audio test data with a sampling frequency of 16kHz, or in subsequent application scenarios, when the sampling frequency of the audio signal collected by the first microphone and the second microphone is also 16kHz, a suitable amplitude mask can be determined directly based on the neural network model obtained by training the noisy audio training data with a sampling frequency of 16kHz. That is, when the sampling frequency of the noisy audio is 16kHz, the frequency domain features corresponding to the noisy audio are input into the neural network model to obtain an amplitude mask with a bandwidth between 0kHz and 8kHz; then the obtained amplitude mask with a bandwidth between 0kHz and 8kHz is used as the amplitude mask of the noisy audio.
[0183] Based on the amplitude mask determined in the above manner, the noise reduction processing of the stereo sound is realized, which can be specifically expressed as:
[0184]
[0185] Among them, mask 0-8k(f) is the amplitude mask with a bandwidth of 0kHz to 8kHz and a frequency (point) of f determined by the neural network model. l (f) is the audio signal input from the left channel, such as the first audio signal collected by the first microphone without noise reduction processing. l (f) is the audio signal output from the left channel, which is the first audio signal after the masking process according to the amplitude mask as mentioned above. r (f) is the audio signal input from the right channel, such as the second audio signal collected by the second microphone without noise reduction processing as mentioned above. r (f) is the audio signal output by the right channel, which is the second audio signal after the masking process is performed according to the amplitude mask as mentioned above.
[0186] Exemplarily, for noisy audio test data with a sampling frequency greater than 16 kHz, or in subsequent application scenarios, when the sampling frequency of the audio signals collected by the first microphone and the second microphone is also greater than 16 kHz, frequency domain expansion processing is required.
[0187] Exemplarily, the sampling frequency mentioned above is greater than 16kHz, for example, the sampling frequency is 32kHz or 48kHz. Since human voice is mainly concentrated in the middle and low frequencies, the neural network model obtained by training based on the noisy frequency training data with a sampling frequency of 16kHz is still applicable, but the premise is to match the feature dimensions. The following takes the sampling frequency of 48kHz as an example to describe the frequency domain expansion processing in detail:
[0188] For example, during the training phase, the noisy frequency training data with a sampling frequency of 16kHz can be upsampled to a sampling frequency of 48kHz, and then feature extraction in the frequency domain is performed according to a preset feature dimension. However, during actual training, only feature data with a sampling frequency within 8kHz is input into the CRNN structure model for training.
[0189] It should be noted that upsampling is used here to increase the sampling frequency of the audio sequence. The upsampling operation can be divided into two steps: first, interpolation is performed according to the sampling ratio, which will introduce an image spectrum; second, the image spectrum is filtered out by a low-pass filtering algorithm to obtain the upsampled signal.
[0190] For specific details on upsampling the noisy audio training data with a sampling frequency of 16 kHz to a sampling frequency of 48 kHz, please refer to the relevant literature on the upsampling method, which will not be repeated here.
[0191] Exemplarily, in the test phase, the frequency domain expansion processing is specifically as follows: within 8kHz, the amplitude mask determined by the neural network model is directly used, above 8kHz, the average value of the current amplitude mask is used, and near 8kHz (such as 7kHz-8kHz), the gains of the two are fused at a certain ratio to ensure the continuity of the spectrum. That is, when the sampling frequency of the noisy frequency is 32kHz or 48kHz, the frequency domain features corresponding to the noisy frequency are input into the neural network model to obtain an amplitude mask with a bandwidth between 0kHz and 8kHz; the average value of the amplitude mask with a bandwidth between 0kHz and 8kHz output by the neural network model is used as the amplitude mask corresponding to the bandwidth above 8kHz; the amplitude mask with a bandwidth between 0kHz and 8kHz output by the neural network model and the amplitude mask corresponding to the bandwidth above 8kHz are fused according to the set gain ratio to obtain the amplitude mask corresponding to the bandwidth near 8kHz; the amplitude mask with a bandwidth between 0kHz and 8kHz, the amplitude mask corresponding to the bandwidth near 8kHz, and the amplitude mask corresponding to the bandwidth above 8kHz are used as the amplitude mask of the noisy frequency.
[0192] Based on the amplitude mask of the noisy frequency determined by this frequency domain expansion processing method, the noise reduction processing of the stereo sound is realized, which can be specifically expressed as (taking the left channel as an example, the right channel is the same):
[0193]
[0194] Among them, the weight α increases uniformly from 0 to 1 in the transition frequency band.
[0195] For a better understanding, the following combination Fig. 9 For example, when both the left channel input and the right channel input are audio signals with a sampling frequency of 48kHz, when performing noise reduction based on the stereo noise reduction method provided in the embodiment of the present application, it is necessary to transform the audio signal with a sampling frequency of 48kHz into an audio signal with a bandwidth of 24kHz based on fast Fourier transform (FFT).
[0196] Continue to see Fig. 9 For example, the frequency spectrum of an audio signal with a bandwidth of 24 kHz after FFT transformation is not noise-reduced, that is, it is an audio signal without noise reduction.
[0197] Continue to see Fig. 9For example, after obtaining the audio signal with a bandwidth of 24kHz for the left and right channels, the noisy audio can be determined based on the method in the above step 103, and then the noisy audio is input into the trained neural network model. Since the input is a noisy audio with a sampling frequency greater than 16kHz, the amplitude masks corresponding to different frequency bands in the entire frequency band of 0kHz to 24kHz are determined based on the above frequency domain expansion processing method. Then, based on the amplitude masks corresponding to different frequency bands, the audio signals input by the left and right channels are masked, so that the noise-reduced audio signals with a bandwidth of 24kHz corresponding to the left and right channels can be obtained. Finally, the audio signal with a bandwidth of 24kHz is transformed into a sampling frequency of 48kHz by using the Inverse Fast Fourier Transform (IFFT).
[0198] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0199] In addition, it should be noted that the neural network model mentioned in this embodiment can be obtained by training the terminal device itself in actual applications, or it can be obtained by training the server and sent to the terminal device.
[0200] In order to reduce the resources and power consumption of the terminal device, this embodiment takes server training as an example. Specifically, in this embodiment, in order to reduce the training pressure on the server as much as possible and at the same time make the trained neural network model suitable for most types and configurations of terminal devices, the neural network model trained by the server for the first time can be based on the noisy frequency training data obtained in the big data platform, train an initial neural network model, and then push the trained initial neural network model to each terminal device, for example Fig.10 Mobile phone 1, mobile phone 2 and mobile phone 3 in the training, or after receiving the request of each terminal device, the trained initial neural network model is pushed to the corresponding terminal device.
[0201] Furthermore, in order to meet customized requirements, the server can also collect the single-channel clean audio subsequently generated by each terminal device using the initial neural network model, such as Fig.10 The single-channel clean audio of 16kHz generated by mobile phone 1, the single-channel clean audio of 32kHz generated by mobile phone 2, and the single-channel clean audio of 48kHz generated by mobile phone 3. Then, the initial neural network model is optimized and trained according to different single-channel clean audios, and then the target neural network models for different terminal devices are obtained, and the target neural network models for different terminal devices are pushed to the corresponding terminal devices for use.
[0202] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0203] 105 , mask the first audio signal and the second audio signal using an amplitude mask to obtain a stereo sound after noise reduction.
[0204] Therefore, by adopting a neural network model obtained by training based on single-channel noisy audio training data, an amplitude mask suitable for the first audio signal and the second audio signal is determined, and then the two audio signals are processed using the same amplitude mask, thereby achieving noise reduction for the two audio signals in stereo.
[0205] In addition, compared with separately reducing the noise of the left and right channels, the stereo noise reduction method provided in the embodiment, by expanding the single-channel noise reduction to stereo noise reduction, can not only significantly reduce the noise reduction algorithm overhead, but also preserve the spatial characteristics of the stereo, thereby improving the recording and video recording experience.
[0206] When the stereo noise reduction method provided in the embodiment of the present application is applied to a terminal device, it not only involves the software part of the terminal device, but also the hardware part of the terminal device. Taking the terminal device as a mobile phone as an example, the hardware structure is Figure 1 As an example, for better understanding Figure 1 The software structure of the mobile phone 100 is shown, and the software structure of the mobile phone 100 is described below. Before describing the software structure of the mobile phone 100, the architecture that can be adopted by the software system of the mobile phone 100 is first described.
[0207] Specifically, in actual applications, the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0208] In addition, it is understandable that the software systems used by the current mainstream terminal devices include but are not limited to Windows systems, Android systems, and iOS systems. For the sake of convenience, the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the mobile phone 100. In a specific implementation, the stereo noise reduction method provided in the embodiment of the present application is also applicable to other systems.
[0209] In addition, it should be understood that the current layered architecture of mobile phones divides software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. These layers may include, for example, the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer, the kernel layer, etc.
[0210] See also Fig.11 , which is a software structure block diagram of the mobile phone 100 according to an embodiment of the present application.
[0211] The application layer may include a series of application packages. The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. In some implementations, these programming interfaces and programming frameworks may be described as functions.
[0212] Continue to see Fig.11 Specifically, in the technical solution provided in the embodiment of the present application, the application layer may include a camera application capable of recording stereo sound, a recorder application, and a setting application that integrates the function of turning on or off the audio noise reduction function.
[0213] Continue to see Fig.11 Specifically, in the technical solution provided in the embodiment of the present application, the application framework layer may include audio services, camera services, stereo noise reduction modules, etc.
[0214] Continue to see Fig.11 ,Exemplarily, Android Runtime includes a core library and a virtual machine.,Android Runtime is responsible for scheduling and management of the Android system.
[0215] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0216] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0217] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0218] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0219] The media library supports the playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0220] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0221] It can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.
[0222] When stereo recording is performed through the video recording mode of the camera application, the content of the screen will be processed by the graphics-related function modules in the system library.
[0223] In addition, it can be understood that the kernel layer in the Android system is a layer between hardware and software. Fig.11 , exemplarily, the kernel layer at least includes a display driver, a camera driver, an audio driver, etc. Exemplarily, in a scene of recording stereo, the audio driver can drive the first microphone and the second microphone in the audio module to collect audio signals. The software structure of the mobile phone 100 is introduced here, and it can be understood that, Fig.11 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.
[0224] based on Figure 1 The hardware structure of the mobile phone is shown and Fig.11 The software structure shown is as follows. The hardware and software structures involved in implementing the stereo noise reduction method provided in the embodiment of the present application are described.
[0225] Take the camera application as an example to record stereo sound, see Fig.12 , for example, when the user clicks on the Figure 3 After S4' shown in (1), the mobile phone responds to the operation behavior, and the camera application sends a stereo recording instruction to the audio service, that is, notifies the audio service to perform stereo recording at the current time.
[0226] Understandably, when recording in the video mode of the camera application, it also involves the recording of the picture, that is, it also involves the camera service, as well as the functional modules of the camera driver, camera, and the video stream collected by the camera. Only the content related to audio is explained here.
[0227] Continue to see Fig.12For example, after receiving the stereo recording instruction, the audio service will start the corresponding process, call up the audio driver, and then the audio driver will drive the audio module, such as the first microphone and the second microphone in the audio module. In this way, during the recording process, the first microphone can collect the first audio signal (without noise reduction) mentioned above, and the second microphone can collect the second audio signal (without noise reduction) mentioned above.
[0228] Exemplarily, the audio signals collected by the first microphone and the second microphone are transmitted to the modem to obtain stereo sound, and the obtained stereo sound is saved in the memory when the recording is finished.
[0229] The processing performed by the modem on the first audio signal (without noise reduction) and the second audio signal (without noise reduction) is specifically determined according to the instructions given by the stereo noise reduction module.
[0230] Continue to see Fig.12 , exemplarily, when the user clicks on the audio noise reduction option in the first state, such as the audio noise reduction option of style S8 in the interface 10c in the above embodiment, the stereo noise reduction module will determine that the user has turned on the audio noise reduction function, that is, the modem needs to use the noise reduction mode to process the first audio signal (without noise reduction) and the second audio signal (without noise reduction). In this case, the stereo noise reduction module will send a noise reduction instruction to the modem, so that the modem will perform noise reduction on the first audio signal (without noise reduction) and the second audio signal (without noise reduction) based on the stereo noise reduction method provided in the embodiment of the present application. Specifically, the first audio signal (without noise reduction) and the second audio signal (without noise reduction) can be processed in steps 103 to 105 in the above embodiment.
[0231] Exemplarily, when the user clicks on the audio noise reduction option in the second state, such as the audio noise reduction option of style S8' in the interface 10c in the above embodiment, the stereo noise reduction module will determine that the user has turned off the audio noise reduction function, that is, the modem needs to use the original sound mode to process the first audio signal (without noise reduction) and the second audio signal (without noise reduction). In this case, the stereo noise reduction module will send an original sound instruction to the modem, so that the modem will not use steps 103 to 105 in the above embodiment to perform noise reduction processing on the first audio signal (without noise reduction) and the second audio signal (without noise reduction).
[0232] It should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. The description of the above various instructions is also only to illustrate when each functional module and hardware performs what operation, and in the specific implementation, the names of these instructions are not limited.
[0233] Therefore, the terminal device based on the above-mentioned software and hardware structure, through the stereo noise reduction method provided in the embodiment of the present application, can achieve noise reduction processing while ensuring the fidelity of the target speech signal in stereo, while preserving the spatial characteristics of stereo and improving the recording and video recording experience.
[0234] In addition, it is understandable that, in order to implement the above functions, the terminal device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0235] In addition, it should be noted that the stereo noise reduction method provided in the above embodiments implemented by the terminal device in the actual application scenario can also be executed by a chip system included in the terminal device, wherein the chip system may include a processor. The chip system can be coupled to the memory so that the chip system calls the computer program stored in the memory when it is running to implement the steps executed by the above terminal device. The processor in the chip system can be an application processor or a processor other than an application processor.
[0236] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a terminal device, the terminal device executes the above-mentioned related method steps to implement the stereo noise reduction method in the above-mentioned embodiment.
[0237] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the above-mentioned related steps to implement the stereo noise reduction method in the above-mentioned embodiment.
[0238] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the stereo noise reduction method in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the transmitting pin to send the signal.
[0239] In addition, it can be seen from the above description that the terminal device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0240] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A stereo noise reduction method, characterized in that: Applied to a terminal device, the method comprises: Displaying a first interface, wherein the first interface includes an audio noise reduction option; When the audio noise reduction option is in the first state, when a click operation on the audio noise reduction option is received, the audio noise reduction function is turned on, and the audio noise reduction option is switched from the first state to the second state; determining whether the first microphone is normal according to the microphone state of the first microphone, and determining whether the second microphone is normal according to the microphone state of the second microphone; Determine the noise-containing frequency according to the audio signal collected by the normal microphone; Inputting the noisy frequency into a neural network model to obtain an amplitude mask of the noisy frequency; wherein the neural network model is trained using noisy frequency training data, and the noisy frequency training data is obtained by fusing noise data on a single-channel noise-free frequency; The amplitude mask is used to mask the first audio signal collected by the first microphone and the second audio signal collected by the second microphone to obtain a stereo sound after noise reduction.
2. The method according to claim 1, characterized in that: The step of determining whether the first microphone is normal according to the microphone state of the first microphone, and determining whether the second microphone is normal according to the microphone state of the second microphone, comprises: When the microphone status of the first microphone indicates that the first microphone is operating normally, it is determined that the first microphone is operating normally. Otherwise, determining that the first microphone is abnormal; When the microphone state of the second microphone indicates that the second microphone is operating normally, determining that the second microphone is normal; Otherwise, it is determined that the second microphone is abnormal.
3. The method according to claim 2, characterized in that The step of determining the noisy frequency according to the audio signal collected by the normal microphone includes: When both the first microphone and the second microphone are normal, determining the noisy frequency according to the first audio signal and the second audio signal; When the first microphone is normal and the second microphone is abnormal, determining the first audio signal as the noisy audio signal; When the first microphone is abnormal and the second microphone is normal, the second audio signal is determined as the noisy audio signal.
4. The method according to claim 3, characterized in that The step of determining the noisy audio signal according to the first audio signal and the second audio signal when both the first microphone and the second microphone are normal includes: When both the first microphone and the second microphone are normal, performing mean processing on the frequency domain characteristics of the first audio signal and the frequency domain characteristics of the second audio signal; The audio signal corresponding to the frequency domain feature obtained after mean processing is used as the noisy audio signal.
5. The method according to claim 3, characterized in that: The step of determining the noisy audio signal according to the first audio signal and the second audio signal when both the first microphone and the second microphone are normal includes: When both the first microphone and the second microphone are normal, an audio signal with low energy is selected from the first audio signal and the second audio signal as the noisy audio signal.
6. The method according to claim 3, characterized in that The method further comprises: When both the first microphone and the second microphone are abnormal, displaying a prompt window in the first interface; The prompt window displays prompt information indicating that both the first microphone and the second microphone are abnormal.
7. The method according to any one of claims 1 to 6, characterized in that: After the audio noise reduction function is turned on, the method further includes: When a click operation on the audio noise reduction option is received, turning off the audio noise reduction function, and switching the audio noise reduction option from the second state to the first state; Synthesize non-noise-reduced stereo sound according to the first audio signal and the second audio signal.
8. The method according to any one of claims 1 to 6, characterized in that: The first interface also includes an option to end recording; The method further comprises: After the audio noise reduction function is turned on, when a click operation on the end recording option is received, the audio noise reduction function is turned off, and the audio noise reduction option is switched from the second state to the first state.
9. The method according to any one of claims 1 to 6, characterized in that: The first interface also includes an option to end recording; The method further comprises: After the audio noise reduction function is turned on, when a click operation on the end recording option is received, recording the second state; When re-triggering recording, the audio noise reduction function is directly turned on according to the recorded second state.
10. The method according to any one of claims 1 to 6, characterized in that: The sampling frequency of the noisy frequency training data is 16 kHz, and the bandwidth of the amplitude mask determined by the neural network model obtained by training with the noisy frequency training data is between 0 kHz and 8 kHz.
11. The method according to claim 10, characterized in that The step of inputting the noisy frequency into a neural network model to obtain an amplitude mask of the noisy frequency comprises: When the sampling frequency of the noisy frequency is 16 kHz, the frequency domain features corresponding to the noisy frequency are input into the neural network model to obtain an amplitude mask with a bandwidth between 0 kHz and 8 kHz; The obtained amplitude mask with a bandwidth between 0 kHz and 8 kHz is used as the amplitude mask of the noisy frequency.
12. The method according to claim 11, characterized in that The method further comprises: When the sampling frequency of the noisy frequency is 32 kHz or 48 kHz, the frequency domain features corresponding to the noisy frequency are input into the neural network model to obtain an amplitude mask with a bandwidth between 0 kHz and 8 kHz; The average value of the amplitude mask with a bandwidth between 0kHz and 8kHz output by the neural network model is used as the amplitude mask corresponding to the bandwidth above 8kHz; The amplitude mask with a bandwidth between 0kHz and 8kHz and the amplitude mask corresponding to a bandwidth above 8kHz output by the neural network model are fused according to a set gain ratio to obtain an amplitude mask corresponding to a bandwidth near 8kHz; An amplitude mask with a bandwidth between 0 kHz and 8 kHz, an amplitude mask corresponding to a bandwidth near 8 kHz, and an amplitude mask corresponding to a bandwidth above 8 kHz are used as the amplitude mask of the noisy frequency.
13. The method according to any one of claims 1 to 6, characterized in that: The step of fusing the noise data on the noise-free frequency of a single channel includes: Divide the single-channel noise-free audio and the noise data into the same number of noise-free audio time frames and noise audio time frames according to the same time period; For a noise-free frequency time frame and a noise audio time frame at the same moment, the frequency domain features in the noise-free frequency time frame and the frequency domain features in the noise audio time frame are superimposed.
14. The method according to any one of claims 1 to 6, characterized in that: The neural network model includes a convolutional network layer, a long short-term memory network layer and a fully connected network layer arranged in sequence; Among them, the convolutional network layer is used to obtain the local features of the frequency domain features corresponding to the noisy frequency, the long short-term memory network layer is used to obtain the temporal features between frames in the noisy frequency, and the fully connected network layer is used to map the local features of the frequency domain features obtained by the convolutional network layer and the temporal features obtained by the long short-term memory network layer to the feature dimensions corresponding to the amplitude mask.
15. The method according to any one of claims 1 to 6, characterized in that: The first microphone is located at the top of the terminal device, and the second microphone is located at the bottom of the terminal device.
16. The method according to any one of claims 1 to 6, characterized in that: The terminal device establishes communication links with the left earphone and the right earphone of the true wireless earphone respectively; The first microphone is located on the left earphone, and the second microphone is located on the right earphone.
17. The method according to any one of claims 1 to 6, characterized in that: The first interface is a video recording interface corresponding to the camera application.
18. The method according to any one of claims 1 to 6, characterized in that: The first interface is a recording interface corresponding to the recording application.
19. A terminal device, characterized in that: The terminal device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device executes the stereo noise reduction method as described in any one of claims 1 to 18.
20. A computer-readable storage medium, characterized in that: It comprises a computer program, and when the computer program is run on a terminal device, the terminal device executes the stereo noise reduction method as claimed in any one of claims 1 to 18.
