Echo test method, device and equipment of audio device and storage medium

CN122802853APending Publication Date: 2026-09-22ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510335291.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0005]本发明提供一种音频设备的回声测试方法、装置、设备及存储介质,用以解决现有技术中通过扬声器播放前后音频的音量进行比较来确定回声测试结果导致获得的回声测试结果不够准确的缺陷,实现在消音箱内对音频设备回声消除后的音频信号进行重采样,并根据重采样后各音频点的幅值来确定音频设备是否存在回声的测试结果,实现对音频设备的回声进行准确测试的目的

Benefits of technology

[0017]本发明提供的音频设备的回声测试方法、装置、设备及存储介质,通过将待测音频设备放置于消音箱内,控制待测音频设备的扬声器播放第一音频信号,获取待测音频设备传输的经由其回声消除装置对麦克风采集的第一音频信号进行消除后的第二音频信号,然后对第二音频信号进行重采样以获得包括多个音频点以及每个音频点对应的第一幅值的重采样信号,并根据各音频点的第一幅值确定待测音频设备是否存在回声的第一回声测试结果。该方法中,由于可以将音频设备放置于消音箱中进行回声测试,而消音箱中的音频较为干净不含有其他杂音,这样可以避免其他杂音对音频设备进行回声测试时产生干扰,提升音频设备回声测试结果的准确性;同时,通过对音频设备回声消除后的音频信号进行重采样并根据重采样后各音频点的幅值来确定音频设备是否存在回声的测试结果,这样可以对音频设备的回声进行准确测试,进一步提升获得的音频设备的回声测试结果的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802853A_ABST
    Figure CN122802853A_ABST
Patent Text Reader

Abstract

The application provides an echo test method, device and equipment of an audio device and a storage medium. The method comprises the following steps: controlling a loudspeaker of a to-be-tested audio device to play a first audio signal; the to-be-tested audio device is placed in a sound-elimination box, which comprises a loudspeaker, a microphone and an echo elimination device for eliminating an audio signal collected by the microphone; obtaining a second audio signal transmitted by the to-be-tested audio device; the second audio signal is an audio signal after the echo elimination device eliminates the first audio signal collected by the microphone; resampling the second audio signal to obtain a resampled signal; the resampled signal comprises a plurality of audio points and a first amplitude of each audio point; determining a first echo test result of the to-be-tested audio device according to the first amplitude of each audio point; and the first echo test result is used to represent whether the to-be-tested audio device has an echo. The technical scheme of the application can improve the accuracy of the echo test of the audio device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio processing technology, and in particular to an echo testing method, apparatus, device, and storage medium for audio devices. Background Technology

[0002] With the continuous development and popularization of building intercom systems, measuring the audio quality of these systems has become increasingly important. Audio quality, as a crucial indicator of intercom system performance, is primarily affected by factors such as audio echo. The causes of audio echo are mainly related to the product design and manufacturing processes of the intercom system. To prevent intercom products with audio echo problems from entering the market, echo testing is necessary before the products leave the factory.

[0003] In related technologies, when testing the echo of an intercom product, a reference audio signal is usually set up first. This reference audio signal is played through the intercom product's speaker, and the echo signal collected by the intercom product's microphone is obtained after playback. Then, the volume of the echo signal and the reference audio signal are compared to obtain the echo test result of the intercom product.

[0004] However, the above techniques have the problem that the obtained audio echo test results are not accurate enough. Summary of the Invention

[0005] This invention provides an echo testing method, apparatus, device, and storage medium for audio devices, addressing the shortcomings of existing technologies that rely on comparing the volume of audio before and after playback through a speaker to determine the echo test result, resulting in inaccurate echo test results. The invention achieves this by resampling the audio signal after echo cancellation within a soundproof enclosure and determining the presence of echo in the audio device based on the amplitude of each audio point after resampling, thus achieving the goal of accurately testing the echo of audio devices.

[0006] This invention provides a method for testing the echo of an audio device, comprising: The speaker of the audio device under test is controlled to play a first audio signal; the audio device under test is placed in a soundproof box, and the audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone; Acquire the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone; The second audio signal is resampled to obtain a resampled signal; the resampled signal includes multiple audio points and the first amplitude value corresponding to each audio point. The first echo test result of the audio device under test is determined based on the first amplitude value corresponding to each audio point; the first echo test result is used to characterize whether the audio device under test has an echo.

[0007] According to the echo testing method for an audio device provided by the present invention, the method for determining the first echo test result of the audio device under test based on the first amplitude value corresponding to each audio point includes: Determine whether the first amplitude value of each audio point is greater than a preset amplitude threshold, and obtain the determination result; The first echo test result of the audio device under test is determined based on the judgment result.

[0008] According to the present invention, an echo testing method for an audio device is provided. If the audio device under test has an echo, the method further includes: Fourier transforms are performed on the time-domain signal and the resampled signal of the first audio signal to obtain the first spectrum corresponding to the time-domain signal of the first audio signal and the second spectrum corresponding to the resampled signal. Based on the first and second spectra, the abnormal information of the audio device under test is determined, and adjustments are made to the audio device under test according to the abnormal information.

[0009] According to the echo testing method for an audio device provided by the present invention, the above-mentioned determination of abnormal information of the audio device under test based on a first spectrum and a second spectrum includes: Compare whether the second amplitude values ​​of the first and second spectra at the same frequency are consistent; If they match, the frequency corresponding to the second amplitude value that matches is taken as the abnormal information of the audio device under test.

[0010] According to the echo testing method for an audio device provided by the present invention, if the audio device under test does not have an echo, an ambient sound simulation module is also provided inside the anechoic chamber. The method further includes: Control the speaker of the audio device under test to play the first audio signal and control the ambient sound simulation module to play the original ambient audio signal; Acquire the third audio signal transmitted by the audio device under test; the third audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone and the original ambient audio signal. Based on the original ambient audio signal and the third audio signal, the second echo test result of the audio device under test is determined; the second echo test result is used to characterize whether there is excessive echo cancellation in the audio device under test.

[0011] According to the echo testing method for an audio device provided by the present invention, the method for determining the second echo test result of the audio device under test based on the original ambient audio signal and the third audio signal includes: Based on the first length corresponding to the original ambient audio signal and the second length corresponding to the third audio signal, the time delay range between the third audio signal and the original ambient audio signal is determined; the time delay range includes multiple different time delays, each time delay representing the time delay of the third audio signal relative to the original ambient audio signal. Calculate the similarity between the third audio signal and the original environmental audio signal at different time delays; The second echo test result of the audio device under test is determined based on the similarity scores.

[0012] According to the echo testing method for an audio device provided by the present invention, the method for determining the second echo test result of the audio device under test based on various similarities includes: Based on each similarity score, determine the maximum similarity score among them; The second echo test result of the audio device under test is determined based on the maximum similarity and the preset similarity threshold range.

[0013] The present invention also provides an echo testing device for audio equipment, comprising the following modules: The first control module is used to control the speaker of the audio device under test to play a first audio signal; the audio device under test is placed in a soundproof box, and the audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone. The first acquisition module is used to acquire the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone. The resampling module is used to resample the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude value corresponding to each audio point; The first echo test result determination module is used to determine the first echo test result of the audio device under test based on the first amplitude value corresponding to each audio point; the first echo test result is used to characterize whether the audio device under test has an echo.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an echo testing method for an audio device as described above.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an echo testing method for an audio device as described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements an echo testing method for an audio device as described above.

[0017] The present invention provides an echo testing method, apparatus, device, and storage medium for audio devices. The method involves placing the audio device under test (ADT) in a soundproof enclosure, controlling the ADT's speaker to play a first audio signal, acquiring a second audio signal after the first audio signal, collected by the microphone and processed by its echo cancellation device, is eliminated. The second audio signal is then resampled to obtain a resampled signal including multiple audio points and a first amplitude corresponding to each audio point. A first echo test result is determined based on the first amplitude of each audio point to determine whether the ADT exhibits an echo. In this method, because the audio device can be placed in a soundproof enclosure for echo testing, and the audio within the enclosure is relatively clean and free of other noise, interference from other noises during the echo test is avoided, improving the accuracy of the echo test results. Furthermore, by resampling the echo-cancelled audio signal and determining the echo test result based on the amplitude of each resampled audio point, the echo of the audio device can be accurately tested, further improving the accuracy of the obtained echo test results. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a diagram illustrating the principle behind the generation of audio echo.

[0020] Figure 2 This is an architectural block diagram of the audio device echo testing system provided in an embodiment of the present invention.

[0021] Figure 3 This is one of the flowcharts illustrating the echo testing method for audio devices provided in this embodiment of the invention.

[0022] Figure 4 This is the second flowchart illustrating the echo testing method for audio devices provided in this embodiment of the invention.

[0023] Figure 5 This is the third flowchart illustrating the echo testing method for audio devices provided in this embodiment of the invention.

[0024] Figure 6This is a schematic diagram of the structure of the echo testing device for audio equipment provided in an embodiment of the present invention.

[0025] Figure 7 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0027] In remote intercom, see Figure 1 The diagram illustrates the principle of audio echo generation. When the sound signal or audio signal from the receiving end (the device within the box in the diagram) is sufficiently loud, it may be picked up again by the microphone or pickup at the receiving end and transmitted back to the sending end via the communication line. This causes the sending end to hear its own delayed sound, a phenomenon known as an echo. The generation and transmission of the echo lag slightly behind the original transmitted sound. Echo cancellation is generally required to address this type of echo.

[0028] Currently, the echo in walkie-talkies is mainly acoustic echo, manifested as poor isolation between the transmit and receive loops. One reason for this is inadequate sealing between the microphone and speaker during assembly, leading to an unpleasant echo experience during calls. Pre-shipment testing for these products often relies on manual listening, but factory environments are typically noisy, and operators, prioritizing efficiency, may overlook quality issues, resulting in products with audio echo problems entering the market. This method cannot accurately intercept problematic audio devices. Another approach involves setting a reference audio signal for testing, playing it through the walkie-talkie's speaker, and then capturing the echo signal from the microphone. The volume of the echo signal is then compared to the reference audio signal to obtain the echo test result. However, comparing the volume of the echo signal and the reference audio signal reveals that the actual volume after amplification differs from the original, making it difficult to obtain the desired result and resulting in inaccurate audio echo test results. Furthermore, this solution does not consider the actual usage environment; ambient noise during actual use of the intercom product will also be superimposed on the audio signal, causing volume differences and affecting the actual echo test results. Additionally, echo issues in intercom products must be addressed during the development and design phase, but during product manufacturing, assembly issues can introduce echo problems (e.g., blocked microphone holes, missing sound-absorbing foam, improperly secured speakers, etc.). This solution only addresses issues from the development and design phase and struggles to intercept echo problems introduced during production. Therefore, this invention provides an echo testing method, apparatus, device, and storage medium for audio devices, which can solve the aforementioned technical problems.

[0029] To better illustrate the technical solutions of the embodiments of the present invention, the echo testing system for audio devices provided in the embodiments of the present invention will be described first. (See [link to documentation]). Figure 2 The diagram shown is an architectural block diagram of an audio device echo testing system provided in an embodiment of the present invention. The audio device echo testing system includes an audio device under test, a soundproof enclosure, an echo testing device main controller, and an ambient sound simulation module. The audio device under test and the ambient sound simulation module are both housed inside the soundproof enclosure, and the echo testing device main controller is connected to the audio device under test and the ambient sound simulation module via a network.

[0030] The audio device under test includes a speaker (Speaker), a microphone (MIC), and an echo cancellation device (the echo cancellation device uses the echo cancellation algorithm AEC for echo cancellation). The speaker is mainly used to play audio signals, the microphone is mainly used to acquire audio signals, and the echo cancellation device is mainly used to cancel the audio signals acquired by the microphone. The audio device under test and the main controller of the echo test device are connected via a network.

[0031] A silencer box, also known as a silencer test box, can effectively isolate external noise interference, ensuring the purity of the sound picked up by the microphone, thus providing a relatively clean testing environment for the audio device under test.

[0032] The main control unit of the echo testing device includes a control module, a display module, an audio signal generator, and an audio signal analyzer. The control module is connected to the display module, the audio signal generator, and the audio signal analyzer to control these modules.

[0033] The audio signal generator, controlled by a control module, generates audio signals of different frequencies and amplitudes. These signals are then transmitted to the audio device under test (DUT) via a data transmission interface for playback through the DUT's speakers. Simultaneously, the audio signal generator can also connect to an ambient sound simulation module via the data transmission interface to transmit generated ambient audio signals for playback. Specifically, the audio signal generator consists of three main parts: an input module, a power amplifier module, and an output stage / output module. The input module stores or inputs specific audio source files for testing. The power amplifier module adjusts the frequency and amplitude of the audio file, enabling output of audio source files with different frequencies and volumes. The output stage / output module converts the adjusted audio source file into a transmittable file type, sending it to the DUT via the data transmission interface, and allowing the DUT's speakers to play the adjusted audio source file.

[0034] The audio signal analyzer also connects to the audio device under test (DUT) via data transmission. It receives the audio signal after echo cancellation by the DUT's echo cancellation device and analyzes the received signal to evaluate the audio echo test results. The display module is primarily used to visually present the test process and results to the user via a screen. Specifically, the audio signal analyzer consists of three main parts: an audio signal acquisition module, a signal analysis module, and an output stage. The audio signal acquisition module converts the sound signal into an electrical signal, which is then converted into a digital signal via an analog-to-digital converter (AD). The signal analysis module analyzes and processes the digital signal using a series of algorithms. The output stage converts the analyzed audio into a transferable file type.

[0035] The ambient sound simulation module is mainly used to simulate the ambient audio of the audio device under test in actual use. Its on / off state and volume can be controlled by the control module in the main control of the echo test device. Specifically, the ambient sound simulation module can generate certain ambient audio for playback to simulate the environment during actual use.

[0036] The echo testing system described above can be used to perform echo testing on the audio device under test. Based on this echo testing system, the following embodiment uses the main controller of the echo testing device in the system as the execution subject to illustrate the echo testing method for audio devices. The main controller of the echo testing device can also be an electronic device, such as a terminal or server.

[0037] Figure 3 This is one of the flowcharts illustrating the echo testing method for audio devices provided by the present invention, such as... Figure 3 As shown, the method includes the following steps: Step 102: Control the speaker of the audio device under test to play the first audio signal; the audio device under test is placed in a soundproof box, and the audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone.

[0038] The first audio signal can be a test audio signal generated by the audio signal generator controlled by the echo test device according to the requirements, or it can be the audio signal of the audio device under test.

[0039] The audio device under test (DUT) can be a walkie-talkie, a walkie-talkie system, etc. "DUT" refers to the fact that the audio device has not undergone an echo test in the manner described in this embodiment before leaving the factory. There can be one or more audio devices under test. When performing an echo test on the audio device under test, it can be placed in a soundproof box to prevent other noises from affecting the echo test.

[0040] When performing an echo test on the audio device under test, the main controller of the echo test device can send the test audio signal generated by the audio signal generator to the audio device under test, causing the speaker of the audio device under test to play the test audio signal; or the main controller of the echo test device can send a control command to the audio device under test to control the speaker of the audio device under test to play its own audio signal. Here, the audio signal played by the speaker last is recorded as the first audio signal.

[0041] Additionally, it should be noted that in this embodiment, the silencer box contains only the first audio signal and no other ambient audio signals.

[0042] Step 104: Obtain the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone.

[0043] In this step, after the speaker of the audio device under test plays the first audio signal, when the first audio signal is loud enough, the microphone of the audio device under test will receive the first audio signal and then transmit it to the echo cancellation device AEC of the audio device under test. The echo cancellation device can perform echo cancellation processing on the audio signal received by the microphone and output the final canceled audio signal, which is denoted as the second audio signal.

[0044] Subsequently, the audio device under test can transmit the second audio signal to the main control unit of the echo test device, where the audio signal analyzer continues to analyze it to obtain the first echo test result. Furthermore, both the first and second audio signals can be analog signals.

[0045] It should be noted that, theoretically, after the echo cancellation device cancels the echo of the audio signal received by the microphone, the final audio signal should contain no sound or only a very faint sound. This indicates that the audio device under test has no problems in the research and development stage and the production stage, meaning that the audio device under test is not a defective product.

[0046] Step 106: Resample the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and the first amplitude value corresponding to each audio point.

[0047] In this step, after the echo test device master obtains the second audio signal transmitted by the audio device under test after echo cancellation, since the second audio signal is an analog signal, in order to facilitate the echo test, the second audio signal can be resampled, that is, the second audio signal is subjected to AD conversion, quantization and encoding processing, etc., to convert the second audio signal from an analog signal into a digital signal. The final digital signal can be recorded as the resampled signal.

[0048] The resampled signal can include multiple audio points and the amplitude corresponding to each audio point. Here, the audio point is actually a time point / moment, and the amplitude is the amplitude corresponding to each time point / moment, denoted as the first amplitude. This resampled signal can accurately represent the amplitude of the second audio signal at various time points in the time domain, which facilitates accurate and rapid echo testing of the audio device under test.

[0049] In addition, the aforementioned second audio signal can be an audio file in PCM (Pulse Code Modulation) format. After the echo testing device obtains the PCM format audio file, it can first parse the PCM format audio file, and then resample it after obtaining the parsing result to obtain a resampled signal.

[0050] Step 108: Determine the first echo test result of the audio device under test based on the first amplitude value corresponding to each audio point; the first echo test result is used to characterize whether the audio device under test has an echo.

[0051] In this step, after obtaining each audio point in the resampled signal and its corresponding first amplitude, the first echo test result of the audio device under test can be determined by these multiple first amplitudes. The first echo test result mainly includes whether the audio device under test has an echo.

[0052] When determining the first echo test result of the audio device under test using these multiple first amplitude values, it can be done in several possible ways, such as the following: The first method involves summing multiple first amplitude values ​​and taking their average. If the average is greater than a set average threshold, the first echo test result is determined to have an echo; otherwise, it is determined to have no echo. The average threshold can be set according to the actual situation, for example, it can be 0.

[0053] The second method involves selecting the largest amplitude from multiple first amplitude values. If the largest amplitude is too large (e.g., the difference between it and the mean is large), the first echo test result is determined to be that there is an echo; otherwise, the first echo test result is determined to be that there is no echo.

[0054] The third method is to determine whether some or all of the first amplitude values ​​among multiple first amplitude values ​​exceed the amplitude threshold. If they do, the first echo test result is determined to be that there is an echo; otherwise, the first echo test result is determined to be that there is no echo.

[0055] The above methods are just examples. Of course, other methods can also be used to determine the first echo test result of the audio device under test by using the first amplitude of multiple audio points. No specific limitations are made here.

[0056] It should be noted that, theoretically, after the echo cancellation device cancels the audio signal received by the microphone, the final audio signal should contain little to no sound. The above-mentioned method uses the amplitude of multiple audio points obtained by resampling the audio signal after echo cancellation to test the audio device under test. This avoids inaccurate test results due to differences in the volume of different audio signals, thus improving the accuracy of echo testing. Furthermore, this embodiment can also intercept echo problems introduced during the processing or production of the audio device under test due to assembly issues (such as blocked microphone holes, missing sound-absorbing foam, or improperly fixed speakers), thereby preventing problematic audio devices from entering the market and causing negative impacts.

[0057] In this embodiment, by placing the audio device under test (ADT) inside a soundproof enclosure, the speaker of the ADT plays a first audio signal, and a second audio signal is acquired after the first audio signal, collected by the microphone and processed by the echo cancellation device, is eliminated. The second audio signal is then resampled to obtain a resampled signal including multiple audio points and a first amplitude corresponding to each audio point. Based on the first amplitude of each audio point, a first echo test result is determined to indicate whether the ADT exhibits an echo. This method utilizes the cleanliness of the soundproof enclosure, free from other noise, to prevent interference from other sounds during the echo test, thus improving the accuracy of the echo test results. Furthermore, by resampling the echo-cancelled audio signal and determining the echo result based on the amplitude of each resampled audio point, the accuracy of the obtained echo test results is further enhanced.

[0058] The following embodiment describes the specific implementation process of a possible implementation of determining the first echo test result of the audio device under test by using the first amplitude of multiple audio points.

[0059] Figure 4 This is a second schematic flowchart of the echo testing method for audio devices provided by the present invention, as shown below. Figure 4 As shown, step 108 above, which determines the first echo test result of the audio device under test based on the first amplitude value corresponding to each audio point, may include the following steps: Step 202: Determine whether the first amplitude value of each audio point is greater than the preset amplitude threshold, and obtain the judgment result.

[0060] The preset amplitude threshold can be a threshold set in advance according to the actual situation, such as 0 or other values.

[0061] Specifically, after obtaining multiple audio points and their respective first amplitude values, the first amplitude value of each audio point can be compared with the amplitude threshold point by point to determine whether the first amplitude value of each audio point is greater than the amplitude threshold, thereby obtaining the judgment result for each audio point. Then, the judgment results of each audio point are combined as the final judgment result.

[0062] Step 204: Determine the first echo test result of the audio device under test based on the judgment result.

[0063] In this step, after obtaining the judgment results of each audio point, optionally, if the judgment result is that the first amplitude of at least one target audio point in each audio point is greater than the amplitude threshold, then the first echo test result of the audio device under test is determined to be that the audio device under test has an echo.

[0064] Optionally, if the judgment result is that the first amplitude of each audio point is not greater than the amplitude threshold, then the first echo test result of the audio device under test is determined to be that the audio device under test has no echo.

[0065] If it is determined that there is no echo in the audio device under test, the echo test can be preliminarily passed, and the audio device under test can be directly regarded as an audio device without problems. Alternatively, the audio device under test can continue to undergo echo testing, such as testing whether there are problems such as excessive echo cancellation, and then determine whether there are any problems after the final test is completed.

[0066] If an echo is detected in the audio device under test, it can be determined that the echo test of the audio device under test has failed and there is a problem. At this point, the abnormal information of the problem of the audio device under test can be further identified so that the audio device under test can be improved in a timely manner based on the abnormal information.

[0067] In an optional embodiment, if the audio device under test has an echo, the above method may further include the following steps: Fourier transforms are performed on the time-domain signal and the resampled signal of the first audio signal to obtain the first spectrum corresponding to the time-domain signal of the first audio signal and the second spectrum corresponding to the resampled signal. Based on the first and second spectra, the abnormal information of the audio device under test is determined, and adjustments are made to the audio device under test according to the abnormal information.

[0068] The first audio signal is an analog signal, and its corresponding time-domain signal can be obtained by resampling the first audio signal. The resampled signal is the time-domain signal corresponding to the second audio signal. Then, Fourier transform processing can be performed on the time-domain signal of the first audio signal and the resampled signal respectively to convert the time-domain signal of the first audio signal and the resampled signal to the frequency domain, obtaining their respective frequency domain signals or spectra. Here, the spectrum corresponding to the time-domain signal of the first audio signal is denoted as the first spectrum, and the spectrum corresponding to the resampled signal is denoted as the second spectrum.

[0069] Both the first and second spectra can include amplitude and phase spectra. The amplitude spectrum refers to the amplitude information of each frequency component of the signal in the frequency domain, representing the magnitude of each frequency component, i.e., the energy distribution of the signal at different frequencies. The phase spectrum refers to the phase information of each spectral component of the signal in the frequency domain.

[0070] After obtaining the first spectrum corresponding to the time-domain signal of the first audio signal and the second spectrum corresponding to the resampled signal of the second audio signal, since there is an echo, that is, the audio device under test may have a problem. In order to facilitate quick problem location, the abnormal information of the audio device under test can be determined by comparing the difference between the two spectra.

[0071] As an optional embodiment, the second amplitude values ​​at the same frequency of the first and second spectra can be compared. If they are consistent, the frequency corresponding to the consistent second amplitude value is taken as the abnormal information of the audio device under test. Specifically, in this embodiment, the amplitude spectra of two signals (i.e., the first audio signal and the second audio signal) are mainly used for echo testing. The frequency ranges corresponding to the amplitude spectra of the two signals are basically the same. The amplitude value corresponding to each frequency point in the two amplitude spectra is recorded as the second amplitude value. After echo cancellation, the amplitude value in the amplitude spectrum of the second audio signal should theoretically only have relatively small amplitude values. If there are relatively large amplitude values, it is theoretically abnormal information. Based on this, the two second amplitude values ​​corresponding to each frequency point in the two amplitude spectra can be compared one by one. If they are inconsistent, it means that there is no abnormality at that frequency point. If they are consistent, it means that there is an abnormality at that frequency point. Then, the two frequency points with the same second amplitude value at the same frequency point can be recorded as the abnormal frequency points of the audio device under test. In this way, all abnormal frequency points in the two amplitude spectra can be obtained. Specifically, for two second amplitude values ​​at the same frequency point, the absolute value of the difference between the two second amplitude values ​​can be calculated. If the absolute value of the difference between the two second amplitude values ​​is less than or equal to a preset threshold, then the two second amplitude values ​​are determined to be consistent; otherwise, the two second amplitude values ​​are determined to be inconsistent. The value of the preset threshold can be set according to the actual situation, for example, it can be 0 or a value greater than 0.

[0072] Simultaneously, when comparing the resampled signal of the second audio signal at each time point / audio point, the time point where the first amplitude is greater than the amplitude threshold can be obtained as an abnormal time point. Alternatively, the abnormal time point can be deduced from the abnormal frequency point. Then, both the abnormal time point and the abnormal frequency point can be used as abnormal information for the audio device under test. This abnormal information can pinpoint the specific problematic aspects of the audio device under test, such as structural design, assembly during the production stage, or echo cancellation algorithm design (e.g., poor echo cancellation in a certain frequency band reflects untimely convergence of the echo cancellation algorithm or incomplete removal of tail sounds). This allows for targeted adjustments to the audio device under test, improving the accuracy and effectiveness of these adjustments, and also providing a better evaluation of the audio echo cancellation effect.

[0073] In this embodiment, the echo test result of the audio device under test is determined by judging whether the amplitude of each audio point is greater than an amplitude threshold. This point-by-point judgment improves the accuracy of the echo test of the audio device, thereby improving the accuracy of the obtained echo test result. Furthermore, when it is determined that the audio device has an echo, the abnormal information of the audio device is determined by comparing the spectra of the audio signal played by the speaker and the audio signal after the echo cancellation device has eliminated the echo, allowing for targeted adjustments to the audio device under test, improving the accuracy and effectiveness of the adjustments. Further, by comparing whether the amplitudes of the same frequency in the spectra of the two signals are consistent, and identifying the frequency points with consistent amplitudes as abnormal information, the abnormal information of the audio device can be determined more accurately and quickly through amplitude comparison at frequency points, thereby improving the efficiency and accuracy of audio device adjustments.

[0074] The above embodiments illustrate the testing process for the presence of echo in audio devices. During echo testing, unsatisfactory echo cancellation often occurs because certain frequencies cannot be completely eliminated, or due to abnormal cancellation caused by audio clipping, or excessive cancellation resulting in poor preservation of the original sound. The first two scenarios generally present echoes in the absence of ambient sound, while the last scenario may not present echoes at all. Even in the absence of echo in the audio device, excessive echo cancellation may still occur. The following embodiments illustrate the process of echo testing in this scenario. In this case, the audio device under test has no echo, and an ambient sound simulation module is installed inside the anechoic chamber. This module simulates ambient audio within the chamber and can be used to construct test scenarios such as two-way and one-way. By selecting different environmental test scenarios and analyzing the audio signals, a comprehensive evaluation of the echo test can be achieved. The following embodiments primarily illustrate the two-way test scenario.

[0075] Figure 5 This is the third flowchart illustrating the echo testing method for audio devices provided by this invention, as shown below. Figure 5 As shown, the above method may also include the following steps: Step 302: Control the speaker of the audio device under test to play the first audio signal and control the ambient sound simulation module to play the original ambient audio signal.

[0076] In this step, the ambient sound simulation module is housed within a soundproof enclosure. This prevents interference and influence from other ambient noises on the test results during echo testing using ambient audio. The main controller of the echo testing device can control the ambient sound simulation module to generate and play a specific ambient audio signal, which is denoted as the original ambient audio signal.

[0077] Meanwhile, the main controller of the echo testing device can also control the speaker of the audio device under test to play the first audio signal. The specific control method is as described in the above embodiment, and will not be repeated here.

[0078] Understandably, the speaker here plays the first audio signal, the ambient sound simulation module plays the original ambient audio signal, and the signal received by the microphone is actually the first audio signal superimposed with the original ambient audio signal.

[0079] Step 304: Obtain the third audio signal transmitted by the audio device under test; the third audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone and the original ambient audio signal.

[0080] In this step, after the microphone receives the audio signal with the original ambient audio signal superimposed on the first audio signal, it can transmit it to the echo cancellation device for echo cancellation processing to obtain the final canceled audio signal, which is denoted as the third audio signal.

[0081] Afterwards, the audio device under test can transmit the third audio signal to the main control unit of the echo test device, and the audio signal analyzer in the main control unit of the echo test device will continue to analyze it to obtain the second echo test result.

[0082] Step 306: Determine the second echo test result of the audio device under test based on the original ambient audio signal and the third audio signal; the second echo test result is used to characterize whether there is excessive echo cancellation in the audio device under test.

[0083] In this step, the echo testing device's main controller can obtain the original ambient audio signal by interacting with the ambient sound simulation module while controlling the ambient sound simulation module to generate the original ambient audio signal. Simultaneously, after obtaining the third audio signal, the main controller can obtain a second echo test result by comparing the third audio signal with the original ambient audio signal. This second echo test result can include whether the audio device under test has excessive echo cancellation.

[0084] Alternatively, if the original ambient audio signal can be well preserved in the third audio signal, for example, if the third audio signal is similar to the original ambient audio signal, it indicates that the audio device under test does not have excessive echo cancellation, that is, the echo cancellation is not excessive. In this case, it can be determined that the audio device under test does not have a problem.

[0085] Alternatively, if the original ambient audio signal is not well preserved in the third audio signal, for example, if the third audio signal is not very similar to the original ambient audio signal, it indicates that the audio device under test has excessive echo cancellation. Excessive echo cancellation may cause distortion problems, which need to be avoided. In this case, it can be determined that there may be a problem with the audio device under test, such as a problem with the hardware or software algorithm of the echo cancellation device of the audio device under test.

[0086] In this embodiment, by playing the original ambient audio and the first audio signal inside the anechoic chamber, and comparing the echo-cancelled audio with the original ambient audio, the test results are used to determine whether the audio device has excessive echo cancellation. Introducing ambient audio testing can simulate a two-way intercom scenario and analyze the echo cancellation quality during two-way intercom, ensuring that excessive echo cancellation does not cause sound distortion. At the same time, conducting ambient sound testing inside the anechoic chamber can also effectively avoid the influence of other ambient noises and eliminate interference, thereby effectively ensuring the accuracy of the echo test results.

[0087] The following embodiment illustrates a possible implementation for determining the second echo test result of the audio device under test using a third audio signal and the original ambient audio signal.

[0088] In some embodiments, before step 306 above determines the second echo test result of the audio device under test based on the original ambient audio signal and the third audio signal, the method further includes: The original environmental audio signal and the third audio signal are normalized respectively to obtain the normalized original environmental audio signal and the normalized third audio signal; In step 306 above, the second echo test result of the audio device under test is determined based on the original environmental audio signal and the third audio signal, including: The second echo test result of the audio device under test is determined based on the normalized original environmental audio signal and the normalized third audio signal.

[0089] In this embodiment, by normalizing the original environmental audio signal and the third audio signal respectively, the amplitude of the two signals can be adjusted to the same range, which facilitates the subsequent comparison of the similarity between the two signals, and thus quickly realizes the test of whether the audio device has excessive echo cancellation.

[0090] In some embodiments, step 306 above, which determines the second echo test result of the audio device under test based on the original ambient audio signal and the third audio signal, may include the following steps: Based on the first length corresponding to the original ambient audio signal and the second length corresponding to the third audio signal, the time delay range between the third audio signal and the original ambient audio signal is determined; the time delay range includes multiple different time delays, each time delay representing the time delay of the third audio signal relative to the original ambient audio signal. Calculate the similarity between the third audio signal and the original environmental audio signal at different time delays; determine the second echo test result of the audio device under test based on each similarity.

[0091] In this process, after the main controller of the echo test device obtains the original ambient audio signal and the third audio signal, it can also obtain the length of these two signals. The length here can be the time length of the signal. The time length of the original ambient audio signal can be recorded as the first length, and the time length of the third audio signal can be recorded as the second length.

[0092] Since the third audio signal is transmitted from the echo cancellation device to the echo testing device after the original ambient audio signal and the first audio signal have been played, the third audio signal is slightly later than the original ambient audio signal; that is, the third audio signal has a certain time delay relative to the original ambient audio signal. In this embodiment, the time delay range between the two signals can be determined by the first length of the original ambient audio signal and the second length of the third audio signal. Specifically, the time range between the first length + 1 and the second length - 1 can be used as the time delay range, which can include multiple different time delays.

[0093] Then, the third audio signal can be placed under different time delays within the time delay range to obtain multiple different fourth audio signals. Then, the similarity between each fourth audio signal and the original audio signal can be calculated. For example, the similarity between each fourth audio signal and the original audio signal can be calculated using a cross-correlation function, and finally multiple similarities can be obtained.

[0094] Then, based on the similarity scores, the second echo test result can be determined to determine whether the audio device under test has excessive echo cancellation. Optionally, based on the similarity scores, the maximum similarity score can be determined; based on the maximum similarity score and a preset similarity threshold range, the second echo test result of the audio device under test can be determined. The similarity threshold range here can be, for example, 0 to 1. If the maximum similarity score is within the similarity threshold range and close to 1, it indicates that the two signals are very similar at a certain time delay, i.e., it is determined that the audio device under test does not have excessive echo cancellation; if the maximum similarity score is within the similarity threshold range and close to 0, it indicates that the two signals are not similar at any time delay, i.e., it is determined that the audio device under test has excessive echo cancellation; if the maximum similarity score is outside / exceeds the similarity threshold range and is negative, it indicates that the two signals are inversely related at a certain time delay.

[0095] For example, suppose the original environmental audio signal and the third audio signal are x(t) and y(t) respectively, and their respective time lengths are M and N. Then the time delay range is from M+1 to N-1, which includes multiple different time delays, all denoted as τ.

[0096] (1) First, normalize the two audio signals separately using the following formula: .

[0097] in, Let x(t) be the mean and standard deviation. Let y(t) be the mean and standard deviation, and x'(t) and y'(t) be the signals after normalization of x(t) and y(t), respectively. By subtracting the mean from the signal and dividing by the standard deviation, the signal can be scaled to a range with a mean of 0 and a standard deviation of 1, making the amplitudes of different signals consistent and facilitating subsequent comparisons.

[0098] (2) The similarity between normalized x'(t) and y'(t) under different time delays is calculated using the cross-correlation function. Specifically, the following formula can be used for calculation: .

[0099] Where τ is the time delay, ranging from M+1 to N-1; y'(t+τ) represents the signal after the y'(t) signal is delayed by a time τ, that is, the signal after the y'(t) signal is delayed by τ time; R xy (τ) is the similarity between two signals at a time delay τ.

[0100] By calculating the product of two signals at different time points with the same time delay τ using the above formula and summing the results, the similarity between the two signals at the same time delay τ can be calculated. This allows for the acquisition of multiple similarity scores after calculations with multiple different time delays. Finally, the maximum value τ of the cross-correlation function can be found among these multiple similarity scores. max The corresponding time and maximum similarity can be expressed using the following formula: , τ max Indicates that R xy (τ) represents the maximum value of τ, and this formula expresses the method for finding the value of R. xy (τ) takes the maximum value of τ.

[0101] , indicating R xy (τ) takes τ at τ max The maximum value / maximum similarity is obtained at that time.

[0102] (3) Through the maximum similarity R xy (τ) can be used to assess the similarity between two signals and determine whether the audio device under test has a second echo test result with excessive echo cancellation.

[0103] Additionally, it should be noted that, ideally, the delay time τ is extremely small and can meet the calculation requirements.

[0104] In this embodiment, the time delay range is determined based on the length of the original ambient audio and the length of the signal after ambient sound is superimposed and echo cancellation is performed. The similarity between the two signals is calculated at different time delays to determine if the audio device has excessive echo cancellation. By comparing similarity at multiple time delays, a more accurate echo test result can be obtained, improving the accuracy and efficiency of obtaining the echo test result. Furthermore, the echo test result is determined by comparing the maximum similarity among multiple similarity values ​​of the two signals at different time delays with a threshold range, which further improves the accuracy and efficiency of obtaining the echo test result.

[0105] In summary, the echo testing method and system for audio devices described in this embodiment have the advantages of simple operation, accurate testing, and wide applicability. By using this echo testing system to test the echo of audio devices, the problems of low accuracy and low efficiency of subjective human judgment can be avoided. At the same time, audio devices with excessive echo cancellation can also be intercepted, thereby enabling a comprehensive and accurate evaluation of the audio echo cancellation performance of audio devices (such as building intercom products).

[0106] The echo testing apparatus for audio devices provided by the present invention is described below. The echo testing apparatus for audio devices described below can be referred to in correspondence with the echo testing method for audio devices described above.

[0107] Figure 6 This is a schematic diagram of the structure of the echo testing device for audio equipment provided in an embodiment of the present invention. See also... Figure 6 As shown, the device may include: The first control module 410 is used to control the speaker of the audio device under test to play a first audio signal; the audio device under test is placed in a soundproof box, and the audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone. The first acquisition module 420 is used to acquire the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone. The resampling module 430 is used to resample the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude value corresponding to each audio point; The first echo test result determination module 440 is used to determine the first echo test result of the audio device under test based on the first amplitude value corresponding to each audio point; the first echo test result is used to characterize whether there is an echo in the audio device under test.

[0108] In some embodiments, the first echo test result determination module 440 is specifically used to determine whether the first amplitude of each audio point is greater than a preset amplitude threshold, and obtain a determination result; and determine the first echo test result of the audio device under test based on the determination result.

[0109] Optionally, if the audio device under test has an echo, the above device further includes: The transformation module is used to perform Fourier transform on the time-domain signal and the resampled signal of the first audio signal respectively to obtain the first spectrum corresponding to the time-domain signal of the first audio signal and the second spectrum corresponding to the resampled signal. The abnormal information determination module is used to determine the abnormal information of the audio device under test based on the first spectrum and the second spectrum, and to adjust the audio device under test according to the abnormal information.

[0110] Optionally, the above-mentioned abnormal information determination module is specifically used to compare whether the second amplitude of the first spectrum and the second spectrum at the same frequency is consistent; if they are consistent, the frequency corresponding to the consistent second amplitude is taken as the abnormal information of the audio device under test.

[0111] In some embodiments, if the audio device under test does not have an echo, an ambient sound simulation module is also provided inside the silencer enclosure, and the above-mentioned device further includes: The second control module is also used to control the speaker of the audio device under test to play the first audio signal and to control the ambient sound simulation module to play the original ambient audio signal. The second acquisition module is also used to acquire the third audio signal transmitted by the audio device under test; the third audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone and the original ambient audio signal. The second echo test result determination module is used to determine the second echo test result of the audio device under test based on the original ambient audio signal and the third audio signal; the second echo test result is used to characterize whether there is excessive echo cancellation in the audio device under test.

[0112] Optionally, the second echo test result determination module mentioned above includes: The time delay range determination unit is used to determine the time delay range between the third audio signal and the original ambient audio signal based on the first length corresponding to the original ambient audio signal and the second length corresponding to the third audio signal; the time delay range includes multiple different time delays, each time delay representing the time delay of the third audio signal relative to the original ambient audio signal; The computing unit is used to calculate the similarity between the third audio signal and the original environmental audio signal at different time delays; The echo test result determination unit is used to determine the second echo test result of the audio device under test based on each similarity.

[0113] Optionally, the echo test result determination unit is specifically used to determine the maximum similarity among the various similarities; and to determine the second echo test result of the audio device under test based on the maximum similarity and a preset similarity threshold range.

[0114] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.

[0115] Figure 7 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be the main controller of the aforementioned echo testing device, such as... Figure 7As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute an echo test method for an audio device. This method includes: controlling the speaker of the audio device under test to play a first audio signal; the audio device under test is placed in a soundproof box, and includes a speaker, a microphone, and an echo cancellation device for cancelling the audio signal collected by the microphone; acquiring a second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone; resampling the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude corresponding to each audio point; determining a first echo test result for the audio device under test based on the first amplitude corresponding to each audio point; the first echo test result is used to characterize whether the audio device under test has an echo.

[0116] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0117] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the echo testing method for audio devices provided by the above methods. The method includes: controlling the speaker of the audio device under test to play a first audio signal; placing the audio device under test in a soundproof box, the audio device under test including a speaker, a microphone, and an echo cancellation device for cancelling the audio signal collected by the microphone; acquiring a second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone; resampling the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude corresponding to each audio point; determining a first echo test result of the audio device under test based on the first amplitude corresponding to each audio point; the first echo test result is used to characterize whether the audio device under test has an echo.

[0118] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an echo testing method for an audio device provided by the methods described above. The method includes: controlling a speaker of an audio device under test to play a first audio signal; placing the audio device under test in a soundproof enclosure, the audio device under test including a speaker, a microphone, and an echo cancellation device for cancelling the audio signal collected by the microphone; acquiring a second audio signal transmitted by the audio device under test; the second audio signal being an audio signal after the echo cancellation device cancels the first audio signal collected by the microphone; resampling the second audio signal to obtain a resampled signal; the resampled signal including multiple audio points and a first amplitude corresponding to each audio point; determining a first echo test result for the audio device under test based on the first amplitude corresponding to each audio point; the first echo test result being used to characterize whether the audio device under test has an echo.

[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0120] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for testing the echo of an audio device, characterized in that, include: Control the speaker of the audio device under test to play the first audio signal; The audio device under test is placed inside a soundproof box. The audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone. Acquire the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone. The second audio signal is resampled to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude value corresponding to each audio point. The first echo test result of the audio device under test is determined based on the first amplitude value corresponding to each of the audio points. The first echo test result is used to characterize whether the audio device under test has an echo.

2. The echo testing method for audio devices according to claim 1, characterized in that, The step of determining the first echo test result of the audio device under test based on the first amplitude value corresponding to each of the audio points includes: Determine whether the first amplitude value of each audio point is greater than a preset amplitude threshold to obtain the determination result; The first echo test result of the audio device under test is determined based on the judgment result.

3. The echo testing method for audio devices according to claim 1, characterized in that, If the audio device under test has an echo, the method further includes: Perform Fourier transforms on the time-domain signal of the first audio signal and the resampled signal respectively to obtain the first spectrum corresponding to the time-domain signal of the first audio signal and the second spectrum corresponding to the resampled signal; Based on the first spectrum and the second spectrum, the abnormal information of the audio device under test is determined, and the audio device under test is adjusted according to the abnormal information.

4. The echo testing method for audio devices according to claim 3, characterized in that, The step of determining the abnormal information of the audio device under test based on the first spectrum and the second spectrum includes: Compare whether the second amplitude values ​​of the first spectrum and the second spectrum at the same frequency are consistent; If they match, the frequency corresponding to the second amplitude value that matches is taken as the abnormal information of the audio device under test.

5. The method for testing the echo of an audio device according to any one of claims 1 to 4, characterized in that, If the audio device under test does not have an echo, the anechoic chamber is further equipped with an ambient sound simulation module, and the method further includes: Control the speaker of the audio device under test to play a first audio signal and control the ambient sound simulation module to play the original ambient audio signal; Acquire the third audio signal transmitted by the audio device under test; the third audio signal is the audio signal obtained after the echo cancellation device cancels the first audio signal collected by the microphone and the original ambient audio signal; Based on the original ambient audio signal and the third audio signal, the second echo test result of the audio device under test is determined; the second echo test result is used to characterize whether the audio device under test has excessive echo cancellation.

6. The method for testing the echo of an audio device according to claim 5, characterized in that, The step of determining the second echo test result of the audio device under test based on the original environmental audio signal and the third audio signal includes: Based on the first length corresponding to the original ambient audio signal and the second length corresponding to the third audio signal, a time delay range between the third audio signal and the original ambient audio signal is determined; the time delay range includes multiple different time delays, each of which represents the time delay of the third audio signal relative to the original ambient audio signal. Calculate the similarity between the third audio signal and the original environmental audio signal under different time delays; The second echo test result of the audio device under test is determined based on the aforementioned similarity scores.

7. The echo testing method for audio devices according to claim 6, characterized in that, The step of determining the second echo test result of the audio device under test based on each of the aforementioned similarities includes: Based on the aforementioned similarities, determine the maximum similarity among the aforementioned similarities; The second echo test result of the audio device under test is determined based on the maximum similarity and the preset similarity threshold range.

8. An echo testing device for an audio device, characterized in that, include: The control module is used to control the speaker of the audio device under test to play the first audio signal; The audio device under test is placed inside a soundproof box. The audio device under test includes a speaker, a microphone, and an echo cancellation device for canceling the audio signal collected by the microphone. The acquisition module is used to acquire the second audio signal transmitted by the audio device under test; the second audio signal is the audio signal after the echo cancellation device cancels the first audio signal collected by the microphone; A resampling module is used to resample the second audio signal to obtain a resampled signal; the resampled signal includes multiple audio points and a first amplitude value corresponding to each audio point. The echo test result determination module is used to determine the first echo test result of the audio device under test based on the first amplitude value corresponding to each of the audio points. The first echo test result is used to characterize whether the audio device under test has an echo.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the echo testing method for an audio device as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the echo testing method for an audio device as described in any one of claims 1 to 7.