Audio noise detection method, computer device and computer program product
By calculating the frequency domain energy change in the audio frame and dynamically adjusting the threshold based on the audio frame type, the problem of low noise recognition accuracy in audio files is solved, and efficient and accurate noise signal recognition is achieved.
Patent Information
- Application Number
- CN202210284034.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-03-22
AI Technical Summary
In the prior art, the accuracy of noise recognition in audio files is low, and it is easy to have problems of false detection or missed detection.
By obtaining the frequency domain energy information of the audio frame, calculating the frequency domain energy change between the target audio frame and the adjacent audio frame, and dynamically adjusting the target change threshold according to the audio frame type, the noise signal is identified.
The accuracy of audio noise recognition is improved, false detection and missed detection are avoided, and efficient noise signal recognition is achieved.
Smart Images

Figure CN114678038B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio technology, and in particular to an audio noise detection method, a computer device, and a computer program product. Background Art
[0002] With the development of computer technology and the increasing popularity of music and chat applications, users are increasingly recording audio. Due to user recording habits, recorded audio files are prone to noise. For example, rubbing headphones or recording microphones generates noise (also known as click), which can distort the human voice signal.
[0003] Related technologies can identify noise in audio by comparing the amplitude or energy of the audio time-domain signal with a threshold to optimize audio file quality. However, this approach often results in false or missed detections, resulting in low noise identification accuracy. Summary of the Invention
[0004] Based on this, it is necessary to provide an audio noise detection method, computer device and computer program product that can improve the accuracy of noise recognition in response to the above technical problems.
[0005] In a first aspect, the present application provides an audio noise detection method. The method comprises:
[0006] Acquire multiple audio frames of the audio signal to be detected;
[0007] determining frequency domain energy information of each audio frame in the plurality of audio frames;
[0008] obtaining, based on frequency domain energy information of the audio frame, a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame among the multiple audio frames, where the target audio frame is an audio frame among the multiple audio frames;
[0009] Obtaining a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on an audio frame type of the target audio frame;
[0010] If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
[0011] In one embodiment, the step of obtaining a target change threshold corresponding to the target audio frame includes:
[0012] Get the audio frame type of the target audio frame;
[0013] If the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame, increasing the preset initial energy change threshold to obtain a target energy change threshold; wherein the boundary audio frame is an audio frame at a switching boundary between a human voice audio frame and a non-human voice audio frame in the multiple audio frames;
[0014] If the audio frame type of the target audio frame is not a boundary audio frame or a silent audio frame, the initial energy change threshold is used as the target energy change threshold.
[0015] In one embodiment, obtaining the audio frame type of the target audio frame includes:
[0016] Obtain the signal power of the target audio frame;
[0017] If the signal power is less than a preset signal power threshold, determining that the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame;
[0018] If the signal power is greater than or equal to the signal power threshold, the audio frame type of the target audio frame is determined to be a non-boundary audio frame or a silent audio frame.
[0019] In one embodiment, the frequency domain energy information of the audio frame includes amplitudes corresponding to multiple frequency points in the audio frame, and obtaining a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame based on the frequency domain energy information of the audio frame includes:
[0020] Obtaining the number of first frequency points in the target audio frame; the first frequency points are frequency points in the target audio frame whose amplitude change exceeds an amplitude change threshold, and the amplitude change is the change between the amplitudes of the target audio frame and the corresponding frequency points in adjacent audio frames;
[0021] Acquire the number of second frequency points in the target audio frame; the second frequency points are frequency points in the target audio frame whose amplitudes are greater than zero;
[0022] Based on the number of the first frequency points and the number of the second frequency points, a frequency domain energy change between the target audio frame and adjacent audio frames of the target audio frame is determined.
[0023] In one embodiment, before obtaining the number of first frequency points in the target audio frame, the method further includes:
[0024] For each frequency point in the target audio frame, determine a reference frequency point of the frequency point from adjacent audio frames, where the frequency point sequence number of the reference frequency point matches the frequency point sequence number of the frequency point;
[0025] An amplitude change between the frequency point and a reference frequency point of the frequency point is obtained, and a frequency point whose amplitude change exceeds an amplitude change threshold is determined as a first frequency point.
[0026] In one embodiment, determining the frequency domain energy change between the target audio frame and an adjacent audio frame of the target audio frame based on the number of the first frequency points and the number of the second frequency points includes:
[0027] Obtaining a ratio between the number of the second frequency points and the number of the first frequency points;
[0028] A frequency domain energy change amount between the target audio frame and the adjacent audio frame is determined based on the ratio.
[0029] In one embodiment, determining frequency domain energy information of each audio frame in the plurality of audio frames includes:
[0030] Acquire an amplitude spectrum of the audio frame according to the frequency spectrum data of the audio frame;
[0031] Frequency domain energy information of the audio frame is determined based on the amplitude spectrum.
[0032] In one embodiment, obtaining multiple audio frames of the audio signal to be detected includes:
[0033] In the process of collecting audio signals, the currently collected audio signals are used as the audio signals to be detected;
[0034] After determining that a noise signal exists in the target audio frame if the frequency domain energy variation is greater than the target variation threshold, the method further includes:
[0035] Noise prompt information is generated and output during the process of collecting audio signals.
[0036] In a second aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0037] In a third aspect, the present application further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0038] The above-mentioned audio noise detection method, computer device and computer program product can obtain multiple audio frames of the audio signal to be detected, determine the frequency domain energy information of each audio frame in the multiple audio frames; based on the frequency domain energy information of the audio frames, obtain the frequency domain energy change between the target audio frame and the adjacent audio frames of the target audio frame in the multiple audio frames, and obtain the target change threshold corresponding to the target audio frame, wherein the target change threshold is determined based on the audio frame type of the target audio frame, and then if the frequency domain energy change is greater than the target change threshold, it is determined that there is a noise signal in the target audio frame. In this embodiment, the characteristic of rapid energy change of noise in the frequency domain can be used to identify noise signals, and the threshold can be dynamically adjusted in combination with the audio frame type, which can adapt to different recognition scenarios, avoid false detection of noise signals, and achieve efficient and accurate recognition of audio noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 1 is a flow chart of an audio noise detection method according to an embodiment;
[0040] Figure 2 is a spectrum diagram of a speech signal in one embodiment;
[0041] Figure 3 A schematic flow chart of the steps for obtaining an audio frame type according to an embodiment;
[0042] Figure 4 Schematic diagram of a speech signal processing result in one embodiment;
[0043] Figure 5 1 is a flow chart of the steps of determining the frequency domain energy variation in one embodiment;
[0044] Figure 6 1 is a flow chart of an audio noise detection method according to another embodiment;
[0045] Figure 7 is a structural block diagram of an audio noise detection device in one embodiment;
[0046] Figure 8 is a diagram of the internal structure of a computer device in one embodiment;
[0047] Figure 9 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0049] In one embodiment, Figure 1 As shown, a method for detecting audio noise is provided. This embodiment uses the method applied to a terminal as an example. The terminal may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, and smart car devices. It is understood that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server.
[0050] In this embodiment, the method includes the following steps:
[0051] Step 101: Acquire multiple audio frames of an audio signal to be detected.
[0052] As an example, an audio signal is an information carrier that records changes in sound, for example, a function of time and sound amplitude. In this embodiment, the audio signal to be detected may include a human voice signal, where the human voice signal may refer to an audio signal generated by the vibration of the vocal cords, such as a human voice signal recorded during speech transmission or audio recording. Of course, the audio signal may also not include a human voice signal.
[0053] In practical applications, an audio signal to be detected may be acquired and divided into frames to obtain a plurality of audio frames corresponding to the audio signal.
[0054] Step 102: Determine frequency domain energy information of each audio frame in a plurality of audio frames.
[0055] The frequency domain energy information may be information reflecting the energy level of the speech signal based on the frequency domain data.
[0056] Sound is a sound wave generated by the vibration of an object. Its essence is a pressure wave with a certain amount of energy. Audio signals, as information carriers that record changes in sound, can also reflect changes in sound energy.
[0057] After obtaining multiple audio frames corresponding to the audio signal, frequency domain energy information corresponding to the audio frames can be determined. In a specific implementation, the obtained audio signal can be an audio signal in the time domain. In this case, a time-frequency conversion can be performed on the audio signal in the audio frame to obtain spectrum data corresponding to the audio frame. The frequency domain energy information of each audio frame in the multiple audio frames can be determined based on the spectrum data of the audio frame.
[0058] Step 103 : Obtain frequency domain energy variations between a target audio frame and adjacent audio frames of the target audio frame in the plurality of audio frames based on the frequency domain energy information of the audio frames.
[0059] For ease of description, the audio frame currently to be analyzed is referred to as a target audio frame. The target audio frame can be any audio frame among multiple audio frames. The adjacent audio frame can be an audio frame adjacent to the target audio frame, for example, the previous audio frame of the target audio frame, or the next audio frame of the target audio frame can be used as the adjacent audio frame.
[0060] The frequency domain energy variation may be an energy difference between different audio frames in the frequency domain.
[0061] After determining the frequency domain energy information corresponding to the audio frame, a target audio frame can be obtained from the multiple audio frames, such as by sequentially determining the target audio frame based on the order of the audio frames. After determining the target audio frame, the frequency domain energy information of the target audio frame and the frequency domain energy information of adjacent audio frames can be determined based on the frequency domain energy information of the multiple determined audio frames. Furthermore, the frequency domain energy change between the target audio frame and the adjacent audio frames can be determined based on the frequency domain energy information of the target audio frame and the frequency domain energy information of the adjacent audio frames.
[0062] Step 104 : Obtain a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on the audio frame type of the target audio frame.
[0063] The target change threshold may be a reference value for measuring the degree of change in frequency domain energy.
[0064] Specifically, the degree of change in the frequency domain energy variable can be determined by comparing it with a target change threshold. The target change threshold can be determined based on the audio frame type of the target audio frame, and the audio frame type can be determined based on the voice scene corresponding to the voice signal in the audio frame. The voice scene can be used to indicate the user's vocal state when the voice signal in the audio frame is collected. For example, the voice scene can include at least one of the following: a vocalization switching scene, a silent scene, and a continuous vocalization scene. It can be understood that the user's vocalization state can change multiple times from the beginning of vocalization to the end of vocalization. The change in vocalization state is caused by the change in the state of the vocal cords and / or vocal channels. Among them, the vocalization switching scene can refer to the switch between emitting sound and being silent, for example, the user starts singing after being silent for a period of time; the silent scene can be a state of not emitting sound; and the continuous vocalization scene can refer to the process of the user continuously pronouncing.
[0065] In other words, corresponding target variation thresholds can be determined for different speech scenarios.
[0066] Step 105: If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
[0067] As an example, the noise signal may be noise information having a preset frequency domain energy variation characteristic, wherein the preset frequency domain energy variation characteristic may be a broadband rapid rise and rapid decay of frequency domain energy.
[0068] Exemplarily, the noise signal in this embodiment may be a noise signal generated by knocking or rubbing a recording device, such as a noise signal generated when a user rubs headphones or a recording microphone. The noise signal sounds similar to the sound of "click" or "crack", which is short and harsh, and is also called a click or click sound.
[0069] In practical applications, after obtaining the target change threshold, the frequency domain energy change can be compared with the target change threshold. If the frequency domain energy change is greater than the target change threshold, it can be determined that there is a noise signal in the target audio frame; if the frequency domain energy change is less than or equal to the target change threshold, it can be determined that there is no noise signal in the target audio frame.
[0070] Specifically, when recording a human voice signal, the noise signal generated by operations such as knocking or rubbing the recording device will be recorded into the audio file at the same time. By analyzing and comparing the spectrum graph containing the human voice signal and the noise signal, for example Figure 2 From the spectrum diagram shown, we can see that the human vocalization process is characterized by short-term stability. The human voice signal mainly includes the fundamental wave and harmonics distributed at frequencies that are integer multiples of the fundamental wave, and the energy changes smoothly between frames. The noise signal in the rectangular frame lacks tonal information, and the broadband energy is distributed at various frequencies, rising rapidly and then falling rapidly.
[0071] By utilizing the difference between the frequency domain energy change characteristics of the noise signal and the frequency domain energy change characteristics of the human voice signal, the noise signal in the speech signal can be identified, that is, it can be determined whether the frequency domain energy change is greater than the target change threshold. When the frequency domain energy change is greater than the target change threshold, it can be determined that the frequency domain energy of the target audio frame has changed significantly relative to the adjacent audio frame. At the same time, since the target change threshold is determined based on the audio frame type of the target audio frame, the target change threshold can change with the change of the audio frame type. In other words, the target change threshold can be adjusted accordingly with different speech scenes, so that the noise signal can be detected quickly and accurately. It can be understood that for the same audio signal to be detected, speech signals under different speech scenes can be recorded. For example, starting from time t1, the user remains silent for five seconds, waits for the prelude to end, and then begins to sing the song, and continues to sing for thirty seconds. This is time t2. If the audio signal to be detected is collected from time t1 to time t2, then the corresponding voice scene for the audio frames during the silent time is a silent scene, and the user switches from the silent state to the state of starting to sing. The current voice scene is a voice switching scene, and the audio frames collected during the continuous singing process correspond to a continuous voice scene. Based on this, when the audio signal to be detected is received and multiple audio frames of the audio signal are obtained, the voice scene of each audio frame can be identified, and the corresponding target change threshold can be determined based on the identified voice scene.
[0072] In this embodiment, multiple audio frames of the audio signal to be detected can be obtained, and the frequency domain energy information of each audio frame in the multiple audio frames can be determined; based on the frequency domain energy information of the audio frames, the frequency domain energy change between the target audio frame and the adjacent audio frames of the target audio frame in the multiple audio frames can be obtained, and a predetermined target change threshold value can be obtained, wherein the target change threshold value is determined based on the audio frame type of the target audio frame, and then if the frequency domain energy change amount is greater than the target change threshold value, it is determined that a noise signal exists in the target audio frame. In this embodiment, the characteristic of rapid energy change of noise in the frequency domain can be used to identify noise signals, and the threshold value can be dynamically adjusted in combination with the audio frame type, which can adapt to different recognition scenarios, avoid false detection of noise signals, and achieve efficient and accurate recognition of audio noise.
[0073] In one embodiment, the step of obtaining a target variation threshold corresponding to a target audio frame may include:
[0074] Obtain the audio frame type of the target audio frame; if the audio frame type of the target audio frame is a boundary audio frame or silent audio, increase the preset initial energy change threshold to obtain the target energy change threshold; if the audio frame type of the target audio frame is not a boundary audio frame or a silent audio frame, use the initial energy change threshold as the target energy change threshold.
[0075] Among them, the boundary audio frame is an audio frame at the switching boundary between the human voice audio frame and the non-human voice audio frame in multiple audio frames. In actual applications, the frequency domain energy change characteristics of the boundary audio frame and the silent audio frame can be similar to or identical to the frequency domain energy change characteristics corresponding to the audio frame containing the noise signal, but the boundary audio frame and the silent audio frame do not contain the noise signal; the human voice audio frame can refer to the audio frame containing the human voice signal, the non-human voice audio frame can refer to the audio frame without the human voice signal, and the silent audio frame can refer to the audio frame in the silent voice scene.
[0076] The initial energy change threshold may be a pre-set threshold that may be set based on an empirical value; the target energy change threshold may also be referred to as a probability threshold for detecting noise information.
[0077] In specific implementations, the switching of vocalization states often occurs during the vocalization process, such as the breathing (also called breath) at the beginning of vocalization during singing. When the vocalization state is switched, the energy of the audio signal in the frequency domain will also change significantly, so that the frequency domain energy change when the vocalization state is switched also has the characteristics of broadband rapid rise and rapid decay. In addition, the audio frame obtained in the silent state has very low frequency domain energy, which will cause a significant change in the frequency domain energy when the sound signal is suddenly detected.
[0078] When detecting and identifying noise signals, if noise signal identification is performed according to a fixed energy change threshold, it is easy to cause false detection, especially in complex scenarios such as online audio recording, where it is difficult to strike a balance between recall rate and accuracy.
[0079] Based on this, when a target audio frame to be analyzed is determined from multiple audio frames, the audio frame type corresponding to the target audio frame can be obtained, and the speech scene corresponding to the target audio frame can be further identified.
[0080] If the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame, since the frequency domain energy change characteristics of the boundary audio frame or the silent audio frame are similar to the frequency domain energy change characteristics of the audio frame containing a noise signal, that is, the frequency domain energy changes significantly relative to the adjacent audio frames, but this frequency domain energy change characteristic of the boundary audio frame or the silent audio frame is not caused by the presence of a noise signal, the initial energy change threshold can be dynamically adjusted to increase the initial energy change threshold, and the target energy change threshold is obtained based on the increased initial energy change threshold. Therefore, when the frequency domain energy change corresponding to the first audio frame is compared with the target energy change threshold, it is possible to avoid erroneous identification of the first audio frame as an audio frame containing a noise signal. Specifically, since the frequency domain energy of the boundary audio frame or the silent audio frame changes significantly, if the initial energy change threshold is continued to be used for identification, it is easy to erroneously identify the audio frame as an audio frame containing a noise signal. Therefore, the initial energy change threshold can be increased so that the frequency domain energy change of the boundary audio frame or the silent audio frame is lower than the target energy change threshold obtained after the increase, thereby avoiding erroneous identification.
[0081] If the target audio frame is determined to be a non-boundary audio frame or a silent audio frame, the initial energy change threshold can be used as the target energy change threshold. In other words, during the audio noise detection process, the target energy change threshold used to determine whether the frequency domain energy change is significant can be dynamically adjusted based on the audio frame type corresponding to the target audio frame being processed. In practical applications, in different speech scenarios, differences in the user's voice state lead to differences in the change in the frequency domain energy of the audio frame. In the speech scene of voice switching or silent scene, the user is just beginning to speak or is silent. Although the frequency domain energy in this speech scene can change significantly, it is not caused by noise signals. Therefore, a higher change threshold (such as threshold K1 greater than the initial energy change threshold) can be set for voice switching or silent scenes. In the continuous speech scene, there is no breath at the beginning of speech. If a significant change in frequency domain energy is detected, it can be determined that it is caused by a noise signal. To promptly identify the noise signal, a lower change threshold (such as threshold K2 less than or equal to the initial energy change threshold) can be used. In specific implementations, the dynamic adjustment strategy of the initial energy change threshold can also be adjusted according to actual conditions, such as adjusting the difference between K1 / K2 and the initial energy change threshold, or adjusting the difference between K1 and K2. By dynamically adjusting the target energy change threshold, it is possible to accurately identify whether the audio signal contains noise signals in different speech scenarios.
[0082] In this embodiment, the audio frame type of the target audio frame can be obtained. If the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame, the preset initial energy change threshold is raised to obtain the target energy change threshold. By dynamically adjusting the initial energy change threshold, the target energy change threshold corresponding to the audio frame type is obtained to avoid false detection; if the audio frame type of the target audio frame is not a boundary audio frame or a silent audio frame, the initial energy change threshold can be used as the target energy change threshold. When the target audio frame is not a sound switching scene or a silent scene, the original initial energy threshold can be reasonably used to identify the noise signal, thereby avoiding missed detection of the noise signal and effectively improving the recognition accuracy of the noise signal in the audio.
[0083] In one embodiment, Figure 3 As shown, obtaining the audio frame type of the target audio frame may include the following steps:
[0084] Step 301: Acquire the signal power of a target audio frame.
[0085] As an example, the signal power may be the power of the audio signal in the target audio frame.
[0086] In a specific implementation, after determining the target audio frame, the signal power of the target audio frame can be obtained. For example, the mean squared amplitude (RMS) of the target audio frame can be obtained as the signal power of the target audio frame, for example, it can be determined by the following formula:
[0087]
[0088] Where L is the frame length of the target audio frame, P(n) is the signal power corresponding to the n-th frame audio signal, i is the index of N samples in the n-th frame signal starting from 0, x is the input signal, that is, the audio signal to be detected, and x(Ln+i) can represent the input signal at the i-th sample point in the n-th frame. In this formula, by "10·log 1o "The power decibel value can be further calculated.
[0089] Step 302 : If the signal power is less than a preset signal power threshold, determine that the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame.
[0090] Step 303: If the signal power is greater than or equal to the signal power threshold, determine the audio frame type of the target audio frame as a non-boundary audio frame or a silent audio frame.
[0091] After the signal power is obtained, a preset signal power threshold may be obtained, and the currently obtained signal power may be compared with the signal power threshold.
[0092] During comparison, since the energy of the frequency points in the silent audio frame and the boundary audio frame when the sound state switches is relatively small, for example, the magnitude of the frequency domain energy when the sound state switches and the magnitude of the frequency domain energy in the silent state are both much lower than the magnitude of the frequency domain energy of the click noise signal, it is possible to determine whether the signal power of the current target audio frame is less than the preset signal power threshold. If the signal power is less than the signal power threshold, the audio frame type of the target audio frame can be determined to be a boundary audio frame or a silent audio frame; if the signal power is greater than or equal to the signal power threshold, the audio frame type of the target audio frame can be determined to be a non-boundary audio frame or a silent audio frame.
[0093] like Figure 4 As shown, it includes the noise signal probability curve, signal power curve and spectrum diagram corresponding to the audio signal to be detected.
[0094] Specifically, for each target audio frame, after obtaining the frequency domain energy change corresponding to the target audio frame, the frequency domain energy change can be used as the probability of the presence of a noise signal in the target audio frame, and a noise signal probability curve corresponding to the audio signal to be detected is generated; the horizontal dotted line in the figure is a fixed energy change threshold, which can also be called a probability threshold. For example, it can be taken as 0.75.
[0095] At the same time, the signal power corresponding to each target audio frame can be obtained and the corresponding signal power curve can be generated. Figure 4 The figure includes a portion of the signal power curve corresponding to the noise signal probability curve; the vertical dashed lines mark locations where noise signals may be present (i.e., locations where the noise signal probability exceeds the probability threshold). However, using a fixed threshold screening approach can easily lead to false detections. For example, the noise signals around 1 minute 35 seconds and 1 minute 38 seconds are incorrectly identified.
[0096] In this embodiment, by obtaining the signal power of the target audio frame and comparing it with the signal power threshold, the audio frame type of the target audio frame can be accurately identified, providing a reference basis for determining whether to adjust the initial energy change threshold, thereby effectively identifying the misdetected noise signal.
[0097] In one embodiment, determining frequency domain energy information of each audio frame in a plurality of audio frames may include the following steps:
[0098] According to the frequency spectrum data of the audio frame, the amplitude spectrum of the audio frame is obtained; and the frequency domain energy information of the audio frame is determined based on the amplitude spectrum.
[0099] In a specific implementation, after obtaining the input audio signal, based on the short-term stationary characteristics of the audio signal, the input signal can be framed according to the preset frame length and frame shift to obtain multiple audio frames. After windowing in the time domain, the amplitude spectrum of the audio frame is determined based on the windowed audio signal.
[0100] Specifically, for each audio frame after framing, a window function can be used to perform windowing processing on the audio frame. The window function can be any of the following: Hanning window, rectangular window, triangular window, Hamming window, Gaussian window. In this embodiment, the method of obtaining the amplitude spectrum is described using the Hanning window as an example. Specifically, the window function w(i) of the Hanning window can be:
[0101]
[0102] Where N is the window length and i is the sample index within the window.
[0103] The windowed audio signal can be expressed as:
[0104] xw n (i) = x(L·n+i)·w(i)
[0105] Wherein, n represents the n-th frame of audio signal after windowing, and L represents the frame length.
[0106] For the windowed audio signal, Fourier transform can be performed, and the obtained transform result can be shown as follows:
[0107]
[0108] Wherein, (n, k) represents the kth frequency point in the nth frame audio signal, and j is an imaginary unit.
[0109] Based on the Fourier transform results, the spectrum of the audio signal to be detected can be represented as a two-dimensional spectrum distribution with the frame sequence n as the horizontal axis and the frequency point sequence k as the vertical axis. This is the signal's spectrogram. By taking the modulus (absolute value) of the above result, the amplitude spectrum of the audio frame can be obtained. The amplitude spectrum A(n,k) is shown below:
[0110] A(n,k)=‖X(n,k)‖
[0111] After the amplitude spectrum of the audio frame is obtained, the amplitude of each frequency point can be determined according to the amplitude spectrum, and the frequency domain energy information corresponding to the audio frame can be determined based on the amplitude of each frequency point.
[0112] In this embodiment, the energy information of the target audio frame in the frequency domain can be accurately obtained based on the amplitude spectrum of the audio frame, providing a basis for subsequent identification of the noise signal based on the frequency domain energy.
[0113] In one embodiment, the frequency domain energy information of the audio frame may include the amplitudes corresponding to multiple frequency points in the audio frame, such as Figure 5As shown, obtaining the frequency domain energy variation between a target audio frame and adjacent audio frames of the target audio frame in multiple audio frames based on the frequency domain energy information of the audio frame may include the following steps:
[0114] Step 501: Obtain the number of first frequency points in a target audio frame.
[0115] The first frequency point is a frequency point in the target audio frame where the amplitude change exceeds the amplitude change threshold; the amplitude change is a change between the amplitudes of the corresponding frequency points in the target audio frame and the adjacent audio frame.
[0116] In practical applications, after obtaining the target audio frame, the first frequency points in the target audio frame may be determined, and the number of the first frequency points may be obtained.
[0117] Step 502: Obtain the number of second frequency points in the target audio frame.
[0118] The second frequency point is a frequency point in the target audio frame whose amplitude is greater than zero.
[0119] In practical applications, the frequency points with non-zero amplitudes in the target audio frame can be counted. Specifically, the second frequency points in the target audio frame can be determined, and the number of the second frequency points can be obtained. For example, the number of the second frequency points in the target audio frame can be determined by the following formula:
[0120] nv(k)=A(n,k)>zeroThr? 1:0
[0121] NC(n)=sum{nv(k)}
[0122] Among them, "nv(k)=A(n,k)>zeroThr?1:0" indicates whether A(n,k) is greater than the non-zero frequency point threshold zeroThr. If so, the kth frequency point in the nth frame audio signal is determined to be the second frequency point and can be recorded, and nv(k) is assigned a value of 1. If not, the kth frequency point in the nth frame audio signal is determined not to be the second frequency point and is not recorded, and nv(k) is assigned a value of 0. Then, the number of second frequency points in the target audio frame can be determined by "NC(n)=sum{nv(k)}". Among them, the non-zero frequency point threshold zeroThr can be set according to actual conditions and can be used to filter out frequency points with zero or very small amplitude in the audio frame.
[0123] Step 503 : Determine a frequency domain energy variation between the target audio frame and adjacent audio frames of the target audio frame based on the number of the first frequency points and the number of the second frequency points.
[0124] After obtaining the number of first frequency points and the number of second frequency points, the ratio of the number of frequency points (i.e., first frequency points) at which the amplitude of the target audio frame changes significantly to the non-zero frequency points (i.e., second frequency points) in the target audio frame can be determined based on the number of first frequency points and the number of second frequency points, thereby determining the amount of frequency domain energy change between the target audio frame and the adjacent audio frame.
[0125] In this embodiment, by obtaining the number of first frequency points in the target audio frame and the number of second frequency points in the target audio frame, and determining the frequency domain energy change between the target audio frame and the adjacent audio frame based on the number of first frequency points and the number of second frequency points, the frequency domain energy of the target audio frame relative to the adjacent audio frame can be accurately quantified.
[0126] In one embodiment, before obtaining the number of first frequency points in the target audio frame, the method further includes:
[0127] For each frequency point in the target audio frame, a reference frequency point of the frequency point is determined from adjacent audio frames; an amplitude change between the frequency point and the reference frequency point of the frequency point is obtained, and a frequency point whose amplitude change exceeds an amplitude change threshold is determined as a first frequency point.
[0128] The frequency point sequence number of the reference frequency point matches the frequency point sequence number of the frequency point.
[0129] As an example, the amplitude change between a frequency point and a reference frequency point may be information describing a relative change in amplitude, thereby more accurately determining the change in frequency domain energy of a target audio frame relative to the frequency domain energy of its adjacent audio frames.
[0130] After determining the target audio frame, for each frequency point in the target audio frame, a reference frequency point can be determined from the adjacent audio frames of the target audio frame for comparison. In one embodiment, before the comparison, it can be determined whether the amplitude corresponding to the current frequency point to be analyzed in the target audio frame is greater than zero. If it is greater than zero, the reference frequency point of the frequency point can be further obtained. If the amplitude of the frequency point is equal to zero, the next frequency point can be obtained for analysis. After determining the current frequency point to be analyzed in the target audio frame, the frequency point serial number corresponding to the frequency point can be obtained, and a frequency point whose frequency point serial number matches the frequency point serial number can be obtained from the adjacent audio frames as a reference frequency point. Specifically, the frequency points with the same frequency point serial number in the adjacent audio frames can be used as reference frequency points.
[0131] After determining the reference frequency point, the amplitude variation between the frequency point and the reference frequency point may be acquired, and the frequency point whose amplitude variation exceeds an amplitude variation threshold may be determined as the first frequency point.
[0132] In practical applications, the number of first frequency points C(n) in the target audio frame can be determined by the following formula:
[0133]
[0134] C(n)=sum{v(k)}
[0135] The above formula indicates that when the kth frequency point in the target audio frame (the nth audio frame) is obtained, it is first determined whether the amplitude of the frequency point is greater than zero. If not, v(k) = 0. If so, it is further determined whether the amplitude of the frequency point is greater than a threshold of zeroThr. If so, the frequency point is determined to be the first frequency point, and v(k) = 1. Otherwise, if the amplitude of the frequency point is greater than zero but less than the threshold of zeroThr, it is determined whether the ratio of A(n, k) to A(n-1, k) is greater than the threshold of thr, provided that the amplitude of the kth frequency point corresponding to the adjacent audio frame (the n-1th audio frame) is greater than the threshold of zeroThr. If so, the frequency point is determined to be the first frequency point, and v(k) = 1. If not, v(k) = 0. The sum of v(k) can then be calculated to obtain the number of first frequency points.
[0136] In this embodiment, for each frequency point in the target audio frame, a reference frequency point is determined from adjacent audio frames, the amplitude change between the frequency point and the reference frequency point is obtained, and the frequency point whose amplitude change exceeds an amplitude change threshold is determined as the first frequency point. By comparing the amplitude change of each frequency point in the target audio frame with the reference frequency point in adjacent audio frames, the amplitude change between the target audio frame and adjacent audio frames can be carefully measured, thereby improving the accuracy of noise recognition.
[0137] In one embodiment, determining the frequency domain energy change between the target audio frame and adjacent audio frames of the target audio frame based on the number of first frequency points and the number of second frequency points includes:
[0138] A ratio between the number of the second frequency points and the number of the first frequency points is obtained; and a frequency domain energy change between the target audio frame and an adjacent audio frame is determined based on the ratio.
[0139] In a specific implementation, after obtaining the number of first frequency points and the number of second frequency points, the ratio between the second frequency points and the first frequency points can be obtained and used as the frequency domain energy change between the target audio frame and the adjacent audio frame. For example, this ratio can also be used as the probability that a noise signal exists in the target audio frame, as shown below:
[0140]
[0141] In this embodiment, by obtaining the ratio of the number of second frequency points to the number of first frequency points, the frequency domain energy change between the target audio frame and the adjacent audio frames can be accurately quantified, thereby effectively improving the noise signal recognition accuracy.
[0142] In one embodiment, the step of obtaining multiple audio frames of the audio signal to be detected may include the following steps:
[0143] During the process of collecting audio signals, the currently collected audio signal is used as the audio signal to be detected.
[0144] In practical applications, during the process of collecting audio signals, the currently collected audio signals in real time can be used as the audio signals to be detected. Specifically, the audio signals can be collected in real time as the audio signals to be detected, or a portion of the audio signals can be intercepted from the audio signals at preset time intervals as the audio signals to be detected.
[0145] After determining that a noise signal exists in the target audio frame if the frequency domain energy variation is greater than the target variation threshold, the following steps may also be included:
[0146] Generate noise prompt information and output the noise prompt information during the process of collecting audio signals.
[0147] As an example, noise prompt information can be used to indicate that a noise signal exists in the currently collected audio signal. The noise prompt information can include at least one of the following types of information: image information, text information. Of course, the noise prompt information is not limited to visual prompt information, but can also include tactile or auditory prompt information, such as vibration or prompt sound. The noise prompt information can also include the cause of the noise and / or suggestions for eliminating the noise. For example, if the noise signal is caused by knocking on the earphone or rubbing the microphone, the noise prompt information can be used to suggest that the user adjust the recording device to avoid knocking or rubbing the recording device.
[0148] Specifically, during the audio signal acquisition process, real-time noise detection can be performed on the currently acquired audio signal. If it is determined that a noise signal exists in the target audio frame of the real-time acquired audio signal, noise prompt information can be generated and output in a timely manner during the audio signal acquisition process. For example, this method can be used for detection and prompting when performing online audio recording (such as online karaoke or recording audio / video in a virtual room).
[0149] In this embodiment, during the process of collecting audio signals, the currently collected audio signal is used as the audio signal to be detected, and after identifying the presence of a noise signal, noise prompt information is generated, and the noise prompt information is output during the process of collecting audio signals. It is possible to monitor in real time and accurately whether there is a noise signal in the audio signal during the audio recording process, and to issue a timely reminder when a noise signal is detected, so that the user can quickly optimize the recording device or recording method to improve the audio recording effect.
[0150] In order to enable those skilled in the art to better understand the above steps, the embodiment of the present application is illustrated below by using an example, but it should be understood that the embodiment of the present application is not limited to this.
[0151] like Figure 6 As shown, during the audio signal acquisition process, for example, when a user sings karaoke online through a terminal, the terminal can obtain the input audio signal, use the audio signal as the audio signal to be detected, and detect whether there is noise in the audio signal through the audio noise detection method in this application. During the detection, the terminal can perform the detection, or the terminal can send the audio signal to be detected to the server, and after the server detects it, the corresponding detection result is returned to the terminal. For example, the server can only provide feedback to the terminal when it detects the presence of a noise signal in the audio signal.
[0152] After obtaining the input audio signal, the audio signal may be divided into frames.
[0153] For multiple audio frames after framing, on the one hand, the signal power of the audio frame can be calculated, for example, the RMS value corresponding to the audio frame can be calculated, and based on the RMS value corresponding to the audio frame, the audio frame type of the audio frame can be determined, and whether to adjust the initial energy change threshold can be determined according to the audio frame type, and the corresponding target energy change threshold can be obtained according to the judgment result.
[0154] On the other hand, a short-time Fourier transform (STFT) can be performed on the multiple audio frames after framing to obtain the amplitudes of multiple frequency points in the audio frame in the frequency domain, and then the frequency points can be screened according to the amplitude of each frequency point (also called frequency point) in the audio frame, that is, first determining the non-zero frequency point in the audio frame, that is, the second frequency point, and then determining the frequency point at which the frequency amplitude in the audio frame changes relative to the amplitude of the frequency point of the adjacent audio frame, that is, the first frequency point, and based on the ratio of the second frequency point to the first frequency point, obtain the change in frequency domain energy of the current audio frame relative to its adjacent audio frame, and use it as the noise signal probability.
[0155] It is then possible to determine whether the noise signal probability is greater than the target energy change threshold obtained after dynamic adjustment, and output the noise signal detection result corresponding to the current audio frame.
[0156] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0157] Based on the same inventive concept, embodiments of the present application further provide an audio noise detection device for implementing the aforementioned audio noise detection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following embodiments of the audio noise detection device can be found in the aforementioned limitations of the audio noise detection method and will not be further elaborated here.
[0158] In one embodiment, Figure 7 As shown, an audio noise detection device 700 is provided, comprising:
[0159] The audio signal acquisition module 701 is used to acquire multiple audio frames of the audio signal to be detected;
[0160] a frequency domain energy acquisition module 702, configured to determine frequency domain energy information of each audio frame in the plurality of audio frames;
[0161] a frequency domain energy change identification module 703 configured to obtain, based on the frequency domain energy information of the audio frame, a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame, wherein the target audio frame is an audio frame from the multiple audio frames;
[0162] A threshold acquisition module 704 is configured to acquire a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on the audio frame type of the target audio frame;
[0163] The noise identification module 705 is configured to determine that a noise signal exists in the target audio frame if the frequency domain energy variation is greater than the target variation threshold.
[0164] In one embodiment, the threshold acquisition module 704 is specifically configured to:
[0165] Get the audio frame type of the target audio frame;
[0166] If the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame, increasing the preset initial energy change threshold to obtain a target energy change threshold; wherein the boundary audio frame is an audio frame at a switching boundary between a human voice audio frame and a non-human voice audio frame in the multiple audio frames;
[0167] If the audio frame type of the target audio frame is not a boundary audio frame or a silent audio frame, the initial energy change threshold is used as the target energy change threshold.
[0168] In one embodiment, the audio frame type acquisition module is specifically configured to:
[0169] Obtain the signal power of the target audio frame;
[0170] If the signal power is less than a preset signal power threshold, determining that the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame;
[0171] If the signal power is greater than or equal to the signal power threshold, the audio frame type of the target audio frame is determined to be a non-boundary audio frame or a silent audio frame.
[0172] In one embodiment, the frequency domain energy information of the audio frame includes amplitudes corresponding to multiple frequency points in the audio frame, and the frequency domain energy change identification module 703 includes:
[0173] A first frequency point number determination submodule is configured to obtain the number of first frequency points in a target audio frame; the first frequency points are frequency points in the target audio frame whose amplitude variation exceeds an amplitude variation threshold, where the amplitude variation is the variation between the amplitudes of the target audio frame and corresponding frequency points in adjacent audio frames;
[0174] A second frequency point number determination submodule is configured to obtain the number of second frequency points in the target audio frame; the second frequency points are frequency points in the target audio frame whose amplitude is greater than zero;
[0175] The frequency domain energy variation determination submodule is configured to determine the frequency domain energy variation between the target audio frame and the adjacent audio frame based on the number of the first frequency points and the number of the second frequency points.
[0176] In one embodiment, the frequency domain energy change identification module 703 further includes:
[0177] A reference frequency point determination submodule is configured to determine, for each frequency point in the target audio frame, a reference frequency point of the frequency point from adjacent audio frames, wherein the frequency point sequence number of the reference frequency point matches the frequency point sequence number of the frequency point;
[0178] The first frequency point identification submodule is configured to obtain an amplitude variation between the frequency point and a reference frequency point of the frequency point, and determine a frequency point whose amplitude variation exceeds an amplitude variation threshold as a first frequency point.
[0179] In one embodiment, the frequency domain energy variation determination submodule is specifically configured to:
[0180] Obtaining a ratio between the number of the second frequency points and the number of the first frequency points;
[0181] A frequency domain energy change amount between the target audio frame and the adjacent audio frame is determined based on the ratio.
[0182] In one embodiment, the frequency domain energy acquisition module 702 is specifically configured to:
[0183] Acquire an amplitude spectrum of the audio frame according to the frequency spectrum data of the audio frame;
[0184] Frequency domain energy information of the audio frame is determined based on the amplitude spectrum.
[0185] In one embodiment, the audio signal acquisition module 701 is specifically configured to:
[0186] In the process of collecting audio signals, the currently collected audio signals are used as the audio signals to be detected;
[0187] The device further comprises:
[0188] The noise prompt module is used to generate noise prompt information and output the noise prompt information during the process of collecting audio signals.
[0189] Each module in the aforementioned audio noise detection device may be implemented in whole or in part via software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0190] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store audio signals to be detected. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an audio noise detection method is implemented.
[0191] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an audio noise detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0192] Those skilled in the art will understand that Figure 8 and Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0193] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0194] Acquire multiple audio frames of the audio signal to be detected;
[0195] determining frequency domain energy information of each audio frame in the plurality of audio frames;
[0196] obtaining, based on frequency domain energy information of the audio frame, a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame among the multiple audio frames, where the target audio frame is an audio frame among the multiple audio frames;
[0197] Obtaining a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on an audio frame type of the target audio frame;
[0198] If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
[0199] In one embodiment, when the processor executes the computer program, the steps in the other embodiments described above are also implemented.
[0200] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0201] Acquire multiple audio frames of the audio signal to be detected;
[0202] determining frequency domain energy information of each audio frame in the plurality of audio frames;
[0203] obtaining, based on frequency domain energy information of the audio frame, a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame among the multiple audio frames, where the target audio frame is an audio frame among the multiple audio frames;
[0204] Obtaining a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on an audio frame type of the target audio frame;
[0205] If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
[0206] In one embodiment, when the computer program is executed by a processor, the steps in the other embodiments described above are also implemented.
[0207] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0208] Acquire multiple audio frames of the audio signal to be detected;
[0209] determining frequency domain energy information of each audio frame in the plurality of audio frames;
[0210] obtaining, based on frequency domain energy information of the audio frame, a frequency domain energy change between a target audio frame and an adjacent audio frame of the target audio frame among the multiple audio frames, where the target audio frame is an audio frame among the multiple audio frames;
[0211] Obtaining a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on an audio frame type of the target audio frame;
[0212] If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
[0213] In one embodiment, when the computer program is executed by a processor, the steps in the other embodiments described above are also implemented.
[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0215] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0216] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0217] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for detecting audio noise, characterized in that: The method comprises: Acquire multiple audio frames of the audio signal to be detected; Determining amplitudes corresponding to a plurality of frequency points in each of the audio frames; Obtaining the number of first frequency points and the number of second frequency points in a target audio frame; the target audio frame is an audio frame among the multiple audio frames; the first frequency point is a frequency point in the target audio frame whose amplitude change exceeds an amplitude change threshold, where the amplitude change is the change between the amplitude of the target audio frame and a corresponding frequency point in an adjacent audio frame; the second frequency point is a frequency point in the target audio frame whose amplitude is greater than zero; determining, based on the number of the first frequency points and the number of the second frequency points, a frequency domain energy change between the target audio frame and an adjacent audio frame of the target audio frame; Obtaining a target variation threshold corresponding to the target audio frame; the target variation threshold is determined based on an audio frame type of the target audio frame; If the frequency domain energy variation is greater than the target variation threshold, it is determined that a noise signal exists in the target audio frame.
2. The method according to claim 1, characterized in that The obtaining of a target change threshold corresponding to the target audio frame includes: Get the audio frame type of the target audio frame; If the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame, increasing the preset initial energy change threshold to obtain a target energy change threshold; wherein the boundary audio frame is an audio frame at a switching boundary between a human voice audio frame and a non-human voice audio frame in the multiple audio frames; If the audio frame type of the target audio frame is a non-boundary audio frame, the initial energy change threshold is used as the target energy change threshold.
3. The method according to claim 2, characterized in that The obtaining of the audio frame type of the target audio frame includes: Obtain the signal power of the target audio frame; If the signal power is less than a preset signal power threshold, determining that the audio frame type of the target audio frame is a boundary audio frame or a silent audio frame; If the signal power is greater than or equal to the signal power threshold, determining that the audio frame type of the target audio frame is a non-boundary audio frame.
4. The method according to claim 1, wherein The determining of amplitudes corresponding to a plurality of frequency points in each of the audio frames includes: Acquire the amplitude spectrum of the audio frame according to the frequency spectrum data of each audio frame; Amplitudes corresponding to a plurality of frequency points in each of the audio frames are determined based on the amplitude spectrum.
5. The method according to claim 1, wherein Before obtaining the number of first frequency points in the target audio frame, the method further includes: For each frequency point in the target audio frame, determine a reference frequency point of the frequency point from adjacent audio frames, where the frequency point sequence number of the reference frequency point matches the frequency point sequence number of the frequency point; An amplitude change between the frequency point and a reference frequency point of the frequency point is obtained, and a frequency point whose amplitude change exceeds an amplitude change threshold is determined as a first frequency point.
6. The method according to claim 1, wherein The determining, based on the number of the first frequency points and the number of the second frequency points, a frequency domain energy change between the target audio frame and an adjacent audio frame of the target audio frame includes: Obtaining a ratio between the number of the second frequency points and the number of the first frequency points; A frequency domain energy change amount between the target audio frame and the adjacent audio frame is determined based on the ratio.
7. The method according to claim 1, characterized in that The determining frequency domain energy information of each audio frame in the plurality of audio frames includes: Acquire an amplitude spectrum of the audio frame according to the frequency spectrum data of the audio frame; Frequency domain energy information of the audio frame is determined based on the amplitude spectrum.
8. The method according to any one of claims 1 to 7, characterized in that The step of obtaining a plurality of audio frames of the audio signal to be detected includes: In the process of collecting audio signals, the currently collected audio signals are used as the audio signals to be detected; After determining that a noise signal exists in the target audio frame if the frequency domain energy variation is greater than the target variation threshold, the method further includes: Noise prompt information is generated and output during the process of collecting audio signals.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and apparatus for processing audio signal including noise
US20170309293A1