Acoustic device and sound processing method thereof

By performing time-frequency conversion on the sound signal and calculating the probability of impact noise, suppressing the impact noise and smoothing it when necessary, the problem of impact noise affecting user comfort in the real-time public speaking system is solved, and the stability of the sound signal and sound quality assurance are achieved. Trueness.

CN115240700BActive Publication Date: 2024-08-23AUSTAR HEARING SCI & TECH XIAMEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210950503.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2024-08-23
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

Existing real-time amplification systems affect user comfort when dealing with impact noise, and are difficult to effectively suppress long-term impact noise, resulting in unstable sound signals.

Method used

By obtaining the sound signal for time-frequency conversion, calculate the probability of impact noise and suppress the signal according to the suppression amplitude to ensure frequency point amplitude adjustment, make the sound signal smoother, suppress impact noise, and perform smooth suppression when necessary to avoid drastic changes. Especially for long-term impact noise, the suppression amplitude of the previous frame is used as the suppression amplitude of the current frame.

Benefits of technology

Effectively suppress impact noise, improve the comfort and clarity of sound signals, ensure the fidelity of sound quality, and avoid excessive changes in sound signals during impact noise processing, ensuring effective suppression of long-term impact noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115240700B
    Figure CN115240700B
Patent Text Reader

Abstract

The present invention provides an acoustic device and a sound processing method, the sound processing method comprising obtaining a sound signal of a set frame length; performing time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed; calculating the probability of impact noise of the frame to be processed; obtaining the suppression amplitude of each frequency point of the frame to be processed; and suppressing the sound signal according to the suppression amplitude. The sound processing method of the present invention can adjust the amplitude of each frequency point of the sound signal of the frame to be processed, thereby suppressing the sudden impact noise, making the sound signal tend to be stable as a whole, ensuring the comfort of the sound, and at the same time ensuring the clarity of the speech sound. In addition, because only the amplitude of the frequency point is adjusted, the fidelity of the sound quality can be better guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to acoustic equipment, and in particular to an acoustic equipment and a sound processing method thereof. Background Art

[0002] Nowadays, real-time sound reinforcement systems consisting of microphones, amplifiers, and speakers are widely used in daily life. For example, hearing aids are a common type of sound reinforcement system. In real-time sound reinforcement systems, sudden impact noises, such as clapping and door slamming, usually have higher sound pressure levels than speech. If the impact noise is amplified at the same time, it will greatly affect the user's comfort. Summary of the invention

[0003] An object of the present invention is to provide an acoustic device and a sound processing method thereof that can solve any of the above problems.

[0004] A further object of the present invention is to make the processed sound signal smoother.

[0005] Another further object of the present invention is to ensure the suppression effect on long-term impact noise.

[0006] In particular, the present invention provides a sound processing method for an acoustic device, comprising:

[0007] Get the sound signal of set frame length;

[0008] Performing time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed;

[0009] Calculating the impulse noise probability of the frame to be processed;

[0010] Obtaining the suppression amplitude of each frequency point of the frame to be processed;

[0011] The sound signal is suppressed according to the suppression amplitude.

[0012] Optionally, the step of performing time-frequency conversion on the sound signal includes:

[0013] According to the formula: Performing short-time Fourier transform on the sound signal;

[0014] Calculate the amplitude of each frequency point according to the formula: Amp(n, ω) = 20·lg(|X(n, ω)|);

[0015] The step of calculating the impulse noise probability of the frame to be processed comprises:

[0016] According to the formula: Calculating the impulse noise probability of the frame to be processed;

[0017] Among them, X(n, ω) is the corresponding spectral component; k is the corresponding frame length; x(m) is the input signal; w(m) is the window function; n is the order number of the frame; Amp(n, ω) is the amplitude of each frequency point; A low is the minimum value of the preset amplitude range; A high is the maximum value of the preset amplitude range; P(n) is the probability of range normalization from 0 to 1.

[0018] Optionally, the step of obtaining the suppression amplitude of each frequency point of the frame to be processed includes:

[0019] The suppression amplitude of each frequency point of the frame to be processed is calculated according to the formula;

[0020] The formula is:

[0021] G(n,w)=min[max(Amp(n,ω)-Amp(n-1,ω)-Debounce,0),Limit_G]·P(n);

[0022] Wherein, G(n, ω) is the suppression amplitude; Debounce is the preset amplitude change removal jitter; Limit_G is the maximum value of the frequency point amplitude that is limited to be suppressed.

[0023] Optionally, the step of obtaining the suppression amplitude of each frequency point of the frame to be processed further includes:

[0024] Determine whether the frame to be processed needs to be smoothed and suppressed:

[0025] If yes, taking the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed;

[0026] If not, the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula is executed.

[0027] Optionally, the step of determining whether the frame to be processed needs to be smoothly suppressed includes:

[0028] Determine whether the impulse noise probability of the frame to be processed is 0:

[0029] If yes, determine whether there is a suppression amplitude in the previous frame of the frame to be processed. If yes, perform the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed. If no, perform the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula;

[0030] If not, determine whether the impulse noise probability of the previous frame of the frame to be processed is 0. If so, execute the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed.

[0031] Optionally, if the impulse noise probability of the frame to be processed is greater than 0 and the impulse noise probability of the previous frame of the frame to be processed is greater than 0, before executing the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed, the step further includes:

[0032] Determine whether the frame energy of the frame to be processed is greater than a preset threshold value. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if so, determine whether the frame to be processed belongs to long-term impulse noise. If so, take the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if not, take the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed and the maximum value of the suppression amplitude of the frame to be processed obtained according to the calculation as the suppression amplitude.

[0033] Optionally, the step of determining whether the frame to be processed belongs to long-term impulse noise includes:

[0034] Determine whether the number of consecutive frames whose frame energy is greater than a preset threshold is greater than a preset value. If so, execute the step of taking the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed and the maximum value of the suppression amplitude obtained according to the calculation as the suppression amplitude.

[0035] Optionally, the step of suppressing the sound signal according to the suppression amplitude includes:

[0036] Make the retained signal amplitude of each frequency point after suppression greater than the steady-state ambient sound amplitude.

[0037] Optionally, before the step of calculating the impulse noise probability of the frame to be processed, the step includes:

[0038] It is determined whether the frame to be processed is the first frame. If so, the sound signal of the frame to be processed is directly output.

[0039] In particular, the present invention provides an acoustic device comprising:

[0040] a microphone configured to convert acquired sound into real-time audio data;

[0041] an amplifier configured to amplify the real-time audio data in real time;

[0042] a speaker configured to convert the amplified real-time audio data into output sound;

[0043] A signal processor comprises a memory, a processor and a machine executable program stored in the memory and running on the processor, and the processor can implement the sound processing method of the acoustic device in any of the above items when executing the machine executable program.

[0044] The acoustic device and sound processing method of the present invention obtain a sound signal of a set frame length as a frame to be processed, perform time-frequency conversion on the sound signal, and obtain the amplitude of each frequency point of the frame to be processed; calculate the probability of impact noise of the frame to be processed; obtain the suppression amplitude of each frequency point of the frame to be processed according to the probability of impact noise; and suppress the sound signal according to the suppression amplitude. In other words, the amplitude of each frequency point of the sound signal of the frame to be processed can be adjusted, thereby suppressing the sudden impact noise, making the sound signal tend to be stable as a whole, ensuring the comfort of the sound, and at the same time ensuring the clarity of the speech sound. In addition, because only the amplitude of the frequency point is adjusted, the fidelity of the sound quality can be better guaranteed.

[0045] Furthermore, the acoustic device and the sound processing method of the present invention determine whether the frame to be processed needs to be smoothly suppressed. When the frame to be processed needs to be smoothly suppressed, the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed is taken as the suppression amplitude of each frequency point of the frame to be processed. Therefore, on the basis of being able to suppress the impact noise, it is possible to avoid excessive changes between the suppressed multi-frame sound signals, thereby helping to ensure the comfort of the sound signal.

[0046] Furthermore, when the frame to be processed is in the presence of long-term impulse noise, the suppression amplitude of each frequency point of the previous frame of the frame to be processed is taken as the suppression amplitude of each frequency point of the frame to be processed, thereby ensuring the suppression effect of the long-term impulse noise.

[0047] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0049] Figure 1 is a schematic block diagram of an acoustic device according to an embodiment of the present invention;

[0050] Figure 2 is a schematic flow chart of a sound processing method of an acoustic device according to an embodiment of the present invention;

[0051] Figure 3 is a schematic flow chart of a sound processing method of an acoustic device according to another embodiment of the present invention;

[0052] Figure 4 is a schematic flow chart of a sound processing method of an acoustic device according to yet another embodiment of the present invention;

[0053] Figure 5 is a schematic flow chart of a sound processing method of an acoustic device according to yet another embodiment of the present invention;

[0054] Figure 6 is a schematic flow chart of determining whether smoothing suppression is required in a sound processing method of an acoustic device according to an embodiment of the present invention;

[0055] Figure 7 is a schematic flow chart of a sound processing method of an acoustic device according to yet another embodiment of the present invention. DETAILED DESCRIPTION

[0056] It should be understood by those skilled in the art that the embodiments described below are only some embodiments of the present invention, rather than all embodiments of the present invention, and these embodiments are intended to explain the technical principles of the present invention, rather than to limit the protection scope of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present invention.

[0057] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.

[0058] like Figure 1As shown, in one embodiment, the acoustic device 10 includes a microphone 110, an amplifier 120, a speaker 130 and a signal processor 140. The microphone 110 is configured to convert the acquired sound into real-time audio data. The amplifier 120 is configured to amplify the real-time audio data in real time. The speaker 130 is configured to convert the amplified real-time audio data into output sound. The signal processor 140 includes a memory, a processor and a machine executable program stored in the memory and running on the processor, and the processor implements the sound processing method in the following embodiment when executing the machine executable program.

[0059] like Figure 2 As shown, in one embodiment, the sound processing method includes:

[0060] Step S202, obtaining a sound signal with a set frame length, wherein the frame length can be preset.

[0061] Step S204: performing time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed.

[0062] The specific method is as follows: firstly, the sound signal is subjected to a short-time Fourier transform according to formula (1):

[0063]

[0064] In formula (1), X(n,ω) is the corresponding spectral component; k is the corresponding frame length; x(m) is the input signal; w(m) is the window function; and n is the ordinal number of the frame.

[0065] The obtained spectral components are processed according to formula (2) to obtain the amplitude of each frequency point:

[0066] Amp(n,ω)=20·lg(|X(n,ω)|) (2)

[0067] In formula (2), Amp(n,ω) is the amplitude of each frequency point.

[0068] Step S206, calculating the impulse noise probability of the frame to be processed.

[0069] The specific calculation formula is:

[0070]

[0071] In formula (3), A low is the minimum value of the preset amplitude range; A high is the maximum value of the preset amplitude range; P(n) is the probability of range normalization from 0 to 1.

[0072] Step S208, obtaining the suppression amplitude of each frequency point of the frame to be processed.

[0073] Step S210, suppress the sound signal according to the suppression amplitude. Specifically, suppress the amplitude of each frequency point obtained by formula (2) according to the calculated suppression amplitude of each frequency point. Then output the suppressed amplitude of each frequency point as the final amplitude of the frame to be processed.

[0074] In the scheme of this embodiment, the probability of the impact noise of the frame to be processed is calculated, and then the suppression amplitude of each frequency point of the frame to be processed is obtained according to the probability of the impact noise, and then the sound signal is suppressed according to the suppression amplitude. In other words, the amplitude of each frequency point of the sound signal of the frame to be processed can be adjusted, so as to suppress the sudden impact noise, so that the sound signal tends to be stable as a whole, ensuring the comfort of the sound and the clarity of the speech sound. In addition, because only the amplitude of the frequency point is adjusted, the fidelity of the sound quality can be better guaranteed.

[0075] like Figure 3 As shown, in one embodiment, the sound processing method includes:

[0076] Step S302, obtaining a sound signal with a set frame length.

[0077] Step S304: perform time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed.

[0078] Step S306, determining whether the frame to be processed is the first frame, if so, directly outputting the sound signal of the frame to be processed. If not, executing step S308.

[0079] Step S308, calculating the impulse noise probability of the frame to be processed.

[0080] Step S310, obtaining the suppression amplitude of each frequency point of the frame to be processed.

[0081] Step S312: suppress the sound signal according to the suppression amplitude.

[0082] Specifically, if the frame to be processed is the first frame of sound signal, the amplitude of each frequency point calculated is directly used as the output amplitude to output the sound signal of the frame to be processed. If the frame to be processed is a frame after the first frame, after obtaining the suppression amplitude of each frequency point, the initial amplitude of each frequency point is suppressed by using the suppression amplitude. Then, the suppressed amplitude of each frequency point is output as the output amplitude of the frame to be processed.

[0083] like Figure 4 As shown, in one embodiment, the sound processing method includes:

[0084] Step S402, obtaining a sound signal with a set frame length.

[0085] Step S404: performing time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed.

[0086] Step S406, determining whether the frame to be processed is the first frame, if so, directly outputting the sound signal of the frame to be processed. If not, executing step S408.

[0087] Step S408, calculating the impulse noise probability of the frame to be processed.

[0088] Step S410, obtaining the suppression amplitude of each frequency point of the frame to be processed according to the formula.

[0089] Specifically, the calculation formula is:

[0090] G(n,w)=min[max(Amp(n,ω)-Amp(n-1,ω)-Debounce,0),Limit_G]·P(n) (4)

[0091] In formula (4), G(n, ω) is the suppression amplitude; Debounce is the preset amplitude change jitter removal; Limit_G is the maximum value of the frequency point amplitude that is limited to be suppressed. The value of Limit_G can be set as needed. For people or scenes who do not want to suppress the sound too much (for example, for some people or in some scenes, it doesn't matter if the applause is louder), the user can set the value of Limit_G to ensure that the suppression amplitude is not too large. For users who do not have the above requirements, they can set the cancellation of the influence of the Limit_G value (set Limit_G to the maximum value). In other words, the formula for calculating the suppression amplitude of each frequency point of the frame to be processed can also be formula (5), so as to meet the usage needs of different users.

[0092] G(n,ω)=max(Amp(n,ω)-Amp(n-1,ω)-Debounce,0)·P(n) (5)

[0093] Step S412: suppress the sound signal according to the suppression amplitude.

[0094] Specifically, the acoustic device receives a sound signal of a preset frame length and starts processing the sound signal of this frame. This frame is the frame to be processed. After time-frequency conversion, the amplitude values ​​corresponding to multiple frequency points of the frame to be processed can be obtained. When the frame to be processed is the first frame signal received, the amplitude values ​​of each frequency point are not processed.

[0095] Starting from the second frame, each frame to be processed begins to calculate the probability of impulse noise and the suppression amplitude of each frequency point. Specifically, the probability of impulse noise obtained according to formula (3) is a probability normalized from 0 to 1, so the probability of impulse noise of the frame to be processed is 0 or greater than 0. If the probability of impulse noise of the frame to be processed is 0, it can be known from formula (4) that the suppression amplitude of the frame to be processed is 0, that is, the amplitude value of each frequency point of the sound signal is not suppressed and is directly output. If the probability of impulse noise of the frame to be processed is not 0, that is, it is greater than 0, the suppression amplitude of each frequency point (i.e. G(n, ω)) can be obtained, and the original amplitude value of each frequency point of the frame to be processed is suppressed by the suppression amplitude, and then the suppressed amplitude of each frequency point is output as the output amplitude of the frame to be processed.

[0096] like Figure 5 As shown, in one embodiment, the step of obtaining the suppression amplitude of each frequency point of the frame to be processed includes: determining whether the frame to be processed needs to be smoothly suppressed: if so, taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if not, executing the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula. Specifically, the sound processing method of this embodiment includes:

[0097] Step S502, obtaining a sound signal with a set frame length.

[0098] Step S504: perform time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed.

[0099] Step S506, determining whether the frame to be processed is the first frame, if so, directly outputting the sound signal of the frame to be processed. If not, executing step S508.

[0100] Step S508: Calculate the impulse noise probability of the frame to be processed.

[0101] Step S510, determining whether the frame to be processed needs to be smoothed and suppressed. If yes, executing step S512, if not, executing step S514.

[0102] Step S512, taking the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed.

[0103] Step S514, calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula.

[0104] Step S516, suppressing the sound signal according to the suppression amplitude.

[0105] Reference Figure 6 As shown, specifically, step S510, determining whether the frame to be processed needs to be smoothed and suppressed includes:

[0106] Step S602, determine whether the impulse noise probability of the frame to be processed is 0. If yes, execute step S604. If not, execute step S606.

[0107] Step S604, determining whether there is a suppression amplitude in the previous frame of the frame to be processed, if so, executing step S608, if not, executing step S610.

[0108] Step S606 , determining whether the impulse noise probability of the frame before the frame to be processed is 0, if so, executing step S610 , if not, executing step S608 .

[0109] Step S608, taking the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed.

[0110] Step S610, obtaining the suppression amplitude of each frequency point of the frame to be processed according to the formula.

[0111] Specifically, the acoustic device receives a sound signal of a preset frame length and starts processing the sound signal of this frame. This frame is the frame to be processed. After time-frequency conversion, the amplitude values ​​corresponding to multiple frequency points of the frame to be processed can be obtained. When the frame to be processed is the first frame signal received, the amplitude values ​​of each frequency point are not processed. Therefore, the probability of impulse noise of the first frame is taken as 0 and there is no suppression amplitude.

[0112] Starting from the second frame, each frame to be processed begins to calculate the probability of impulse noise and the suppression amplitude of each frequency point. For example, the probability of impulse noise in the second frame is 0, because there is no suppression amplitude in the first frame, then the suppression amplitude of each frequency point in the second frame is calculated according to the formula, because the probability of impulse noise is 0, then the suppression amplitude of each frequency point in the second frame is also 0, that is, there is no suppression amplitude.

[0113] Next, the probability of impulse noise in the third frame is 0. Since there is no suppression amplitude in the second frame, the suppression amplitude of each frequency point in the third frame is calculated according to the formula. Since the probability of impulse noise is 0, the suppression amplitude of each frequency point in the third frame is also 0.

[0114] Then the impulse noise probability of each frame is 0 until the nth frame, whose impulse noise probability is not 0, that is, greater than 0. Because the impulse noise probability of the previous frame (n-1th frame) is 0, the suppression amplitude of each frequency point is calculated according to the formula for the nth frame. The impulse noise probability of the n+1th frame is still greater than 0, and the impulse noise probability of the nth frame is also greater than 0, so the n+1th frame uses the attenuated value of the suppression amplitude of each frequency point of the nth frame as the suppression amplitude of this frame.

[0115] Then, until the n+10th frame, the probability of impulse noise of the frame to be processed is 0, because the n+9th frame has a suppression amplitude. Then the n+10th frame uses the attenuated value of the suppression amplitude of each frequency point in the n+9th frame as the suppression amplitude of this frame. Then, the probability of impulse noise of the n+11th frame is 0, because the n+10th frame has a suppression amplitude, so the n+11th frame uses the attenuated value of the suppression amplitude of each frequency point in the n+10th frame as the suppression amplitude of this frame.

[0116] In the scheme of the present implementation, by judging whether the frame to be processed needs to be smoothly suppressed, when the frame to be processed needs to be smoothly suppressed, the attenuation value of the suppression amplitude of each frequency point of the frame previous to the frame to be processed is taken as the suppression amplitude of each frequency point of the frame to be processed. Therefore, on the basis of being able to suppress the impact noise, it is possible to avoid excessively drastic changes between the suppressed multi-frame sound signals, which helps to ensure the comfort of the sound signal.

[0117] It should be noted that the attenuation value of the suppression amplitude of each frequency point in the previous frame can be obtained by subtracting a fixed value from the suppression amplitude of each frequency point in the previous frame as the attenuation value. For example, the fixed value is 2dB. Assuming that the nth frame needs to be smoothly suppressed, and the suppression amplitude of a certain frequency point in the n-1th frame is 10dB, then the suppression amplitude of the corresponding frequency point in the nth frame is 8dB. In this attenuation method, it can be until the attenuation value is less than or equal to 0, or it can be directly taken as 0 when the attenuation value is less than the preset value.

[0118] Alternatively, the attenuation value of the suppression amplitude of each frequency point of the previous frame can be taken as the percentage value of the suppression amplitude of each frequency point of the previous frame as the attenuation value. For example, if the percentage is 90%, and the nth frame needs to be smoothly suppressed, and the suppression amplitude of a certain frequency point of the n-1th frame is 10dB, then the suppression amplitude of the corresponding frequency point of the nth frame is 9dB. In this attenuation mode, the suppression amplitude of the frame to be processed is directly taken as 0 until the attenuation value is less than or equal to the preset value.

[0119] like Figure 7 As shown, in one embodiment, if the impulse noise probability of the previous frame of the frame to be processed is greater than 0 and the impulse noise probability of the previous frame of the frame to be processed is greater than 0, before executing the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed, the step also includes:

[0120] Determine whether the frame energy of the frame to be processed is greater than a preset threshold value. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if so, determine whether the frame to be processed belongs to long-term impulse noise. If so, take the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if not, take the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed and the maximum value of the suppression amplitude obtained according to the calculation as the suppression amplitude.

[0121] The specific steps are as follows:

[0122] Step S702, obtaining a sound signal with a set frame length.

[0123] Step S704: perform time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed.

[0124] Step S706, determining whether the frame to be processed is the first frame, if so, directly outputting the sound signal of the frame to be processed. If not, executing step S708.

[0125] Step S708, calculating the impulse noise probability of the frame to be processed.

[0126] Step S710, determining whether the impulse noise probability of the frame to be processed is 0. If yes, executing step S712. If not, executing step S714.

[0127] Step S712, determine whether the previous frame of the frame to be processed has a suppression amplitude. If so, execute step S720, if not, execute step S722.

[0128] Step S714, determining whether the impulse noise probability of the frame before the frame to be processed is 0. If so, executing step S722, if not, executing step S716.

[0129] Step S716, determining whether the frame energy of the frame to be processed is greater than a preset threshold. If so, executing step S718, if not, executing step S720.

[0130] Step S718, determine whether the frame to be processed is a long-term impulse noise. If yes, execute step S724, if not, execute step S726.

[0131] Specifically, the step of determining whether the frame to be processed belongs to long-term impulse noise includes:

[0132] It is determined whether the number of consecutive frames whose frame energy is greater than the preset threshold is greater than the preset value. If so, it is determined that the frame to be processed belongs to long-term impulse noise, and step S724 is executed. If not, it is determined that the frame to be processed does not belong to long-term impulse noise, and step S726 is executed.

[0133] Step S720, taking the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed.

[0134] Step S722, calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula.

[0135] Step S724, taking the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed. Specifically, the suppression amplitude of each frequency point of the previous frame is directly taken as the suppression amplitude of each frequency point of the frame to be processed.

[0136] Step S726, taking the maximum value of the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed and the suppression amplitude of the frame to be processed obtained according to calculation as the suppression amplitude.

[0137] Step S728, suppressing the sound signal according to the suppression amplitude.

[0138] The method for calculating the signal energy value is a prior art and will not be described in detail here.

[0139] Specifically, the acoustic device receives a sound signal of a preset frame length and starts processing the sound signal of this frame. This frame is the frame to be processed. After time-frequency conversion, the amplitude values ​​corresponding to multiple frequency points of the frame to be processed can be obtained. When the frame to be processed is the first frame signal received, the amplitude values ​​of each frequency point are not processed. Therefore, the probability of impulse noise of the first frame is taken as 0 and there is no suppression amplitude.

[0140] Starting from the second frame, each frame to be processed begins to calculate the probability of impulse noise and the suppression amplitude of each frequency point. For example, the probability of impulse noise in the second frame is 0, because there is no suppression amplitude in the first frame, then the suppression amplitude of each frequency point in the second frame is calculated according to the formula, because the probability of impulse noise is 0, then the suppression amplitude of each frequency point in the second frame is also 0, that is, there is no suppression amplitude.

[0141] Next, the probability of impulse noise in the third frame is 0. Since there is no suppression amplitude in the second frame, the suppression amplitude of each frequency point in the third frame is calculated according to the formula. Since the probability of impulse noise is 0, the suppression amplitude of each frequency point in the third frame is also 0.

[0142] Then the impulse noise probability of each frame is 0 until the nth frame, whose impulse noise probability is not 0, that is, greater than 0. Because the impulse noise probability of the previous frame (n-1th frame) is 0, the suppression amplitude of each frequency point is calculated according to the formula for the nth frame. The impulse noise probability of the n+1th frame is still greater than 0, and the impulse noise probability of the nth frame is also greater than 0. At this time, it is necessary to determine whether the frame energy of the n+1th frame is greater than the preset threshold.

[0143] If the frame energy of the n+1th frame is less than the preset threshold, the n+1th frame uses the attenuated value of the suppression amplitude of each frequency point of the nth frame as the suppression amplitude of this frame. If the frame energy of the n+1th frame is greater than the preset threshold, it is determined whether the n+1th frame belongs to long-term impulse noise. For example, the preset value is 10. Because the number of frames with frame energy greater than the preset threshold by the n+1th frame is 2, it is determined that the n+1th frame does not belong to long-term impulse noise, and the attenuation value of the suppression amplitude of each frequency point of the nth frame and the maximum value of the suppression amplitude of the n+1th frame obtained by calculation are taken as the suppression amplitude of the n+1th frame.

[0144] Then, until the n+11th frame, the probability of impulse noise in each frame is not 0 and is greater than the preset threshold. At this time, the number of consecutive frames whose frame energy is greater than the preset threshold is 11 frames, and the n+11th frame is determined to be a long-term impulse noise. Then the n+11th frame uses the suppression amplitude of each frequency point of the n+10th frame as the suppression amplitude of this frame.

[0145] In the scheme of this implementation, by judging whether the frame energy of the frame to be processed is greater than the threshold and judging whether it is a long-term impulse noise, on the one hand, when the impulse noise overlaps, insufficient suppression of the subsequent impulse noise can be avoided. On the other hand, by taking the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed when the frame to be processed is in the long-term impulse noise, the suppression effect of the long-term impulse noise can be guaranteed.

[0146] Preferably, in one embodiment, the step of suppressing the sound signal according to the suppression amplitude includes: making the amplitude of the retained signal after the amplitude of each frequency point is suppressed greater than the amplitude of the steady-state ambient sound, thereby ensuring the hearing experience.

[0147] At this point, those skilled in the art should recognize that, although multiple exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the content disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and recognized as covering all these other variations or modifications.

Claims

1. A sound processing method for an acoustic device, comprising: Get the sound signal of set frame length; Performing time-frequency conversion on the sound signal to obtain the amplitude of each frequency point of the frame to be processed; Calculating the impulse noise probability of the frame to be processed; Obtaining the suppression amplitude of each frequency point of the frame to be processed; Suppressing the sound signal according to the suppression amplitude; The step of performing time-frequency conversion on the sound signal includes: According to the formula: Performing short-time Fourier transform on the sound signal; Calculate the amplitude of each frequency point according to the formula: Amp(n, ω) = 20·lg(|X(n, ω)|); The step of calculating the impulse noise probability of the frame to be processed comprises: According to the formula: Calculating the impulse noise probability of the frame to be processed; Among them, X(n,ω) is the corresponding spectral component; k is the corresponding frame length; x(m) is the input signal; w(m) is the window function; n is the order number of the frame; Amp(n,ω) is the amplitude of each frequency point; A low is the minimum value of the preset amplitude range; A high is the maximum value of the preset amplitude range; P(n) is the probability of the range normalized from 0 to 1; The step of obtaining the suppression amplitude of each frequency point of the frame to be processed includes: The suppression amplitude of each frequency point of the frame to be processed is obtained by calculation according to the formula; The formula is: G(n,w)=min[max(Amp(n,ω)-Amp(n-1,ω)-Debounce,0),Limit_G]·P(n); Where G(n,ω) is the suppression amplitude; Debounce is the preset amplitude change jitter removal; Limit_G is the maximum value of the frequency point amplitude that is limited.

2. The sound processing method of an acoustic device according to claim 1, wherein: The step of obtaining the suppression amplitude of each frequency point of the frame to be processed also includes: Determine whether the frame to be processed needs to be smoothed and suppressed: If yes, taking the attenuation value of the suppression amplitude of each frequency point of the frame before the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; If not, the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula is executed.

3. The sound processing method of an acoustic device according to claim 2, wherein: The step of determining whether the frame to be processed needs to be smoothly suppressed comprises: Determine whether the impulse noise probability of the frame to be processed is 0: If yes, determine whether there is a suppression amplitude in the previous frame of the frame to be processed. If yes, perform the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed. If no, perform the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula; If not, determine whether the impulse noise probability of the previous frame of the frame to be processed is 0. If so, execute the step of calculating the suppression amplitude of each frequency point of the frame to be processed according to the formula. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed.

4. The sound processing method for an acoustic device according to claim 3, wherein: If the impulse noise probability of the frame to be processed is greater than 0 and the impulse noise probability of the previous frame of the frame to be processed is greater than 0, before executing the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed, the step further includes: Determine whether the frame energy of the frame to be processed is greater than a preset threshold value. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if so, determine whether the frame to be processed belongs to long-term impulse noise. If so, take the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed; if not, take the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed and the maximum value of the suppression amplitude of the frame to be processed obtained according to the calculation as the suppression amplitude.

5. The sound processing method for an acoustic device according to claim 4, wherein: The step of determining whether the frame to be processed belongs to long-term impulse noise includes: Determine whether the number of consecutive frames whose frame energy is greater than a preset threshold is greater than a preset value. If so, execute the step of taking the suppression amplitude of each frequency point of the previous frame of the frame to be processed as the suppression amplitude of each frequency point of the frame to be processed. If not, execute the step of taking the attenuation value of the suppression amplitude of each frequency point of the previous frame of the frame to be processed and the maximum value of the suppression amplitude obtained according to the calculation as the suppression amplitude.

6. The sound processing method of an acoustic device according to claim 1, wherein: The step of suppressing the sound signal according to the suppression amplitude comprises: Make the retained signal amplitude of each frequency point after suppression greater than the steady-state ambient sound amplitude.

7. The sound processing method for an acoustic device according to claim 1, wherein: The step of calculating the impulse noise probability of the frame to be processed includes: It is determined whether the frame to be processed is the first frame. If so, the sound signal of the frame to be processed is directly output.

8. An acoustic device comprising: a microphone configured to convert acquired sound into real-time audio data; an amplifier configured to amplify the real-time audio data in real time; a speaker configured to convert the amplified real-time audio data into output sound; A signal processor comprises a memory, a processor and a machine executable program stored in the memory and running on the processor, and the processor implements the sound processing method of the acoustic device according to any one of claims 1 to 7 when executing the machine executable program.