Noise detection method, device and electronic equipment

By obtaining the band energy and loudness of the target single-frame data of the multimedia file in an electronic device, the noise of piano sound is detected in advance, and the problem of low accuracy of detecting and processing noise when playing piano sounds is solved, and the tone and Volume performance.

CN112163117BActive Publication Date: 2025-02-14VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010984664.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-02-14
Estimated Expiration
2040-09-22

AI Technical Summary

Technical Problem

When electronic devices play piano sounds, it is difficult to accurately detect and process noises, resulting in the impact of tone and volume.

Method used

By acquiring the first frequency band energy and/or the first loudness of the target single frame data in the multimedia file, whether there is a noise exists in advance, thereby determining whether processing of the single frame data is required.

Benefits of technology

The accuracy of electronic devices in detecting and processing piano noises is improved, and unnecessary impact on tone and volume is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112163117B_ABST
    Figure CN112163117B_ABST
Patent Text Reader

Abstract

The present application discloses a noise detection method, device and electronic device, belonging to the field of communication technology. It can solve the problem of low accuracy of piano noise detection and processing by electronic devices. The method includes: when playing a multimedia file, obtaining a first parameter of a target single-frame data, the target single-frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: first frequency band energy and first loudness; according to the target parameter, detecting whether there is noise in the target single-frame data, the target parameter at least includes the first parameter. The embodiment of the present application is applied to the process of detecting and processing piano noise by electronic devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a noise detection method, device and electronic equipment. Background Art

[0002] Usually, when a user plays a multimedia file (such as an audio file) through an electronic device, when the audio file contains piano sounds, the pitch of the piano sound's vibration tone may overlap with the speaker's natural frequency, which may cause speaker distortion, so that there may be noise in the piano sound played by the electronic device. At present, the electronic device can determine the piano sound in the audio file by detecting the timbre of the audio stream data of the audio file in real time, so that when the piano sound is detected, the piano sound can be balanced and suppressed (i.e., it is greatly suppressed in the speaker resonance frequency domain) to adjust some parameters of the speaker through the piano sound control algorithm, thereby achieving control of the noise.

[0003] However, in the above method, when the electronic device detects the piano sound, it will perform equalization and suppression processing on the piano sound. When there is no noise in the piano sound, the electronic device will still perform equalization and suppression processing, which will affect the timbre and volume of the piano sound, so that the accuracy of the electronic device in detecting and processing the piano noise is low. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a noise detection method, device and electronic device, which can solve the problem of low accuracy in detecting and processing piano noise by electronic devices.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a noise detection method, the method comprising: when playing a multimedia file, obtaining a first parameter of target single-frame data, the target single-frame data being any frame data to be played in the multimedia file, the first parameter comprising at least one of the following: first frequency band energy and first loudness; based on the target parameter, detecting whether there is noise in the target single-frame data, the target parameter comprising at least the first parameter.

[0007] In a second aspect, an embodiment of the present application provides a noise detection device, which includes: an acquisition module and a detection module. The acquisition module is used to acquire a first parameter of a target single-frame data when playing a multimedia file, and the target single-frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: a first frequency band energy and a first loudness. The detection module is used to detect whether there is noise in the target single-frame data according to the target parameter, and the target parameter includes at least the first parameter.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In an embodiment of the present application, when playing a multimedia file, the electronic device can obtain the first frequency band energy and / or the first loudness of the target single frame data to be played in the multimedia file, so as to detect whether the target single frame data has noise according to the first frequency band energy and / or the first loudness. Because when the electronic device plays a multimedia file, the electronic device can obtain the first parameter of the target single frame data to be played in the multimedia file, so as to pre-detect whether the target single frame data has noise according to the first parameter, so as to pre-determine whether the target single frame data needs to be processed. Therefore, in an embodiment of the present application, the single frame data in the multimedia file can be obtained in advance to determine whether each single frame data has noise, so that when a single frame data has noise, the single frame data can be processed without affecting the timbre and volume of the data therein, so that the electronic device has a high accuracy in detecting and processing the piano noise. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a schematic diagram of a piano sound time domain feature and a control target provided by an embodiment of the present application;

[0013] Figure 2 is a schematic diagram of piano audio frequency domain characteristics and control targets provided by an embodiment of the present application;

[0014] Figure 3 It is one of the schematic diagrams of a noise detection method provided in an embodiment of the present application;

[0015] Figure 4 This is a second schematic diagram of a noise detection method provided in an embodiment of the present application;

[0016] Figure 5 This is a third schematic diagram of a noise detection method provided in an embodiment of the present application;

[0017] Figure 6 This is a fourth schematic diagram of a noise detection method provided in an embodiment of the present application;

[0018] Figure 7 This is a fifth schematic diagram of a noise detection method provided in an embodiment of the present application;

[0019] Figure 8 This is a sixth schematic diagram of a noise detection method provided in an embodiment of the present application;

[0020] Fig. 9 This is one of the structural schematic diagrams of a noise detection device provided in an embodiment of the present application;

[0021] Fig.10 This is a second structural schematic diagram of a noise detection device provided in an embodiment of the present application;

[0022] Fig.11 This is a third structural schematic diagram of a noise detection device provided in an embodiment of the present application;

[0023] Fig.12 This is a fourth structural schematic diagram of a noise detection device provided in an embodiment of the present application;

[0024] Fig.13 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0025] Fig.14 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] The following is an explanation of some concepts and / or terms involved in the noise detection method provided in the embodiment of the present invention.

[0029] Usually, under the premise of reasonable design, the perfection of the speaker is inversely proportional to its physical size; among them, the micro and small speakers carried by electronic devices face a series of distortion problems. These problems cannot be completely solved due to the limitation of acoustic design, and can only be weighed and adjusted according to people's subjective hearing. The noise generated by the piano timbre is one of the bad subjective listening feelings caused by many speaker distortions. At present, it is believed that the signal characteristics that excite this noise are mainly the timbre of sudden vibration, and when the pitch of the vibration timbre coincides with the natural frequency of the speaker, the distortion will be further aggravated, forming a continuous and obvious noise. The control method of piano noise by traditional device tuning is to perform balanced suppression: that is, to suppress it greatly in the resonance frequency domain of the speaker. The consequence of this suppression is to reduce the amplitude and volume of the entire audio signal, and have a certain negative impact on the timbre. The piano sound processing module is better than balanced suppression in that it has more signal feature detection judgment. Signal feature detection is mainly used to detect whether the current audio stream data features have piano sound risks. Some of these schemes have some predictiveness, so that most of the audio that does not have piano sound risks is uncontrolled, and the volume of the body sound and timbre is restored. In terms of suppression control, in addition to balanced suppression, some other schemes will also make a certain degree of compensation to maintain the original sound level. The piano sound control algorithm achieves the minimum cost control of noise by referring to some parameters of the speaker and subjectively adjusting the characteristic sound source.

[0030] The noise detection method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0031] In an embodiment of the present application, when an electronic device plays a multimedia file, the electronic device can obtain the first frequency band energy (or first loudness) of any frame data to be played in the multimedia file, so that the electronic device can detect whether there is noise in the arbitrary frame data based on the first frequency band energy. Specifically, the electronic device can perform a first filtering process on the arbitrary frame data to obtain the first frequency band energy of the arbitrary frame data, so that when the first frequency band energy meets the first preset condition, the arbitrary frame data is determined to be piano sound data, and a second filtering process is performed on the arbitrary frame data to obtain the second frequency band energy (or second loudness), so that when the second frequency band energy meets the second preset condition, it is determined that the piano sound data (i.e., the arbitrary frame data) has a noise risk, and then the noise risk type (i.e., transition band piano noise type or delay period piano noise type) to which the piano sound data belongs can be determined according to the difference between the second frequency band energy and the frequency band energy of the historical single frame data, so that the parameters corresponding to the noise risk type to which the piano sound data belongs (the attack time, the preset timbre attack sound and the release time) can be obtained, and the target gain value is calculated based on these parameters, so that according to the target gain value, the initial frequency band energy (or initial loudness) corresponding to the frequency in the preset risk frequency band of at least one frequency corresponding to the target single frame data is compensated, thereby improving the accuracy of the electronic device in detecting and processing piano noise.

[0032] In the embodiment of the present application, the detection and control of piano sound and quasi-piano sound are based on their basic time domain and frequency domain characteristics. The time domain envelope diagram of the classic piano sound is as follows: Figure 1As shown, 101 marks an onset time. In the onset stage of the timbre, the energy comparison historical audio stream data begins to rise suddenly, and the overall curve goes through onset and attenuation to reach the marked point 102. The time point between 101 and 102 is an unstable transition zone (corresponding to the piano noise in the transition zone), which is often around 15-20 milliseconds and is an important factor in exciting the piano noise. After that, the piano sound envelope comes to a relatively stable sustaining interval (corresponding to the piano noise in the delay period) and ends at the marked point 103. The energy size of the sustaining interval is another factor in the excitation of the piano sound. This time interval is usually between 500 and 2000 milliseconds for ordinary piano timbres. The sustaining interval is also the main time interval in which the piano sound is subjectively felt. After that, the timbre goes through a release time interval to complete a complete musical sound process. From a time domain perspective, if you want to suppress a single piano sound, you need to pay special attention to the start 101. Suppression takes effect from this point. Since the audio stream is processed online, there is no future direction information. If the delay energy or loudness is insufficient, the transition zone energy will still be subject to certain suppression control. The size of the suppression control is related to the tuning parameters. According to the size of the suppression parameter setting, it will control the energy of the transition zone and the delay period at the same time, so that the final output reaches the target curve shape marked at 104. Pay attention to adjusting the release time of the effect so that it can match the maximum sound length of a certain type of piano sound.

[0033] In the present application embodiment, Figure 2 As shown in the figure, it is a common piano timbre frequency domain characteristic diagram. As a musical timbre, the piano sound contains a fundamental frequency f0 and several harmonics f1~f n . From the perspective of overall spectrum energy, the distribution decreases as the harmonic order increases. The common 88-key piano has obvious high-frequency loss in the keys below the third group of small notes. This is also one of the most obvious characteristics of piano sound. The high-frequency loss makes the high-frequency masking phenomenon completely disappear, resulting in extremely small distortion being clearly perceived. Another focus of piano sound distortion is the energy of the risk frequency band, such as Figure 2 The risk frequency band marked in the example is above the fundamental frequency f0 of the musical sound and below the fourth harmonic f3. The location of the risk frequency band is related to the low-frequency resonance frequency of the speaker. The purpose of the suppression algorithm of this patent is also to control the harmonic (or fundamental frequency) components in this interval so that they are attenuated according to a certain ratio. Figure 2 The point marked with 201 shows a frequency point that needs to be controlled, and 202 shows a target frequency point after being controlled. At the same time, the corresponding improvement of the critical band can play two roles: compensating for the volume loss and masking the possible remaining critical band noise. Figure 2 An example of a boosted frequency point of an adjacent frequency band is marked in Figure 203. Through the above identification and control of time domain and frequency domain features, the timbre with high noise risk is changed and output from both the time domain and the frequency domain, thereby achieving the control of piano noise.

[0034] The present application provides a noise detection method. Figure 3 FIG. 1 is a flow chart of a noise detection method provided by an embodiment of the present application, which can be applied to electronic devices. Figure 3 As shown, the noise detection method provided in the embodiment of the present application may include the following steps 201 and 202.

[0035] Step 201: When playing a multimedia file, the electronic device obtains a first parameter of a target single frame of data.

[0036] In the embodiment of the present application, the target single frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: first frequency band energy and first loudness.

[0037] Optionally, in an embodiment of the present application, the electronic device may obtain the frequency band energy of the target single frame data and determine whether the target single frame data has noise by using a piano sound suppression algorithm based on physical quantities such as amplitude and energy.

[0038] Optionally, in an embodiment of the present application, after acquiring the target single frame data, the electronic device may perform high-pass or high-frequency band-pass filtering on the target single frame data according to the high-frequency missing phenomenon of piano sound to obtain the first criterion for noise (i.e., timbre criterion).

[0039] Optionally, in an embodiment of the present application, the electronic device can perform simulation and control based on psychoacoustic perception quantities to achieve an implementation method for piano sound detection and suppression.

[0040] Optionally, in the embodiment of the present application, the electronic device can select a characteristic critical band filter group (critical band-pass filter bands) to filter the target single frame data. The critical band reflects the physiological topological structure of the human inner ear. This structure results in a limited auditory frequency domain resolution that can be perceived within a certain bandwidth above and below a fixed center frequency (resulting in masking, popping, etc.). Among them, the critical band effective bandwidth (ie, ERB) is related to the center frequency f c The relationship is as follows:

[0041] ERB(f c )=24.7×(4.37×f c +1)Hz

[0042] The critical band excitation data will be used as basic judgment data for timbre judgment and control in the following steps.

[0043] Optionally, in an embodiment of the present application, the electronic device may evaluate the loudness of adjacent frequency bands of the critical frequency band in which the high-risk frequency band (i.e., the resonant frequency band of the speaker of the electronic device) is located. If the loudness in the adjacent frequency band does not exceed the hearing threshold, there is no reverse masking effect and there is a risk of piano noise; if the loudness in the adjacent frequency band exceeds the hearing threshold, there is a reverse masking effect and the risk of piano noise is low or zero.

[0044] Step 202: The electronic device detects whether there is noise in the target single frame data according to the target parameters.

[0045] In the embodiment of the present application, the above-mentioned target parameters include at least a first parameter.

[0046] Optionally, in an embodiment of the present application, the electronic device determines whether there is noise in the target single frame data by judging the first frequency band energy or the first loudness, and the noise may be piano noise.

[0047] Optionally, in the embodiment of the present application, the electronic device calculates the loudness on the premise of determining the front and back masking and the frequency domain masking, and sets a threshold value in each critical frequency band according to the equal loudness curve and other weighting curves. When the loudness of the target single-frame data exceeds the threshold value, the target single-frame data has a piano noise risk, and when the loudness of the target single-frame data does not exceed the threshold value, the target single-frame data does not have a piano noise risk (i.e., low risk or zero risk). Among them, the mutual masking model can adopt a simplified triangle model, that is, the loudness P of the target single-frame data is masked by the loudness P' of other single-frame data in turn, and the loudness masking strength Mlt of the final target single-frame data is determined by the loudness of other single-frame data and the frequency of the target single-frame data:

[0048] ml(P,P')=yl(P')-k m |H(P')-H(P)|

[0049] Mlt=20log 10 (∑10 ml(P,P’) / 20 )| p≠p’ ; Mlt≥0

[0050] Where ml is the single-tone masking effect of the loudness P' of other single-frame data on the loudness P of the target single-frame data, which is determined by the super-hearing threshold yl of the loudness P' of other single-frame data, the adjustable slope constant k m (usually set to 25dB / critical frequency band) and the single frequency pure tone energy value H (P fundamental frequency).

[0051] It should be noted that the purpose of this application is to provide a method for detecting and controlling a single piano sound, which is different from the previous algorithm based on timbre detection and control, and can improve the accuracy of piano sound detection and suppression. This application uses a time domain feature judgment method, combined with the pitch frequency distribution of the piano sound, to accurately judge the fundamental frequency of the piano sound. And the piano noise is comprehensively judged by combining the power value of the historical single frame data and the current single frame data (i.e., the target single frame data). The piano sound onset time point is judged by the time domain feature, and the piano sound is processed more accurately by the obtained piano noise fundamental frequency and onset time to complete the control of the piano noise. The algorithm of this application has improved the amount of calculation compared with the piano sound control algorithm of the prior art, but it currently runs well in the integrated environment of several power amplifier chips. Because it is based on the control of single frame data with piano noise risk rather than the control strategy of all data, the purpose is to ensure that non-piano sound or non-piano noise in piano sound is not controlled, thereby improving the authenticity of the sound source playback.

[0052] The embodiment of the present application provides a noise detection method, and the electronic device can obtain the first frequency band energy and / or the first loudness of the target single frame data to be played in the multimedia file when playing the multimedia file, so as to detect whether the target single frame data has noise according to the first frequency band energy and / or the first loudness. Because when the electronic device plays the multimedia file, the electronic device can obtain the first parameter of the target single frame data to be played in the multimedia file, so as to pre-detect whether the target single frame data has noise according to the first parameter, so as to pre-determine whether the target single frame data needs to be processed. Therefore, in the embodiment of the present application, the single frame data in the multimedia file can be obtained in advance to determine whether each single frame data has noise, so that when a single frame data has noise, the single frame data can be processed without affecting the timbre and volume of the data therein, so that the electronic device has a high accuracy in detecting and processing the piano noise.

[0053] Optionally, in the embodiment of the present application, the above target parameter includes the first parameter. Figure 3 ,like Figure 4 As shown, the above step 201 can be specifically implemented by the following step 201a, and the above step 202 can be specifically implemented by the following step 202a.

[0054] Step 201a: When playing a multimedia file, the electronic device performs a first filtering process on the target single frame data to obtain a first parameter.

[0055] In the embodiment of the present application, the above-mentioned first parameter is a parameter of the target single frame data after the first filtering process.

[0056] Optionally, in an embodiment of the present application, the electronic device may perform high-pass or high-frequency band-pass filtering on the target single-frame data to obtain a timbre criterion for the noise and determine the frequency band energy (ie, the first frequency band energy) of the target single-frame data.

[0057] Optionally, in the embodiment of the present application, the electronic device may process the target single frame data to determine the loudness (ie, the first loudness) of the target single frame data.

[0058] Step 202a: If the first parameter does not satisfy the first preset condition, the electronic device determines that the target single frame data is non-piano sound data and does not contain noise.

[0059] Optionally, in the embodiment of the present application, the first preset condition may be any one of the following: the first frequency band energy is less than or equal to the first preset energy, the first loudness is greater than or equal to the first preset loudness, etc.

[0060] Optionally, in an embodiment of the present application, when the first parameter is the first frequency band energy, and the first frequency band energy is greater than the first preset energy, the electronic device determines that the target single frame data is non-piano sound data and there is no risk of piano noise.

[0061] Optionally, in an embodiment of the present application, when the first parameter is a first loudness, and the first loudness is less than a first preset loudness, the electronic device determines that the target single frame data is non-piano sound data and there is no risk of piano noise.

[0062] It should be noted that the electronic device performs noise risk assessment on the target single frame data according to the timbre criterion of piano sound, so that when the energy of the characteristic frequency band exceeds a certain preset energy, the target single frame data is judged as non-piano timbre.

[0063] In an embodiment of the present application, the electronic device can perform a first filtering process on the target single frame data to obtain a first parameter, so that when the first parameter does not meet the first preset condition, it can be determined that the target single frame data is non-piano sound data and there is no piano noise risk, thereby accurately determining whether there is a piano noise risk in the single frame data.

[0064] Optionally, in the embodiment of the present application, the above target parameter includes a first parameter and a second parameter. Figure 3 ,like Figure 5 As shown, the above step 202 can be specifically implemented by the following step 202b, and after step 202b, the noise detection method provided in the embodiment of the present application can also include the following step 301.

[0065] Step 202b: If the first parameter satisfies the first preset condition, the electronic device determines that the target single frame data is piano sound data, and performs a second filtering process on the target single frame data to obtain a second parameter.

[0066] In the embodiment of the present application, the second parameter is a parameter of the target single frame data after the second filtering process, and the second parameter includes at least one of the following: second frequency band energy and second loudness.

[0067] Optionally, in an embodiment of the present application, when the first parameter is the first frequency band energy, and the first frequency band energy is less than or equal to the first preset energy, the electronic device determines that the target single frame data is piano sound data.

[0068] Optionally, in the embodiment of the present application, when the first parameter is a first loudness, and the first loudness is greater than or equal to a first preset loudness, the electronic device determines that the target single frame data is piano sound data.

[0069] Optionally, in an embodiment of the present application, after the electronic device determines that the target single frame data is piano sound data, the electronic device may perform a second filtering process on the target single frame data to obtain a second frequency band energy or a second loudness.

[0070] Optionally, in the embodiment of the present application, the second parameter includes the second frequency band energy. The step 202b can be implemented by the following steps 202b1 and 202b2.

[0071] Step 202b1: If the first parameter satisfies the first preset condition, the electronic device determines that the target single frame data is piano sound data, determines a target frequency in a preset risk frequency band among at least one frequency corresponding to the target single frame data, and obtains the frequency band energy corresponding to the target frequency.

[0072] Optionally, in the embodiment of the present application, the electronic device performs analysis based on the particularity of the frequency domain distribution of piano sound keys. The piano sound on the keys defines a set of specific center frequencies according to ISO 16, where 440 Hz is used as the reference frequency. The twelve-tone equal temperament system can deduce the frequency f(n) of N semitones away from the A440 sound:

[0073] f(n)=440×2 n / 12

[0074] In this step, the above specific frequency points will be narrow-band filtered, and the electronic device can obtain the Figure 2 The single-frame average energy of the frequencies in the medium-risk frequency band or the root mean square value RMS of the frequencies (ie, the second frequency band energy).

[0075] Step 202b2: The electronic device determines the second frequency band energy according to the frequency band energy corresponding to the target frequency.

[0076] Step 301: The electronic device determines whether the piano sound data has a noise risk according to the second parameter.

[0077] Optionally, in an embodiment of the present application, the electronic device may determine whether the energy of the second frequency band exceeds a second preset energy to determine whether there is a noise risk in the piano sound data.

[0078] Optionally, in an embodiment of the present application, the electronic device may consider one by one whether the absolute energy of the frequency band in the filter group exceeds the second preset energy. If it does not exceed the second preset energy, the target single frame data is determined to have no piano noise risk (i.e., low-risk piano noise or zero-risk piano noise); if the absolute energy of the frequency band in the filter group exceeds the second preset energy, the target single frame data is determined to have a piano noise risk.

[0079] Optionally, in an embodiment of the present application, selection of the second preset energy is related to parameters of a speaker of the electronic device and a data size of the multimedia file.

[0080] In an embodiment of the present application, the electronic device can determine whether the first parameter satisfies the first preset condition, and then when the first parameter satisfies the first preset condition, determine that the target single frame data is piano sound data, so as to perform a second filtering process on the target single frame data, thereby obtaining the second frequency band energy and / or the second loudness, and determine whether the target single frame data has a noise risk based on the second frequency band energy and / or the second loudness, so that the electronic device can accurately determine whether the single frame data has a piano noise risk.

[0081] Optionally, in the embodiment of the present application, combined with Figure 5 ,like Figure 6 As shown, the above step 301 can be specifically implemented by the following step 301a or step 301b, and before step 301a and step 301b, the noise detection method provided in the embodiment of the present application further includes step 401.

[0082] Step 401: The electronic device determines whether a second parameter meets a second preset condition.

[0083] Step 301a: If the second parameter does not satisfy the second preset condition, the electronic device determines that the piano sound data does not have a noise risk.

[0084] Optionally, in the embodiment of the present application, the second preset condition may be any one of the following: the second frequency band energy is greater than or equal to the second preset energy, the second loudness is greater than or equal to the second preset loudness, etc.

[0085] Optionally, in the embodiment of the present application, when the second parameter is the second frequency band energy, and the second frequency band energy is less than the second preset energy, the electronic device determines that there is no noise risk in the piano sound data.

[0086] Optionally, in the embodiment of the present application, when the second parameter is a second loudness, and the second loudness is less than a second preset loudness, the electronic device determines that there is no noise risk in the piano sound data.

[0087] Step 301b: If the second parameter satisfies the second preset condition, the electronic device determines that the piano sound data has a noise risk, and determines the noise risk type to which the piano sound data belongs based on the target difference.

[0088] In the embodiment of the present application, the above-mentioned target difference is the difference between the second parameter and the third parameter of the historical single frame data, and the third parameter is the parameter of the historical single frame data after the second filtering process.

[0089] Optionally, in the embodiment of the present application, when the second parameter is the second frequency band energy, and the second frequency band energy is greater than or equal to the second preset energy, the electronic device determines that the piano sound data has a noise risk.

[0090] Optionally, in the embodiment of the present application, when the second parameter is a second loudness, and the second loudness is greater than or equal to a second preset loudness, the electronic device determines that the piano sound data has a noise risk.

[0091] Optionally, in an embodiment of the present application, after the electronic device determines that there is a noise risk in the piano sound data, the electronic device can obtain a third parameter of the historical single frame data after the second filtering process, and calculate a target difference between the second parameter and the third parameter.

[0092] Optionally, in the embodiment of the present application, the electronic device may determine the noise risk type (ie, transition zone piano noise type or delay period piano noise type) to which the piano sound data belongs based on the target difference between the second parameter and the third parameter.

[0093] Optionally, in an embodiment of the present application, the electronic device may determine the increase in loudness of the target single frame data. If the increase in loudness exceeds a third preset loudness of a frequency band in the filter group, the electronic device determines that the target single frame data is a transition band piano noise type.

[0094] Optionally, in the embodiment of the present application, the setting of the third preset loudness is related to the loudness change perception threshold JND.

[0095] Optionally, in the embodiment of the present application, combined with Figure 6 ,like Figure 7 As shown, the above step 301b can be specifically implemented by the following step 301b1 or step 301b2, and before step 301b1 and step 301b2, the noise detection method provided in the embodiment of the present application further includes step 402.

[0096] Step 402: The electronic device determines whether the target difference is greater than or equal to a first preset threshold.

[0097] Step 301b1: If the second parameter satisfies the second preset condition, the electronic device determines that the piano sound data has a noise risk, and if the target difference is greater than or equal to the first preset threshold, determines that the noise risk type of the piano sound data is a transition zone piano noise type.

[0098] Step 301b2: If the second parameter satisfies the second preset condition, the electronic device determines that the piano sound data has a noise risk, and if the target difference is less than the first preset threshold, determines that the noise risk type of the piano sound data is a delayed piano noise type.

[0099] It should be noted that the electronic device can further analyze the target single-frame data with noise risk to determine whether the piano noise risk in the target single-frame data is a transition zone piano noise type or a delay period piano noise type. Specifically, the electronic device compares the second parameter obtained in step 202b with the parameter of the historical single-frame data corresponding to the target single-frame data. If the difference does not exceed the first preset threshold, the target single-frame data is determined to be a delay period piano noise type. If the difference exceeds the first preset threshold, the target single-frame data is determined to be a transition zone piano noise type. The processing of the transition zone piano noise type needs to be synchronized with the onset of the piano sound, so the onset time needs to be further analyzed.

[0100] In an embodiment of the present application, the electronic device can determine whether the second parameter satisfies the second preset condition, and thereby determine that the piano sound data does not have a noise risk when the second parameter does not satisfy the second preset condition; or, when the second parameter satisfies the second preset condition, determine that the piano sound data has a noise risk, and thereby determine the noise risk type to which the piano sound data belongs based on the difference between the second parameter and the third parameter of the historical single frame data after the second filtering process. Therefore, the electronic device can accurately determine the noise risk type to which the piano sound data belongs.

[0101] Optionally, in the embodiment of the present application, combined with Figure 6 ,like Figure 8 As shown, after "determining the noise risk type to which the piano sound data belongs" in the above step 301b, the noise detection method provided in the embodiment of the present application may further include the following steps 501 and 502.

[0102] Step 501: The electronic device obtains a fourth parameter corresponding to the noise risk type to which the piano sound data belongs.

[0103] In the embodiment of the present application, the fourth parameter includes: attack time, preset timbre attack sound and release time.

[0104] Optionally, in an embodiment of the present application, the electronic device may perform an oscillation start time point analysis on the target single frame data to determine a fourth parameter of the target single frame data.

[0105] Step 502: The electronic device calculates a target gain value according to the fourth parameter, and performs compensation processing on a fifth parameter corresponding to the target frequency according to the target gain value.

[0106] In the embodiment of the present application, the target frequency is a frequency in a preset risk frequency band among at least one frequency corresponding to the target single frame data, and the fifth parameter includes at least one of the following: initial frequency band energy and initial loudness of the target single frame data.

[0107] Optionally, in an embodiment of the present application, the electronic device can process the target single frame data according to the frequency band energy of the target single frame data (or the loudness of the target single frame data) and the noise risk type of the target single frame data: no piano noise risk type (i.e., low risk or zero risk), transition zone piano noise type, and delay period piano noise type. The target gain value is calculated based on the fourth parameter to be loaded into the risk band to suppress or reduce the risk of noise in the piano sound.

[0108] Optionally, in an embodiment of the present application, after the electronic device compensates for the fifth parameter corresponding to the target frequency according to the target gain value, the electronic device can perform energy compensation on the suppressed frequency band (i.e., the frequency band adjacent to the risk frequency band) to compensate for the volume and further control the weak noise.

[0109] Optionally, in an embodiment of the present application, after the electronic device performs compensation processing on the fifth parameter corresponding to the target frequency according to the target gain value, the electronic device can ensure that the output loudness of the target single frame data is the same as the loudness of the original signal by calculating the loudness model of the target single frame data.

[0110] In the embodiment of the present application, the electronic device can accurately detect the single frame data of the piano sound in the multimedia file that has the risk of piano noise if the amount of calculation allows, thereby making it possible to realize parallel multi-tone time domain narrowband filtering. The frequency characteristics of the piano temperament system are fully utilized. The suppression of piano sound is continuous and has zero delay (no need for caching and pre-reading). This is due to the judgment of the piano noise type in the transition zone and the piano noise type in the delay period, as well as the judgment of the mode and the processing of the dynamic suppression curve. By compensating the volume of the piano sound, small noises are masked (the compensation strategy allows small noises to exist, and these small noises may be masked due to the enhancement of the critical upper and lower frequency bands). And by accurately reconstructing the piano harmonic components, the pitch where the piano noise appears is accurately located, making it easier to control the timbre and harmonic distribution of the piano sound.

[0111] In the embodiment of the present application, the electronic device is also based on the psychoacoustic model, so that in addition to achieving the above-mentioned effects in the embodiment of the present application, the loudness threshold can be more accurate for judging the timbre onset through the critical band excitation level loudness according to human perception. The critical band filter group can be used to directly judge the effect of mutual masking between frequency bands. According to the effect of mutual masking of musical sounds, a more direct piano sound risk judgment can be made, that is, when the risk band is strongly masked (including front and back time masking and frequency domain masking), the piano noise is also masked, and the risk of producing piano noise is greatly reduced. Therefore, compensation can be directly performed by calculating the loudness. In addition, a timbre frequency domain template can be constructed through a table lookup model to determine a trade-off point between restoring the timbre and restoring the volume in the correction control.

[0112] In an embodiment of the present application, after the electronic device determines the noise risk type to which the piano sound data belongs, the electronic device can obtain the attack time, preset timbre attack sound and release time corresponding to the noise risk type to which the piano sound data belongs, so as to calculate a target gain value based on these parameters, and based on the target gain value, perform compensation processing on the initial frequency band energy or initial loudness corresponding to at least one frequency corresponding to the target single frame data that is within the preset risk frequency band, so that the electronic device has a higher accuracy in detecting and processing piano noise.

[0113] It should be noted that the noise detection method provided in the embodiment of the present application can be executed by a noise detection device or a control module in the noise detection device for executing the noise detection method. In the embodiment of the present application, the noise detection device provided in the embodiment of the present application is described by taking the noise detection device executing the loading noise detection method as an example.

[0114] Fig. 9 FIG. 1 shows a possible structural diagram of a noise detection device involved in an embodiment of the present application. Fig. 9 As shown, the noise detection device 70 may include: an acquisition module 71 and a detection module 72 .

[0115] The acquisition module 71 is used to acquire the first parameter of the target single frame data when playing the multimedia file, the target single frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: first frequency band energy and first loudness. The detection module 72 is used to detect whether there is noise in the target single frame data according to the target parameter, and the target parameter includes at least the first parameter.

[0116] In a possible implementation, the target parameter includes the first parameter. Fig. 9 ,like Fig.10As shown, the noise detection device 70 provided in the embodiment of the present application may also include: a processing module 73. The processing module 73 is used to perform a first filtering process on the target single frame data to obtain a first parameter, which is a parameter of the target single frame data after the first filtering process. The detection module 72 is specifically used to determine that the target single frame data is non-piano sound data and there is no noise if the first parameter does not meet the first preset condition.

[0117] In a possible implementation, the target parameter includes a first parameter and a second parameter. The detection module 72 is specifically configured to determine that the target single frame data is piano sound data if the first parameter satisfies a first preset condition. Fig. 9 ,like Fig.11 As shown, the noise detection device 70 provided in the embodiment of the present application may also include: a processing module 73 and a determination module 74. The processing module 73 is used to perform a second filtering process on the target single frame data to obtain a second parameter, which is a parameter of the target single frame data after the second filtering process, and the second parameter includes at least one of the following: second frequency band energy and second loudness. The determination module 74 is used to determine whether the piano sound data has a noise risk according to the second parameter.

[0118] In one possible implementation, the determination module 74 is specifically used to determine that the piano sound data does not have a noise risk if the second parameter does not satisfy the second preset condition; or, if the second parameter satisfies the second preset condition, determine that the piano sound data has a noise risk, and determine the noise risk type to which the piano sound data belongs based on a target difference, where the target difference is the difference between the second parameter and a third parameter of the historical single frame data, where the third parameter is a parameter of the historical single frame data after the second filtering process.

[0119] In one possible implementation, the determination module 74 is specifically used to determine that the noise risk type to which the piano sound data belongs is a transition zone piano noise type if the target difference is greater than or equal to a first preset threshold; or, if the target difference is less than the first preset threshold, determine that the noise risk type to which the piano sound data belongs is a delayed period piano noise type.

[0120] In a possible implementation, the acquisition module 71 is further configured to, after determining the noise risk type to which the piano sound data belongs according to the target difference, acquire a fourth parameter corresponding to the noise risk type to which the piano sound data belongs, the fourth parameter including: attack time, preset timbre attack sound, and release time. Fig.11 ,like Fig.12As shown, the noise detection device 70 provided in the embodiment of the present application may further include: a calculation module 75. The calculation module 75 is used to calculate the target gain value according to the fourth parameter obtained by the acquisition module 71. The processing module 73 is also used to perform compensation processing on the fifth parameter corresponding to the target frequency according to the target gain value, and the target frequency is a frequency in a preset risk frequency band among at least one frequency corresponding to the target single frame data, and the fifth parameter includes at least one of the following: initial frequency band energy and initial loudness of the target single frame data.

[0121] In a possible implementation, the second parameter includes a second frequency band energy. The processing module 73 is specifically configured to determine a target frequency in a preset risk frequency band among at least one frequency corresponding to the target single frame data, and obtain the frequency band energy corresponding to the target frequency; and determine the second frequency band energy according to the frequency band energy corresponding to the target frequency.

[0122] The noise detection device provided in the embodiment of the present application can implement each process implemented by the noise detection device in the above method embodiment. To avoid repetition, the detailed description will not be repeated here.

[0123] The embodiment of the present application provides a noise detection device. When an electronic device plays a multimedia file, the electronic device can obtain the first parameter of the target single-frame data to be played in the multimedia file to pre-detect whether the target single-frame data has noise according to the first parameter, so as to pre-determine whether the target single-frame data needs to be processed. Therefore, in the embodiment of the present application, the single-frame data in the multimedia file can be obtained in advance to determine whether each single-frame data has noise, so that when a single-frame data has noise, the single-frame data can be processed without affecting the timbre and volume of the data therein, so that the electronic device has a higher accuracy in detecting and processing piano noise.

[0124] The noise detection device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0125] The noise detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0126] Alternatively, if Fig.13 As shown, an embodiment of the present application also provides an electronic device M00, including a processor M01, a memory M02, and a program or instruction stored in the memory M02 and executable on the processor M01. When the program or instruction is executed by the processor M01, each process of the above-mentioned noise detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0127] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0128] Fig.14 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0129] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.

[0130] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.14The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0131] Among them, the processor 110 is used to obtain a first parameter of target single-frame data when playing a multimedia file, where the target single-frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: first frequency band energy and first loudness; and based on the target parameter, detect whether there is noise in the target single-frame data, where the target parameter at least includes the first parameter.

[0132] The embodiment of the present application provides an electronic device. When the electronic device plays a multimedia file, the electronic device can obtain the first parameter of the target single-frame data to be played in the multimedia file to pre-detect whether the target single-frame data has noise according to the first parameter, so as to pre-determine whether the target single-frame data needs to be processed. Therefore, in the embodiment of the present application, the single-frame data in the multimedia file can be obtained in advance to determine whether each single-frame data has noise, so that when a single-frame data has noise, the single-frame data can be processed without affecting the timbre and volume of the data therein, so that the electronic device has a higher accuracy in detecting and processing piano noise.

[0133] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 109 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 110 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.

[0134] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned noise detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0135] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0136] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned noise detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0137] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0138] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0139] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0140] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A noise detection method, characterized in that: The method comprises: In the case of playing a multimedia file, obtaining a first parameter of target single-frame data, wherein the target single-frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: first frequency band energy and first loudness; Detecting whether there is noise in the target single frame data according to the target parameters; The target parameters include the first parameter and the second parameter; The detecting, according to the target parameter, whether the target single frame data has noise includes: If the first parameter satisfies the first preset condition, the target single frame data is determined to be piano sound data, and the target single frame data is subjected to a second filtering process to obtain the second parameter, the second parameter being a parameter of the target single frame data after the second filtering process, the second parameter including at least one of the following: second frequency band energy and second loudness; According to the second parameter, it is determined whether the piano sound data has a noise risk.

2. The method according to claim 1, characterized in that The target parameters include the first parameter; The first parameter of obtaining the target single frame data includes: Performing a first filtering process on the target single frame data to obtain the first parameter, where the first parameter is a parameter of the target single frame data after the first filtering process; The detecting, according to the target parameter, whether the target single frame data has noise includes: If the first parameter does not satisfy the first preset condition, it is determined that the target single frame data is non-piano sound data and does not contain noise.

3. The method according to claim 1, characterized in that The determining, according to the second parameter, whether the piano sound data has a noise risk comprises: If the second parameter does not satisfy the second preset condition, determining that the piano sound data does not have a noise risk; If the second parameter satisfies the second preset condition, it is determined that the piano sound data has a noise risk, and the noise risk type of the piano sound data is determined based on the target difference. The target difference is the difference between the second parameter and the third parameter of the historical single frame data, and the third parameter is the parameter of the historical single frame data after the second filtering processing.

4. The method according to claim 3, characterized in that The step of determining the noise risk type to which the piano sound data belongs according to the target difference includes: If the target difference is greater than or equal to a first preset threshold, determining that the noise risk type to which the piano sound data belongs is a transitional zone piano noise type; If the target difference is less than a first preset threshold, it is determined that the noise risk type to which the piano sound data belongs is a delayed piano noise type.

5. The method according to claim 4, characterized in that After determining the noise risk type to which the piano sound data belongs according to the target difference, the method further includes: Acquire a fourth parameter corresponding to the noise risk type to which the piano sound data belongs, the fourth parameter comprising: an attack time, a preset timbre attack sound, and a release time; A target gain value is calculated according to the fourth parameter, and a fifth parameter corresponding to a target frequency is compensated according to the target gain value, where the target frequency is a frequency in a preset risk frequency band among at least one frequency corresponding to the target single frame data, and the fifth parameter includes at least one of the following: initial frequency band energy and initial loudness of the target single frame data.

6. A noise detection device, characterized in that: The noise detection device comprises: an acquisition module and a detection module; The acquisition module is used to acquire a first parameter of target single-frame data when playing a multimedia file, wherein the target single-frame data is any frame data to be played in the multimedia file, and the first parameter includes at least one of the following: a first frequency band energy and a first loudness; The detection module is used to detect whether there is noise in the target single frame data according to the target parameters; The target parameters include the first parameter and the second parameter; The detection module is specifically configured to determine that the target single-frame data is piano sound data if the first parameter satisfies a first preset condition; The noise detection device further includes: a processing module and a determination module; The processing module is used to perform a second filtering process on the target single frame data to obtain the second parameter, where the second parameter is a parameter of the target single frame data after the second filtering process, and the second parameter includes at least one of the following: second frequency band energy and second loudness; The determination module is used to determine whether the piano sound data has a noise risk according to the second parameter.

7. The noise detection device according to claim 6, characterized in that: The target parameters include the first parameter; The noise detection device further includes: a processing module; The processing module is used to perform a first filtering process on the target single frame data to obtain the first parameter, where the first parameter is a parameter of the target single frame data after the first filtering process; The detection module is specifically used to determine that the target single frame data is non-piano sound data and does not contain noise if the first parameter does not meet the first preset condition.

8. The noise detection device according to claim 6, characterized in that: The determination module is specifically used to determine that the piano sound data does not have noise risk if the second parameter does not meet the second preset condition; or, if the second parameter meets the second preset condition, determine that the piano sound data has noise risk, and determine the noise risk type to which the piano sound data belongs based on a target difference, wherein the target difference is the difference between the second parameter and a third parameter of the historical single frame data, and the third parameter is the parameter of the historical single frame data after the second filtering process.

Citation Information

Patent Citations

  • Method for improving piano playing sound quality of loudspeaker

    CN108322868A

  • Transient Detection for Speaker Distortion Reduction

    US20190074805A1