Noise reduction method for stereo sound, and device and storage medium

By using the neural network model of single-channel noise audio training data in stereo recording and video recording, the appropriate amplitude mask is determined to perform noise reduction processing on the two-channel audio signals, which solves the problem of noise signals in stereo and achieves efficient noise reduction and The spatial characteristics are preserved, which improves the audio and video recording experience.

WO2024221844A1PCT designated stage expired Publication Date: 2024-10-31HONOR DEVICE CO LTD

Patent Information

Application Number
PCT/CN2023/131385
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2023-11-14
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In stereo audio and video recording scenarios, the recorded audio may contain noise signals other than the target speech signal, resulting in a degraded audio and video recording experience. It is difficult for existing technologies to effectively reduce noise while retaining the spatial characteristics of the audio.

Method used

Using a neural network model based on single-channel noise audio training data, the two-channel audio signals in stereo are denoised by determining a suitable amplitude mask, and the same amplitude mask is used to process the two-channel audio signals, thereby achieving simultaneous noise reduction. Preserve the spatial characteristics of stereo sound.

Benefits of technology

Under the premise of ensuring the fidelity of the target speech signal, the noise signal is effectively reduced, the audio and video recording experience is improved, the noise reduction algorithm overhead is significantly reduced, and the spatial characteristics of the stereo sound are preserved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023131385_31102024_PF_FP_ABST
    Figure CN2023131385_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A noise reduction method for a stereo sound, and a device and a storage medium. The method comprises: displaying a first interface, wherein an audio noise reduction option is displayed in the interface (101); when the audio noise reduction option is in a first state and when a click operation for the audio noise reduction option is received, switching the audio noise reduction option to a second state, and enabling an audio noise reduction function (102); after the audio noise reduction function is enabled, determining an amplitude mask suitable for a first audio signal and a second audio signal by means of a neural network model, which is obtained by means of performing training by using noise audio training data based on a single channel; and using the amplitude mask to process the two audio signals. By means of the method, noise reduction is performed on two audio signals in a stereo sound, and spatial features of the stereo sound are also preserved, thereby improving the sound recording and video recording experience.
Need to check novelty before this filing date? Find Prior Art

Description

Stereo noise reduction method, device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 27, 2023, with application number 202310481612.6 and invention name “Stereo Noise Reduction Method, Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. 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 devices capable of stereo recording and playback have become popular among users. For example, stereo audio in audio recording and video recording is a two-channel audio signal received by two or more microphones in different locations. Compared to mono recording and video recording, stereo recording and video recording can present the spatial characteristics of the audio, resulting in 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 sound, which can achieve noise reduction processing while ensuring the fidelity of the target speech signal in the stereo sound, while preserving the spatial characteristics of the stereo sound and improving the recording and video recording experience.

[0006] Summary of the Invention

[0007] 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 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.

[0008] In the first aspect, the present application provides a stereo noise reduction method. The method is applied to a terminal device, including: displaying a first interface, wherein 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 amplitude mask is used to mask the first audio signal and the second audio signal to obtain a de-noised stereo sound.

[0009] 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 using 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 noise reduction is achieved for the two audio signals in stereo, the spatial characteristics of the stereo are preserved, thereby improving the recording and video recording experience.

[0010] According to the first aspect, noisy frequency is determined based on 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, 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.

[0011] Therefore, it can be better applied to various practical scenarios.

[0012] According to the first aspect, or any implementation method of the first aspect above, when the microphone status of the first microphone indicates that the first microphone is operating normally and the microphone status 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 status of the first microphone indicates that the first microphone is operating normally and the microphone status 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.

[0013] 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.

[0014] According to the first aspect, or any implementation method of the first aspect above, when the microphone status of the first microphone indicates that the first microphone is operating normally and the microphone status 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 status of the first microphone indicates that the first microphone is operating normally and the microphone status of the second microphone indicates that the second microphone is operating normally, selecting the audio signal with low energy from the first audio signal and the second audio signal as the noisy frequency.

[0015] 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 stereo after noise reduction obtained by masking based on the amplitude mask can obtain a better guarantee effect.

[0016] 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.

[0017] 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 may result in no sound in the final recorded audio or video file, or all of it being interference audio.

[0018] According to the first aspect, or any implementation of the first aspect above, after the audio noise reduction function is turned on, the method also includes: when a click operation on the audio noise reduction option is received, the audio noise reduction option is switched to the first state, and the audio noise reduction function is turned off; after the audio noise reduction function is turned off, synthesizing un-noise-reduced stereo according to the first audio signal and the second audio signal.

[0019] Therefore, during the recording and video recording process, 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 recording and video recording process, thereby better meeting the user's usage needs for different scenarios.

[0020] According to the first aspect, or any implementation method 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 stop recording option is received, the audio noise reduction option is restored to the first state, and the audio noise reduction function is turned off.

[0021] Therefore, no matter what state the audio noise reduction option is in before the recording ends, the audio noise reduction option is restored to the first state by default after each recording ends. In this way, in the implementation method, there is no need to additionally maintain and manage files recording the state information of the audio noise reduction option.

[0022] According to the first aspect, or any implementation method of the first aspect above, the first interface also displays an end recording option; the method also includes: after turning on the audio noise reduction function, when receiving a click operation on the stop recording option, recording the second state; when re-triggering the recording, directly turning on the audio noise reduction function according to the recorded second state.

[0023] Therefore, after each recording is completed, the audio noise reduction option maintains its current state and continues in this state when recording starts next time, so that it can better adapt to the user's actual usage habits.

[0024] 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.

[0025] According to the first aspect, or any implementation 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 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; and the obtained amplitude mask with a bandwidth between 0 kHz and 8 kHz is used as the amplitude mask of the noisy frequency.

[0026] Since the neural network model is trained using noisy frequency training data with a sampling frequency of 16kHz, for stereo noise reduction scenarios with a sampling frequency of 16kHz, the amplitude mask determined by the neural network model can be directly used as the amplitude mask of the noisy frequency without any other processing, which is convenient and fast.

[0027] According to the first aspect, or any implementation of the first aspect above, the method further 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 and the amplitude mask corresponding to the bandwidth above 8kHz output by the neural network model 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.

[0028] Since the neural network model was trained using noisy audio data with a sampling frequency of 16kHz, it is still applicable to stereo noise reduction scenarios with sampling frequencies of 32kHz or 48kHz, as human voices are primarily concentrated in the mid- and low-frequency ranges. However, to accommodate bandwidths above 8kHz, the frequency band is expanded based on the amplitude mask determined by the neural network model, ensuring spectral continuity.

[0029] According to the first aspect, or any implementation method of the first aspect above, fusing noise data on a single-channel noise-free frequency includes: 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.

[0030] 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 temporal features between each frame 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 temporal features obtained by the long short-term memory network layer to the feature dimensions corresponding to the amplitude mask.

[0031] According to the first aspect, or any implementation of the above first aspect, 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.

[0032] According to the first aspect, or any implementation of the first aspect above, 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 in the left earphone, and the second microphone is located in the right earphone.

[0033] 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.

[0034] 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.

[0035] 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 being coupled; the memory storing program instructions, which, when executed by the processor, cause the terminal device to execute instructions of the method of the first aspect or any possible implementation of the first aspect.

[0036] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0037] 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.

[0038] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0039] 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.

[0040] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0041] In a fifth aspect, the present application provides a chip comprising a processing circuit and a transceiver pin. The transceiver pin and the processing circuit communicate with each other via an internal connection path, and the processing circuit executes the method of the first aspect or any possible implementation of the first aspect to control the receive pin to receive a signal and to control the transmit pin to send a signal.

[0042] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] FIG1 is a schematic diagram showing an exemplary hardware structure of a terminal device;

[0044] 2 to 5 are schematic diagrams of user interfaces for illustratively showing how to enable or disable an audio noise reduction function in a stereo recording scenario;

[0045] FIG6 is a schematic diagram of a user interface for exemplarily showing another method of turning on or off the audio noise reduction function;

[0046] FIG7 is a schematic flow chart illustrating an exemplary embodiment of a stereo noise reduction method provided by the present application;

[0047] FIG8 is a schematic diagram illustrating a stereo noise reduction processing logic provided by an embodiment of the present application;

[0048] FIG9 is a schematic diagram illustrating yet another stereo noise reduction processing logic provided by an embodiment of the present application;

[0049] FIG10 is a schematic diagram illustrating an exemplary interaction between a terminal device and a server;

[0050] FIG11 is a schematic diagram showing an exemplary software structure of a terminal device;

[0051] FIG12 is a schematic diagram showing an exemplary interaction between software and hardware. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0053] The term "and / or" in this article is merely a description of the association relationship between 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.

[0054] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.

[0055] In the embodiments of this 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 this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0056] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.

[0057] In order to better understand the technical solutions provided by the embodiments of the present application, before describing the technical solutions of the embodiments of the present application, the hardware structure of the terminal devices (such as mobile phones, tablet computers, etc.) to which the embodiments of the present application are applicable is first described in conjunction with the accompanying drawings.

[0058] It should be noted that the technical solutions provided in the embodiments of the present application are particularly applicable to terminal devices capable of stereo recording, such as mobile phones, tablet computers, etc. that are equipped with at least two microphones located in different positions, or mobile phones, tablet computers, smart watches, etc. that are connected to stereo headphones. For ease of explanation, the following description uses a mobile phone as an example.

[0059] For example, for a mobile phone with two microphones, one microphone (microphone) is set at the bottom of the mobile phone, such as on both sides or one side of the charging port; the other microphone is set at the top of the mobile phone, such as near the rear camera, or near the earpiece on the front of the mobile phone.

[0060] For example, for a stereo headset connected to a mobile phone, such as a True Wireless Stereo headset (TWS headset), in the present application, the following descriptions of the embodiments take TWS headsets as an example of two microphones for collecting audio signals.

[0061] 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 using TWS headphones as two microphones to collect audio signals, it is necessary to ensure that both the left and right headphones of the TWS headphones are successfully connected to the mobile phone.

[0062] 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.

[0063] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor (Modem), a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc., which are not listed one by one here and are not limited in this application.

[0064] The controller as the processing unit mentioned above can be the nerve center and command center of the mobile phone 100. In actual applications, the controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of instruction fetching and execution.

[0065] The aforementioned modem 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- or 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.

[0066] 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.

[0067] It should be noted that in some implementations, the baseband processor may be integrated into the modem, that is, the modem may have the functionality of the baseband processor.

[0068] 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 display images or videos through the display screen 194.

[0069] 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 this 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.

[0070] Regarding the aforementioned neural network processor, specifically in the technical solution provided by this application, it can be used to train the neural network model for stereo noise reduction processing described in the embodiments of this application. It is understandable that in order to reduce the resource usage 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.

[0071] The aforementioned video codec is used to compress or decompress digital video. For example, the mobile phone 100 may support one or more video codecs. Thus, the mobile phone 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0072] The ISP mentioned above is used to output digital image signals to the DSP for processing. Specifically, the ISP is used to process data fed back by the camera 193. For example, when taking a photo or recording a video, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on the image's noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some implementations, the ISP can be set in the camera 193.

[0073] The DSP mentioned above is used to convert digital image signals into image signals in standard RGB, YUV and other formats.

[0074] Furthermore, it should be noted that regarding the processor 110 including the aforementioned processing units, in some implementations, the different processing units may be independent devices. That is, each processing unit may be considered a processor. In other implementations, the different processing units may 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 provided in the same device as the mobile communication module 150 or other functional modules.

[0075] 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 on this embodiment.

[0076] 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 are not limited in this application.

[0077] In addition, processor 110 may also include a memory for storing instructions and data. In some implementations, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces processor 110 latency, and thus improves system efficiency.

[0078] Continuing with FIG1 , 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 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored on the external memory card.

[0079] Continuing to refer to 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 can 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 can 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.

[0080] Continuing with FIG1 , the charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 may receive charging input from the wired charger via the USB interface 130. In some wireless charging implementations, the charging management module 140 may receive wireless charging input via the wireless charging coil of the mobile phone 100. While charging the battery 142, the charging management module 140 may also power the terminal device via the power management module 141.

[0081] Continuing with 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 provides power to the processor 110, the internal memory 121, the external memory, the display 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 count, battery health status (leakage, impedance), etc. In some other implementations, the power management module 141 can also be set in the processor 110. In other implementations, the power management module 141 and the charging management module 140 can also be set in the same device.

[0082] 1 , the wireless communication function of the mobile phone 100 can be implemented through antenna 1 , antenna 2 , mobile communication module 150 , wireless communication module 160 , modem processor, and baseband processor.

[0083] 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 antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other implementations, the antennas can be used in conjunction with a tuning switch.

[0084] Continuing to refer to Figure 1, the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to 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.

[0085] Continuing to refer to Figure 1, the 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 that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0086] It should be noted that in the following implementation, the neural network model used for stereo noise reduction can be trained by a cloud server or other server. For this implementation scenario, the mobile phone 100 can communicate with the cloud server or other server that provides the 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 the cloud server to obtain or update the neural network model 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.

[0087] 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 the iterative training of the neural network model based on the noise reduction results feedback from different mobile phones 100.

[0088] 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 on this embodiment.

[0089] Continuing with FIG1 , the audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone jack 170D, etc. For example, the mobile phone 100 may implement audio functions, such as audio recording and video recording, through the application processor and the speaker 170A, the receiver 170B, the microphone 170C, the earphone jack 170D, etc. in the audio module 170.

[0090] In the process of implementing audio functions through the application processor and 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 signals. The audio module 170 can also be used to encode and decode audio signals. In some implementations, the audio module 170 can be set in the processor 110, or some functional modules of the audio module 170 can be set in the processor 110.

[0091] 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 locations of the two microphones 170C can be found above and will not be described in detail here.

[0092] Continuing to refer to 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.

[0093] Continuing with FIG1 , buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The mobile phone 100 may receive key inputs and generate key signal inputs related to user settings and function control of the mobile phone 100.

[0094] 1 , the motor 191 can generate a vibration prompt. The motor 191 can be used for an incoming call vibration prompt or for touch vibration feedback.

[0095] Continuing to refer to FIG1 , the indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, and the like.

[0096] Continuing with FIG1 , the camera 193 is used to capture still images or videos. The mobile phone 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display 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 light 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.

[0097] Continuing with FIG1 , the display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 may include one or N display screens 194 , where N is a positive integer greater than 1. The mobile phone 100 may implement display functions using a GPU, the display screen 194 , and an application processor. The GPU is a microprocessor for image processing that 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.

[0098] This concludes the introduction to the hardware structure of the mobile phone 100. It should be understood that the mobile phone 100 shown in FIG1 is merely an example. In a specific implementation, the mobile phone 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration. The various components shown in FIG1 may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0099] Based on the mobile phone with the structure shown in FIG1 , when the user uses the mobile phone to record audio or video, he or she 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.

[0100] However, in audio and video recording scenarios, due to environmental influences, the recorded stereo sound may include not only the target speech signal but also noise signals outside the target speech signal. To enhance the user experience, this application provides a stereo noise reduction method that aims to achieve noise reduction processing while ensuring the fidelity of the target speech signal in stereo, while preserving the spatial characteristics of the stereo sound and improving the audio 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 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, etc., 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 the two audio signals collected by two microphones or the left and right earphones of TWS headphones, and then use the same amplitude mask to process the two audio signals, thereby achieving noise reduction of the two audio signals in the stereo while preserving the spatial characteristics of the stereo, thereby improving the recording and video recording experience.

[0102] For example, 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 noise, such as concerts, outdoor scenes, and other scenarios where the user wants 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 recorded original audio.

[0103] Taking the terminal device as a mobile phone as an example, specifically in actual applications, the changes in the user interface involved in the recording and video recording scenarios implemented based on the stereo noise reduction method provided in the embodiment of the present application are shown in Figures 2 to 5.

[0104] Referring to FIG2 (1), an interface (interface 10a) of a mobile phone is shown as an example. Referring to FIG2 (1), the interface 10 may include one or more controls, such as a battery icon, a network icon, and various application icons. Among them, the application icons include, for example, a camera application icon S1, a settings application icon S2, a recorder application icon, etc.

[0105] For example, when the user clicks the camera application icon S1 in the interface 10a, the mobile phone will start the camera application in response to the operation, and the interface will switch from the interface 10a shown in FIG2 (1) to the interface 10b shown in FIG2 (2).

[0106] As shown in (2) of FIG2 , the interface 10b may include one or more controls, 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), and a picture viewing control (the control to the left of the shutter control S4).

[0107] Among them, the preview window S3 can display the image captured by the camera in real time. The shutter control S4 can monitor the user operation that triggers the photo taking. That is, when the mobile phone detects the user operation acting on the shutter control S4, it will take a photo in response to the operation and store the captured image in the gallery application. The front and rear camera switching control S5 can switch the front and rear cameras in response to the user's operation 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. 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.6x (ultra-wide angle), 1x (main lens), 2.5x (telephoto lens), 10x (super telephoto lens), etc.

[0108] For example, in the interface 10b shown in (2) of FIG. 2 , the shooting mode selected in the shooting mode list S6 is “photographing”, and the magnification selected in the magnification selection list S7 is 1.

[0109] For example, when the user slides the shooting mode in the shooting mode list S6 to the left, slides "video recording" to the position of "photographing" in (2) Figure 2, or directly clicks the "video recording" option in the shooting mode list S6, the mobile phone responds to the operation and the shooting mode will switch from "photographing" mode to "video recording" mode, as shown in (1) Figure 3.

[0110] In addition, it is understandable that recording is a continuous action, so when the shooting mode is switched to the "recording" mode, the shutter control S4 will be switched to the recording control S4' shown in (1) in Figure 3.

[0111] For example, when the user clicks the recording control S4', the mobile phone will start recording (recording the sound and picture of the current environment) in response to the operation. At this time, the interface of the mobile phone will also switch from interface 10b to the recording interface, such as interface 10c shown in (2) in Figure 3.

[0112] 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 can be set in the interface 10c. Referring to (2) in Figure 3, for example, the interface 10c corresponding to the video recording mode may include, in addition to a preview window S3 for displaying the recording image, 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, and controls S4 for operating during the video recording process.

[0113] Understandably, during the recording process, the user may pause the recording or end the recording directly. 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.

[0114] Furthermore, it should be noted that the audio noise reduction option S8 can be set to different states, thereby enabling or disabling the audio noise reduction function through a single 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.

[0115] For example, 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 sound after noise reduction, but directly perform stereo synthesis based on the two audio signals collected by the two microphones (this scenario will be referred to as the original sound mode later).

[0116] For example, 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 (this scenario will be referred to as the noise reduction mode later).

[0117] Based on the above description of the audio noise reduction option status, it can be seen that when starting to record, when the corresponding interface is the interface 10c shown in (2) in Figure 3, 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 will use the original sound mode for recording.

[0118] For example, during the video recording process, for example, when recording for 5 seconds (see the time "00:00:05" shown in S9 in (1) of Figure 4), the user clicks on the audio noise reduction option in 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 first state to the second state, that is, from the style shown in S8 to the style S8' shown in (1) of Figure 4, thereby turning on the audio noise reduction function. At this time, the mobile phone will stop recording in the original sound mode and instead use the noise reduction mode to record.

[0119] For example, in some implementations, when the audio noise reduction function is turned on, a pop-up window may appear in the interface 10c to remind the user that the audio noise reduction function is currently turned on, such as the prompt message "Audio noise reduction is turned on" shown in (1) in FIG4 .

[0120] In addition, in order not to affect user use and prevent the prompt information from blocking the video screen for a long time, the display duration 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. As shown in Figure 4 (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 information will disappear.

[0121] For example, during the video recording process, for example, when recording for 5 minutes and 25 seconds (see the time "00:05:25" shown in S9 in (1) of Figure 5), the user clicks on the audio noise reduction option with the 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 record in the original sound mode.

[0122] For example, in some implementations, when the audio noise reduction function is turned off, a pop-up window may appear in the interface 10c to remind the user that the audio noise reduction function is currently turned off, such as the prompt message "Audio noise reduction is turned off" shown in (1) in FIG5 .

[0123] In addition, in order not to affect user use and prevent the prompt information from blocking the video screen for a long time, the display duration 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. As shown in Figure 5 (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 information will disappear.

[0124] Therefore, by adding an audio noise reduction option to the interface 10c for turning the audio noise reduction function on or off, the user can conveniently turn the audio noise reduction function on or off at any time as needed during the recording process, and then switch between the original sound mode recording and the noise reduction mode recording based on the stereo noise reduction method provided in the embodiment of the present application. That is, based on the stereo noise reduction method provided in the embodiment of the present application, not only can the stereo sound corresponding to a complete recording or video be a stereo sound after noise reduction, but also the stereo sound corresponding to a complete recording or video can be a stereo sound without noise reduction, and also the stereo sound corresponding to a complete recording or video can be a stereo sound with both a noise-reduced stereo part and a stereo sound without noise reduction, thereby being more suitable for actual stereo recording scenarios.

[0125] In addition, it should be noted that when the user clicks S4-2", i.e., stops recording, during the recording process, the mobile phone will end the recording in response to the operation, and the recorded content will also be saved to the gallery application of the mobile phone. When the recording ends, 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 ends. '), when the recording is finished, the mobile phone sets the state of the audio noise reduction option to the first state. That is, based on this implementation method, after the user clicks S4-2" in the interface 10c shown in (2) of Figure 4 (the audio noise reduction option is in the second state) or in the interface 10c shown in (1) of Figure 5 (the audio noise reduction option is in the first state) to return to the interface 10b shown in (1) of Figure 3, when the user clicks S4' in the interface 10b again, the mobile phone responds to the operation behavior and enters the interface 10c corresponding to the video shooting, and the audio noise reduction option is still in the style shown in S8.

[0126] For example, 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.

[0127] For example, based on this implementation, after the user clicks S4-2" in the interface 10c shown in (2) of FIG4 (the audio noise reduction option is in the second state) to return to the interface 10b shown in (1) of FIG3, when the user clicks S4' in the interface 10b again, the mobile phone responds to the operation behavior and enters the interface 10c corresponding to the video shooting, and 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.

[0128] For example, based on this implementation method, after the user clicks S4-2" in the interface 10c shown in (1) of Figure 5 (the audio noise reduction option is in the first state) to return to the interface 10b shown in (1) of Figure 3, when the user clicks S4' in the interface 10b again, the mobile phone responds to the operation behavior and enters the interface 10c corresponding to the video shooting, and the audio noise reduction option is still in the style shown in S8. In this way, the mobile phone can directly use the original sound mode for recording.

[0129] 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 on this embodiment.

[0130] For example, in another implementation, the entry for turning on the audio noise reduction function can be integrated into the interface corresponding to the settings application. For this implementation, before starting recording, it is necessary to go to the interface corresponding to the settings application and turn on the audio noise reduction function. For example, the user needs to click the icon S2 of the settings application displayed in the interface 10a shown in Figure 2 (1).

[0131] For example, after the user clicks S2, the mobile phone responds to the operation behavior and starts the setting application, switching from the interface 10a to the interface 10d shown in FIG6 (1).

[0132] As shown in (1) of FIG6 , the interface 10d may include one or more controls. The controls include, but are not limited to, account center, airplane mode, stereo noise reduction option 10d-1, WLAN, Bluetooth, notifications, applications, display and brightness, sound and vibration, system and update, battery, storage, security, and other control options.

[0133] 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 will turn on the audio noise reduction function in response to the operation, and the stereo noise reduction option 10d-1 will switch to the style of the stereo noise reduction option 10d-1' shown in (2) in Figure 6.

[0134] For example, 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 noise reduction mode.

[0135] For example, when the stereo noise reduction option is set to 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.

[0136] For example, in one implementation, the audio noise reduction function is enabled or disabled via the stereo noise reduction option provided in the settings app. During recording, the audio noise reduction option may not be displayed in interface 10c, as described in S8 or S8' above. Therefore, during recording, the user cannot dynamically switch between noise reduction mode and original sound mode. If switching between noise reduction mode and original sound mode is desired, the user must pause recording via S4-1", then enter interface 10d and operate the stereo noise reduction option to switch between noise reduction mode and original sound mode.

[0137] For example, in another implementation, the stereo noise reduction option provided in interface 10d can be bound to the audio noise reduction option provided in the above-mentioned interface 10c. 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 clicking S4' to enter interface 10c, 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.

[0138] 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 on this embodiment.

[0139] 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.

[0140] Referring to FIG7 , the stereo noise reduction method provided in the embodiment of the present application specifically includes:

[0141] 101. Display a first interface, which displays audio noise reduction options.

[0142] For example, in some implementations, the first interface may be, for example, the recording interface corresponding to the camera application described in the above embodiment, i.e., interface 10c. Accordingly, when the first interface is interface 10c described above, the audio noise reduction option displayed in the first interface is the audio noise reduction option in the S8 or S8' style displayed in interface 10c.

[0143] For example, in 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.

[0144] For ease of description, this embodiment takes the first interface as the video recording interface corresponding to the camera application, that is, the interface 10c mentioned above as an example.

[0145] 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.

[0146] It can be seen from the description of the above embodiment that when the audio noise reduction option is in the style of S8, that is, in the first state, it means 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 means 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 behavior, 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.

[0147] 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.

[0148] 103 : After the audio noise reduction function is enabled, 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.

[0149] 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. The specific locations of the top and bottom microphones can be found in the description of the above embodiment and will not be further elaborated here.

[0150] 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 the left earphone and the right earphone of a TWS headset, respectively, the first microphone can be, for example, a microphone located in the left earphone, and the second microphone can be, for example, a microphone located in the right earphone.

[0151] It should be understood that the above description is merely an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. It is sufficient as long as the synthesized stereo audio signals come from microphones at different locations.

[0152] Furthermore, it should be noted that the neural network model used to determine the amplitude mask of the noisy frequency in step 104 is trained using noisy frequency training data, which is obtained by fusing noise data onto a single-channel noise-free frequency. Therefore, the noisy frequency input to the neural network model should be single-channel audio. However, the currently collected audio signal has two channels (i.e., dual channels). Therefore, in order to ensure that the amplitude mask is obtained using the neural network model trained based on single-channel audio data, it is necessary to determine one audio signal based on the two audio signals.

[0153] For example, the aforementioned fusion of noise data onto a single-channel noise-free frequency spectrum specifically involves dividing the noise-free frequency spectrum and noise data of the single channel into an equal 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 noise audio time frames at the same instant, the frequency domain features of the noise-free frequency time frames and the frequency domain features of the noise audio time frames are superimposed. In other words, the fusion mentioned here refers to the fusion of different audio signals in the time domain.

[0154] For ease of explanation, let's take the example of a first audio signal captured by a first microphone as the left channel input and a second audio signal captured by a second microphone as the right channel input. Referring to Figure 8 , upon receiving the first audio signal input from the left channel and the second audio signal input from the right channel, the two audio signals are fused together based on the microphone states of the microphones corresponding to these two audio signals, thereby determining the noisy audio that can be input into the neural network model. In this way, the neural network model can determine amplitude masks suitable for the first and second audio signals based on the input single-channel noisy audio. The audio noise reduction module can then mask the first and second audio signals based on the same amplitude mask determined by the neural network model. Thus, after masking with the same amplitude mask, the left and right channel outputs are the noise-reduced audio signals. Thus, through the coordination of the left and right channels, noise-reduced stereo sound can be obtained.

[0155] It should be noted that the so-called amplitude mask is specifically used to describe the relationship between clean speech, that is, the noise-free frequency (target audio signal, or clean speech, human voice, etc.) and the noise-containing frequency (various noises, such as wind, road noise, music, etc., except the target audio signal) in the frequency domain.

[0156] It's also important to note that when the amplitude mask describes relationships in the frequency domain, masking based on the amplitude mask can be understood as spectral masking. Spectral masking means that at the same frequency, strong tones mask weaker ones. Therefore, within a certain threshold, some weak signals can be directly removed, thus achieving audio noise reduction.

[0157] For example, 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.

[0158] 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 frequency.

[0159] Furthermore, it is understandable that while the difference in human voice energy between the left and right stereo channels is generally small, the difference in noise energy between the left and right channels is larger in certain scenarios. Therefore, the difference in signal-to-noise ratio between the left and right channels lies primarily in the noise energy. Therefore, using the audio signal with lower energy as the noisy frequency and calculating the amplitude mask using a neural network model can reduce harmonic distortion and achieve better fidelity. Therefore, in other implementations, the energy of both channels can be calculated, and the lower-energy audio signal from the first and second audio signals can be selected as the noisy frequency.

[0160] 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 on this embodiment.

[0161] For example, 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.

[0162] For example, when the microphone status of the first microphone indicates that the first microphone is operating normally and the microphone status of the second microphone indicates that the second microphone is abnormal (such as being blocked or broken), the first audio signal is determined to be noisy audio.

[0163] For another example, 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 operating normally, the second audio signal is determined to be a noisy audio signal.

[0164] 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 on this embodiment.

[0165] 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 described above when the audio streams of both channels are normal can be used to determine the noisy audio. In another implementation, a prompt window can be displayed on the current interface, such as the first interface, and a prompt message indicating that both the first microphone and the second microphone are abnormal can be displayed in the prompt window. This can prevent the user from unknowingly using the abnormal microphone for recording or video recording, which may result in the final recorded audio or video file being devoid of sound or consisting entirely of interference audio.

[0166] 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 on this embodiment.

[0167] 104, input the noisy frequency into the neural network model to obtain an amplitude mask of the noisy frequency.

[0168] It can be understood that the neural network model is pre-trained based on the noisy frequency training data mentioned above and embedded in the terminal device. Specifically in this embodiment, the neural network model includes a convolutional neural network (CNN) layer, a long short-term memory network (LSTM) layer, and a fully connected network (Linear Network, LN) layer arranged in sequence. That is, the neural network model in this embodiment is a CRNN (Convolutional Recurrent Neural Network) structure.

[0169] To facilitate the explanation of the neural network model construction process, the following is an explanation from two aspects: the training phase and the testing phase.

[0170] Training phase:

[0171] Single-channel clean speech (noise-free) is collected and fused with noise data from various scenarios (e.g., noise without human voices, wind noise, road noise, music, etc.) at varying signal-to-noise ratios and amplitudes to generate noisy training data. This noisy training data is then used to iteratively train a model that meets the aforementioned neural network structure and reflects the loss function of the time-frequency domain until convergence is achieved.

[0172] For example, during the training process, the clean speech can be denoted as x(t) and the noise data can be denoted as n(t). Then the noisy audio training data y(t) can be expressed as y(t)=x(t)+n(t).

[0173] 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 .

[0174] 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.

[0175] 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).

[0176] Based on this, the loss function can be expressed as:

[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 the specific details of 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 rates of the noisy training data and the noisy test data do not match, frequency band expansion can be performed to ensure that the neural network model can also output an amplitude mask suitable for the noisy test data. Specifically, the amplitude mask obtained by the neural network model is expanded to the full frequency band of the noisy test data.

[0182] Understandably, since the sampling frequency of current noisy audio training data is mostly 16kHz, 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] 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 described 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. 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 described above.

[0185] For example, 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.

[0186] For example, 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 mid-low frequency, the neural network model obtained by training based on 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 process in detail:

[0187] 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 frequency domain feature extraction is performed according to the 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.

[0188] 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 according to the sampling ratio, which introduces image spectra; second, filtering out the image spectra through a low-pass filtering algorithm to obtain the upsampled signal.

[0189] For 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 upsampling methods, which will not be repeated here.

[0190] Exemplarily, during the testing 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; near 8kHz (e.g., 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 a set gain ratio to obtain an 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.

[0191] 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 follows (taking the left channel as an example, the right channel is the same):

[0192] The weight α increases uniformly from 0 to 1 in the transition frequency band.

[0193] For a better understanding, the following is a specific description with reference to Figure 9. For example, when both the left channel input and the right channel input are audio signals with a sampling frequency of 48 kHz, 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 48 kHz into an audio signal with a bandwidth of 24 kHz based on a fast Fourier transform (FFT).

[0194] Continuing to refer to FIG. 9 , for example, the frequency spectrum of an audio signal with a bandwidth of 24 kHz after FFT transformation is not subjected to noise reduction, that is, it is an audio signal without noise reduction.

[0195] Continuing to refer to Figure 9, for example, after obtaining the audio signals with a bandwidth of 24kHz input to the left and right channels, the noisy frequency can be determined based on the method in the above step 103, and then the noisy frequency can be input into the trained neural network model. Since the input is a noisy frequency with a sampling frequency greater than 16kHz, the amplitude masks corresponding to different frequency bands in the entire frequency band of 0kHz to 24kHz will be 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 to 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 Inverse Fast Fourier Transform (IFFT) is used to transform the audio signal with a bandwidth of 24kHz into a sampling frequency of 48kHz.

[0196] 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 on this embodiment.

[0197] 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.

[0198] In order to reduce the resources and power consumption of terminal devices, this embodiment takes server training as an example. Specifically, in this embodiment, in order to minimize the training pressure on the server 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 from the big data platform to train an initial neural network model, and then push the trained initial neural network model to each terminal device, such as mobile phone 1, mobile phone 2 and mobile phone 3 in Figure 10, respectively, or after receiving the request of each terminal device, push the trained initial neural network model to the corresponding terminal device.

[0199] Furthermore, 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 the 16kHz single-channel clean audio generated by mobile phone 1, the 32kHz single-channel clean audio generated by mobile phone 2, and the 48kHz single-channel clean audio generated by mobile phone 3 in Figure 10. The initial neural network model is then optimized and trained based on the different single-channel clean audios to obtain target neural network models for different terminal devices. The target neural network models for different terminal devices are then pushed to the corresponding terminal devices for use.

[0200] 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 on this embodiment.

[0201] 105 , mask the first audio signal and the second audio signal using an amplitude mask to obtain a stereo sound after noise reduction.

[0202] 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 same amplitude mask is used to process the two audio signals, thereby achieving noise reduction for the two audio signals in stereo.

[0203] In addition, compared with performing noise reduction on the left and right channels separately, the stereo noise reduction method provided in the embodiment, which expands 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 stereo, thereby improving the recording and video recording experience.

[0204] When the stereo noise reduction method provided in the embodiments of the present application is applied to a terminal device, it involves not only the software portion of the terminal device but also the hardware portion of the terminal device. Taking a mobile phone as an example, with the hardware structure shown in FIG1 as an example, to better understand the software structure of the mobile phone 100 shown in FIG1 , 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.

[0205] 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.

[0206] Furthermore, it is understood that the software systems currently used by mainstream terminal devices include, but are not limited to, Windows, Android, and iOS. For ease of explanation, this embodiment of the present application uses the layered architecture of the Android system as an example to illustrate the software structure of the mobile phone 100. In specific implementations, the stereo noise reduction method provided in this embodiment of the present application is also applicable to other systems.

[0207] Furthermore, it should be understood that the current layered architecture of mobile phones divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. These layers may include, for example, the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.

[0208] See FIG11 , which is a software structure block diagram of the mobile phone 100 according to an embodiment of the present application.

[0209] The application layer may include a series of application packages. The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. In some implementations, these programming interfaces and programming frameworks may be described as functions.

[0210] Continuing to refer to FIG11 , specifically to 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 settings application that integrates turning on or off the audio noise reduction function.

[0211] Continuing to refer to FIG11 , specifically to 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, and the like.

[0212] Continuing to refer to Figure 11, illustratively, the Android Runtime includes a core library and a virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.

[0213] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0214] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0215] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).

[0216] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0217] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0218] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0219] It can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.

[0220] 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.

[0221] In addition, it is understandable that the kernel layer in the Android system is a layer between hardware and software. Continuing to refer to Figure 11, illustratively, the kernel layer includes at least a display driver, a camera driver, an audio driver, and the like. Exemplarily, in a scene of recording stereo sound, the audio driver can drive the first microphone and the second microphone in the audio module to collect audio signals. This is the end of the introduction to the software structure of the mobile phone 100. It is understandable that the layers in the software structure shown in Figure 11 and the components contained 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, and the present application does not impose any restrictions.

[0222] Based on the hardware structure of the mobile phone shown in FIG1 and the software structure shown in FIG11 , the hardware and software structures involved in implementing the stereo noise reduction method provided in the embodiment of the present application are described below.

[0223] Taking the camera application as an example of an application for recording stereo sound, see Figure 12. For example, when the user clicks S4' shown in (1) in Figure 3 mentioned in the above embodiment, the mobile phone responds to the operation behavior, and the camera application will send a stereo recording instruction to the audio service, that is, inform the audio service that stereo recording is to be performed at the current time.

[0224] Understandably, recording in the camera app's video mode also involves recording the image, which requires the camera service, as well as the camera driver, camera, and the functional modules for generating the video stream captured by the camera. This section only describes the audio-related content.

[0225] Continuing with Figure 12, illustratively, after receiving the stereo recording instruction, the audio service will start the corresponding process, call 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.

[0226] Exemplarily, the audio signals collected by the first microphone and the second microphone are transmitted to the modem for recording to obtain stereo sound, and the obtained stereo sound is saved in the memory when recording is stopped.

[0227] 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.

[0228] Continuing to refer to Figure 12, for example, when the user clicks on the audio noise reduction option in the first state, such as the audio noise reduction option in the style of 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 is required to use the noise reduction mode to process the first audio signal (not noise reduced) and the second audio signal (not noise reduced). 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 (not noise reduced) and the second audio signal (not noise reduced) based on the stereo noise reduction method provided in the embodiment of the present application. Specifically, the first audio signal (not noise reduced) and the second audio signal (not noise reduced) can be processed in steps 103 to 105 in the above embodiment.

[0229] For example, when a user clicks on an audio noise reduction option in the second state, such as the audio noise reduction option shown as S8' in interface 10c in the above embodiment, the stereo noise reduction module determines that the user has disabled the audio noise reduction function, requiring the modem to process the first audio signal (without noise reduction) and the second audio signal (without noise reduction) in the original sound mode. In this case, the stereo noise reduction module sends an original sound instruction to the modem, so that the modem does not perform noise reduction processing on the first audio signal (without noise reduction) and the second audio signal (without noise reduction) in steps 103 to 105 in the above embodiment.

[0230] It should be understood that the above description is merely an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. The description of the various instructions above is also merely to illustrate when and what operations each functional module and hardware performs. In the specific implementation, the names of these instructions are not limited.

[0231] 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 voice signal in stereo, while preserving the spatial characteristics of stereo and improving the recording and video recording experience.

[0232] In addition, it is understandable that, in order to implement the above functions, the terminal device includes hardware and / or software modules that perform the corresponding functions. 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.

[0233] In addition, it should be noted that the stereo noise reduction method provided in the above embodiments implemented by a terminal device in an 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 a memory so that when the chip system is running, it calls a computer program stored in the memory to implement the steps performed by the above terminal device. The processor in the chip system can be an application processor or a processor other than an application processor.

[0234] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. 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.

[0235] 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.

[0236] 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 to control the receiving pin to receive the signal, so as to control the transmitting pin to send the signal.

[0237] 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.

[0238] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 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, determining the noisy frequency 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; 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 and the second audio signal to obtain a noise-reduced stereo signal.

2. The method according to claim 1, characterized in that The determining of the noisy audio 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 includes: 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 according to 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 the noisy audio signal; 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 as the noisy audio signal.

3. The method according to claim 2, characterized in that 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 audio signal according to the first audio signal and the second audio signal includes: 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; The audio signal corresponding to the frequency domain feature obtained after mean processing is used as the noisy audio signal.

4. The method according to claim 2, characterized in that: 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 audio signal according to the first audio signal and the second audio signal includes: 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, an audio signal with low energy is selected from the first audio signal and the second audio signal as the noisy audio signal.

5. The method according to claim 2, characterized in that: The method further comprises: 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 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.

6. The method according to any one of claims 1 to 5, 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, the audio noise reduction option is switched to the first state, and the audio noise reduction function is turned off; After the audio noise reduction function is turned off, a non-noise-reduced stereo sound is synthesized according to the first audio signal and the second audio signal.

7. The method according to any one of claims 1 to 6, characterized in that: The first interface also displays an option to end recording; The method further comprises: After the audio noise reduction function is turned on, when a click operation on the stop recording option is received, the audio noise reduction option is restored to the first state, and the audio noise reduction function is turned off.

8. The method according to any one of claims 1 to 6, characterized in that: The first interface also displays an option to end recording; The method further comprises: After the audio noise reduction function is turned on, when a click operation on the stop 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.

9. The method according to any one of claims 1 to 8, 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.

10. The method according to claim 9, 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.

11. The method according to claim 10, 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.

12. The method according to any one of claims 1 to 11, 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.

13. The method according to any one of claims 1 to 12, 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.

14. The method according to any one of claims 1 to 13, 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.

15. The method according to any one of claims 1 to 13, 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.

16. The method according to any one of claims 1 to 15, characterized in that The first interface is a video recording interface corresponding to the camera application.

17. The method according to any one of claims 1 to 15, characterized in that The first interface is a recording interface corresponding to the recording application.

18. 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 17.

19. 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 17.

Citation Information

Patent Citations

  • Recording method based on double microphones and recording device

    CN107331402A

  • Recording method and device, terminal and computer readable storage medium

    CN108111952A

  • Speech enhancement method and system, computer equipment and storage medium

    CN110503972A

  • Stereo echo cancellation method and system based on neural network

    CN111292759A

  • Improved multi-channel speech enhancement system and method

    CN111583948A

Cited By

  • Audio processing method, earphone and terminal equipment

    CN119697551A

  • Improved auditory masking system

    GB2645337A