Noise suppression method, storage medium, electronic equipment and chip

Through frame processing of audio data and analysis of spectral energy distribution characteristics, piano sounds are distinguished from other audio types, and only piano sounds that meet specific conditions are suppressed, which solves the problem of speaker distortion and misidentification and improves audio quality.

CN118737196APending Publication Date: 2024-10-01SHANGHAI AWINIC TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410776243.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the existing technology plays piano audio, the high spectral energy in the low-frequency part causes speaker distortion, and it is difficult to distinguish the piano sound from other non-piano sounds with high spectral energy in the low-frequency part, leading to misidentification and false suppression, which affects the audio quality.

Method used

By dividing the audio data into frames, the audio type is determined based on the spectral energy distribution characteristics, the piano sound is distinguished from other audio types, such as drums, whistles and human voices, and only piano sounds that meet specific spectral energy distribution conditions are suppressed. , to avoid misidentification and error suppression.

Benefits of technology

It improves the audio suppression quality, ensures the playback effect of the human voice part, reduces speaker distortion, and improves the overall audio quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118737196A_ABST
    Figure CN118737196A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of audio processing, and discloses a noise suppression method, a storage medium, an electronic device and a chip, and the method comprises the steps: determining the audio type included in audio sub-data based on the spectrum energy distribution characteristics of the audio sub-data when the audio sub-data meets a spectrum energy distribution condition, the audio types comprise a first audio type and a second audio type different from the first audio type, and the first audio type comprises piano sound; and determining a suppression processing mode corresponding to the audio sub-data based on the audio type included in the audio sub-data. On the basis of piano sound recognition, other non-piano sounds possibly influencing piano sound recognition are detected, error suppression caused by piano sound error recognition is avoided, and the audio suppression quality is improved. Moreover, when the voice exists in the audio sub-data, the audio sub-data with the voice is not suppressed, so that the audio playing effect of the voice part is ensured, and the overall audio quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio processing, and in particular to a noise suppression method, a storage medium, an electronic device and a chip. Background Art

[0002] When playing an audio file containing piano sounds through a speaker, the piano sounds have uneven energy distribution in the high and low frequency spectra. For example, the spectrum energy of the piano sounds is mainly concentrated in the low-frequency part, and the spectrum energy of the low-frequency part is higher. As a result, when a piano sound appears during the playback process, it may cause speaker distortion and a "rustling" noise. In this way, the piano sounds in the audio file can be detected and suppressed based on the spectrum energy distribution. For example, when the ratio of the spectrum energy of the low-frequency part of a certain audio segment to the spectrum energy of the entire audio segment is high, it can be determined that there is a piano sound in the audio segment and it can be suppressed.

[0003] However, when a certain audio segment contains non-piano sounds with high low-frequency spectrum energy, such as drums and whistles, the low-frequency spectrum energy in the audio segment will account for a higher ratio of the spectrum energy of the entire audio segment, thus misidentifying the audio segment as piano sound, and suppressing the non-piano sound using piano sound suppression, affecting the audio quality. In addition, when a certain audio segment with piano sound also contains human voice, if the audio segment is suppressed, the playback effect of the human voice part will be affected, thereby affecting the overall audio quality. Summary of the invention

[0004] Embodiments of the present invention provide a noise suppression method, a storage medium, an electronic device, and a chip.

[0005] In a first aspect, the present invention provides a noise suppression method, which is applied to an electronic device, the method comprising performing frame processing on audio data to be processed to obtain multiple frames of audio sub-data; determining whether the audio sub-data satisfies a spectral energy distribution condition based on spectral energy distribution characteristics of the audio sub-data, wherein the spectral energy distribution condition comprises: the proportion of spectral energy of first frequency band data greater than a first frequency threshold in the audio sub-data satisfies a condition threshold, and the first frequency threshold is a target attenuation frequency of a first audio type; when the audio sub-data satisfies the spectral energy distribution condition, determining the audio type included in the audio sub-data based on the spectral energy distribution characteristics of the audio sub-data, wherein the audio type includes a first audio type and a second audio type different from the first audio type, and the first audio type includes piano sound; determining a suppression processing method for the corresponding audio sub-data based on the audio type included in the audio sub-data.

[0006] In the embodiment of the present application, on the basis of piano sound recognition, other non-piano sounds that may affect piano sound recognition are detected to avoid erroneous suppression caused by erroneous piano sound recognition, thereby improving the audio suppression quality. In addition, when there is human voice in the audio sub-data, the audio sub-data containing human voice is not suppressed to ensure the audio playback effect of the human voice part and improve the overall audio quality.

[0007] In a possible implementation of the first aspect, the second audio type includes at least one of drum sounds, whistle sounds, and human voices.

[0008] In a possible implementation of the first aspect, the drum sound and / or the whistle sound is determined based on a filter, and the human voice is determined based on a human voice recognition model.

[0009] In a possible implementation of the first aspect above, the above-mentioned determination of the suppression processing method of the corresponding audio sub-data based on the audio type included in the audio sub-data includes: when the audio type of the audio sub-data includes a first audio type but does not include a second audio type, suppressing the audio sub-data; when the audio type of the audio sub-data includes a first audio type and a second audio type, not suppressing the audio sub-data; when the audio type of the audio sub-data includes the second audio type but does not include the first audio type, not suppressing the audio sub-data.

[0010] In a possible implementation of the first aspect, when the audio type of the audio sub-data includes the first audio type, the audio sub-data is suppressed, including: determining a volume peak value of the audio sub-data; determining a suppression parameter of the audio sub-data based on the volume peak value, wherein the volume peak value is proportional to the suppression parameter; and suppressing the audio sub-data based on the suppression parameter.

[0011] In a possible implementation of the first aspect, the suppression process includes: determining first spectrum energy of the audio sub-data; and adjusting the first spectrum energy to second spectrum energy, wherein the second spectrum energy is less than or equal to a limiting amplitude of the speaker.

[0012] In a possible implementation of the first aspect above, the method also includes: when the audio type of the i-th frame audio sub-data includes the first audio type and the second audio type; or, when the audio type of the i-th frame audio sub-data includes the second audio type; determining the i-th frame to the i+m-th frame audio sub-data, where m is a positive integer greater than 0; and not performing suppression processing on the i-th frame to the i+m-th frame audio sub-data.

[0013] In a possible implementation of the first aspect above, the method also includes: when the audio type of the audio sub-data includes human voice, the audio data of the first period corresponding to the audio sub-data is not suppressed; when the audio type of the audio sub-data after the first period does not include human voice, the audio data of the second period after the first period is not suppressed, wherein the time of the second period is less than the time of the first period.

[0014] In a possible implementation of the first aspect above, the above-mentioned determining whether the audio sub-data meets the spectral energy distribution condition based on the spectral energy distribution characteristics of the audio sub-data includes: determining second frequency band data in the audio sub-data, wherein the second frequency band data is data in the audio sub-data that is less than a second frequency threshold, and the first frequency band data is data in the second frequency band data that is greater than the first frequency threshold; determining the spectral energy ratio of the total spectral energy of the first frequency band data to the total spectral energy of the second frequency band data; when the spectral energy ratio is less than the conditional threshold, the audio sub-data meets the spectral energy distribution condition.

[0015] In a possible implementation of the first aspect above, determining the suppression processing method corresponding to the audio sub-data based on the audio type included in the audio sub-data also includes: after processing the audio sub-data based on the suppression processing method, outputting the processed audio sub-data.

[0016] In a second aspect, an embodiment of the present application provides a readable storage medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to implement any one of the noise suppression methods provided by the first aspect and various possible implementations of the first aspect.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for executing the instructions stored in the memory to implement any one of the noise suppression methods provided by the first aspect and various possible implementations of the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a chip, which includes a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface, and is used to execute instructions stored in the memory to implement any one of the noise suppression methods provided by the first aspect and various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 According to some embodiments of the present application, a schematic diagram of clipping is shown;

[0020] Figure 2According to some embodiments of the present application, a schematic diagram of a noise suppression method is shown;

[0021] Figure 3 According to some embodiments of the present application, a schematic diagram of audio recognition is shown;

[0022] Figure 4 According to some embodiments of the present application, a schematic diagram of hierarchical judgment is shown;

[0023] Figure 5 According to some embodiments of the present application, a schematic flow chart of a noise suppression method is shown;

[0024] Figure 6 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION

[0025] The illustrative embodiments of the present invention include, but are not limited to, a noise suppression method, a storage medium, an electronic device, and a chip.

[0026] The technical solution of the present invention is introduced below in conjunction with the accompanying drawings.

[0027] The spectral energy of piano sound is mainly concentrated in the low-frequency part, such as the low-frequency part of the frequency band less than 4 kilo hertz (kHz). The spectral energy of piano sound will attenuate at 4kHz. In this way, the spectral energy of piano sound in the frequency band less than 4kHz is higher, and the spectral energy of piano sound in the frequency band greater than 4kHz is lower, resulting in the phenomenon of uneven energy distribution of piano sound in the spectrum. It can be understood that although the energy distribution of piano sound in the low-frequency and high-frequency spectra is uneven, the spectral energy distribution of piano sound in the frequency band less than 4kHz is relatively uniform, and it is usually not the case that the spectral energy of a certain part of the frequency band in the low frequency is very high, and the spectral energy of a certain part of the frequency band is very low.

[0028] Since the spectrum energy of piano sound in the low frequency part is relatively high, when playing an audio file containing piano sound through a speaker, when a piano sound appears during the playback, the spectrum energy of the audio may exceed the speaker's limited amplitude (referred to as limiter), resulting in a "rustling" noise and causing speaker distortion. Figure 1As shown, the horizontal axis is used to represent the timeline, the vertical axis is used to represent the amplitude, M is used to represent the audio data including the piano sound, and a / -a is used to represent the amplitude limit of the speaker. When a piano sound appears during the playback process, the spectrum energy of the piano sound in the low-frequency part is relatively high, resulting in a higher amplitude of the audio data M when the piano sound part is played, causing the amplitude of the audio data M from point A to point B and from point C to point D to exceed the amplitude limit of the speaker, causing the waveform of the audio data M to be clipped, resulting in the audio data M generating noise, that is, speaker distortion. In this way, it is necessary to detect the piano sound part in the audio file to suppress the piano sound part and avoid clipping to prevent speaker distortion.

[0029] In some embodiments, the piano sound in the audio file can be detected by the spectrum energy distribution. For example, when the ratio of the spectrum energy of the frequency band greater than 4kHz in a certain audio segment to the spectrum energy of the entire audio segment is low, it meets the spectrum energy distribution characteristics of the piano sound greater than 4kHz frequency band with low spectrum energy, so as to judge the presence of piano sound in the audio segment. Or for example, when the ratio of the spectrum energy of the frequency band less than 4kHz in a certain audio segment to the spectrum energy of the entire audio segment is high, it meets the spectrum energy distribution characteristics of the piano sound less than 4kHz frequency band with high spectrum energy, so as to judge the presence of piano sound in the audio segment.

[0030] However, when there are non-piano sounds such as drums and whistles in the audio segment, which also have high spectral energy in the low-frequency part, for example, drum sounds usually have high spectral energy in the frequency band below 100Hz and low spectral energy in the frequency band above 100Hz; whistles usually have high spectral energy in the frequency band below 400Hz and low spectral energy in the frequency band above 400Hz. If 4kHz is used as the dividing point to judge the spectral energy distribution of the audio segment, the spectral energy distribution of the audio including non-piano sounds such as drums and whistles and the audio including piano sounds may be similar, which may cause the audio including non-piano sounds such as drums and whistles to be mistakenly identified as audio including piano sounds, and the non-piano sounds are suppressed by the piano sound suppression processing method, affecting the audio quality. In addition, when a certain audio segment with piano sounds also contains human voices, if the audio segment is suppressed, the playback effect of the human voice part will be affected, thereby affecting the overall audio quality.

[0031] To this end, the present invention proposes a noise suppression method, which is applied to electronic devices. The method includes: performing frame processing on the audio data to be processed to obtain multiple frames of audio sub-data; based on the spectrum energy distribution characteristics of the audio sub-data, determining whether the audio sub-data meets the spectrum energy distribution condition, wherein the spectrum energy distribution condition includes: the spectrum energy proportion of the first frequency band data greater than the first frequency threshold in the audio sub-data meets the condition threshold, and the first frequency threshold is the target attenuation frequency of the first audio type; when the audio sub-data meets the spectrum energy distribution condition, based on the spectrum energy distribution characteristics of the audio sub-data, determining the audio type included in the audio sub-data, wherein the audio type includes a first audio type and a second audio type different from the first audio type, and the first audio type includes piano sound; based on the audio type included in the audio sub-data, determining the suppression processing method of the corresponding audio sub-data.

[0032] In some embodiments, Figure 2 As shown, the process of the noise suppression method includes: first, inputting the audio data to be processed into an electronic device for frame processing to obtain multiple frames of audio sub-data; second, the electronic device extracts the characteristic value of the audio sub-data to obtain the spectrum energy distribution characteristics of the audio sub-data; then, the electronic device determines whether the audio sub-data meets the spectrum energy distribution conditions of the piano sound based on the spectrum energy distribution characteristics of the audio sub-data. For example, it can be judged whether the audio sub-data meets the spectrum energy distribution conditions of the piano sound by the proportion of the spectrum energy of the first frequency band data in the audio sub-data that is greater than the first frequency threshold. It can be understood that since the first frequency threshold is the target attenuation frequency of the first audio type, when the first audio type is a piano sound, the first frequency threshold is the frequency at which the spectrum energy of the piano sound is attenuated, such as 4kHz.

[0033] In some embodiments, when the proportion of spectral energy in the frequency band greater than 4kHz in the audio sub-data is less than a conditional threshold, the spectral energy distribution characteristics of piano sounds in the frequency band greater than 4kHz are satisfied, that is, the audio sub-data satisfies the spectral energy distribution conditions of piano sounds; after determining that the audio sub-data satisfies the spectral energy distribution conditions of piano sounds, further identifying the second audio type of non-piano sounds such as drums, whistles, and human voices based on the spectral energy distribution characteristics of the audio sub-data and calculating the compression ratio, and suppressing the audio sub-data according to the obtained compression ratio; finally, outputting the suppressed audio sub-data.

[0034] In other embodiments, when the proportion of spectral energy in the frequency band greater than 4kHz in the audio sub-data is greater than or equal to the conditional threshold, the spectral energy distribution characteristic of piano sound in the frequency band greater than 4kHz is not satisfied, that is, the audio sub-data does not satisfy the spectral energy distribution condition of piano sound; after determining that the audio sub-data does not satisfy the spectral energy distribution condition of piano sound, the compression ratio of the audio sub-data is determined to be 0, that is, the audio sub-data is not suppressed; finally, the audio sub-data without suppression is output.

[0035] It can be understood that the noise suppression method of the present application first identifies whether the audio sub-data meets the spectral energy distribution conditions of piano sounds, and then compresses the specific identification position. For example, if the spectral energy distribution conditions of piano sounds are not met, no compression is performed. If the spectral energy distribution conditions of piano sounds are met, it is further determined whether drum sounds, whistles, human voices, etc. are included, and whether to compress is determined based on drum sounds, whistles, human voices, etc. On the basis of piano sound recognition, the present application detects other non-piano sounds that may affect piano sound recognition, avoids erroneous suppression caused by erroneous recognition of piano sounds, and improves the quality of audio suppression.

[0036] In some embodiments, in order to reduce the amount of data in the audio recognition process and improve the recognition efficiency, the audio sub-data may be first filtered to remove the high-frequency part of the audio sub-data that is greater than or equal to the second frequency threshold, such as filtering out the frequencies with larger frequency values ​​such as greater than or equal to 9kHz, 10kHz, etc. in the audio sub-data, thereby reducing the amount of data of the audio sub-data and obtaining the second frequency band data; and then the second frequency band data may be filtered for the second time to remove the audio data in the second frequency band data that is less than or equal to the first frequency threshold, thereby obtaining the first frequency band data. The first frequency threshold is the frequency at which the spectrum energy of the piano sound decays, such as 4kHz.

[0037] The following is an example of piano sound recognition, as well as non-piano sound recognition such as drum sounds, whistles, and human voices.

[0038] In some embodiments, Figure 3As shown, after the audio sub-data is input into the filter, a fast Fourier transform (FFT) calculation is performed, and the characteristic value of the piano sound in the audio sub-data is extracted based on the spectrum energy distribution characteristics of the audio sub-data, and the piano characteristic value is output after normalization. At the same time, the drum sound and the whistle sound are identified through the third filtering process. For example, the drum sound is identified through a 100Hz low-pass filter, and the main frequency band of the drum sound is extracted through a low-frequency filter for amplitude and energy judgment. When the energy exceeds the set threshold, it is judged as a drum sound, that is, the drum sound is identified based on the spectrum energy ratio of the frequency band less than 100Hz in the spectrum energy distribution characteristics of the audio sub-data, or, the single-frequency sound such as the whistle sound is detected through a 400Hz high-pass filter, and the interference of the low frequency on the detection in the single-frequency sound detection is eliminated by the high-pass filter, and then the zero-crossing detection and sampling count are used to obtain the time of the first half and the back of each cycle waveform to determine whether it is a whistle sound, that is, the whistle sound is identified based on the spectrum energy ratio of the frequency band less than 400Hz in the spectrum energy distribution characteristics of the audio sub-data. Exemplarily, other non-piano sounds in the audio sub-data may also be identified through filters in other frequency bands, without specific limitation.

[0039] Furthermore, if Figure 3 As shown in the figure, the audio data to be processed is sampled and framed, the characteristic value of the reflection coefficient is calculated and brought into the machine learning model to obtain the sound tube area ratio, and then the human voice characteristic value is obtained, that is, the human voice is recognized through the human voice recognition model based on the spectral energy distribution characteristics of the audio sub-data. At the same time, the characteristic values ​​of the drum, whistle and human voice are integrated and normalized to output the error pressure characteristic value.

[0040] The following is an example of different suppression processing methods for audio sub-data.

[0041] When the audio such as drums, whistles, and human voices are not recognized based on the spectral energy distribution characteristics of the audio sub-data, for example, the spectral energy distribution of the frequency band less than 4kHz in the audio sub-data is relatively uniform, and there is no distribution of a high proportion of spectral energy in the frequency band less than 100Hz in the 0 to 4kHz frequency band, or there is no distribution of a high proportion of spectral energy in the frequency band less than 400Hz in the 0 to 4kHz frequency band, or the human voice recognition model does not recognize the human voice. In this way, it can be determined that the audio sub-data is a piano sound, and speaker distortion may occur when the piano sound is played through a speaker, so the audio sub-data is suppressed to prevent speaker distortion.

[0042] When it is determined based on the audio sub-data spectrum energy distribution characteristics that the audio sub-data includes any one or more audios such as drum sounds and whistles, for example, in the audio sub-data, there is a distribution situation in which the spectrum energy of the frequency band less than 100Hz in the 0 to 4kHz frequency band accounts for a high proportion, and the spectrum energy of the frequency band greater than 100Hz is relatively low; or there is a distribution situation in which the spectrum energy of the frequency band less than 400Hz in the 0 to 4kHz frequency band accounts for a high proportion, and the spectrum energy of the frequency band greater than 400Hz is relatively low. In this way, it can be determined that the audio sub-data is mistakenly identified as piano sound because it includes drum sounds and whistles similar to the piano audio spectrum distribution characteristics, and the suppression processing method for the audio sub-data is not to perform suppression processing.

[0043] When it is determined based on the spectral energy distribution characteristics of the audio sub-data that the audio sub-data includes any one or more audios such as drum sounds, whistles, and piano sounds, for example, in the audio sub-data, the spectral energy of the frequency band less than 100Hz in the 0 to 4kHz frequency band accounts for a high proportion, but the spectral energy of the frequency band greater than 100Hz is evenly distributed and has a small difference from the spectral energy of the frequency band less than 100Hz; or in the 0 to 4kHz frequency band, the spectral energy of the frequency band less than 400Hz accounts for a high proportion, but the spectral energy of the frequency band greater than 400Hz is evenly distributed and has a small difference from the spectral energy of the frequency band less than 400Hz. It can be determined that the audio sub-data includes both drum sounds / whistles and piano sounds. Since the presence of drum sounds and whistles in the audio sub-data will disperse the spectral energy of the audio sub-data, so that the audio sub-data will not be distorted by the speaker when it is played through the speaker, the suppression processing method of the audio sub-data is not to perform suppression processing.

[0044] When a human voice is recognized by the human voice recognition model based on the spectral energy distribution characteristics of the audio sub-data, since the spectral energy distribution of the human voice is relatively uniform and will not affect the piano sound recognition, it can be determined that the audio sub-data includes human voice and piano sound. Since suppressing the human voice part will affect the playback effect of the human voice part, the suppression processing method for the audio sub-data is not to perform suppression processing.

[0045] In some embodiments, the error pressure characteristic value of the audio sub-data is determined by drum sounds, whistles, and human voices. For example, when the audio sub-data does not include human voices, but includes any one or more audios such as drum sounds and whistles, the error pressure characteristic value of the audio sub-data is 1, and the audio sub-data is not suppressed. For another example, when the audio sub-data includes human voices, or includes human voices and any one or more audios such as drum sounds and whistles, the error pressure characteristic value is determined based on the continuity of the human voice.

[0046] It can be understood that since the audio of the vocal part is usually continuous audio, for example, the vocal part can be continuous audio of 20 seconds, 30 seconds, etc., and the vocal part usually does not have discontinuous audio of 0.5 seconds, 1 second, etc. In this way, when the i-th frame audio sub-data detects the human voice, the i-th frame to the i+m-th frame audio sub-data are determined, where m is a positive integer greater than 0, and the i-th frame to the i+m-th frame audio sub-data are not suppressed. That is, when the i-th frame audio sub-data detects the human voice, the error compression characteristic value of the i-th frame to the i+m-th frame audio sub-data is 1, and the i-th frame to the i+m-th frame audio sub-data are not suppressed. For example, after the human voice is detected in the 1st second audio, the audio in the interval from 1 second to 20 seconds is not suppressed.

[0047] In some embodiments, Figure 4 As shown, the error pressure characteristic value can be graded and judged by the continuity of the human voice. For example, when the human voice is detected, the error pressure characteristic value is 0.6, and it lasts for 100 cycles (num, corresponding to the instance of the first cycle), and the audio sub-data is not suppressed. It can be understood that a cycle can be any unit such as 10 milliseconds or 1 frame. If the human voice is not detected after 100 cycles, the error pressure characteristic value is 0.4, and it lasts for 50 cycles (corresponding to the instance of the second cycle), and the audio sub-data is not suppressed; if the human voice is not detected after 50 cycles, the error pressure characteristic value and the number of continuous cycles will continue to be reduced until the error pressure characteristic value is 0, and the audio sub-data is suppressed based on the piano characteristic value. It can be understood that the second cycle can be one or more continuous cycles, and there is no specific limitation.

[0048] That is to say, when human voice is detected, the audio sub-data is first not suppressed for a period of time (the time corresponding to the first cycle), and then when human voice is not detected for a period of time (the time corresponding to the second cycle), the audio sub-data is suppressed by using the piano characteristic sound in the audio sub-data.

[0049] In some embodiments, when the audio sub-data needs to be suppressed, that is, when the audio sub-data only includes piano sounds, the volume peak of the audio sub-data is determined, and the suppression parameter of the audio sub-data is determined based on the volume peak. It can be understood that since the volume will also affect the size of the spectral energy, for example, the higher the volume, the greater the spectral energy, the greater the probability of clipping, that is, the greater the volume peak, the greater the suppression parameter, and the volume peak is proportional to the suppression parameter. Finally, based on the suppression parameter, the original spectral energy (first spectral energy) of the audio sub-data is adjusted to a second spectral energy that is less than or equal to the limiting amplitude of the speaker.

[0050] For example, Figure 4As shown, when the volume peak is greater than 0.7 and the piano eigenvalue is less than 30, it means that the piano audio spectrum energy of the audio sub-data is low and will not exceed the limited amplitude of the speaker. At this time, the suppression parameter is the volume peak, that is, the playback volume of the current audio sub-data is maintained; when the volume peak is greater than 0.8 and the piano eigenvalue is less than 300, it means that the piano audio spectrum energy of the audio sub-data is high and may exceed the limited amplitude of the speaker. At this time, the suppression parameter is the volume peak / 2, that is, the playback volume of the current audio sub-data is reduced by half to avoid clipping; when the volume peak is greater than 0.9 and the piano eigenvalue is less than 3000, it means that the piano audio spectrum energy of the audio sub-data is very high and will exceed the limited amplitude of the speaker. At this time, the suppression parameter is the volume peak / 4, that is, the playback volume of the current audio sub-data is reduced by three quarters to avoid clipping, etc.

[0051] It can be understood that the present application optimizes the judgment logic based on multiple extracted audio feature values ​​such as human voice and volume peak, and performs gradient discrimination, gradient retention time, and gradient compression ratio. The purpose of less mispressure or lower mispressure amplitude and smaller impact can be achieved, so that the compression ratio is smoother and the listening experience is better without noise. It can be understood that the present application first uses the first frequency threshold as a demarcation point to determine whether the energy distribution of the high and low spectra of the audio sub-data meets the energy distribution characteristics of the high and low spectra of the piano sound. Secondly, after determining that the audio sub-data meets the energy distribution characteristics of the high and low spectra of the piano sound, it is determined based on the spectrum energy distribution characteristics of the audio sub-data whether there are other non-piano sounds with similar spectrum energy distribution to the piano sound, thereby improving the accuracy of piano sound detection. Finally, the audio with non-piano sound is not suppressed, and only the pure piano sound is suppressed to ensure the audio quality after suppression. In addition, when there is human voice in the audio, the audio with human voice is not suppressed to ensure the audio playback effect of the human voice part and improve the overall quality of the audio.

[0052] Figure 5 According to some embodiments of the present application, a flow chart of a noise suppression method is shown. In some embodiments, Figure 5 Each step of the process shown is performed by an electronic device. To simplify the description, Figure 5 The execution entities of each step will not be described repeatedly in the steps of the process shown. Figure 5 As shown, the following steps are included:

[0053] S501: Perform frame processing on the audio data to be processed to obtain multiple frames of audio sub-data.

[0054] In some embodiments, after the audio file is input into the electronic device to obtain the audio data to be processed, the electronic device performs frame processing on the audio data to be processed to obtain multiple frames of audio sub-data. For example, the electronic device can use the time lengths of 10ms, 20ms and 30ms as the frame intervals to divide the audio data to be processed into multiple frames of 10ms / 20ms / 30ms audio sub-data, and this application does not limit this.

[0055] S502: Determine whether the audio sub-data satisfies a spectral energy distribution condition based on spectral energy distribution characteristics of the audio sub-data, wherein the spectral energy distribution condition includes: a spectral energy proportion of first frequency band data in the audio sub-data that is greater than a first frequency threshold satisfies a condition threshold, and the first frequency threshold is a target attenuation frequency of the first audio type.

[0056] In some embodiments, the electronic device can firstly perform a first filtering process on each frame of audio sub-data in the time domain through a low-pass filter to filter out the high-frequency part of each frame of audio sub-data that is greater than or equal to the second frequency threshold, reduce the data volume of the audio sub-data, and obtain the second frequency band data. Among them, the cutoff frequency of the low-pass filter can be set to a relatively large frequency such as 9kHz, 10kHz, etc., or it can also be set to the minimum frequency that can be perceived by the human ear when the speaker is playing, etc. It can be understood that the filtering of this part will not affect the data analysis of the audio sub-data, and can relatively reduce the data volume of subsequent data analysis.

[0057] Secondly, the electronic device performs a second filtering process on the second frequency band data in the time domain through a high-pass filter to filter out the audio data in the second frequency band data that is less than or equal to the first frequency threshold, and obtain the first frequency band data. The first frequency threshold is the frequency at which the spectrum energy of the piano sound attenuates, such as 4kHz, that is, the proportion of the total spectrum energy of the first frequency band data to the total spectrum energy of the second frequency band data can be used to determine whether the audio sub-data meets the frequency distribution characteristics of the piano sound. The total spectrum energy can be calculated in the time domain by Parseval's Theorem to obtain the spectrum energy in the frequency domain.

[0058] It can be understood that when the cut-off frequency of the low-pass filter is 10 kHz, the frequency band of the second frequency band data is 0 kHz to 10 kHz, and the frequency band of the first frequency band data is 4 kHz to 10 kHz.

[0059] S503: When the audio sub-data meets the spectral energy distribution condition, determine the audio type included in the audio sub-data based on the spectral energy distribution characteristics of the audio sub-data, wherein the audio type includes a first audio type and a second audio type different from the first audio type, and the first audio type includes piano sound.

[0060] In some embodiments, when the proportion of spectral energy of frequency band energy greater than 4kHz in audio sub-data is less than a conditional threshold, it can be determined that the audio sub-data satisfies the frequency distribution characteristics of lower spectral energy of piano sounds in frequency bands greater than 4kHz, that is, the audio sub-data satisfies the spectral energy distribution condition.

[0061] After the audio sub-data meets the spectrum energy distribution condition, the electronic device performs a third filtering process on the second frequency band data in the time domain through a high-pass filter or a low-pass filter to obtain frequency band data less than 100Hz, frequency band data less than 400Hz, 100Hz single frequency band and 400Hz single frequency band in the second frequency band data, so as to identify drum sounds, whistles and the like in the audio sub-data. At the same time, the audio sub-data is subjected to human voice recognition through the sound tube human voice recognition model. It can be understood that the second audio type includes at least drum sounds, whistles, human voices and the like. In other embodiments, the frequency band or frequency of the third filtering process can be selected according to the actual detection needs, without specific limitation.

[0062] S504: Determine a suppression processing method for the corresponding audio sub-data based on the audio type included in the audio sub-data.

[0063] In some embodiments, when the audio type of the audio sub-data is piano sound, the volume peak of the audio sub-data is determined, and the suppression parameter of the audio sub-data is determined based on the volume peak. It can be understood that since the volume will also affect the size of the spectral energy, for example, the higher the volume, the greater the spectral energy, and the greater the probability of clipping, that is, the greater the volume peak, the greater the suppression parameter, and the volume peak is proportional to the suppression parameter. Finally, based on the suppression parameter, the original spectral energy (first spectral energy) of the audio sub-data is adjusted to a second spectral energy that is less than or equal to the limiting amplitude of the speaker.

[0064] In other embodiments, when the audio type of the audio sub-data is drum sound or whistle sound, or when the audio type of the audio sub-data includes drum sound / whistle sound / human voice and piano sound, the audio sub-data is not suppressed. The specific judgment process is described above and will not be repeated here.

[0065] In some embodiments, since the audio of the vocal part is usually continuous audio, for example, the vocal part can be continuous audio of 20 seconds, 30 seconds, etc., and the vocal part usually does not have discontinuous audio of 0.5 seconds, 1 second, etc. In this way, when the i-th frame audio sub-data detects the human voice, the i-th frame to the i+m-th frame audio sub-data are determined, where m is a positive integer greater than 0, and the i-th frame to the i+m-th frame audio sub-data are not suppressed. For example, after the human voice is detected in the 1st second audio, the audio in the interval from the 1st second to the 20th second is not suppressed. In this way, not only can the audio balance of the vocal part be ensured and the overall audio quality be improved, but also the data processing amount can be relatively reduced and the detection efficiency can be improved.

[0066] In other embodiments, when the drum sounds, whistle sounds, etc. in the corresponding audio are also continuous audio, the above-mentioned human voice continuous audio processing method can also be used to process the drum sounds, whistle sounds, etc. Specifically, for the value of m for different types of audio, it can be set according to different audio types or different audio settings, and there is no specific limitation.

[0067] Figure 6 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 100 is shown. Figure 6 As shown, the electronic device 100 includes: a processor 101, a communication interface 103 and a memory 102. Among them, the processor 101, the communication interface 103 and the memory 102 can be connected to each other through an internal bus 104, and can also communicate through other means such as wireless transmission. In the embodiment of the present application, the connection through the bus 104 is taken as an example. The bus 104 can be a peripheral component interconnect express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a computer express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 104 can be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 104 can also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as bus 104 in the figure.

[0068] The processor 101 may be composed of at least one general-purpose processor, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 101 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 102, which enables the electronic device 100 to provide a variety of services.

[0069] The memory 102 is used to store program codes, and is controlled to be executed by the processor 101 to perform the processing steps of the noise suppression method in the above embodiment.

[0070] It should be noted that this embodiment can be implemented by a general physical server, for example, an ARM server or an X86 server, or it can be implemented by a virtual machine based on a general physical server combined with NFV technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. This application does not make any specific limitations.

[0071] The memory 102 may include a volatile memory, such as a random access memory (RAM); the memory 102 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 102 may also include a combination of the above types. The memory 102 may store program code, specifically executing Figure 5 Steps S501 to S504 in the embodiment are not described in detail here.

[0072] The communication interface 103 can be a wired interface (such as an Ethernet interface), an internal interface (such as a PCIe bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless LAN interface) for communicating with other devices or modules.

[0073] Need to explain, Figure 6 This is only one possible implementation of the embodiment of the present application. In actual applications, the electronic device 100 may also include more or fewer components, which will not be elaborated here.

[0074] In some embodiments, the present application further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on the processor 102, Figure 5 The method flow shown is realized.

[0075] In some embodiments, the present application further provides a computer program product, which, when executed on the processor 102, Figure 5 The method flow shown is realized.

[0076] In some embodiments, the present application further proposes a chip, which is formed with a processor and a data interface. The processor reads the instructions stored in the above-mentioned memory 101 through the data interface, and when the instructions are executed on the processor, Figure 5 The method flow shown is realized.

[0077] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0078] It should be noted that the units / modules mentioned in the various device embodiments of the present invention are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present invention. In addition, in order to highlight the innovative part of the present invention, the above-mentioned device embodiments of the present invention do not introduce units / modules that are not closely related to solving the technical problems proposed by the present invention, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0079] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0080] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention.

Claims

1. A noise suppression method, applied to electronic equipment, characterized in that: include: Perform frame processing on the audio data to be processed to obtain multiple frames of audio sub-data; Based on the spectral energy distribution characteristics of the audio sub-data, determining whether the audio sub-data meets the spectral energy distribution condition, The spectrum energy distribution condition includes: the spectrum energy ratio of the first frequency band data greater than the first frequency threshold in the audio sub-data satisfies the condition threshold, and the first frequency threshold is the target attenuation frequency of the first audio type; When the audio sub-data satisfies a spectrum energy distribution condition, determining the audio type included in the audio sub-data based on the spectrum energy distribution characteristics of the audio sub-data, wherein the audio type includes the first audio type and a second audio type different from the first audio type, and the first audio type includes piano sound; Based on the audio type included in the audio sub-data, a suppression processing method corresponding to the audio sub-data is determined.

2. The method according to claim 1, characterized in that The second audio type includes at least one of drum sounds, whistle sounds, and human voices.

3. The method according to claim 2, characterized in that The drum sound and / or the whistle sound is determined based on a filter, and the human voice is determined based on a human voice recognition model.

4. The method according to claim 2, characterized in that: The determining, based on the audio type included in the audio sub-data, a suppression processing method corresponding to the audio sub-data includes: When the audio type of the audio sub-data includes the first audio type but does not include the second audio type, suppressing the audio sub-data; When the audio type of the audio sub-data includes the first audio type and the second audio type, no suppression processing is performed on the audio sub-data; When the audio type of the audio sub-data includes the second audio type but does not include the first audio type, no suppression processing is performed on the audio sub-data.

5. The method according to claim 4, characterized in that When the audio type of the audio sub-data includes the first audio type, suppressing the audio sub-data comprises: Determining a volume peak value of the audio sub-data; Determining a suppression parameter of the audio sub-data based on the volume peak value, wherein the volume peak value is proportional to the suppression parameter; The audio sub-data is subjected to suppression processing based on the suppression parameter.

6. The method according to claim 5, characterized in that The suppression process comprises: Determining a first spectrum energy of the audio sub-data; The first spectrum energy is adjusted to a second spectrum energy, wherein the second spectrum energy is less than or equal to a limiting amplitude of a speaker.

7. The method according to claim 2, characterized in that The method further comprises: When the audio type of the audio sub-data of the i-th frame includes the first audio type and the second audio type; or, When the audio type of the audio sub-data of the i-th frame includes the second audio type; Determine the audio sub-data of the i-th frame to the i+m-th frame, where m is a positive integer greater than 0; The audio sub-data from the i-th frame to the i+m-th frame are not suppressed.

8. The method according to claim 2, characterized in that: The method further comprises: When the audio type of the audio sub-data includes human voice, the audio data of the first period corresponding to the audio sub-data is not suppressed; When the audio type of the audio sub-data after the first period does not include human voice, the audio data of a second period after the first period is not suppressed, wherein the time of the second period is shorter than the time of the first period.

9. The method according to any one of claims 1 to 8, characterized in that: The determining, based on the spectrum energy distribution characteristics of the audio sub-data, whether the audio sub-data satisfies the spectrum energy distribution condition comprises: Determine second frequency band data in the audio sub-data, wherein the second frequency band data is data in the audio sub-data that is less than a second frequency threshold, and the first frequency band data is data in the second frequency band data that is greater than the first frequency threshold; Determine the spectrum energy ratio of the total spectrum energy of the first frequency band data to the total spectrum energy of the second frequency band data; When the spectrum energy proportion is less than the conditional threshold, the audio sub-data meets the spectrum energy distribution condition.

10. The method according to any one of claims 1 to 8, characterized in that: The determining, based on the audio type included in the audio sub-data, a suppression processing method corresponding to the audio sub-data further includes: After the audio sub-data is processed based on the suppression processing method, the processed audio sub-data is output.

11. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, which, when executed on an electronic device, enable the electronic device to implement the method according to any one of claims 1 to 10.

12. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, configured to execute instructions stored in the memory to implement the method according to any one of claims 1 to 10.

13. A chip, characterized in that: The chip comprises a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method as claimed in any one of claims 1 to 10.

Citation Information

Cited By

  • Audio processing method, audio processing device and electronic equipment

    CN120600050A