Noise reduction method and device, electronic equipment and storage medium
By weighting the first noise data and the second noise data in the electronic device to generate the target noise, the problem of poor noise reduction effect caused by the difference in microphone acquisition in small wearable devices is solved, and a purer voice output is achieved.
Patent Information
- Application Number
- CN202211275335.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-10-18
AI Technical Summary
In the existing technology, electronic devices using multiple microphones are relatively large in small wearable devices, and the difference between the voice to be denoised and the ambient noise collected by the microphones is not obvious, resulting in poor voice noise reduction effect.
After acquiring the speech to be denoised, the first noise data and the second noise data are weighted and processed to obtain the target noise. The speech to be denoised is then denoised based on the target noise. Specific methods include spectral subtraction, adaptive filter algorithms, etc.
It improves voice noise reduction, resulting in cleaner voice, and is suitable for small wearable devices.
Smart Images

Figure CN115762548B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of noise reduction technology, specifically relating to a noise reduction method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Speech signals encounter various types of noise during encoding and transmission. Speech denoising has become an indispensable part of speech signal processing, such as speech coding and speech recognition, which both require denoising beforehand. Speech denoising is an effective noise reduction technique aimed at eliminating the impact of noise on speech signals, thereby improving clarity and quality. However, the denoising effectiveness of existing methods still needs improvement. Summary of the Invention
[0003] In view of the above problems, this application proposes a noise reduction method, apparatus, electronic device, and readable storage medium to improve the above problems.
[0004] In a first aspect, embodiments of this application provide a noise reduction method applied to an electronic device. The method includes: acquiring speech to be denoised; acquiring target noise corresponding to the speech to be denoised, wherein the target noise is obtained by weighting first noise data and second noise data; and performing noise reduction processing on the speech to be denoised based on the target noise to obtain denoised speech.
[0005] Secondly, embodiments of this application provide a noise reduction device operating in an electronic device. The device includes a voice acquisition unit, a noise acquisition unit, and a noise reduction unit. The voice acquisition unit is used to acquire voice to be denoised; the noise acquisition unit is used to acquire target noise corresponding to the voice to be denoised, the target noise being obtained by weighting first noise data and second noise data; the noise reduction unit is used to perform noise reduction processing on the voice to be denoised based on the target noise to obtain denoised voice.
[0006] Thirdly, embodiments of this application provide an electronic device, the electronic device including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the noise reduction method described in the above embodiments.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run.
[0008] This application provides a noise reduction method, apparatus, electronic device, and readable storage medium. First, the speech to be denoised is acquired. Then, a target noise corresponding to the speech is acquired. The target noise is obtained by weighting first noise data and second noise data. Finally, based on the target noise, the speech to be denoised is processed to obtain denoised speech. By using the above method, the target noise is obtained by weighting the first noise data and the second noise data, so that the obtained target noise simultaneously possesses the characteristics of both the first and second noise data. Therefore, by using the target noise to process the speech to be denoised, the noise reduction effect can be improved, resulting in cleaner speech. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart of a noise reduction method according to an embodiment of this application is shown;
[0011] Figure 2 A flowchart of a noise reduction method according to another embodiment of this application is shown;
[0012] Figure 3 A flowchart of a noise reduction method according to another embodiment of this application is shown;
[0013] Figure 4 A structural block diagram of a noise reduction device according to an embodiment of this application is shown;
[0014] Figure 5 This paper shows a structural block diagram of an electronic device for performing a noise reduction method according to an embodiment of the present application.
[0015] Figure 6 The present application shows a storage unit for storing or carrying program code that implements the noise reduction method according to the embodiments of the present application. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] Speech signals encounter various types of noise pollution during encoding and transmission. Speech denoising has become an indispensable part of speech signal processing, such as speech coding and speech recognition, which all require speech denoising beforehand. Speech denoising is an effective processing technique for noise problems, aiming to eliminate the impact of noise on speech signals to improve their clarity and quality.
[0018] The inventors, in their research on related noise reduction methods, discovered that these methods typically utilize dual microphones in an electronic device to separately capture the speech to be denoised and the ambient noise. The ambient noise is then subtracted from the speech to obtain noise-free, clean speech. This clean speech is then amplified by the device's processor, making it clearly audible. However, this method becomes unsuitable for small wearable devices if multiple microphones are included. Furthermore, multiple microphones in a small wearable device can lead to indistinct differences between the speech and ambient noise, resulting in inaccurate estimations of the clean speech and ambient noise components. Consequently, the noise reduction effect needs further improvement.
[0019] Therefore, the inventors have proposed the noise reduction method, apparatus, electronic device, and readable storage medium of this application. First, the speech to be denoised is acquired. Then, a target noise corresponding to the speech is acquired. The target noise is obtained by weighting first noise data and second noise data. Finally, based on the target noise, the speech to be denoised is processed to obtain denoised speech. By using the above method, the target noise is obtained by weighting the first noise data and the second noise data, so that the obtained target noise simultaneously possesses the characteristics of both the first and second noise data. Therefore, by using the target noise to process the speech to be denoised, the noise reduction effect can be improved, resulting in cleaner speech.
[0020] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0021] Please see Figure 1 This application provides a noise reduction method applied to an electronic device, the method comprising:
[0022] Step S110: Obtain the speech to be denoised.
[0023] In this embodiment, the speech to be denoised can be collected through a microphone in an electronic device. The speech to be denoised can include two parts: environmental noise to be eliminated and clean speech free of environmental noise. For example, the clean speech free of environmental noise could be the clean speech to be transmitted during a call. Environmental noise can be various types of speech, such as music played on a smart playback device. The smart playback device can be a smartphone, tablet, speaker, or other smart device with audio playback capabilities, etc., without specific limitations. The electronic device can be a personal communication device, smartphone, tablet, smart wearable device, or other smart device with call or voice transmission capabilities, etc., without specific limitations.
[0024] In different application scenarios, the microphones in electronic devices collect different types of noise-reducing audio. For example, in a call scenario, the microphones in electronic devices can collect audio containing ambient noise during the call; in an audio recording scenario, the microphones in electronic devices can collect audio containing machine operation and electrical noise during the recording process. No specific limitations are made here.
[0025] One approach is to use the voice to be denoised as the voice data acquired in real time by the electronic device when a specified application is detected to be running. This specified application can be an application that requires the microphone to be activated upon startup, such as a calling application. When the specified application is detected to be running, voice data can be acquired in real time through the microphone set on the electronic device, and this acquired voice data can be used as the voice data to be denoised.
[0026] Specifically, when detecting whether a specified application is running, this can be determined by setting an application identifier for each application. Specifically, two different application identifiers can be set for a specified application: one indicating that the specified application is running, and the other indicating that the specified application is not running. Therefore, when detecting whether a specified application is running, the determination can be made based on whether the application identifier indicating that the specified application is running is detected. If the application identifier indicating that the specified application is running is detected, then the specified application is determined to be running; if the application identifier indicating that the specified application is not running is detected, then the specified application is determined to be not running.
[0027] As another approach, the electronic device can respond to a voice acquisition command and begin acquiring the voice to be denoised. The voice acquisition command can be sent by other external devices that have established a communication connection with the electronic device, or it can be sent by a cloud server; no specific limitation is made here.
[0028] When an electronic device receives a voice acquisition command from another external device or server, it responds to the command by starting to acquire the voice to be noise-reduced through the microphone set in the electronic device.
[0029] Optionally, when acquiring the speech to be denoised using the above method, the speech can be acquired at preset time intervals, or the speech data collected by the microphone within a preset time period can be used as the speech to be denoised. The preset time and preset time period can be set according to actual needs and are not specifically limited here.
[0030] Step S120: Obtain the target noise corresponding to the speech to be denoised, wherein the target noise is obtained by weighting the first noise data and the second noise data.
[0031] In this embodiment, the target noise corresponding to the speech to be denoised is noise data used for denoising the speech. The target noise can be obtained by weighting two parts of noise data, which may include first noise data and second noise data. The first and second noise data can be noise data collected by different electronic devices. Optionally, the first noise data can be noise data obtained by processing noise data sent by an external device that has established a communication connection with the electronic device. The second noise data can be noise data obtained by processing noise data collected by a microphone built into the electronic device. The external device can be an electronic device capable of collecting speech data in real time, or an electronic device capable of playing audio signals, such as a car speaker.
[0032] In this embodiment, the target noise is obtained by weighting the first noise data and the second noise data. This can be understood as assigning different weights to the first and second noise data and then summing them to obtain the target noise. The weights corresponding to the first and second noise data can be preset or determined through multiple experiments. For example, the weights corresponding to the first and second noise data can be simply set to 0.5 and 0.5 respectively. Alternatively, the weights can be appropriately adjusted according to the calculation accuracy of the noise estimation algorithm to reduce the error of the target noise. Using the target noise with the smaller error for noise reduction processing can yield cleaner speech with better noise reduction results. Optionally, when adjusting the weights corresponding to the first and second noise data according to the calculation accuracy of the noise estimation algorithm, if the calculation accuracy of the noise estimation algorithm corresponding to the first noise data is poor and the calculation accuracy of the noise estimation algorithm corresponding to the second noise data is good, then a larger weight can be assigned to the first noise data and a smaller weight to the second noise data; conversely, a smaller weight can be assigned to the first noise data and a larger weight to the second noise data.
[0033] One approach is to weight the first and second noise data according to pre-set weights after obtaining them, thus obtaining the target noise. Specifically, pre-set weights are assigned to the first and second noise data respectively, and then the weighted first and second noise data are added together to obtain the target noise. The formula for calculating the target noise is as follows: y′ t =A*x′ t +(1-A)y t Where A is the set weight, x′ t This represents the first noise data, y t This represents the second noise data.
[0034] For example, if the first noise data is y1 and the second noise data is y2, the pre-set weights are 0.3 and 0.7 respectively. Here, 0.3 is the weight corresponding to the first noise data and 0.7 is the weight corresponding to the second noise data, and the target noise y = 0.3*y1 + 0.7*y2 is obtained.
[0035] Step S130: Based on the target noise, perform noise reduction processing on the speech to be denoised to obtain denoised speech.
[0036] In this embodiment of the application, the noise-reduced speech is the pure speech that is free of environmental noise after noise reduction processing.
[0037] As one approach, since the speech to be denoised can include two parts: one is the environmental noise that needs to be eliminated, and the other is the clean speech that does not contain environmental noise, when denoising the speech, the target noise can be subtracted from the speech to be denoised by a preset denoising method to obtain clean speech that does not contain environmental noise. The preset denoising method can be spectral subtraction, Speex denoising algorithm, adaptive filter algorithm, Wiener filtering method, or denoising model, etc., without specific limitations.
[0038] This application provides a noise reduction method that first acquires the speech to be denoised, then acquires the target noise corresponding to the speech, wherein the target noise is obtained by weighting first noise data and second noise data. Finally, based on the target noise, noise reduction processing is performed on the speech to be denoised to obtain denoised speech. By using the above method to obtain the target noise through weighting the first noise data and the second noise data, the obtained target noise simultaneously possesses the characteristics of both the first and second noise data. Therefore, by using the target noise to perform noise reduction processing on the speech to be denoised, the noise reduction effect can be improved, resulting in cleaner speech.
[0039] Please see Figure 2 This application provides a noise reduction method applied to an electronic device, the method comprising:
[0040] Step S210: Obtain the speech to be denoised.
[0041] Step S210 can be specifically explained in the detailed explanation of the above embodiments, and therefore will not be repeated in this embodiment.
[0042] Step S220: Obtain the first reference noise data and the second reference noise data.
[0043] In this embodiment of the application, the first reference noise data is the noise data transmitted from the external device to the electronic device. The first reference noise data can be used as a known quantity for the electronic device. For example, the first reference noise data can be the content (music or human voice) played by the external device in a specified environment (such as inside a car or indoors). The second reference noise data is the noise data collected by the microphone built into the electronic device.
[0044] In one approach, the first and second reference noise data can be noise data pre-stored in a preset storage area. Specifically, when an external device acquires noise data, it can transmit it to an electronic device in real time via a wireless transmission protocol, allowing the electronic device to store the noise data transmitted from the external device. Similarly, when the electronic device collects noise data through its built-in microphone, it can also store the collected noise data. Furthermore, when storing noise data, the acquisition time of the noise data and the device to which each noise data belongs can be stored, allowing the corresponding noise data to be found based on the acquisition time and device.
[0045] Alternatively, the first and second reference noise data can also be noise data acquired in real time. Specifically, when an electronic device needs to acquire the first reference noise data, it can send a data acquisition request to an external device with which it has established a communication connection. The external device can then respond to this request and transmit the first reference noise data to the electronic device in real time. When the external device collects the first reference noise data, the collected data will differ depending on the location or environment. For example, the first reference noise data collected by the external device at different locations within a vehicle may be different. For instance, a vehicle may have four seats: seat 1, seat 2, seat 3, and seat 4. Seat 1 is the driver's seat, seat 2 is the front passenger seat, seat 3 is the seat behind the driver's seat, and seat 4 is the seat behind the front passenger seat. The first reference noise data collected by the external device at the four locations of the vehicle can be different. The first reference noise data collected at seat 1 may include the motion noise of the left front wheel and the motion noise of the accelerator; the first reference noise data collected at seat 2 may include the motion noise of the right front wheel; the first reference noise data collected at seat 3 may include the motion noise of the left rear wheel; and the first reference noise data collected at seat 4 may include the motion noise of the right rear wheel.
[0046] Therefore, while the external device transmits the first reference noise data to the electronic device, the location information of the first reference noise data acquisition can be sent to the electronic device, so that the electronic device can acquire the second reference noise data at the same location.
[0047] Simultaneously, when the electronic device sends a data acquisition request to an external device, it can use its built-in microphone to collect ambient noise as a second reference noise data, or use a noise reduction algorithm to estimate the noise in the speech data collected by the microphone to obtain the second reference noise data. When estimating the noise in the speech data collected by the microphone using a noise reduction algorithm, it can assume that the noise is constant and estimate the components in the speech data that do not change over time to obtain the second reference noise estimate. Optionally, the second reference noise data can also be a reference noise data point from a preset reference noise dataset.
[0048] In the embodiments of this application, the first reference noise data and the second reference noise data may also be noise data collected by the same electronic device.
[0049] In the case where the electronic device includes a first microphone and a second microphone, the acquisition of the first reference noise data and the second reference noise data includes: using the noise data collected by the first microphone as the first reference noise data, wherein the first microphone is a microphone set far away from the target position; and using the noise data collected by the second microphone as the second reference noise data, wherein the second microphone is a microphone set close to the target position.
[0050] The target location can be the location of the voice output device, such as the mouth. The first microphone is positioned away from the mouth in the electronic device, and the second microphone is positioned closer to the mouth, so that the first noise data and the second noise data collected by the first microphone and the second microphone can be effectively distinguished.
[0051] Step S230: Align the first reference noise data and the second reference noise data to obtain the first noise data and the second noise data.
[0052] In this embodiment, the acquisition time and length of the first reference noise data and the second reference noise data may differ. When the acquisition time and length of the first reference noise data and the second reference noise data may differ, weighting the first reference noise data and the second reference noise data may result in a large error in the obtained target noise. Therefore, it is necessary to first align the first reference noise data and the second reference noise data.
[0053] Specifically, before aligning the first reference noise data and the second reference noise data, time synchronization between the electronic device and the external device can be performed when the electronic device establishes a communication connection with the external device.
[0054] In this embodiment, time synchronization refers to synchronizing the time when electronic devices and external devices collect noise data, so that the first reference noise data and the second reference noise data can be aligned. The synchronization process may delay (or advance) the time when electronic devices or external devices collect noise data.
[0055] After time synchronization of electronic devices and external devices, the noise data collected by these devices can be aligned. This alignment process can include start time point alignment and time length alignment. Start time point alignment refers to aligning the start time points of the first and second reference noise data; time length alignment refers to aligning the lengths of the first and second reference noise data at each time point.
[0056] As one approach, the process of aligning the first reference noise with the second reference noise to obtain first noise data and second noise data includes: aligning the first reference noise data and the second reference noise data with their start time points to obtain first target noise data and second target noise data; and aligning the first target noise data and the second target noise data with their time lengths to obtain first noise data and second noise data.
[0057] The step of aligning the first target noise data and the second target noise data by time length to obtain the first noise data and the second noise data includes: aligning the first target noise data to the second target noise data in time, and adjusting the overall volume of the first target noise data to be the same as the volume of the second target noise data, thereby obtaining the first noise data and the second noise data.
[0058] In this embodiment, due to potential transmission errors during the transmission of the first reference noise data by the external device, the two noise data may not have the same duration. Therefore, after obtaining the first and second reference noise data, their start time points can be aligned to obtain two target noise data. For example, if the first reference noise data is x0, x1, x2...xr; and the second reference noise data is y0, y1, y2...ys; aligning the start time points of the first and second reference noise data can be understood as aligning the times of x0 and y0. Here, xr and ys are both vectors, each dimension of which represents a frequency range, and the values corresponding to xr and ys represent the intensity of the noise in that frequency range at that moment.
[0059] Then, a dynamic time warping algorithm is used to align the two target noise data points on the time axis after initial time point alignment, making the lengths of the first and second noise data points equal, thereby reducing the omission of the first and second noise data points. The dynamic time warping algorithm uses a time warping function that meets certain conditions to describe the time correspondence between the test template and the reference template, solving for the warping function that minimizes the cumulative distance when the two templates match.
[0060] In this embodiment, a first target noise data is used as a test template, and a second target noise data is used as a reference template. The first target noise data is stretched or compressed to make the lengths of the first and second target noise data the same. After alignment, the volumes of the first and second target noise data can be adjusted to be the same to obtain the first noise data and the second noise data.
[0061] Step S240: Weight the first noise data and the second noise data to obtain the target noise.
[0062] Step S250: Based on the target noise, perform noise reduction processing on the speech to be denoised to obtain denoised speech.
[0063] Steps S240 and S250 can be specifically explained in the detailed explanations in the above embodiments, and therefore will not be repeated in this embodiment.
[0064] This application provides a noise reduction method that first acquires the speech to be denoised, and then acquires first reference noise data and second reference noise data. Next, the first and second reference noise data are aligned to obtain first noise data and second noise data. Then, the first and second noise data are weighted to obtain target noise. Finally, based on the target noise, noise reduction processing is performed on the speech to be denoised to obtain denoised speech. By aligning and weighting the first and second reference noise data to obtain the target noise, the target noise simultaneously possesses the characteristics of both the first and second noise data. Therefore, by using the target noise to perform noise reduction processing on the speech to be denoised, the noise reduction effect can be improved, resulting in cleaner speech.
[0065] Please see Figure 3 This application provides a noise reduction method applied to an electronic device, the method comprising:
[0066] Step S310: Obtain the speech to be denoised.
[0067] Step S310 can be specifically explained in the above embodiments, and therefore will not be repeated in this embodiment.
[0068] Step S320: Obtain noise data sent by an external device that has established a communication connection with the electronic device as the first reference noise data.
[0069] In this embodiment, electronic devices and external devices can establish a communication connection based on a wireless communication protocol. This wireless communication protocol can be Wi-Fi, Zigbee, Bluetooth, etc.
[0070] For example, in a call scenario, noise data collected by microphones positioned at different locations can be used as the first noise data. The microphones are positioned away from the mouth. The microphones acquire the background noise at the current location (which may include playing music, human voices, and ambient noise) and transmit this acquired background noise to the electronic device as the first reference noise data.
[0071] Step S330: The noise data collected by the microphone set in the electronic device is used as the second reference noise data.
[0072] In one approach, if an electronic device is equipped with multiple microphones, the step of using noise data collected by the microphones in the electronic device as the second reference noise data includes: acquiring the noise data collected by the multiple microphones to obtain multiple noise data; and obtaining the second reference noise data based on the multiple noise data.
[0073] In this embodiment, if the electronic device is equipped with multiple microphones, noise data can be collected simultaneously by the multiple microphones to obtain noise data corresponding to each microphone, i.e., multiple noise data. After obtaining the multiple noise data, the multiple noise data can be comprehensively estimated to obtain a second reference noise data. Here, comprehensively estimating can be understood as performing alignment and weighting processing on the multiple noise data, which is not specifically limited here.
[0074] Similarly, multiple microphones can be installed in the external device, so that when the external device collects the first reference noise data, it can also obtain the first reference noise data by aligning and weighting the multiple noise data collected by multiple microphones.
[0075] For example, in a call scenario, an electronic device collects the current call speech through a microphone close to the mouth, estimates the noise data in the call speech using a noise reduction algorithm to obtain second reference noise data, and then performs alignment and weighting processing on the first and second reference noise data to obtain target noise. Thus, when transmitting speech to the other end of the call next time, the transmitted speech can be denoised using the target noise, so that the other end of the call can only hear the target human voice and not the ambient noise.
[0076] Step S340: Align the first reference noise data and the second reference noise data to obtain the first noise data and the second noise data.
[0077] Step S350: Weight the first noise data and the second noise data to obtain the target noise.
[0078] Step S360: Based on the target noise, perform noise reduction processing on the speech to be denoised to obtain denoised speech.
[0079] Steps S340, S350 and S360 can be referred to the detailed explanation in the above embodiments, and therefore will not be repeated in this embodiment.
[0080] This application provides a noise reduction method. First, it acquires the speech to be denoised. Noise data sent by an external device communicating with the electronic device is used as first reference noise data. Noise data collected by a microphone in the electronic device is used as second reference noise data. Then, the first and second reference noise data are aligned to obtain first noise data and second noise data. The first and second noise data are then weighted to obtain target noise. Finally, based on the target noise, noise reduction is performed on the speech to be denoised to obtain the denoised speech. By aligning and weighting the first and second reference noise data to obtain the target noise, the target noise possesses characteristics of both the first and second noise data. Therefore, using the target noise for noise reduction improves the noise reduction effect and results in cleaner speech.
[0081] Please see Figure 4 This application provides a noise reduction device 400, which operates in an electronic device. The device 400 includes:
[0082] The voice acquisition unit 410 is used to acquire the voice to be denoised.
[0083] The noise acquisition unit 420 is used to acquire the target noise corresponding to the speech to be denoised, wherein the target noise is obtained by weighting the first noise data and the second noise data.
[0084] In one approach, the noise acquisition unit 420 is used to acquire first reference noise data and second reference noise data; align the first reference noise data and the second reference noise data to obtain first noise data and second noise data; and weight the first noise data and the second noise data to obtain the target noise.
[0085] Optionally, the noise acquisition unit 420 is specifically used to align the first reference noise data and the second reference noise data with their start time points to obtain the first target noise data and the second target noise data; and to align the first target noise data and the second target noise data with their time lengths to obtain the first noise data and the second noise data.
[0086] Optionally, the noise acquisition unit 420 is further configured to align the first target noise data to the second target noise data in time, and adjust the overall volume of the first target noise data to be the same as the volume of the second target noise data, thereby obtaining the first noise data and the second noise data.
[0087] Furthermore, the noise acquisition unit 420 is specifically used to acquire noise data sent by an external device that has established a communication connection with the electronic device as first reference noise data; and to acquire noise data collected by a microphone set in the electronic device as second reference noise data.
[0088] Optionally, the electronic device is equipped with multiple microphones. The noise acquisition unit 420 is specifically used to acquire noise data collected by the multiple microphones to obtain multiple noise data; and based on the multiple noise data, to obtain the second reference noise data.
[0089] Optionally, the electronic device includes a first microphone and a second microphone. The noise acquisition unit 420 is specifically used to use noise data acquired through the first microphone as first reference noise data, wherein the first microphone is a microphone positioned far from the target location; and to use noise data acquired through the second microphone as second reference noise data, wherein the second microphone is a microphone positioned close to the target location.
[0090] The noise reduction unit 430 is used to perform noise reduction processing on the speech to be denoised based on the target noise to obtain denoised speech.
[0091] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0092] The following will combine Figure 5 This application describes an electronic device.
[0093] Please see Figure 5Based on the aforementioned noise reduction method and apparatus, this application also provides another electronic device 500 capable of performing the aforementioned noise reduction method. The electronic device 500 includes one or more (only one shown in the figure) processors 502, a memory 504, and a network module 506 coupled together. The memory 504 stores programs capable of executing the contents of the aforementioned embodiments, and the processors 502 can execute the programs stored in the memory 504.
[0094] The processor 502 may include one or more processing cores. The processor 502 connects to various parts within the electronic device 500 using various interfaces and lines, and executes various functions of the server 500 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 504, and by calling data stored in the memory 504. Optionally, the processor 502 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 802 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 502 and may be implemented separately using a communication chip.
[0095] The memory 504 may include random access memory (RAM) or read-only memory (ROM). The memory 504 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 504 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 500 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0096] The network module 506 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as audio playback devices. The network module 506 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. The network module 506 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 506 can interact with base stations.
[0097] Please refer to Figure 6 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 600 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0098] The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.
[0099] This application provides a noise reduction method, apparatus, electronic device, and storage medium. First, it acquires the speech to be denoised. Then, it acquires the target noise corresponding to the speech, which is obtained by weighting first noise data and second noise data. Finally, based on the target noise, it performs noise reduction processing on the speech to be denoised to obtain denoised speech. By using this method, the target noise is obtained by weighting the first and second noise data, so that the obtained target noise simultaneously possesses the characteristics of both the first and second noise data. Therefore, by using the target noise to perform noise reduction processing on the speech to be denoised, the noise reduction effect can be improved, resulting in cleaner speech.
[0100] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A noise reduction method, characterized in that, The method, which utilizes an electronic device, includes: Acquire the noise-reduced audio to be transmitted to the other end of a conversation with the electronic device; Obtain the target noise corresponding to the speech to be denoised. The target noise is obtained by weighting first noise data and second noise data. The first noise data and second noise data are determined by: obtaining first reference noise data and second reference noise data; aligning the first reference noise data and second reference noise data with their start time points to obtain first target noise data and second target noise data; aligning the first target noise data and second target noise data with their time lengths to obtain first noise data and second noise data. The first reference noise data is the content played by the external device sent to the electronic device, which is located inside the vehicle. The second reference noise data is the noise data collected by the microphone in the electronic device. Before obtaining the target noise, the overall volume of the first target noise data is adjusted to be the same as the volume of the second target noise data. Based on the target noise, the speech to be denoised is processed to obtain denoised speech.
2. The method according to claim 1, characterized in that, The step of aligning the first target noise data and the second target noise data by time length to obtain the first noise data and the second noise data includes: Align the first target noise data with the second target noise data in time.
3. The method according to claim 1, characterized in that, If the electronic device is equipped with multiple microphones, acquiring second reference noise data includes: Obtain noise data collected by the multiple microphones to obtain multiple noise data; The multiple noise data are aligned and weighted to obtain the second reference noise data.
4. The method according to claim 1, characterized in that, The electronic device includes a first microphone and a second microphone. The first reference noise data is noise data collected through the first microphone, which is located far from the target position. The noise data collected through the second microphone is used as the second reference noise data, which is located close to the target position.
5. A noise reduction device, characterized in that, Operating in an electronic device, the device includes: A voice acquisition unit is used to acquire the noise-reduced voice to be transmitted to another end of a conversation with the electronic device; A noise acquisition unit is used to acquire target noise corresponding to the speech to be denoised. The target noise is obtained by weighting first noise data and second noise data. The first noise data and second noise data are determined by: acquiring first reference noise data and second reference noise data; aligning the first reference noise data and second reference noise data with their start time points to obtain first target noise data and second target noise data; aligning the first target noise data and second target noise data with their time lengths to obtain first noise data and second noise data. The first reference noise data is the content played by the external device and sent to the electronic device, which is located inside the vehicle. The second reference noise data is the noise data collected by the microphone in the electronic device. Before obtaining the target noise, the overall volume of the first target noise data is adjusted to be the same as the volume of the second target noise data. The noise reduction unit is used to perform noise reduction processing on the speech to be denoised based on the target noise to obtain denoised speech.
6. An electronic device, characterized in that, It includes one or more processors and memory; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which includes instructions for performing the method as claimed in any one of claims 1-4.
Citation Information
Patent Citations
Noise reduction method, device, equipment and storage medium
CN111402913A
Vehicle-mounted voice noise reduction method and device, electronic equipment and storage medium
CN115083404A