Piano noise risk detection method and device, electronic equipment and readable storage medium
Patent Information
- Application Number
- CN202611318137.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-20
AI Technical Summary
然而,实际应用中,采用上述检测信号进行测试的结果与用户实际播放钢琴曲时的听感往往存在较大偏差,检测通过的产品在真实使用场景下仍可能出现钢琴杂音,其检测准确度较低,难以满足产品质量管控的需求
[0016]因此,本申请提供的技术方案通过获取钢琴键音的基频并生成模拟钢琴音色的激励信号作为杂音检测信号,且杂音检测信号包括基波成分和若干个谐波成分,基波成分与各谐波成分之间的能量占比各不相同、随时间变化的包络互不相同,使得杂音检测信号在频谱特征和时域动态特性上与真实钢琴曲的激励信号高度一致,从而使得待测音频播放设备在播放该杂音检测信号时,待测音频播放设备的振动状态能够与其播放真实钢琴曲时的振动状态相匹配。在此基础上,通过采集待测音频播放设备播放该杂音检测信号时产生的响应信号,并从响应信号中提取目标频段内的第一信号成分,目标频段的下限频率高于杂音检测信号的最高频率,根据第一信号成分确定待测音频播放设备是否存在钢琴杂音风险,由于响应信号是在与真实钢琴曲匹配的振动状态下采集的,因此响应信号中的杂音成分能够真实反映待测音频播放设备在实际播放钢琴曲时的杂音表现,并且通过将分析频段限定在高于杂音检测信号最高频率的目标频段,排除了杂音检测信号中基波与谐波等正常乐音成分的干扰,使检测结果直接指向待测音频播放设备自身产生的杂音,从而能够准确判定待测音频播放设备是否存在钢琴杂音风险。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of sound testing technology, and in particular to a method, apparatus, electronic device, and readable storage medium for detecting piano noise risk. Background Technology
[0002] Speaker modules and audio equipment containing speaker modules typically undergo audio performance testing before leaving the factory to ensure reliable sound quality. Among the common sound quality issues, piano noise is a noticeable problem. When playing piano music, the human ear can clearly perceive abnormal noises such as hissing or buzzing, severely impacting the user experience. Analysis shows that this type of failure is usually related to the structural design or manufacturing process of the speaker module, such as improper airflow channel design or inadequate cavity sealing.
[0003] Currently, the commonly used detection signal for detecting piano noise in loudspeakers typically uses the internationally standardized nominal center frequency (e.g., 1kHz) as the excitation source to detect abnormal loudspeaker responses. However, in practical applications, the test results using the above detection signal often deviate significantly from the user's actual listening experience when playing piano music. Products that pass the test may still exhibit piano noise in real-world usage scenarios, indicating low detection accuracy and difficulty in meeting product quality control requirements. Summary of the Invention
[0004] The main objective of this application is to provide a method, device, electronic device, and readable storage medium for detecting piano noise risks, with the aim of improving the accuracy of piano noise risk detection.
[0005] This application provides a method for detecting piano noise risks, the method comprising: Obtain the fundamental frequency of at least one piano key note; Based on the fundamental frequency of the at least one piano key tone, a noise detection signal is generated, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each of the harmonic components is different, and the envelopes of the fundamental component and each of the harmonic components are different over time; Control the audio playback device under test to play the noise detection signal, and collect the response signal generated by the audio playback device under test when playing the noise detection signal; Extract a first signal component within the target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; Based on the first signal component, determine whether the audio playback device under test has a risk of piano noise.
[0006] In one embodiment, the step of generating a noise detection signal based on the fundamental frequency of the at least one piano key tone includes: The fundamental frequency of the piano key tone is used as the frequency of the fundamental component; Based on the frequency of the fundamental component, the frequencies of each candidate harmonic component are generated, wherein the frequencies of each candidate harmonic component are offset from integer multiples of the frequency of the fundamental component. Determine whether the highest frequency among the frequencies of each candidate harmonic component is greater than a preset frequency threshold. If so, the noise detection signal is synthesized based on each candidate harmonic component with a frequency less than or equal to the preset frequency threshold, and the fundamental component. If not, the noise detection signal is synthesized based on each of the candidate harmonic components and the fundamental component.
[0007] In one embodiment, the step of controlling the audio playback device under test to play the noise detection signal includes: The noise detection signal is configured as a frequency sweep signal, and the frequency of the frequency sweep signal changes with time within a preset frequency range; The audio playback device under test is controlled to play the sweep signal, wherein the frequency range of the sweep signal covers the noise risk band or the frequency band with the most noise of the audio playback device under test.
[0008] In one embodiment, the step of determining whether the audio playback device under test has a risk of piano noise based on the first signal component includes: The first signal component is separated into harmonic distortion component, intermodulation distortion component and broadband noise component; The energy values of the harmonic distortion component, the intermodulation distortion component, and the broadband noise component are statistically analyzed, and the energy values are weighted and fused to obtain the noise energy value. If the noise energy value is greater than or equal to the preset energy threshold, then the audio playback device under test is determined to have a risk of piano noise. If the noise energy value is less than the preset energy threshold, then it is determined that the audio playback device under test does not pose a risk of piano noise.
[0009] In one embodiment, the method further includes: Before controlling the audio playback device under test to play the noise detection signal, the background noise signal of the environment where the audio playback device under test is located is collected, and the background noise energy value of the background noise signal in the target frequency band is extracted; The preset energy threshold is determined based on the background noise energy value; The preset energy threshold is positively correlated with the background noise energy value.
[0010] In one embodiment, after the step of acquiring the response signal generated when the audio playback device under test plays the noise detection signal, the method further includes: Based on the envelope of the amplitude of each frequency component in the noise detection signal as a function of time, signal segments corresponding to the oscillation stage, the initial decay stage, the continuous decay stage, and the release stage are determined from the response signal. Extract the second signal component of each of the aforementioned signal segments within the target frequency band; Based on the second signal component corresponding to each signal segment, determine whether there is noise in the audio playback device under test within the stage corresponding to each signal segment; If the audio playback device under test has noise in at least one phase corresponding to the signal segment, it is determined that the audio playback device under test has a risk of piano noise.
[0011] In one embodiment, when the audio playback device under test includes multiple speakers, after the step of generating a noise detection signal based on the fundamental frequency of the at least one piano key tone, the method further includes: Each of the aforementioned speakers is driven to play the noise detection signal, and a first response signal generated when each of the aforementioned speakers plays the noise detection signal is acquired; Simultaneously drive each of the speakers to play the noise detection signal, and collect the second response signal generated when each of the speakers plays the noise detection signal simultaneously; Using the first response signal corresponding to each loudspeaker as a separation reference, the signal component corresponding to each loudspeaker is separated from the second response signal; Based on the signal components corresponding to each speaker, determine whether there is a risk of piano noise in each speaker during collaborative playback.
[0012] Furthermore, to achieve the above objectives, this application also provides a piano noise risk detection device, the piano noise risk detection device comprising: A generation module is used to acquire the fundamental frequency of at least one piano key tone; and to generate a noise detection signal based on the fundamental frequency of the at least one piano key tone, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each of the harmonic components is different, and the envelopes of the fundamental component and each of the harmonic components are different over time; The excitation and detection module is used to control the audio playback device under test to play the noise detection signal, and to collect the response signal generated by the audio playback device under test when playing the noise detection signal; The processing module is configured to extract a first signal component within a target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and to determine whether the audio playback device under test has a risk of piano noise based on the first signal component.
[0013] In addition, to achieve the above objectives, this application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the piano noise risk detection method as described above.
[0014] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the piano noise risk detection method described above.
[0015] This application provides a method for detecting piano noise risk, comprising: acquiring the fundamental frequency of at least one piano key tone; generating a noise detection signal based on the fundamental frequency of the at least one piano key tone, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each harmonic component is different, and the envelopes of the fundamental component and each harmonic component change over time are different; controlling the audio playback device under test to play the noise detection signal, and acquiring the response signal generated by the audio playback device under test when playing the noise detection signal; extracting a first signal component within a target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and determining whether the audio playback device under test has a piano noise risk based on the first signal component.
[0016] Therefore, the technical solution provided in this application obtains the fundamental frequency of piano key sounds and generates an excitation signal that simulates piano timbre as a noise detection signal. The noise detection signal includes a fundamental component and several harmonic components. The energy ratio between the fundamental component and each harmonic component is different, and the envelopes that change with time are different from each other. This makes the noise detection signal highly consistent with the excitation signal of a real piano piece in terms of spectral characteristics and time-domain dynamic characteristics. As a result, when the audio playback device under test plays the noise detection signal, the vibration state of the audio playback device under test can match the vibration state when it plays a real piano piece. Based on this, the response signal generated when the audio playback device under test plays the noise detection signal is collected, and the first signal component within the target frequency band is extracted from the response signal. The lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal. Based on the first signal component, it is determined whether the audio playback device under test has a risk of piano noise. Since the response signal is collected under vibration conditions matching a real piano piece, the noise component in the response signal can truly reflect the noise performance of the audio playback device under test when actually playing a piano piece. Furthermore, by limiting the analysis frequency band to the target frequency band higher than the highest frequency of the noise detection signal, the interference of normal musical sound components such as fundamental and harmonics in the noise detection signal is eliminated, so that the detection result directly points to the noise generated by the audio playback device under test itself, thereby accurately determining whether the audio playback device under test has a risk of piano noise.
[0017] In summary, the technical solution provided in this application can improve the accuracy of piano noise risk detection, making the detection results more consistent with the user's actual listening experience, and effectively avoiding situations where piano noise still occurs in actual use even though the test is qualified. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic flowchart illustrating the piano noise risk detection method provided in the first embodiment of this application; Figure 2 This is a schematic diagram of the fundamental frequency of piano key sounds provided in the first embodiment of this application; Figure 3 A schematic diagram showing the energy percentage of each frequency component in the noise detection signal provided in the first embodiment of this application; Figure 4 This is a schematic diagram of the module structure of the piano noise risk detection device provided in the embodiments of this application; Figure 5 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] Speaker modules and audio equipment containing speaker modules typically undergo audio performance testing before leaving the factory to ensure reliable sound quality. Among the common sound quality issues, piano noise is a noticeable problem. When playing piano music, the human ear can clearly perceive abnormal noises such as hissing or buzzing, severely impacting the user experience. Analysis shows that this type of failure is usually related to the structural design or manufacturing process of the speaker module, such as improper airflow channel design or inadequate cavity sealing.
[0025] When a piano is playing, the player strikes the keys, causing the hammers to strike the strings, which in turn are transmitted to the soundboard and radiate into space. Due to the material properties and tension of the strings, as well as the coupling between the strings and the soundboard, the piano's tone exhibits complex characteristics. The harmonic frequencies and energy distribution (consonance) produced when reproducing different core frequencies vary, and the decay rates of different frequency components also differ.
[0026] Currently, the commonly used detection signal for detecting piano noise in loudspeakers typically uses the internationally standardized nominal center frequency (e.g., 1kHz) as the excitation source to detect abnormal loudspeaker responses. However, in practical applications, the test results using the above detection signal often deviate significantly from the user's actual listening experience when playing piano music. Products that pass the test may still exhibit piano noise in real-world usage scenarios, indicating low detection accuracy and difficulty in meeting product quality control requirements.
[0027] Based on this, this application provides a method for detecting piano noise risk, comprising: acquiring the fundamental frequency of at least one piano key tone; generating a noise detection signal based on the fundamental frequency of the at least one piano key tone, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each harmonic component is different, and the envelopes of the fundamental component and each harmonic component change over time are different; controlling the audio playback device under test to play the noise detection signal, and acquiring the response signal generated by the audio playback device under test when playing the noise detection signal; extracting a first signal component within a target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and determining whether the audio playback device under test has a piano noise risk based on the first signal component.
[0028] Therefore, the technical solution provided in this application obtains the fundamental frequency of piano key sounds and generates an excitation signal that simulates piano timbre as a noise detection signal. The noise detection signal includes a fundamental component and several harmonic components. The energy ratio between the fundamental component and each harmonic component is different, and the envelopes that change with time are different from each other. This makes the noise detection signal highly consistent with the excitation signal of a real piano piece in terms of spectral characteristics and time-domain dynamic characteristics. As a result, when the audio playback device under test plays the noise detection signal, the vibration state of the audio playback device under test can match the vibration state when it plays a real piano piece. Based on this, the response signal generated when the audio playback device under test plays the noise detection signal is collected, and the first signal component within the target frequency band is extracted from the response signal. The lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal. Based on the first signal component, it is determined whether the audio playback device under test has a risk of piano noise. Since the response signal is collected under vibration conditions matching a real piano piece, the noise component in the response signal can truly reflect the noise performance of the audio playback device under test when actually playing a piano piece. Furthermore, by limiting the analysis frequency band to the target frequency band higher than the highest frequency of the noise detection signal, the interference of normal musical sound components such as fundamental and harmonics in the noise detection signal is eliminated, so that the detection result directly points to the noise generated by the audio playback device under test itself, thereby accurately determining whether the audio playback device under test has a risk of piano noise.
[0029] In summary, the technical solution provided in this application can improve the accuracy of piano noise risk detection, making the detection results more consistent with the user's actual listening experience, and effectively avoiding situations where piano noise still occurs in actual use even though the test is qualified.
[0030] The subject of the piano noise risk detection method of this application can be an electronic device with data processing, network communication and program running functions, but this embodiment does not specifically limit it.
[0031] The following description uses an electronic device as the execution subject to illustrate the various embodiments.
[0032] This application presents a piano noise risk detection method according to the first embodiment. Please refer to [link / reference]. Figure 1 The method for detecting piano noise risks may include steps S10 to S50: Step S10: Obtain the fundamental frequency of at least one piano key tone; It should be noted that the fundamental frequency of a piano key tone refers to the fundamental frequency of the pitch corresponding to each key being struck. In a standard piano, each key corresponds to a fixed fundamental frequency value. For example, ... Figure 2 The fundamental frequency of key A4 (49th key) is 440.00 Hz, and the fundamental frequency of key C4 (40th key) is 261.63 Hz.
[0033] When acquiring the fundamental frequency of at least one piano key tone, a standard fundamental frequency lookup table for the 88 keys of a piano can be pre-stored, with each key in the table corresponding to its fundamental frequency. Thus, one or more target keys can be selected according to testing requirements, and their corresponding fundamental frequencies can be directly read from the lookup table. Alternatively, the international standard pitch A4 can be used as the reference frequency, and the fundamental frequency of the target key can be calculated in real time using the twelve-tone equal temperament formula based on the interval difference (number of semitones) between the target key and A4. For example, when the target is C4, C4 differs from A4 by 9 semitones, and its fundamental frequency is 440 × 2^(-9 / 12) ≈ 261.63 Hz. This embodiment does not specifically limit the implementation method of step S10.
[0034] Step S20: Generate a noise detection signal based on the fundamental frequency of at least one piano key tone. The noise detection signal is an excitation signal that simulates the piano tone. The noise detection signal includes a fundamental component and several harmonic components. The frequency of the fundamental component is the fundamental frequency of the piano key tone. The energy ratio between the fundamental component and each harmonic component is different, and the envelopes of the fundamental component and each harmonic component change over time are different. It should be noted that the noise detection signal is essentially an electrical signal or a digital audio signal, and its frequency components are consistent with those of a piano tone. The fundamental frequency component is the lowest frequency component in the noise detection signal, and its frequency is the fundamental frequency of the piano key tone obtained in step S10. The fundamental frequency component is the dominant frequency component of the noise detection signal, which determines the pitch of the signal. The harmonic components are frequency components in the noise detection signal whose frequencies are integer multiples of the fundamental frequency (allowing for slight offsets), and they are used to simulate the overtone series produced by string vibration in a real piano tone.
[0035] Additionally, it should be noted that energy percentage refers to the proportion of energy of a specific frequency component to the total energy of the signal. In a real piano tone, the energy percentages of the fundamental frequency and each harmonic vary and differ with factors such as the key register and playing intensity. For example, one can refer to... Figure 3 The fundamental frequency typically has the highest energy proportion (which can be considered as 1.0), the second harmonic typically accounts for 0.5 to 0.7 of the fundamental frequency, the third harmonic typically accounts for 0.3 to 0.5 of the fundamental frequency, and the energy of the fourth and higher harmonics decreases further. The envelope refers to the contour of the signal amplitude changing over time. In audio signal processing, the envelope describes the complete process of a signal from its start to its disappearance. In this embodiment, the fundamental frequency component and each harmonic component have distinct envelopes; that is, each frequency component has its own independent onset speed, decay speed, and duration.
[0036] In one feasible implementation, step S20 may include steps S21 to S25: Step S21: Use the fundamental frequency of the piano key tone as the frequency of the fundamental component; Step S22: Generate the frequencies of each candidate harmonic component based on the frequency of the fundamental component, wherein the frequencies of each candidate harmonic component are offset at integer multiples of the frequency of the fundamental component. Candidate harmonic components refer to potential harmonic frequency components generated based on the fundamental frequency that may be incorporated into the noise detection signal. After further screening, it is determined which harmonic components are ultimately included in the noise detection signal. It should be noted that once a candidate harmonic component is used to synthesize the noise detection signal, it becomes a harmonic component within the signal.
[0037] The frequencies of each candidate harmonic component deviate from integer multiples of the fundamental frequency; that is, the actual frequencies of each candidate harmonic component deviate from the ideal integer multiples of the fundamental frequency. In a real piano tone, due to physical factors such as string stiffness, nonlinear coupling, and the radiation characteristics of the soundboard, the frequencies of each harmonic are not strictly equal to integer multiples of the fundamental frequency, but rather exhibit a slight deviation. For example, the ideal second harmonic frequency is 2f0, but the actual second harmonic frequency of a piano may be 2f0 + Δ2, where Δ2 is the deviation.
[0038] When generating the frequencies of each candidate harmonic component based on the frequency of the fundamental component, the offset can be determined according to the physical characteristics of the strings of a real piano. Specifically, due to the stiffness effect during actual vibration, the higher-order harmonic frequencies of the strings will be slightly higher than ideal integer multiples. Therefore, the frequencies of each candidate harmonic component can be determined by the physical model shown in Formula 1 below. Alternatively, a lookup table of preset values for the offsets of each order of harmonics can be pre-established. This lookup table can be obtained based on the statistical analysis of actual piano timbre measurements. Thus, the corresponding offset can be directly read from the lookup table according to the harmonic order, and the frequency of the candidate harmonic component is obtained by adding the integer multiple of the frequency of the fundamental component to the offset. This embodiment does not specifically limit the implementation method of step S22.
[0039] f k = k×f0× (1+ ε×k 2 ) Formula 1; Among them, f k Let ε be the frequency of the k-th harmonic (i.e., the candidate harmonic component), where k is the harmonic order, and ε is the string stiffness coefficient (which can be obtained statistically from actual piano test data, and its value is usually in the range of 10). -4 Up to 10 -3 (Order of magnitude), f0 is the frequency of the fundamental component.
[0040] Step S23: Determine whether the highest frequency among the frequencies of each candidate harmonic component is greater than a preset frequency threshold. A preset frequency threshold is a pre-defined upper limit of frequencies used to filter candidate harmonic components to determine which can be retained and used in the synthesis of the noise detection signal. The setting of the preset frequency threshold can be based on factors such as the effective frequency response range of the speaker of the audio playback device under test, the range of frequencies sensitive to human hearing, and any unintended interference that may be introduced by excessively high frequency components. For example, a preset frequency threshold of 2kHz can be set, in which case all candidate harmonic components higher than 2kHz will be eliminated and will not participate in the synthesis of the noise detection signal.
[0041] Step S24: If yes, then synthesize a noise detection signal based on each candidate harmonic component with a frequency less than or equal to a preset frequency threshold, and the fundamental component. Step S25: If not, synthesize a noise detection signal based on each candidate harmonic component and the fundamental component.
[0042] When synthesizing a noise detection signal, digital waveform sample points of each frequency component can be linearly superimposed in the time domain to generate a composite time-domain signal, which serves as the noise detection signal. Alternatively, the spectra of each frequency component can be merged in the frequency domain, and then the time-domain signal can be obtained through inverse Fourier transform, which also serves as the noise detection signal. The amplitude of each frequency component is scaled according to a preset energy ratio, and the time-domain envelope is configured according to preset ADSR parameters.
[0043] This implementation uses the fundamental frequency of piano key sounds as the fundamental component frequency, establishing an accurate pitch reference for the noise detection signal. Utilizing the fundamental component frequency, it generates candidate harmonic components with offsets at integer multiples of the fundamental frequency. This ensures that the generated harmonic frequencies reflect the actual deviations of harmonics in the real piano tone from theoretical integer multiples due to physical factors such as string material, tension, and soundboard coupling. This makes the harmonic structure of the noise detection signal closer to the spectral characteristics of a real piano. Furthermore, by determining whether the highest frequency of each candidate harmonic component exceeds a preset frequency threshold, and selectively combining candidate harmonic components with frequencies not exceeding the threshold with the fundamental component to synthesize the noise detection signal, it avoids interference from excessively high-frequency harmonic components in subsequent noise detection. This ensures that the frequency range of the detection signal remains within a controllable and reasonable range while preserving the harmonic characteristics of the real piano tone. Therefore, the synthesized noise detection signal possesses a harmonic structure highly consistent with the real piano tone and effectively avoids interference from excessively high-frequency components, guaranteeing the accuracy and reliability of the noise detection signal.
[0044] This embodiment does not specifically limit the implementation of step S20. For example, in other feasible implementations: First, the fundamental frequency of the piano key tone is taken as the frequency of the fundamental component, and the frequencies of each harmonic component are generated based on the frequency of the fundamental component. Then, independent time-domain amplitude envelopes can be configured for the fundamental component and each harmonic component. Specifically, the envelope of each frequency component adopts the ADSR (Attack, Decay, Sustain, Release) four-stage envelope model, but the oscillation speed and decay speed of different frequency components are different.
[0045] For example, for the fundamental frequency component, the start-up time can be set to 5ms, the initial decay time to 100ms, the sustained decay time to 800ms, and the release time to 50ms; for the second harmonic component, the start-up time can be set to 3ms, the initial decay time to 80ms, the sustained decay time to 600ms, and the release time to 40ms; and for the third harmonic component, the start-up time can be set to 2ms, the initial decay time to 60ms, the sustained decay time to 400ms, and the release time to 30ms. These differentiated start-up and decay times for different frequency components simulate the varying temporal evolution characteristics of different frequency components in a real piano tone due to physical mechanisms such as string coupling and soundboard radiation. The ADSR parameters for each frequency component can be extracted from measured real piano tones or calculated based on a piano physical acoustic model.
[0046] Finally, the fundamental frequency component and each harmonic component are amplitude-scaled according to a preset energy ratio, and then the frequency components are superimposed and synthesized in the time domain to obtain the noise detection signal. The preset energy ratio can be based on measured data of real piano timbre, for example, the fundamental frequency component accounts for 60%, the second harmonic for 25%, the third harmonic for 10%, and the fourth and higher harmonics together account for 5%.
[0047] Step S30: Control the audio playback device under test to play the noise detection signal, and collect the response signal generated when the audio playback device under test plays the noise detection signal; It should be noted that the audio playback device under test refers to an audio device containing a speaker, such as a speaker module, mobile phone, tablet computer, smart speaker, etc. This embodiment does not specifically limit this. The response signal refers to the sound signal generated by the diaphragm vibration and radiated outward when the speaker of the audio playback device under test plays the noise detection signal. This sound signal is collected by the microphone and converted into an electrical signal or a digital signal.
[0048] When controlling the audio playback device under test to play the noise detection signal, it is advisable to control the device to play the noise detection signal at its maximum volume. Since noise is usually more easily excited under high volume and large amplitude conditions, playing at maximum volume allows the speaker of the audio playback device under test to operate under the most stringent conditions, which is conducive to fully exposing potential noise problems and avoiding missed detections due to insufficient excitation.
[0049] Alternatively, a preset standard level below the maximum volume can be selected for playback, based on the rated power or product specifications of the audio playback device under test. This method is suitable for scenarios with high equipment safety requirements, or for standardized testing scenarios where data is compared with historical test data.
[0050] Furthermore, before controlling the audio playback device under test to play the noise detection signal, the noise trigger sensitivity index of the audio playback device under test can be determined first, and then the input level when playing the noise detection signal can be determined according to the index, so as to perform detection at the most appropriate level.
[0051] In one feasible implementation, step S30 may include steps S31-S32: Step S31: Configure the noise detection signal as a frequency sweep signal, and the frequency of the frequency sweep signal changes with time within a preset frequency range; It should be noted that a swept frequency signal refers to a signal whose frequency changes continuously or in steps within a preset frequency range over time, gradually changing from a starting value to an ending value. A swept frequency signal can be considered a single-frequency signal at any given moment, but the corresponding frequency value differs at different times. The preset frequency range is the frequency interval defined by the pre-set start and end frequencies of the swept frequency, for example, 100Hz to 1000Hz. The specific values of the start and end frequencies can be flexibly set according to the characteristics of the audio playback device under test or the testing requirements.
[0052] Step S32: Control the audio playback device under test to play a frequency sweep signal, wherein the frequency range of the frequency sweep signal covers the noise risk band or the frequency band with the most noise of the audio playback device under test.
[0053] It should be noted that the noise risk band refers to the frequency range that is pre-determined based on the structural characteristics, design experience, or pre-test results of the audio playback device under test, indicating that the device is prone to generating noise or has a high noise risk. Different audio playback devices under test may correspond to different noise risk bands. For example, for large speakers, the noise risk band may cover a wider frequency range. Determining the noise risk band makes the frequency scanning range of the noise detection signal more targeted.
[0054] Additionally, it should be noted that the frequency band with the most noise refers to the frequency range where the noise energy is most concentrated during playback by the audio playback device under test. The frequency band with the most noise can be identified by performing a pre-scan test on the audio playback device under test. For example, before the formal test, a quick frequency scan of the audio playback device under test is performed to record the noise energy corresponding to each frequency point, and the frequency band where the peak noise energy is located is determined as the frequency band with the most noise.
[0055] This embodiment configures the noise detection signal as a frequency-sweeping signal whose frequency varies over time, and controls the frequency range of the sweep signal to cover the noise-prone frequency band or the frequency band with the most noise in the audio playback device under test. This allows the audio playback device under test to be excited to emit sound at multiple different frequency points sequentially during a single test, thus covering a wider frequency range and avoiding missed noise detection due to omission of specific risk frequencies. Simultaneously, by setting the sweep range to cover the noise-prone frequency band or the frequency band with the most noise in the audio playback device under test, the energy of the noise detection signal is concentrated in the frequency range where the device is most prone to generating noise. This avoids the test time redundancy of indiscriminate sweeping across the entire frequency band and ensures that the detection signal can effectively excite the noise in the audio playback device under test, improving detection efficiency.
[0056] Step S40: Extract the first signal component within the target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; It should be noted that the target frequency band refers to the frequency range extracted from the response signal for analysis, with its lower limit frequency higher than the highest frequency of the noise detection signal. For example, when the highest frequency of the noise detection signal is 2kHz, the target frequency band can be from 2kHz to 5kHz. Because the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal, the signal within this target frequency band does not contain the fundamental and harmonic components of the noise detection signal, but mainly reflects the noise energy generated by the audio playback device under test due to nonlinear distortion. The first signal component is the portion of the response signal located within the target frequency band.
[0057] This embodiment extracts the first signal component within the target frequency band from the response signal and sets the lower limit frequency of the target frequency band higher than the highest frequency of the noise detection signal. The aim is to isolate and extract noise components in the response signal that are solely generated by the nonlinearity of the audio playback device under test. Since the frequencies of normal musical tones such as the fundamental and harmonics in the noise detection signal are not higher than the lower limit frequency of the target frequency band, analyzing the extracted signal components within the target frequency band effectively eliminates the masking effect of normal musical tones on noise detection. This allows subsequent judgment results to more accurately reflect whether the audio playback device under test has a risk of piano noise, thereby improving the detection accuracy of piano noise risk.
[0058] Step S50: Based on the first signal component, determine whether the audio playback device under test has a risk of piano noise.
[0059] In one feasible implementation, step S50 may include steps S51 to S54: Step S51: Separate the first signal component into harmonic distortion component, intermodulation distortion component and broadband noise component; Harmonic distortion components refer to redundant frequency components in the response signal, whose frequencies are integer multiples of the input signal frequency, generated by the nonlinear relationship between the speaker diaphragm displacement of the audio playback device under test and the input signal. Within the target frequency band, harmonic distortion components manifest as higher-order harmonics generated by the fundamental and higher-order harmonic components after passing through a nonlinear system and falling into the target frequency band. Harmonic distortion components mainly originate from the nonlinear elastic force and nonlinear damping of the speaker diaphragm under large amplitude.
[0060] Intermodulation distortion (IMD) components refer to new frequency components that do not belong to the input signal frequencies or their harmonics, generated due to nonlinear characteristics when two or more signal components of different frequencies pass simultaneously through the speaker of the audio playback device under test. These new frequency components are usually linear combinations of the input frequencies. Within the target frequency band, IMD components appear as the portions of these modulation products falling into the target frequency band. IMD components typically interfere more significantly with human hearing than harmonic distortion because their frequency combinations often exhibit dissonance.
[0061] Broadband noise components refer to non-periodic random signal components that are continuously distributed over a wide frequency range in the response signal. Within the target frequency band, broadband noise components manifest as continuously distributed energy across the spectrum. Broadband noise components mainly originate from random noise generated by physical processes such as airflow turbulence, mechanical friction, and uneven vibration of the diaphragm surface in the speaker module.
[0062] When separating the first signal component into harmonic distortion components, intermodulation distortion components, and broadband noise components, in one feasible implementation, a fast Fourier transform can be performed on the first signal component to obtain its spectral distribution within the target frequency band; based on this, it can be classified and separated according to the frequency characteristics of each spectral component. If a certain spectral component is located at a higher harmonic frequency point of each harmonic component in the noise detection signal, it is classified as a harmonic distortion component. For example, when the fundamental frequency is 261.6Hz, the 5232Hz frequency point in the target frequency band corresponds to the 20th harmonic, and the signal at that frequency point is classified as a harmonic distortion component.
[0063] If a spectral component is located at a frequency point of the combination product of two or more input frequencies and does not meet the harmonic frequency position condition, it is classified as an intermodulation distortion component. For example, after the fundamental frequency of 261.6Hz is modulated with the second harmonic of 523.2Hz, the modulation product generated at 261.6+523.2=784.8Hz is classified as an intermodulation distortion component.
[0064] Continuous spectral components that do not belong to the aforementioned harmonic distortion and intermodulation distortion are classified as broadband noise components.
[0065] In another feasible implementation, an adaptive notch filter can be used to track and separate the spectral peaks of the first signal component point by point. Specifically, for harmonic distortion components, multiple narrowband notch filters can be designed according to the harmonic frequency positions of the noise detection signal to extract the energy of the corresponding frequency points as harmonic distortion components. For intermodulation distortion components, corresponding narrowband filters can be designed according to the frequency positions of the input frequency combination products for extraction. The remaining continuous spectral components not extracted by the filters are then treated as broadband noise components. This embodiment does not specifically limit the implementation of step S51.
[0066] Step S52: Calculate the energy values of the harmonic distortion component, intermodulation distortion component, and broadband noise component, and perform weighted fusion processing on each energy value to obtain the noise energy value. Step S53: If the noise energy value is greater than or equal to the preset energy threshold, it is determined that the audio playback device under test has a risk of piano noise. The preset energy threshold is a pre-set energy threshold used to determine the presence of noise. It can be a default value or can be flexibly set by the user according to the actual situation. This embodiment does not make specific limitations on it.
[0067] Understandably, if the noise energy value is greater than or equal to the preset energy threshold, it means that the noise energy generated by the speaker module of the audio playback device under test under the excitation signal of simulated piano tone has reached or exceeded the acceptable critical level. This part of the noise energy may be perceived by the human ear as abnormal sounds such as "hissing" or "buzzing" in actual use. Therefore, it can be determined that the audio playback device under test has the risk of piano noise.
[0068] In one feasible implementation, the step of determining the preset energy threshold may include steps S531-S532: Step S531: Before controlling the audio playback device under test to play the noise detection signal, collect the background noise signal of the environment where the audio playback device under test is located, and extract the background noise energy value of the background noise signal in the target frequency band. Background noise signal refers to the background noise signal in the test environment when the audio playback device under test is not playing a noise detection signal. The background noise signal can be collected by a microphone at the test position and reflects all environmental sounds in the test environment other than those emitted by the audio playback device under test. It may include, but is not limited to, air conditioner noise, equipment fan noise, personnel activity noise, and noise from adjacent workstations. This embodiment does not specifically limit this.
[0069] Step S532: Determine the preset energy threshold based on the background noise energy value; Among them, the preset energy threshold is positively correlated with the background noise energy value.
[0070] The preset energy threshold is positively correlated with the background noise energy value; that is, the larger the background noise energy value, the larger the preset energy threshold; and the smaller the background noise energy value, the smaller the preset energy threshold.
[0071] This embodiment acquires ambient background noise signals before playing the noise detection signal, extracts the background noise energy value within the target frequency band, and then determines a preset energy threshold positively correlated with the background noise based on this energy value. This allows the determined preset energy threshold to adaptively adjust dynamically according to the actual noise level of the test environment. Since background noise levels vary in different test environments (e.g., different production line workstations, different laboratories, different time periods), using a fixed threshold might lead to misjudgments of qualified equipment as having noise risk in noisy environments due to high ambient noise energy, while in quiet environments, a threshold set too high might cause unqualified equipment with slight noise to be missed. Therefore, this embodiment achieves adaptive adjustment of the preset energy threshold with the environment through dynamic environmental calibration, effectively eliminating the influence of test environment differences on the detection results, improving the robustness and cross-environment consistency of the detection, and making the detection results more accurate and reliable.
[0072] Step S54: If the noise energy value is less than the preset energy threshold, it is determined that the audio playback device under test does not have the risk of piano noise.
[0073] Understandably, if the noise energy value is less than the preset energy threshold, it means that the noise energy generated by the speaker module of the audio playback device under test under the excitation signal of the simulated piano timbre is within an acceptable range. This part of the noise energy will not produce perceptible noise interference in actual use by the user and will not have a substantial impact on the listening experience of the piano music. Therefore, it can be determined that there is no risk of piano noise in the audio playback device under test.
[0074] In this embodiment, by separating the first signal component into harmonic distortion, intermodulation distortion, and broadband noise components, and then performing weighted fusion processing on each component before threshold comparison, the final noise energy value can more accurately reflect the actual perception of noise by the human ear. Since the human ear has different sensitivities to different types of noise (for example, intermodulation distortion is usually more piercing than harmonic distortion and broadband noise), simply performing equal-weighted energy statistics on all noise components may lead to a dominant noise judgment result where "physical energy is high but auditory sensitivity is low," or noise where "physical energy is low but auditory sensitivity is very high" may be submerged in the total energy. This application separates the three noise components, separately calculates their energy, and then performs weighted fusion, allowing noise components from different mechanisms to contribute to the final noise energy value with weights matching human auditory perception. This improves the consistency between the noise detection result and the user's actual hearing experience, making the judgment result more accurate and reliable.
[0075] This embodiment does not specifically limit the implementation of step S50. For example, in other feasible implementations, the total energy value of the first signal component can be directly calculated. Specifically, the first signal component is integrally squared or summed in the time domain to obtain its total energy value in the target frequency band; then, the total energy value is compared with a preset energy threshold; if the total energy value is greater than or equal to the preset energy threshold, it is determined that the audio playback device under test has a risk of piano noise; if the total energy value is less than the preset energy threshold, it is determined that the audio playback device under test does not have a risk of piano noise.
[0076] As can be seen from the above, the technical solution provided in this embodiment obtains the fundamental frequency of piano key sounds and generates an excitation signal that simulates piano timbre as a noise detection signal. The noise detection signal includes a fundamental component and several harmonic components. The energy ratio between the fundamental component and each harmonic component is different, and their envelopes that change with time are also different. This makes the noise detection signal highly consistent with the excitation signal of a real piano piece in terms of spectral characteristics and time-domain dynamic characteristics. As a result, when the audio playback device under test plays the noise detection signal, the vibration state of the audio playback device under test can match its vibration state when playing a real piano piece. Based on this, the response signal generated when the audio playback device under test plays the noise detection signal is collected, and the first signal component within the target frequency band is extracted from the response signal. The lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal. Based on the first signal component, it is determined whether the audio playback device under test has a risk of piano noise. Since the response signal is collected under vibration conditions matching a real piano piece, the noise component in the response signal can truly reflect the noise performance of the audio playback device under test when actually playing a piano piece. Furthermore, by limiting the analysis frequency band to the target frequency band higher than the highest frequency of the noise detection signal, the interference of normal musical sound components such as fundamental and harmonics in the noise detection signal is eliminated, so that the detection result directly points to the noise generated by the audio playback device under test itself, thereby accurately determining whether the audio playback device under test has a risk of piano noise.
[0077] In summary, the technical solution provided in this embodiment can improve the accuracy of piano noise risk detection, making the detection results more consistent with the user's actual listening experience, and effectively avoiding the situation where piano noise still occurs in actual use even though the detection is qualified.
[0078] Based on the first embodiment described above, a second embodiment of the piano noise risk detection method of this application is proposed. In the second embodiment, after step S30, the piano noise risk detection method may further include steps S301 to S304: Step S301: Based on the envelope of the amplitude of each frequency component in the noise detection signal changing with time, determine the signal segments corresponding to the oscillation stage, the initial decay stage, the continuous decay stage and the release stage from the response signal respectively. It should be noted that a signal segment refers to a local signal segment extracted from the complete response signal, corresponding to a specific time-domain stage (onset stage, initial decay stage, sustained decay stage, or release stage) in the noise detection signal. Since each frequency component in the noise detection signal has its own independent ADSR envelope, and the onset time and decay rate of different frequency components are different, different time-domain intervals of the response signal correspond to different physical stages. The difference between a signal segment and a time-domain interval is that a time-domain interval is a continuous segment on the time axis of the response signal, while a signal segment is a portion of the signal extracted from the response signal corresponding to a specific ADSR stage. In this embodiment, the response signal is divided based on the envelope characteristics of each frequency component, resulting in four signal segments, each corresponding to a time-domain stage.
[0079] When determining the signal segments corresponding to the oscillation stage, initial decay stage, sustained decay stage, and release stage from the response signal based on the time-varying envelope of the amplitude of each frequency component in the noise detection signal, in one feasible implementation, considering that the noise detection signal has been configured with independent ADSR envelope parameters for each frequency component during generation (e.g., the oscillation time of the fundamental component is 5ms, the initial decay time is 100ms, the sustained decay time is 800ms, and the release time is 50ms), these envelope parameters determine the energy distribution of each frequency component in the time domain. Thus, the boundary times of the four stages on the time axis can be determined based on the oscillation start time of the frequency component with the slowest oscillation speed in the noise detection signal, the start time of the sustained decay stage, and the start and end times of the release stage. Then, the response signal is divided into four continuous signal segments according to these boundary times.
[0080] For example, for noise detection signals that are dominated by the fundamental frequency component (with the largest energy proportion), the ADSR envelope time parameter of the fundamental frequency component can be used as the basis: the response signal from time 0 to the end of the fundamental frequency component oscillation stage is divided into the oscillation stage signal segment, from the end of the oscillation stage to the end of the first decay stage is divided into the first decay stage signal segment, from the end of the first decay stage to the start of the release stage is divided into the continuous decay stage signal segment, and from the start of the release stage to the end of the signal is divided into the release stage signal segment.
[0081] In another feasible implementation, envelope detection can be performed on the response signal (e.g., extracting the amplitude envelope of the response signal through Hilbert transform or rectified filtering), and the boundary times of each stage can be adaptively determined based on the amplitude variation trend of the envelope. Specifically, the rising edge start point, amplitude peak point, rapid descent inflection point after the peak, and the end point of the slow descent segment of the envelope are detected, and the response signal is divided into four signal segments using these feature points as boundaries. This implementation does not rely on the envelope parameters of the noise detection signal, but directly divides the signal based on the time-domain characteristics of the response signal itself, making it suitable for scenarios where the envelope parameters of the noise detection signal are unknown or where there is a deviation between the envelope of the response signal and the noise detection signal.
[0082] The above are only two feasible implementations of step S301 provided in this embodiment. This embodiment does not specifically limit the implementation of step S301.
[0083] Step S302: Extract the second signal component of each signal segment within the target frequency band; It should be noted that the second signal component refers to the signal component located within the target frequency band obtained after extracting the target frequency band from each signal segment. The difference between this and the first signal component in step S40 is that the first signal component extracts the signal within the target frequency band from the complete response signal, while the second signal component extracts the signal within the target frequency band from each signal segment after dividing the response signal into four signal segments. The second signal component reflects the distribution of noise energy generated by the audio playback device under test within the target frequency band at each time domain stage.
[0084] Step S303: Based on the second signal component corresponding to each signal segment, determine whether there is noise in the audio playback device under test within the stage corresponding to each signal segment; Independent preset thresholds can be set for the oscillation stage, initial decay stage, sustained decay stage, and release stage. These thresholds can be the same or different for different stages. For example, in the oscillation stage, because the transient energy of the signal is high, noise is easily masked by the transient components, so a relatively high threshold can be set; in the sustained decay stage, the signal energy is low, and noise is more easily perceived by the human ear, so a relatively low threshold can be set. Therefore, when determining whether noise exists in the audio playback device under test within the corresponding stage of each signal segment based on the second signal component corresponding to each signal segment, the energy value of each second signal component can be determined first; then, the energy value of each stage can be compared with its corresponding threshold. If the energy value of a certain stage is greater than or equal to the threshold corresponding to that stage, it is determined that noise exists within that stage; otherwise, it is determined that no noise exists within that stage.
[0085] Step S304: If the audio playback device under test has noise in at least one phase corresponding to a signal segment, it is determined that the audio playback device under test has a risk of piano noise.
[0086] This embodiment identifies signal segments corresponding to the oscillation stage, initial decay stage, sustained decay stage, and release stage from the response signal based on the envelope of the amplitude changes of each frequency component in the noise detection signal over time. Noise is then determined for each stage, and the presence of noise in any stage indicates a risk of piano noise in the entire instrument. This achieves a phased and refined analysis of the response signal. Because the characteristics of piano timbre differ significantly across different stages—specifically, the oscillation stage exhibits transient impact characteristics, the initial decay stage shows a rapid energy decrease, the sustained decay stage has relatively stable energy but a long duration, and the release stage sees a rapid energy dissipation—noise may only appear in one or a few specific stages (e.g., only in the oscillation stage due to excessive impact causing ringing noise, or only in the sustained decay stage due to structural resonance causing persistent noise). If the entire response signal is analyzed as a whole, the high-energy transients in the oscillation stage may mask the noise under normal energy, or noise from different stages may cancel each other out due to energy statistical averaging, leading to missed detections. Therefore, this embodiment detects the response signal in stages, enabling each stage of noise to be independently exposed and identified. This effectively avoids missed noise detection caused by energy averaging across the entire time period, improving the sensitivity and positioning accuracy of noise detection. At the same time, since it is possible to determine which specific stage the noise occurs in, this embodiment can also provide more refined time-domain positioning information for subsequent fault diagnosis, helping engineers to quickly locate the physical cause of the noise.
[0087] Based on the first and / or second embodiments described above, a third embodiment of the piano noise risk detection method of this application is proposed. In the third embodiment, when the audio playback device under test includes multiple speakers, after step S20, the piano noise risk detection method may further include steps S201 to S204: Step S201: Drive each speaker to play the noise detection signal respectively, and collect the first response signal generated when each speaker plays the noise detection signal respectively; It should be noted that the first response signal refers to the response signal collected by the microphone when each speaker plays the noise detection signal individually. Since only one speaker is producing sound, the first response signal only contains the acoustic response of that speaker itself and does not contain the sound components of other speakers. It can be used as the "acoustic fingerprint" of that speaker in an interference-free state.
[0088] Step S202: Simultaneously drive each speaker to play the noise detection signal, and collect the second response signal generated when each speaker plays the noise detection signal simultaneously; It should be noted that the second response signal refers to the mixed response signal collected by the microphone when multiple speakers simultaneously play noise detection signals. The second response signal contains sound components from multiple speakers.
[0089] Step S203: Using the first response signal corresponding to each speaker as the separation reference, separate the signal component corresponding to each speaker from the second response signal; It should be noted that the separation reference refers to using the first response signal collected when each speaker plays individually as a reference for separating the contribution of each speaker from the mixed signal. The signal component corresponding to the speaker refers to the signal component belonging to the corresponding speaker separated from the second response signal (mixed signal). For example, in a stereo device containing a left channel speaker and a right channel speaker, the signal component belonging only to the left channel speaker and the signal component belonging only to the right channel speaker are separated from the mixed signal.
[0090] When separating the signal components corresponding to each loudspeaker from the second response signal using the first response signal corresponding to each loudspeaker as the separation reference, the second response signal and the first response signal corresponding to each loudspeaker can be transformed to the frequency domain respectively. In the frequency domain, the spectrum of the first response signal is used as a template to extract the spectral components of each loudspeaker one by one from the spectrum of the second response signal, and then inversely transformed back to the time domain to obtain the signal components corresponding to each loudspeaker. Alternatively, the first response signal corresponding to each loudspeaker can be used as a reference signal to perform adaptive filtering on the second response signal, separating the contribution components of each loudspeaker channel by channel. This embodiment does not specifically limit the implementation of step S203.
[0091] Step S204: Based on the signal components corresponding to each speaker, determine whether there is a risk of piano noise in each speaker during collaborative playback.
[0092] It should be noted that the collaborative playback state refers to the working state where multiple speakers operate simultaneously and jointly play the noise detection signal. In this state, there may be acoustic interactions between the speakers (such as airflow interference, cavity pressure coupling, sound wave interference, etc.), which will not occur when playing individually.
[0093] When determining whether there is a risk of piano noise in the collaborative playback state based on the signal components corresponding to each speaker, the implementation logic is the same as the implementation of steps S40 to S50 provided in the aforementioned embodiment, and will not be described in detail here.
[0094] As described above, this embodiment determines the piano noise performance of each speaker in the collaborative playback state by driving each speaker individually to play and acquiring a first response signal, and simultaneously driving each speaker to play and acquiring a second response signal. Using the first response signal corresponding to each speaker as a separation benchmark, the signal components of each speaker are separated from the mixed second response signal. Since some piano noise failures only become apparent when multiple speakers are working simultaneously—such as airflow interference between speakers, pressure coupling within a shared cavity, and nonlinear distortion caused by sound wave interference—these noise failures in the collaborative working state cannot be detected when a single speaker is driven individually. Therefore, by comparing individual and simultaneous driving tests and obtaining the signal components corresponding to each unit in the collaborative working state through signal separation technology, the noise performance of each speaker in the collaborative working scenario can be independently evaluated. This effectively compensates for the inability of individual tests to detect noise failures in the collaborative working scenario, improving the comprehensiveness and reliability of the detection.
[0095] Based on the first, second, and / or third embodiments described above, a fourth embodiment of the piano noise risk detection method of this application is proposed. In the fourth embodiment, before step S30, the piano noise risk detection method may further include steps S031 to S032: Step S031: After obtaining the fundamental frequencies of multiple different piano key tones, a pre-scan is performed on the audio playback device under test to obtain the frequency response characteristics and / or background distortion characteristics of the audio playback device under test in the frequency bands of the fundamental frequencies and harmonics of each piano key tone. It's important to note that pre-scanning refers to a quick preliminary test performed on the audio playback device before the formal noise detection signal is played. This test aims to obtain the device's response characteristics within a specific frequency range. The purpose of pre-scanning differs from the formal test; it aims to understand the device's inherent characteristics, not to determine the presence of noise risk. Pre-scanning can be performed using a low-level signal to avoid exciting noise during the pre-scanning phase.
[0096] Additionally, it should be noted that frequency response characteristics refer to the sensitivity or amplitude transfer characteristics of the audio playback device under test to different frequency signals within the frequency band of the fundamental frequency and harmonics of each piano key tone. Specifically, for excitation signals of different frequencies, the sound pressure level or diaphragm displacement amplitude output by the audio playback device under test may differ. Frequency response characteristics reflect the amplification or attenuation degree of each fundamental frequency by the device; some frequency points have higher responses (larger amplitude gain), while others have lower responses (smaller amplitude gain). Distortion floor characteristics refer to the inherent nonlinear distortion level of the audio playback device under test within the frequency band of the fundamental frequency and harmonics of each piano key tone, without the application of external noise excitation. Distortion floor characteristics can be characterized by the percentage of distortion measured by a low-level pre-scan or the energy distribution of each harmonic. Distortion floor characteristics reflect the inherent nonlinearity introduced by the device itself in terms of structure, materials, and assembly.
[0097] When pre-scanning the audio playback device under test to obtain its frequency response characteristics and / or background distortion characteristics within the frequency bands of the fundamental frequency and harmonics of each piano key tone, the device can be controlled to play a sweep signal covering the fundamental frequency of all target piano key tones and their harmonics of interest. The level of this sweep signal is lower than the rated power of the device to ensure that no noise is generated during the pre-scanning phase, thus preventing interference with the background measurement. After acquiring the response signal, the frequency domain response amplitude and / or distortion percentage at each fundamental frequency and harmonic frequency point are calculated to obtain the frequency response characteristics and / or background distortion characteristics. Alternatively, a single-frequency sine wave signal can be played at the fundamental frequency and harmonic frequency points of each target piano key tone, and the response amplitude and / or distortion percentage at each frequency point can be calculated after acquiring the response signal to obtain the frequency response characteristics and / or background distortion characteristics. This embodiment does not specifically limit the implementation of step S031.
[0098] Step S032: Based on the frequency response characteristics and / or background distortion characteristics of each piano key tone, adjust the amplitude of the frequency point corresponding to the fundamental frequency of each piano key tone in the noise detection signal, so as to make the fundamental frequency excitation intensity of each piano key tone balanced when the audio playback device under test plays the noise detection signal.
[0099] It should be noted that, after amplitude adjustment, the diaphragm vibration amplitude or sound output level of the audio playback device under test tends to be consistent or basically equivalent under the fundamental frequency excitation of each piano key note. Because different devices respond differently to different frequencies, the same input signal amplitude may produce different diaphragm displacements at different fundamental frequencies; some fundamental frequencies will have strong excitation, while others will have weak excitation. After compensating for this difference through amplitude adjustment, the actual excitation effect produced by each fundamental frequency within the device reaches a balance, i.e., the excitation intensity is balanced.
[0100] When adjusting the amplitude of the frequency points corresponding to the fundamental frequency of each piano key tone in the noise detection signal according to the frequency response characteristics of each piano key tone, the gain compensation coefficient of each frequency point can be calculated according to the frequency response characteristics of each piano key tone. The fundamental frequency with a lower frequency response is given a larger amplitude compensation gain, and the fundamental frequency with a higher frequency response is given a smaller amplitude compensation gain, so that the actual sound output level corresponding to each fundamental frequency is basically the same when playing. Then, each compensation coefficient is applied to the amplitude of the frequency points corresponding to each fundamental frequency in the noise detection signal to adjust the amplitude of the frequency points corresponding to the fundamental frequency of each piano key tone in the noise detection signal.
[0101] When adjusting the amplitude at the frequency point corresponding to the fundamental frequency of each piano key note in the noise detection signal according to the frequency response characteristics and the background distortion characteristics of each piano key note, the amplitude adjustment amount of each fundamental frequency can be determined by combining the frequency response characteristics and the background distortion characteristics. For example, the amplitude can be appropriately increased for fundamental frequencies with low frequency response but low background distortion, and the amplitude can be appropriately decreased for fundamental frequencies with high background distortion, so as to avoid the inherent distortion being misjudged as noise by subsequent detection.
[0102] This embodiment pre-scans the audio playback device under test before formal testing to obtain the frequency response characteristics and / or distortion floor characteristics of the fundamental frequency and its harmonics of each piano key tone within the frequency band. Based on the response and / or distortion characteristics corresponding to each fundamental frequency, the amplitude of the noise detection signal at the corresponding frequency point is adjusted to ensure that the fundamental frequency excitation intensity of each piano key tone is more balanced when the audio playback device plays multi-tone signals. Because different audio playback devices under test have individual differences in response sensitivity and distortion floor levels at each fundamental frequency due to manufacturing tolerances, assembly variations, etc., if a uniform fixed amplitude input is used, some fundamental frequencies may not be fully excited (noise not exposed) due to the device's low response at that frequency point, while other fundamental frequencies may be over-excited (noise exaggerated or additional distortion introduced) due to the device's high response at that frequency point. By pre-scanning to obtain the frequency response and distortion characteristics of the device itself and performing personalized amplitude compensation accordingly, different devices can obtain a balanced fundamental frequency excitation intensity during testing, thereby effectively eliminating the influence of individual differences on the test results, improving the accuracy and consistency of the test results, and avoiding misjudgments or omissions caused by differences in the inherent characteristics of the devices.
[0103] Based on the first, second, third, and / or fourth embodiments described above, a fifth embodiment of the piano noise risk detection method of this application is proposed. In the fifth embodiment, the piano noise risk detection method may further include steps S01 to S05: Step S01: During the process of controlling the audio playback device under test to play the noise detection signal, the diaphragm displacement of the audio playback device under test is dynamically monitored. It should be noted that diaphragm displacement refers to the amplitude of the reciprocating motion of the speaker diaphragm of the audio playback device under test around its equilibrium position, usually expressed in millimeters or micrometers. The magnitude of the diaphragm displacement reflects the degree of physical deviation of the speaker diaphragm during vibration, and it is positively correlated with the input level; that is, the higher the input level, the greater the diaphragm displacement usually is. Dynamic monitoring refers to real-time monitoring or periodic monitoring at certain time intervals.
[0104] When dynamically monitoring the diaphragm displacement of the audio playback device under test, a laser vibrometer or laser displacement sensor can be used to emit a laser beam non-contactly onto the surface of the speaker diaphragm while controlling the device to play a noise detection signal. The diaphragm displacement can be calculated by measuring the Doppler frequency shift or phase change of the reflected light. Alternatively, the impedance change of the speaker voice coil can be dynamically monitored while controlling the device to play the noise detection signal. Since there is a definite correspondence between diaphragm displacement and voice coil impedance, the diaphragm displacement can be indirectly calculated from the impedance change. This embodiment does not specifically limit the implementation method of step S01.
[0105] Step S02: Based on the diaphragm displacement, gradually increase the input level of the noise detection signal until the diaphragm displacement reaches the preset noise triggering displacement threshold, wherein the noise triggering displacement threshold is the critical diaphragm displacement value when noise begins to appear under the fundamental frequency excitation of piano key tone. It should be noted that the input level refers to the amplitude or power of the electrical signal input to the audio playback device under test. The input level directly determines the magnitude of the speaker diaphragm displacement. The noise trigger displacement threshold is a pre-set critical value for determining whether noise is likely to occur. The physical meaning of the noise trigger displacement threshold is: when the diaphragm displacement reaches this threshold, the speaker is in a critical state close to triggering noise. The critical diaphragm displacement value refers to the diaphragm displacement value determined through pre-experimentation, at which noise just begins to appear under the fundamental frequency excitation of a specific piano key tone. It reflects the maximum diaphragm displacement that the speaker of the audio playback device under test can support without producing noise under the constraints of physical factors such as structure, materials, and assembly. Different types or batches of speakers may have different critical diaphragm displacement values.
[0106] When gradually increasing the input level of the noise detection signal, the input level can be increased step by step with a fixed step size. After each increase, wait for the diaphragm displacement to stabilize before increasing it again, until the diaphragm displacement reaches the preset noise trigger displacement threshold. Alternatively, the input level can be increased rapidly with a larger step size initially, and then switched to a smaller step size for fine adjustment when the diaphragm displacement approaches the preset noise trigger displacement threshold, so that the diaphragm displacement accurately reaches the noise trigger displacement threshold. This embodiment does not specifically limit the implementation method of step S02.
[0107] Step S03: After the diaphragm displacement reaches the noise triggering displacement threshold, detect whether the audio playback device under test produces noise. When detecting whether the audio playback device under test has noise, the response signal at the current moment can be collected in real time, transformed to the frequency domain, and analyzed to see if there are abnormal peaks or broadband energy increases in the frequency domain energy distribution within the target frequency band. If so, it is determined that the audio playback device under test has noise; if not, it is determined that the audio playback device under test does not have noise. Alternatively, the presence of noise can be determined by time-domain characteristics such as peak factor and waveform symmetry, or by the operator using listening headphones to determine in real time whether noise can be heard. This embodiment does not specifically limit the implementation method of step S03.
[0108] Step S04, if yes, then record the current input level value and / or diaphragm displacement as an indicator of the noise triggering sensitivity of the audio playback device under test for the fundamental frequency excitation of piano key sounds. It should be noted that the noise triggering sensitivity index is a quantitative parameter obtained through testing to characterize the sensitivity of the audio playback device under test to noise triggering under the fundamental frequency excitation of piano key tones. It reflects the extent to which the structure of the device approaches the critical condition for noise generation under the fundamental frequency excitation of piano key tones.
[0109] It is understandable that when noise is detected in the audio playback device under test, it indicates that the diaphragm displacement at the current moment has reached the critical state that the audio playback device under test can withstand under the fundamental frequency excitation of piano key sounds. At this time, the recorded input level value and / or diaphragm displacement value can directly reflect the sensitivity of the audio playback device under test to noise triggering under the fundamental frequency excitation. Therefore, the current input level value and / or diaphragm displacement value can be recorded as an indicator of the noise triggering sensitivity of the audio playback device under test to the fundamental frequency excitation of piano key sounds.
[0110] Step S05: If the noise triggering sensitivity index is outside the preset qualified index range, it is determined that the audio playback device under test has a risk of piano noise.
[0111] It should be noted that the preset acceptable range is a pre-defined acceptable interval for the noise triggering sensitivity index of the audio playback device under test. This interval is determined based on statistical results from a large number of qualified devices or design specifications. If the noise triggering sensitivity index falls within this preset acceptable range, it indicates that the noise triggering behavior of the audio playback device under test is consistent with that of qualified products; if it exceeds the preset acceptable range, it indicates that the noise triggering behavior of the audio playback device under test is abnormal, which may correspond to structural defects or process deviations.
[0112] This embodiment dynamically monitors the diaphragm displacement while controlling the audio playback device under test to play a noise detection signal. The input level is gradually increased based on the diaphragm displacement until it reaches the noise triggering displacement threshold. Once the threshold is reached, noise is detected, and the input level and / or diaphragm displacement at that moment are recorded as a noise triggering sensitivity index. Finally, the sensitivity index is compared with a preset acceptable range to determine if there is a noise risk. This achieves a quantitative assessment of the audio playback device under test at its noise threshold. Because different speakers have individual differences in the critical diaphragm displacement value at the onset of noise due to manufacturing tolerances, material batches, assembly differences, etc., using a uniform fixed input level for all devices may lead to over-excitation (risk of damage) of highly sensitive devices and under-excitation (no noise triggered) of less sensitive devices. Therefore, by dynamically monitoring diaphragm displacement and adjusting the input level to the noise triggering displacement threshold of each device, each audio playback device under test is tested under its noise critical state, effectively eliminating under-excitation or over-excitation problems caused by individual differences. At the same time, the noise triggering sensitivity index, which reflects the structural consistency level of the device under the noise critical state, is recorded, and the noise triggering sensitivity index is compared with the preset qualified range. This allows the test to not only determine whether the device has a noise risk, but also reflect the performance margin of the device when it is close to its structural limit, providing richer judgment basis for product quality control and further improving the accuracy and reliability of the test.
[0113] This application also provides a piano noise risk detection device. Please refer to... Figure 4 The piano noise risk detection device may include: The generation module 10 is used to acquire the fundamental frequency of at least one piano key tone; and to generate a noise detection signal based on the fundamental frequency of at least one piano key tone. The noise detection signal is an excitation signal that simulates the piano timbre. The noise detection signal includes a fundamental component and several harmonic components. The frequency of the fundamental component is the fundamental frequency of the piano key tone. The energy ratio between the fundamental component and each harmonic component is different, and the envelopes of the fundamental component and each harmonic component change over time are different. The excitation and detection module 20 is used to control the audio playback device under test to play the noise detection signal and to collect the response signal generated by the audio playback device under test when playing the noise detection signal; The processing module 30 is used to extract a first signal component within the target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and to determine whether the audio playback device under test has a risk of piano noise based on the first signal component.
[0114] In one embodiment, the generation module 10 is further configured to: The fundamental frequency of the piano key tone is taken as the frequency of the fundamental component; Based on the frequency of the fundamental component, the frequencies of each candidate harmonic component are generated, wherein the frequencies of each candidate harmonic component are offset at integer multiples of the frequency of the fundamental component. Determine whether the highest frequency among the frequencies of each candidate harmonic component is greater than a preset frequency threshold. If so, a noise detection signal is synthesized based on each candidate harmonic component with a frequency less than or equal to a preset frequency threshold, as well as the fundamental component. If not, then a noise detection signal is synthesized based on each candidate harmonic component and the fundamental component.
[0115] In one embodiment, the excitation and detection module 20 is further configured to: The noise detection signal is configured as a frequency sweep signal, and the frequency of the frequency sweep signal changes with time within a preset frequency range; Control the audio playback device under test to play a frequency sweep signal, wherein the frequency range of the frequency sweep signal covers the noise risk band or the frequency band with the most noise of the audio playback device under test.
[0116] In one embodiment, the processing module 30 is further configured to: The first signal component is separated into harmonic distortion component, intermodulation distortion component and broadband noise component; The energy values of harmonic distortion components, intermodulation distortion components, and broadband noise components are statistically analyzed, and the energy values are weighted and fused to obtain the noise energy value. If the noise energy value is greater than or equal to the preset energy threshold, it is determined that the audio playback device under test has a risk of piano noise. If the noise energy value is less than the preset energy threshold, it is determined that the audio playback device under test does not pose a risk of piano noise.
[0117] In one embodiment, the processing module 30 is further configured to: Before controlling the audio playback device under test to play the noise detection signal, the background noise signal of the environment in which the audio playback device under test is located is collected, and the background noise energy value of the background noise signal in the target frequency band is extracted. Determine the preset energy threshold based on the background noise energy value; Among them, the preset energy threshold is positively correlated with the background noise energy value.
[0118] In one embodiment, the processing module 30 is further configured to: Based on the envelope of the amplitude of each frequency component in the noise detection signal as a function of time, signal segments corresponding to the oscillation stage, the initial decay stage, the sustained decay stage, and the release stage are determined from the response signal. Extract the second signal component of each signal segment within the target frequency band; Based on the second signal component corresponding to each signal segment, determine whether there is noise in the audio playback device under test within the corresponding stage of each signal segment; If the audio playback device under test has noise in at least one phase corresponding to a signal segment, it is determined that the audio playback device under test has a risk of piano noise.
[0119] In one embodiment, when the audio playback device under test includes multiple speakers, the excitation and detection module 20 is further configured to: Each speaker is driven to play a noise detection signal, and the first response signal generated when each speaker plays the noise detection signal is collected. Simultaneously drive each speaker to play noise detection signals, and collect the second response signal generated when each speaker plays noise detection signals simultaneously; Processing module 30 is also used for: Using the first response signal corresponding to each loudspeaker as the separation reference, the signal component corresponding to each loudspeaker is separated from the second response signal; Based on the signal components corresponding to each speaker, determine whether there is a risk of piano noise in each speaker during collaborative playback.
[0120] The piano noise risk detection device provided in this application adopts the piano noise risk detection method in the above embodiments, which can improve the detection accuracy of piano noise risk. Compared with the prior art, the beneficial effects of the piano noise risk detection device provided in this application are the same as the beneficial effects of the piano noise risk detection method provided in the above embodiments, and other technical features in the piano noise risk detection device are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0121] This application also provides an electronic device, which may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the piano noise risk detection method in the above embodiments.
[0122] The following is for reference. Figure 5 It shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of this application. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0123] like Figure 5As shown, the electronic device may include a processing unit 101 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory 102 or a program loaded from storage device 103 into random access memory 104. Random access memory 104 also stores various programs and data required for the operation of the electronic device. The processing unit 101, read-only memory 102, and random access memory 104 are interconnected via bus 105. Input / output interface 106 is also connected to bus 105. Typically, the following systems can be connected to input / output interface 106: input devices 107 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 108 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 103 including, for example, magnetic tape, hard disks, etc.; and communication devices 109. Communication device 109 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0124] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 103, or installed from read-only memory 102. When the computer program is executed by processing device 101, it performs the functions defined in the methods of the embodiments of this application.
[0125] The electronic device provided in this application, employing the piano noise risk detection method described in the above embodiments, can improve the accuracy of piano noise risk detection. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the piano noise risk detection method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0126] It should be understood that various parts of the embodiments of this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0127] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the above claims.
[0128] This application also provides a computer-readable storage medium storing a computer program that can run on a processor. The computer program is used to execute the piano noise risk detection method in the above embodiments.
[0129] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0130] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0131] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquire the fundamental frequency of at least one piano key tone; generate a noise detection signal based on the fundamental frequency of the at least one piano key tone, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each harmonic component is different, and the envelopes of the fundamental component and each harmonic component change over time are different; control the audio playback device under test to play the noise detection signal, and acquire the response signal generated by the audio playback device under test when playing the noise detection signal; extract a first signal component within a target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and determine whether the audio playback device under test has a risk of piano noise based on the first signal component.
[0132] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0134] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0135] The computer-readable storage medium provided in this application embodiment stores computer-readable program instructions for executing the above-described piano noise risk detection method, which can improve the detection accuracy of piano noise risks. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application embodiment are the same as the beneficial effects of the piano noise risk detection method provided in the above embodiments, and will not be repeated here.
[0136] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the piano noise risk detection method described above.
[0137] The computer program product provided in this application can improve the accuracy of piano noise risk detection. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the piano noise risk detection method provided in the above embodiments, and will not be repeated here.
[0138] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method of detecting a risk of a piano noise, characterized by, The method includes: Obtain the fundamental frequency of at least one piano key note; Based on the fundamental frequency of the at least one piano key tone, a noise detection signal is generated, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each of the harmonic components is different, and the envelopes of the fundamental component and each of the harmonic components are different over time; Control the audio playback device under test to play the noise detection signal, and collect the response signal generated by the audio playback device under test when playing the noise detection signal; Extract a first signal component within the target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; Based on the first signal component, determine whether the audio playback device under test has a risk of piano noise.
2. The method of claim 1, wherein, The step of generating a noise detection signal based on the fundamental frequency of the at least one piano key tone includes: The fundamental frequency of the piano key tone is used as the frequency of the fundamental component; Based on the frequency of the fundamental component, the frequencies of each candidate harmonic component are generated, wherein the frequencies of each candidate harmonic component are offset from integer multiples of the frequency of the fundamental component. Determine whether the highest frequency among the frequencies of each candidate harmonic component is greater than a preset frequency threshold. If so, the noise detection signal is synthesized based on each candidate harmonic component with a frequency less than or equal to the preset frequency threshold, and the fundamental component. If not, the noise detection signal is synthesized based on each of the candidate harmonic components and the fundamental component.
3. The method as described in claim 1, characterized in that, The step of controlling the audio playback device under test to play the noise detection signal includes: The noise detection signal is configured as a frequency sweep signal, and the frequency of the frequency sweep signal changes with time within a preset frequency range; The audio playback device under test is controlled to play the sweep signal, wherein the frequency range of the sweep signal covers the noise risk band or the frequency band with the most noise of the audio playback device under test.
4. The method as described in claim 1, characterized in that, The step of determining whether the audio playback device under test has a risk of piano noise based on the first signal component includes: The first signal component is separated into harmonic distortion component, intermodulation distortion component and broadband noise component; The energy values of the harmonic distortion component, the intermodulation distortion component, and the broadband noise component are statistically analyzed, and the energy values are weighted and fused to obtain the noise energy value. If the noise energy value is greater than or equal to the preset energy threshold, then the audio playback device under test is determined to have a risk of piano noise. If the noise energy value is less than the preset energy threshold, then it is determined that the audio playback device under test does not pose a risk of piano noise.
5. The method as described in claim 4, characterized in that, The method further includes: Before controlling the audio playback device under test to play the noise detection signal, the background noise signal of the environment where the audio playback device under test is located is collected, and the background noise energy value of the background noise signal in the target frequency band is extracted; The preset energy threshold is determined based on the background noise energy value; The preset energy threshold is positively correlated with the background noise energy value.
6. The method according to any one of claims 1 to 5, characterized in that, After the step of collecting the response signal generated when the audio playback device under test plays the noise detection signal, the method further includes: Based on the envelope of the amplitude of each frequency component in the noise detection signal as a function of time, signal segments corresponding to the oscillation stage, the initial decay stage, the continuous decay stage, and the release stage are determined from the response signal. Extract the second signal component of each of the aforementioned signal segments within the target frequency band; Based on the second signal component corresponding to each signal segment, determine whether there is noise in the audio playback device under test within the stage corresponding to each signal segment; If the audio playback device under test has noise in at least one phase corresponding to the signal segment, it is determined that the audio playback device under test has a risk of piano noise.
7. The method according to any one of claims 1 to 5, characterized in that, When the audio playback device under test includes multiple speakers, after the step of generating a noise detection signal based on the fundamental frequency of the at least one piano key tone, the method further includes: Each of the aforementioned speakers is driven to play the noise detection signal, and a first response signal generated when each of the aforementioned speakers plays the noise detection signal is acquired; Simultaneously drive each of the speakers to play the noise detection signal, and collect the second response signal generated when each of the speakers plays the noise detection signal simultaneously; Using the first response signal corresponding to each loudspeaker as a separation reference, the signal component corresponding to each loudspeaker is separated from the second response signal; Based on the signal components corresponding to each speaker, determine whether there is a risk of piano noise in each speaker during collaborative playback.
8. A piano noise risk detection device, characterized in that, The piano noise risk detection device includes: A generation module is used to acquire the fundamental frequency of at least one piano key tone; and to generate a noise detection signal based on the fundamental frequency of the at least one piano key tone, wherein the noise detection signal is an excitation signal simulating piano timbre, the noise detection signal includes a fundamental component and several harmonic components, the frequency of the fundamental component is the fundamental frequency of the piano key tone, the energy ratio between the fundamental component and each of the harmonic components is different, and the envelopes of the fundamental component and each of the harmonic components are different over time; The excitation and detection module is used to control the audio playback device under test to play the noise detection signal, and to collect the response signal generated by the audio playback device under test when playing the noise detection signal; The processing module is configured to extract a first signal component within a target frequency band from the response signal, wherein the lower limit frequency of the target frequency band is higher than the highest frequency of the noise detection signal; and to determine whether the audio playback device under test has a risk of piano noise based on the first signal component.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the piano noise risk detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the piano noise risk detection method as described in any one of claims 1 to 7.