Audio device detection method, apparatus, device, and storage medium

By aligning and cropping the spectrograms of audio devices and then comparing and analyzing them, the reliability and accuracy issues of audio device detection in existing technologies have been resolved, and an automated and reliable detection process has been achieved.

CN115841823BActive Publication Date: 2026-05-08WUHAN HAIWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN HAIWEI TECH CO LTD
Filing Date
2022-11-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing audio equipment testing methods, manual judgment is not reliable or accurate, and professional audio testing equipment has a long testing time, high requirements for operators, and is difficult to operate.

Method used

By acquiring the spectrogram of the device under test, aligning the standard spectrogram template with the spectrogram of the device under test, and cropping out the excess parts, a comparative analysis is performed to determine whether the device meets the standard.

Benefits of technology

It improves the reliability and accuracy of test results, reduces human intervention, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841823B_ABST
    Figure CN115841823B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of audio detection, and discloses an audio equipment detection method, device, equipment and storage medium, the method comprises the following steps: obtaining a spectrogram of a to-be-detected equipment; aligning a standard spectrogram template with a swept frequency part of the spectrogram of the to-be-detected equipment, and cutting off the excess parts on the left and right to obtain a cut standard spectrogram template and a cut spectrogram of the to-be-detected equipment; comparing and analyzing the cut standard spectrogram template and the cut spectrogram of the to-be-detected equipment; if the comparison and analysis result is within an allowable range, it is determined that the to-be-detected equipment meets the standard; in the above manner, manual intervention is not required in the process, and the reliability and accuracy of the detection result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio testing technology, and more particularly to audio device testing methods, apparatus, equipment, and storage media. Background Technology

[0002] Currently, more and more devices have audio input / output functions, and these devices all face the challenge of production line testing for audio input / output functionality. Traditional testing methods include:

[0003] 1) Audio recorded or played through hearing aids is judged manually;

[0004] 2) Display the recorded or played audio waveform on the monitor and judge it by visual observation.

[0005] 3) Test various indicators using professional audio testing equipment to make a judgment.

[0006] Manual judgment is not reliable and accurate, while professional audio testing equipment takes a long time to test, requires highly skilled operators, and is difficult to operate.

[0007] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0008] The main objective of this invention is to provide an audio device testing method, apparatus, equipment, and storage medium, aiming to solve the technical problems in the prior art where the reliability and accuracy of manual judgment are not high, professional audio testing equipment has long testing time, high requirements for operators, and high operational difficulty.

[0009] To achieve the above objectives, the present invention provides an audio device detection method, the method comprising the following steps:

[0010] Obtain the spectrogram of the device under test;

[0011] Align the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, and trim off the excess portions on the left and right to obtain the trimmed standard spectrogram template and the trimmed spectrogram of the device under test.

[0012] The clipped standard spectrogram template is compared and analyzed with the clipped spectrogram of the device under test.

[0013] If the comparative analysis results are within the allowable range, then the tested equipment is determined to meet the standard.

[0014] Optionally, aligning the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test includes:

[0015] Determine the first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept signal;

[0016] Determine the second alignment point between the standard swept frequency signal spectrogram and the standard spectrogram template;

[0017] Align the standard spectrogram with the spectrogram of the device under test based on the first alignment point and the second alignment point.

[0018] Optionally, before determining the first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept signal, the method further includes:

[0019] A swept frequency signal is used as the signal source;

[0020] Obtain the spectrogram of a standard swept frequency signal, wherein the spectrogram of the standard swept frequency signal is a spectrogram generated from a standard swept frequency signal;

[0021] Obtain a standard spectrogram template, wherein the standard spectrogram template is a spectrogram generated from audio played by a standard device and recorded by a standard testing device.

[0022] Optionally, the step of comparing and analyzing the clipped standard spectrogram with the clipped spectrogram of the device under test includes:

[0023] The spectrogram of the clipped device under test is subtracted or divided from the standard spectrogram template to obtain the spectrogram difference matrix;

[0024] The spectrogram difference matrix is ​​filtered using a filter to identify regions with large amplitude differences.

[0025] When there are amplitude points with relatively large differences in the amplitude differences, the analysis results indicate the presence of abnormal sounds or cutoff amplitudes.

[0026] Optionally, after subtracting or dividing the clipped spectrogram of the tested device from the clipped standard spectrogram template, the method further includes:

[0027] Calculate the root mean square value of the region outside the standard swept frequency signal spectrogram on the clipped spectrogram of the device under test;

[0028] Compare the root mean square values ​​of the same region between the clipped standard spectrogram template and the clipped spectrogram of the device under test.

[0029] The degree of noise difference is determined by comparing the root mean square values ​​of the same region.

[0030] Whether the tested equipment meets the standard is determined based on the degree of difference in noise.

[0031] Optionally, after calculating the root mean square value of the region outside the standard swept frequency signal spectrogram on the clipped spectrogram of the device under test, the method further includes:

[0032] The standard swept frequency signal spectrum Figure 2 Valued and used as the first mask template;

[0033] The fundamental frequency component is selected using the first mask template from the spectrogram of the clipped device under test and the standard spectrogram template.

[0034] The degree of difference in the fundamental frequency components is determined by comparing their amplitudes.

[0035] Whether the tested device meets the standard is determined based on the degree of difference in the fundamental frequency component.

[0036] Optionally, after determining the degree of difference in the fundamental frequency components by comparing their amplitudes, the method further includes:

[0037] The standard swept frequency signal spectrogram is debinarized and used as the second mask template;

[0038] The harmonic and noise components are selected using the second mask template from the spectrogram of the clipped device under test and the standard spectrogram template.

[0039] Calculate the root mean square value of the harmonics plus noise;

[0040] The total harmonic distortion plus noise is calculated based on the root mean square value of the harmonic noise and the root mean square value of the fundamental frequency component.

[0041] The difference between the total harmonic distortion and the noise is determined by comparing the total harmonic distortion plus the noise.

[0042] Furthermore, to achieve the above objectives, the present invention also proposes an audio device detection apparatus, the audio device detection apparatus comprising:

[0043] The acquisition module is used to acquire the spectrogram of the device under test;

[0044] The alignment module is used to align the standard spectrogram with the frequency sweep portion of the spectrogram of the device under test, and to trim the excess portions on the left and right to obtain the trimmed standard spectrogram and the trimmed spectrogram of the device under test.

[0045] The analysis module is used to compare and analyze the clipped standard spectrogram with the clipped spectrogram of the device under test.

[0046] The judgment module is used to determine whether the device under test meets the standard.

[0047] Furthermore, to achieve the above objectives, the present invention also proposes an audio device detection device, which includes: a memory, a processor, and an audio device detection program stored in the memory and executable on the processor, wherein the audio device detection program is configured to implement the steps of the audio device detection method described above.

[0048] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing an audio device detection program, which, when executed by a processor, implements the steps of the audio device detection method described above.

[0049] The method proposed in this invention includes: acquiring the spectrogram of the device under test; aligning a standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, and cropping the excess portions on both sides to obtain a cropped standard spectrogram template and a cropped spectrogram of the device under test; comparing and analyzing the cropped standard spectrogram template and the cropped spectrogram of the device under test; if the comparison and analysis results are within the allowable range, the device under test is determined to meet the standard. Since this invention acquires the spectrogram of the device under test, aligns the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, compares and analyzes them, and finally determines whether the device under test meets the standard based on the analysis results, the testing process does not require manual intervention, thus improving the reliability and accuracy of the testing results. Attached Figure Description

[0050] Figure 1 A schematic diagram of the structure of an audio device detection device in the hardware operating environment involved in the embodiments of the present invention;

[0051] Figure 2 This is a flowchart illustrating the first embodiment of the audio device detection method of the present invention;

[0052] Figure 3 This is a structural diagram of the detection scheme of the audio device detection method of the present invention;

[0053] Figure 4 This is a flowchart illustrating the second embodiment of the audio device detection method of the present invention;

[0054] Figure 5 This is an illustrative diagram illustrating the audio device detection method of the present invention;

[0055] Figure 6 This is a flowchart illustrating the third embodiment of the audio device detection method of the present invention;

[0056] Figure 7 This is a schematic diagram of the functional modules of the first embodiment of the audio device detection device of the present invention.

[0057] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0058] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0059] Reference Figure 1 , Figure 1 This is a schematic diagram of the audio device detection device structure in the hardware operating environment involved in the embodiments of the present invention.

[0060] like Figure 1 As shown, the audio device detection device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0061] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the audio device detection device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0062] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an audio device detection program.

[0063] exist Figure 1In the audio device detection device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the XX device of the present invention can be set in the audio device detection device, and the audio device detection device calls the audio device detection program stored in the memory 1005 through the processor 1001 and executes the audio device detection method provided in the embodiment of the present invention.

[0064] Based on the above hardware structure, an embodiment of the audio device detection method of the present invention is proposed.

[0065] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the audio device detection method of the present invention.

[0066] In a first embodiment, the audio device detection method includes the following steps:

[0067] Step S10: Obtain the spectrogram of the device under test.

[0068] It should be noted that the execution subject of this embodiment is an audio device detection device, but it can also be other devices that can achieve the same or similar functions, such as an audio device detection controller. This embodiment does not limit this, and in this embodiment, an audio device detection controller will be used as an example for explanation.

[0069] It should be understood that the spectrogram of the device under test includes both the spectrogram of the device under test and the swept spectrogram of the device under test. The audio input and audio output processes are as follows: Figure 3 As shown. During audio input, the standard playback device plays a standard sweep signal, the device under test records, and the saved recording file generates the spectrogram of the device under test. During audio output, the device under test plays a standard sweep signal, the standard recording device records, and the saved audio file generates the sweep spectrogram of the device under test.

[0070] In the specific implementation, the spectrogram of the device under test (DUT) and the swept spectrogram of the DUT are consistent. For the DUT, the input and output directions are different, corresponding to two different scenarios. Because the system error of the detection scheme is the same for both the standard device and the DUT, the differences can be directly analyzed. The system errors between the two scenarios are different, but the system error of a single scenario is the same.

[0071] Step S20: Align the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, and trim off the excess portions on the left and right to obtain the trimmed standard spectrogram template and the trimmed spectrogram of the device under test.

[0072] It should be noted that the standard spectrogram template is a spectrogram generated from audio played by a standard device, recorded by a standard testing device. When the device under test is in playback mode, the standard spectrogram template is an audio file playing a standard sweep signal, and the spectrogram is generated by examining the audio file recorded by the device.

[0073] It is understood that the spectrogram of a standard swept signal is a spectrogram generated from a standard swept signal. The standard swept signal is stored as an audio file, and the playback device plays the specified signal by playing the audio file; the spectrogram can be directly generated from the audio file.

[0074] It should be understood that the detailed alignment steps are as follows: determining a first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept frequency signal; determining a second alignment point between the spectrogram of the standard swept frequency signal and the standard spectrogram template; and aligning the standard spectrogram with the spectrogram of the device under test according to the first and second alignment points. Alignment can be performed using normalized cross-correlation or other machine vision correlation methods; this embodiment does not impose any limitations on this.

[0075] In the specific implementation, the excess parts on the left and right are cut off to form the noise region. The noise region is not discarded. It is divided into a sweep frequency response region and a noise region by cutting. The sweep frequency response region and the noise region need to be calculated during the analysis process.

[0076] Step S30: Compare and analyze the cropped standard spectrogram template with the cropped spectrogram of the device under test.

[0077] Step S40: If the comparison analysis results are within the allowable range, then the tested equipment is determined to meet the standard.

[0078] It should be noted that for the testing equipment to meet the standards, the audio input and audio output functions of the testing equipment need to be assessed separately. The testing process is as follows: Figure 3 As shown.

[0079] Figure 3This is a structural diagram of the detection scheme of the present invention. The detection equipment includes a standard playback device or a standard recording device for playing standard audio signals or recording audio signals. The audio transmission between the standard playback / recording device and the device under test (DUT) can be direct transmission via a wiring harness or indirectly via a speaker-microphone, depending on the requirements. When the DUT has an audio output function, it requires an audio source; if it lacks external data acquisition capabilities, it can have built-in audio files. On the automated detection platform, the detection equipment also needs to control the DUT to complete the recording / playback operation and transmit the recorded audio for analysis. If the DUT has sufficient computing power, audio analysis can also be performed on the DUT itself, and the results can be returned. If the DUT has both recording and playback functions, the recorded audio can be played back, eliminating the need for built-in audio.

[0080] Figure 3 The left side shows the audio input function test of the device under test (DUT). The test process is as follows: The testing device controls the DUT to start recording through the control channel; the testing device controls the standard playback device to play the standard audio signal; after the standard audio is played, the testing device controls the DUT to stop recording; the testing device acquires the audio recorded by the DUT through the data transmission channel; the testing device analyzes the audio and outputs the test results.

[0081] Figure 3 The right side shows the audio output function test of the device under test. The test process is as follows: The testing device controls the standard recording device to start recording through the control channel; the testing device controls the device under test to play the standard audio file; after the standard audio file is finished playing, the testing device controls the standard recording device to stop recording; the testing device analyzes the audio and outputs the test results.

[0082] It should be understood that the standard audio files used in the audio input function testing process and the standard audio files used in the audio output function testing process are both audio files of standard sweep frequency signals.

[0083] It is understandable that the test results of the audio input and audio output functions of the device under test are within the allowable range, thus confirming that the device under test meets the standard.

[0084] This embodiment acquires the spectrogram of the device under test; aligns a standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, and trims off excess portions on both sides to obtain a trimmed standard spectrogram template and a trimmed spectrogram of the device under test; compares and analyzes the trimmed standard spectrogram template and the trimmed spectrogram of the device under test; if the comparison and analysis results are within the allowable range, the device under test is determined to meet the standard; through the above method, the process does not require manual intervention, improving the reliability and accuracy of the test results.

[0085] In one embodiment, such as Figure 4 The second embodiment of the audio device detection method of the present invention, based on the first embodiment, includes step S30, which includes:

[0086] Step S310: Calculate the root mean square value of the region outside the standard swept frequency signal spectrogram on the clipped spectrogram of the device under test.

[0087] It should be noted that the area outside the standard swept frequency signal spectrogram is a noise region, which is the portion cropped after aligning the swept frequency portion of the standard spectrogram with the spectrogram of the device under test.

[0088] Understandably, the root mean square (RMS) refers to the sum of the squares of all values ​​in statistical data analysis, the mean of which is then taken as the square root.

[0089] Step S320: Compare the root mean square values ​​of the same region between the clipped standard spectrogram template and the clipped spectrogram of the device under test.

[0090] Step S330: Determine the degree of noise difference by comparing the root mean square values ​​of the same region.

[0091] It should be noted that the root mean square (RMS) values ​​of the noise region in the spectrogram of the device under test and the noise region in the standard spectrogram template are compared, and the degree of noise difference is determined by the difference between the RMS values. For example, if the two RMS values ​​are close, it means that the degree of noise difference is very small or there is no difference. This embodiment does not impose any restrictions on this.

[0092] In practice, by projecting the noise region vertically, the differences in noise at different frequencies can be compared.

[0093] Step S340: Determine whether the tested device meets the standard based on the degree of noise difference.

[0094] It should be noted that if the noise difference is within the standard range and the tested device passes the test in the noise area, it should not be interpreted as the tested device meeting the standard. Rather, it should be interpreted as the tested device passing this test. Multiple tests are still required to make an overall judgment on the tested device.

[0095] This embodiment calculates the root mean square (RMS) value of the region outside the standard swept frequency signal response on the spectrogram of the clipped device under test (DUT); compares the RMS values ​​of the same region between the clipped standard spectrogram template and the spectrogram of the clipped DUT; determines the degree of noise difference by comparing the RMS values ​​of the same region; and determines whether the DUT meets the standard based on the degree of noise difference. Through the above method, the noise region is analyzed and judged to determine whether the DUT meets the standard.

[0096] like Figure 5 The figure shown is an example illustration of the audio device detection method of the present invention.

[0097] Figure 5 On the left are a standard spectrogram template and a spectrogram of the device under test. The standard spectrogram template and the spectrogram of the device under test are divided into a noise region and a swept frequency response region, and also include a spectrogram difference map.

[0098] Figure 5 The right side shows the spectrum of a standard swept frequency signal. Figure 2 Binarization and debinarization yield binarized and debinarized mask templates. Using the binarized template mask, the swept frequency response region of the standard spectrogram template and the swept frequency response region of the device under test's spectrogram are obtained, along with the fundamental frequency of the standard template. Using the debinarized template mask, the swept frequency response region of the standard spectrogram template and the swept frequency response region of the device under test's spectrogram are obtained, along with the harmonic noise added to the device under test and the harmonic noise added to the standard template.

[0099] In one embodiment, such as Figure 6 The third embodiment of the audio device detection method of the present invention, based on the first embodiment, includes step S30, which comprises:

[0100] Step S301: Subtract or divide the clipped spectrogram of the device under test from the clipped standard spectrogram template to obtain the spectrogram difference matrix.

[0101] Step S302: Use a filter to filter the spectrogram difference matrix to find regions with large amplitude differences.

[0102] It should be noted that the filtering here refers to image filtering, an operation that enhances features and suppresses interference, thus serving as a feature extraction tool. Filtering the spectrogram difference matrix is ​​used to extract regions with large amplitude values.

[0103] It is understandable that amplitude is the amplitude of a frequency component of the audio system's output signal at a certain moment. A single-frequency signal with a fixed amplitude will produce different amplitude output signals for different frequencies after passing through an audio system.

[0104] Step S303: When there are amplitude points with relatively large differences in the amplitude differences, determine the analysis results of abnormal sound or cutoff amplitude.

[0105] In practice, abnormal sounds manifest as strong high-order harmonic distortion, and the cutoff also exhibits strong high-order harmonics.

[0106] Step S320: Spectrum of the standard swept frequency signal Figure 2 Valued and used as a mask template.

[0107] It should be understood that binarization is a method of image segmentation. Binarization can convert a grayscale image into a binary image. Pixels with grayscale values ​​greater than a certain threshold are set as grayscale maxima, and pixels with grayscale values ​​less than this threshold are set as grayscale minima, thus achieving binarization.

[0108] In practical implementation, masks in digital image processing are two-dimensional matrix arrays and are also used for multi-valued images. Image masks are mainly used for: extracting regions of interest (ROIs) by multiplying a pre-made ROI mask with the image to be processed to obtain the ROI image, where image values ​​within the ROI remain unchanged, while image values ​​outside the ROI are all 0; masking effect by using a mask to shield certain regions of the image, preventing them from participating in processing or the calculation of processing parameters, or only processing or statistically analyzing the shielded areas; structural feature extraction by detecting and extracting structural features in the image similar to the mask using similarity variables or image matching methods; and the creation of images with special shapes. In this embodiment, the mask template is used to select the fundamental frequency portion of the clipped spectrogram of the device under test and the clipped standard spectrogram template.

[0109] Step S321: Select the fundamental frequency portion from the clipped spectrogram of the device under test and the clipped standard spectrogram template using the first mask template.

[0110] It should be noted that the fundamental frequency refers to the sinusoidal wave component in a complex periodic oscillation that has the longest period of that oscillation; the frequency corresponding to this period is called the fundamental frequency. The fundamental frequency component is as follows: Figure 6 As shown.

[0111] Step S322: Determine the degree of difference in the fundamental frequency components by comparing the amplitude of the fundamental frequency components.

[0112] In a specific implementation, the selected fundamental frequency component is projected in the vertical direction, and the difference in gain at different frequencies can be compared. The gain difference represents the degree of difference in the fundamental frequency component.

[0113] Step S323: Determine whether the device under test meets the standard based on the degree of difference in the fundamental frequency portion.

[0114] It should be noted that if the difference in the fundamental frequency range is within the standard range, and the device under test passes the test in the fundamental frequency range, it should not be interpreted as the device under test meeting the standard. Rather, it should be interpreted as the device under test passing this test. Multiple tests are still required to make an overall judgment on the device under test.

[0115] Step S330: The standard swept frequency signal spectrogram is debinarized and used as the second mask template.

[0116] Understandably, the second mask template is the inverse binarization of the standard swept frequency signal spectrogram, which is the opposite of the first mask template obtained in step S3110.

[0117] Step S331: Select the harmonic and noise components from the clipped spectrogram of the device under test and the clipped standard spectrogram template using the second mask template.

[0118] It should be understood that harmonics refer to the electrical quantity in an electric current whose frequency is an integer multiple of the fundamental frequency. Generally, it refers to the electrical quantity generated by the current with a frequency greater than the fundamental frequency after performing Fourier series decomposition on periodic non-sinusoidal electrical quantities.

[0119] Step S332: Calculate the root mean square value of the harmonics plus noise.

[0120] Step S333: Calculate the total harmonic distortion plus noise based on the root mean square value of the harmonics plus noise and the root mean square value of the fundamental frequency component.

[0121] In practical implementation, total harmonic distortion plus noise is the root mean square value of harmonics plus noise divided by the root mean square value of the fundamental frequency component.

[0122] Step S334: Determine the difference between the total harmonic distortion and noise by comparing the total harmonic distortion plus noise.

[0123] This embodiment obtains a spectrogram difference matrix, then uses the filtered spectrogram difference matrix to determine the amplitude difference between the clipped spectrogram of the device under test and the clipped standard spectrogram. Finally, when there are amplitude points with significant differences in amplitude, it determines the presence of abnormal sounds or amplitude cutoff. It also analyzes the standard swept frequency signal spectrogram... Figure 2 After value-based binarization, a mask template is obtained. Then, the fundamental frequency component is selected using the mask template. Finally, the amplitude of the fundamental frequency component is compared to determine the degree of difference. Additionally, the harmonic noise component is selected using a mask template obtained after inverse binarization of the standard swept frequency signal spectrogram. The root mean square value of the harmonic noise is then calculated, and the total harmonic distortion plus noise is derived from this value. Finally, the difference in the total harmonic distortion plus noise is determined by comparing these values. These three detection methods are used to detect the corresponding region of the swept frequency signal to determine whether the device under test meets the standards.

[0124] Furthermore, embodiments of the present invention also propose a storage medium storing an audio device detection program, which, when executed by a processor, implements the steps of the audio device detection method described above.

[0125] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0126] In addition, refer to Figure 6 This invention also proposes an audio device detection apparatus, which includes:

[0127] The acquisition module 10 is used to acquire the spectrogram of the device under test.

[0128] Alignment module 20 is used to align the standard spectrogram with the frequency sweep portion of the spectrogram of the device under test, and to trim the excess portions on the left and right to obtain the trimmed standard spectrogram and the trimmed spectrogram of the device under test.

[0129] The analysis module 30 is used to compare and analyze the clipped standard spectrogram with the clipped spectrogram of the device under test.

[0130] The judgment module 40 is used to determine whether the device under test meets the standard.

[0131] In addition, for technical details not described in detail in this embodiment, please refer to the audio device detection method provided in any embodiment of the present invention, which will not be repeated here.

[0132] In one embodiment, the alignment module 20 is further configured to determine a first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept frequency signal; determine a second alignment point between the spectrogram of the standard swept frequency signal and the standard spectrogram template; and align the standard spectrogram with the spectrogram of the device under test according to the first alignment point and the second alignment point.

[0133] In one embodiment, the alignment module 20 is further configured to use a sweep frequency signal as a signal source; obtain a standard sweep frequency signal spectrogram, wherein the standard sweep frequency signal spectrogram is a spectrogram generated by the standard sweep frequency signal; and obtain a standard spectrogram template, wherein the standard spectrogram template is a spectrogram generated by audio played by a standard device or recorded by a standard detection device.

[0134] In one embodiment, the analysis module 30 is further configured to subtract or divide the clipped spectrogram of the device under test from the clipped standard spectrogram template to obtain a spectrogram difference matrix; use a filter to filter the spectrogram difference matrix to find regions with large amplitude differences; and when there are amplitude points with relatively large differences in the amplitude differences, determine the analysis results of abnormal sounds or cutoff amplitudes.

[0135] In one embodiment, the analysis module 30 is further configured to calculate the root mean square value of the region outside the standard swept frequency signal spectrogram on the spectrogram of the clipped device under test; compare the root mean square values ​​of the same region between the clipped standard spectrogram template and the spectrogram of the clipped device under test; determine the degree of noise difference by comparing the root mean square values ​​of the same region; and determine whether the device under test meets the standard based on the degree of noise difference.

[0136] In one embodiment, the analysis module 30 is further configured to select the fundamental frequency component from the clipped spectrogram of the device under test and the clipped standard spectrogram template using the mask template; determine the degree of difference of the fundamental frequency component by comparing the amplitude of the fundamental frequency component; and determine whether the device under test meets the standard based on the degree of difference of the fundamental frequency component.

[0137] In one embodiment, the analysis module 30 is further configured to: debinarize the standard swept frequency signal spectrogram and use it as a second mask template; select the harmonic noise portion from the clipped spectrogram of the device under test and the clipped standard spectrogram template using the second mask template; calculate the root mean square value of the harmonic noise; derive the total harmonic distortion plus noise based on the root mean square value of the harmonic noise and the root mean square value of the fundamental frequency portion; and determine the difference between the total harmonic distortion plus noise by comparing the total harmonic distortion plus noise.

[0138] Other embodiments or implementation methods of the audio device detection device described in this invention can be found in the above-described method embodiments, and will not be repeated here.

[0139] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0140] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0142] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for detecting audio devices, characterized in that, The method includes the following steps: Obtain the spectrogram of the device under test; Align the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test, and trim off the excess portions on the left and right to obtain the trimmed standard spectrogram template and the trimmed spectrogram of the device under test. The clipped standard spectrogram template is compared and analyzed with the clipped spectrogram of the device under test. If the comparative analysis results are within the allowable range, then the tested equipment is determined to meet the standard. The step of comparing and analyzing the clipped standard spectrogram with the clipped spectrogram of the device under test includes: The spectrogram of the clipped device under test is subtracted or divided from the standard spectrogram template to obtain the spectrogram difference matrix; The spectrogram difference matrix is ​​filtered using a filter to identify regions with large amplitude differences. When there are amplitude points with relatively large differences among the amplitude differences, the analysis results indicate the presence of abnormal sounds or cutoff amplitudes. After subtracting or dividing the clipped spectrogram of the tested device from the clipped standard spectrogram template, the method further includes: Calculate the root mean square value of the region outside the standard swept signal spectrogram on the clipped spectrogram of the device under test, wherein the standard swept signal spectrogram is a spectrogram generated from the standard swept signal; Compare the root mean square values ​​of the same region between the clipped standard spectrogram template and the clipped spectrogram of the device under test. The degree of noise difference is determined by comparing the root mean square values ​​of the same region. Whether the tested equipment meets the standard is determined based on the degree of difference in noise. After calculating the root mean square value of the region outside the standard swept frequency signal spectrogram on the clipped spectrogram of the device under test, the method further includes: The standard swept frequency signal spectrogram is binarized and used as the first mask template; The fundamental frequency component is selected using the mask template from the spectrogram of the clipped device under test and the standard spectrogram template. The degree of difference in the fundamental frequency components is determined by comparing their amplitudes. Whether the device under test meets the standard is determined based on the degree of difference in the fundamental frequency component.

2. The method as described in claim 1, characterized in that, Aligning the standard spectrogram template with the frequency sweep portion of the spectrogram of the device under test includes: Determine the first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept signal; Determine the second alignment point between the standard swept frequency signal spectrogram and the standard spectrogram template; Align the standard spectrogram with the spectrogram of the device under test based on the first alignment point and the second alignment point.

3. The method as described in claim 2, characterized in that, Before determining the first alignment point between the spectrogram of the device under test and the spectrogram of the standard swept signal, the method further includes: A swept frequency signal is used as the signal source; Obtain the spectrogram of the standard swept frequency signal; Obtain a standard spectrogram template, wherein the standard spectrogram template is a spectrogram generated from audio played by a standard device and recorded by a standard testing device.

4. The method as described in claim 1, characterized in that, After determining the degree of difference in the fundamental frequency components by comparing their amplitudes, the method further includes: The standard swept frequency signal spectrogram is debinarized and used as the second mask template; The harmonic and noise components are selected using the second mask template from the spectrogram of the clipped device under test and the standard spectrogram template. Calculate the root mean square value of the harmonics plus noise; The total harmonic distortion plus noise is calculated based on the root mean square value of the harmonic noise and the root mean square value of the fundamental frequency component. The difference between the total harmonic distortion and the noise is determined by comparing the total harmonic distortion plus the noise.

5. An audio device detection device, characterized in that, The audio device detection device includes: The acquisition module is used to acquire the spectrogram of the device under test; The alignment module is used to align the standard spectrogram with the frequency sweep portion of the spectrogram of the device under test, and to trim the excess portions on the left and right to obtain the trimmed standard spectrogram and the trimmed spectrogram of the device under test. The analysis module is used to compare and analyze the clipped standard spectrogram with the clipped spectrogram of the device under test. The judgment module is used to determine whether the device under test meets the standard; The analysis module is further configured to subtract or divide the clipped spectrogram of the device under test from the clipped standard spectrogram template to obtain a spectrogram difference matrix; to filter the spectrogram difference matrix using a filter to identify regions with large amplitude differences; and to determine the presence of abnormal sounds or cutoff amplitudes when there are amplitude points with large differences in the amplitude differences. The analysis module is further configured to calculate the root mean square (RMS) value of the region outside the standard swept signal spectrogram on the spectrogram of the clipped device under test (DUT), wherein the standard swept signal spectrogram is a spectrogram generated from a standard swept signal; compare the RMS values ​​of the same region between the clipped standard spectrogram template and the spectrogram of the clipped DUT; determine the degree of noise difference by comparing the RMS values ​​of the same region; and determine whether the DUT meets the standard based on the degree of noise difference. The analysis module is further configured to binarize the standard swept frequency signal spectrogram and use it as a first mask template; select the fundamental frequency component from the clipped spectrogram of the device under test and the clipped standard spectrogram template using the mask template; determine the degree of difference of the fundamental frequency component by comparing the amplitude of the fundamental frequency component; and determine whether the device under test meets the standard based on the degree of difference of the fundamental frequency component.

6. An audio device testing device, characterized in that, The device includes: a memory, a processor, and an audio device detection program stored in the memory and executable on the processor, the audio device detection program being configured to implement the steps of the audio device detection method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium stores an audio device detection program, which, when executed by a processor, implements the steps of the audio device detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Microphone test method, microphone test device and storage medium

    CN109474879A

  • Voice comparison method, device and equipment and computer readable storage medium

    CN111640421A

  • Microphone array detection method and device

    CN112423213A