Audio stream format testing method and system for audio device
Patent Information
- Application Number
- CN202310850235.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-07-12
AI Technical Summary
[0003]音频设备在使用过程中,存在音频的输入和/或输出的使用场景,为了保证每一种使用场景的工作都正常,这就需要对音频设备的输入音频流格式和输出音频流格式做全面的遍历测试,如果依靠人工列举测试case,做遍历测试将会耗费巨大的人力和时间成本
[0041]This application provides a method and system for testing audio stream formats of audio devices. The method is applied to a testing system including an audio analyzer, a device under test (DUT), and a terminal. The method includes: the terminal acquiring a target output audio stream format and multiple input audio stream formats; for any input audio stream format, the DUT inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer via the terminal; the audio analyzer performs quality analysis on the received analog signal and second test signal corresponding to the first test signal until a first preset termination condition is met, obtaining a first test result for each input audio stream format and a second test result for the target output audio stream format of the DUT. This application solves the problem in the prior art where relying on manually listing test cases and performing traversal testing consumes huge manpower and time costs, and can efficiently perform comprehensive traversal testing on the input and output audio stream formats of audio devices.
Smart Images

Figure CN117255299B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio stream format testing, and more specifically, to a method and system for testing the audio stream format of an audio device. Background Technology
[0002] Because audio devices support a wide variety of audio stream formats from source files and applications, and while some operating systems and applications have robust audio format conversion capabilities, many audio devices and software lack this functionality. This necessitates that audio devices support a broader range of audio stream formats. Therefore, to enhance the competitiveness of their audio devices, electronics manufacturers typically ensure that they support multiple audio stream formats, thereby providing customers with the best user experience.
[0003] During use, audio devices have various scenarios involving audio input and / or output. To ensure proper operation in each scenario, it is necessary to conduct comprehensive tests on both the input and output audio stream formats. Relying on manually listing test cases and performing comprehensive testing would consume enormous manpower and time. Summary of the Invention
[0004] The purpose of this application is to provide an audio stream format testing method and system for audio devices, which solves the above-mentioned problems existing in the prior art and can efficiently perform comprehensive traversal testing on the input audio stream format and output audio stream format of audio devices.
[0005] In a first aspect, a method for testing the audio stream format of an audio device is provided, applicable to a test system including an audio analyzer, a device under test, and a terminal, the method comprising:
[0006] The terminal acquires a target output audio stream format and multiple input audio stream formats respectively; the target output audio stream format is any output audio stream format of the device under test; the multiple input audio stream formats are all the input audio stream formats of the device under test.
[0007] For any input audio stream format, the device under test (DUT) inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer through the terminal; the first test signal is sent to the DUT by the audio analyzer controlled by the terminal.
[0008] The audio analyzer performs quality analysis on the received first test signal and the second test signal corresponding to it, until the first preset termination condition is met, and obtains the first test result of each input audio stream format of the device under test and the second test result of the target output audio stream format; the second test signal is the audio output by the device under test controlled by the terminal in the target output audio stream format, and then the device under test sends the second test signal to the audio analyzer.
[0009] In one possible implementation, after obtaining the first test result corresponding to each input audio stream format and the second test result of the target output audio stream format, the method further includes:
[0010] The terminal acquires any output audio stream format other than the target output audio stream format, uses the output audio stream format as the new target output audio stream format, and returns to execute the steps of the terminal acquiring the target output audio stream format and multiple input audio stream formats until the second preset termination condition is met, thereby obtaining the second test results of each output audio stream format of the device under test, and the first test results of each input audio stream format corresponding to the corresponding output audio stream format.
[0011] In one possible implementation, the audio analyzer performs quality analysis on the received analog signal under test to obtain a first test result of the input audio stream format, including:
[0012] The audio analyzer receives the analog signal under test in the input audio stream format multiple times according to a preset period;
[0013] The audio analyzer compares the performance values of a portion of the analog signals to be tested received within the preset period with the performance values of the signals to be tested emitted by the audio analyzer to determine the first comparison result within the preset period.
[0014] The first comparison results corresponding to each preset period are processed to obtain the first test result of the input audio stream format.
[0015] In one possible implementation, the audio analyzer performs quality analysis on the received second signal under test to obtain a second test result of the output audio stream format, including:
[0016] The audio analyzer receives the second test signal in the output audio stream format multiple times according to a preset period.
[0017] The audio analyzer compares the performance value of a portion of the second test signal received within the preset period with a preset performance value to determine the second comparison result within the preset period.
[0018] The second comparison results corresponding to each preset period are processed to obtain the second test result of the output audio stream format.
[0019] In one possible implementation, the test system further includes a reference audio device that forwards the first signal under test to the audio analyzer via the terminal, including:
[0020] The first signal to be tested is forwarded to the reference audio device through the terminal;
[0021] The reference audio device converts the received first signal under test into a format to obtain a simulated signal under test, and sends the simulated signal under test to the audio analyzer.
[0022] In one possible implementation, the terminal is connected to the device under test via USB;
[0023] The terminal is connected to the reference audio device via a first communication bus;
[0024] The terminal is connected to the audio analyzer via a second communication bus;
[0025] The audio analyzer includes a first output channel, a first input channel, and a second input channel;
[0026] The first output channel of the audio analyzer is connected to the device input channel of the device under test;
[0027] The first input channel of the audio analyzer is connected to the device output channel of the device under test;
[0028] The second input channel of the audio analyzer is connected to the reference output channel of the reference audio device.
[0029] In one possible implementation, after the terminal acquires the target output audio stream format, the method further includes:
[0030] The terminal selects the audio to be tested according to the target output audio stream format and sends the audio to be tested to the device under test;
[0031] The device under test outputs the received audio signal to obtain a second signal under test, and sends the second signal under test to the audio analyzer.
[0032] The audio analyzer performs quality analysis on the second signal under test to obtain a second test result for the target output audio stream format.
[0033] Secondly, an audio stream format testing system for audio devices is provided, the testing system including an audio analyzer, a device under test, and a terminal;
[0034] The terminal is used to acquire a target output audio stream format and multiple input audio stream formats respectively; the target output audio stream format is any output audio stream format of the device under test; the multiple input audio stream formats are all the input audio stream formats of the device under test.
[0035] The device under test (DUT) is configured to input a first test signal according to any input audio stream format, and forward the first test signal to the audio analyzer via the terminal; the first test signal is sent to the DUT by the audio analyzer controlled by the terminal.
[0036] The audio analyzer is used to perform quality analysis on the received first test signal and the second test signal corresponding to the first test signal, until the first preset termination condition is met, and to obtain the first test result of each input audio stream format of the device under test and the second test result of the target output audio stream format; the second test signal is the test audio output by the device under test under the control of the terminal in the target output audio stream format, and then the device under test sends the second test signal to the audio analyzer.
[0037] Thirdly, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0038] Memory, used to store computer programs;
[0039] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0040] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0041] This application provides a method and system for testing audio stream formats of audio devices. The method is applied to a testing system including an audio analyzer, a device under test (DUT), and a terminal. The method includes: the terminal acquiring a target output audio stream format and multiple input audio stream formats; for any input audio stream format, the DUT inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer via the terminal; the audio analyzer performs quality analysis on the received analog signal and second test signal corresponding to the first test signal until a first preset termination condition is met, obtaining a first test result for each input audio stream format and a second test result for the target output audio stream format of the DUT. This application solves the problem in the prior art where relying on manually listing test cases and performing traversal testing consumes huge manpower and time costs, and can efficiently perform comprehensive traversal testing on the input and output audio stream formats of audio devices. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A schematic diagram of the structure of an audio stream format testing system for an audio device provided in this application embodiment;
[0044] Figure 2 A flowchart illustrating an audio stream format testing method for an audio device provided in this application embodiment;
[0045] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0047] For ease of understanding, the terms used in the embodiments of this application are explained below:
[0048] Audio stream format refers to the audio driver attributes of audio device chips or related electronic products (such as USB headphones, USB to audio adapters, and USB sound cards).
[0049] Audio stream formats contain two basic pieces of information: sampling rate and bit depth.
[0050] The sampling rate indicates the number of times an audio signal is sampled per second, which translates to the number of encoded audio data points per second. Common sampling rates include 8kHz, 16kHz, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4kHz, 192kHz, and 384kHz.
[0051] Bit depth reflects the minimum resolution capability for each sample point; it is evident that the higher the resolution and the deeper the bit depth, the stronger the ability to represent and reproduce sound, but the data volume will also be larger, and the requirements for storage and data transmission will be higher. Common bit depths are 8 bits, 16 bits, 24 bits, and 32 bits.
[0052] Audio stream formats can be divided into input audio stream formats and output audio stream formats.
[0053] The input audio stream format can be understood as the audio stream format when audio is input (recorded).
[0054] The output audio stream format can be understood as the audio stream format when audio is output (played).
[0055] The audio stream format testing method for audio devices provided in this application embodiment can be applied to... Figure 1 In the system architecture shown, such as Figure 1 As shown, the system may include: an audio analyzer, a device under test (DUT), a reference audio device, and a terminal. The terminal may be a user equipment (UE) such as a mobile phone, smartphone, laptop, digital radio receiver, personal digital assistant (PDA), or tablet computer (PAD), a handheld device, an in-vehicle device, a wearable device, a computing device, or other processing device connected to a wireless modem, a mobile station (MS), or a mobile terminal. The terminal and the server can be directly or indirectly connected via wired or wireless communication methods; this application does not impose any limitations on this connection.
[0056] The terminal is connected to the device under test (DUT), a reference audio device, and an audio analyzer. The terminal is equipped with a test module and a music player. The test module is used to acquire the output audio stream format and input audio stream format of the DUT. The music player is used to select the audio to be tested output by the DUT so that the DUT can output the audio to be tested, and the output is the second test signal.
[0057] The reference audio device is used to convert the format of the first test signal recorded by the device under test through the terminal to obtain the test analog signal, and then send the test analog signal to the audio analyzer.
[0058] The audio analyzer is connected to a reference audio device and a device under test (DUT) to perform quality analysis on the received analog signal under test and the second signal under test.
[0059] The terminal and the device under test are connected via USB.
[0060] The terminal and the reference audio device are connected via a first communication bus.
[0061] The terminal and the audio analyzer are connected via a second communication bus.
[0062] The audio analyzer includes a first output channel, a first input channel, and a second input channel.
[0063] The device under test includes device input channels and device output channels.
[0064] The reference audio device includes a reference output channel.
[0065] Furthermore, the first output channel of the audio analyzer is connected to the device input channel of the device under test (DUT). This connection is used to send a command to the host computer of the audio analyzer to output the first test signal. Based on the received command, the audio analyzer sends the first test signal to the DUT, enabling the DUT to input the first test signal through its own device input channel. Essentially, the audio analyzer provides the DUT with a high-performance audio source (the first test signal).
[0066] The first input channel of the audio analyzer is connected to the device output channel of the device under test (DUT) to receive the second test signal output by the DUT.
[0067] The second input channel of the audio analyzer is connected to the reference output channel of the reference audio device and is used to receive the analog signal under test output by the reference audio device.
[0068] In one possible implementation, the audio analyzer may include a first output channel and a first input channel, and the test system may also include a multi-select switch.
[0069] The multi-select switch is connected to both the audio analyzer and the terminal. When the terminal receives the first test signal, it controls the multi-select switch to connect the first input channel of the audio analyzer to the reference output channel of the reference audio device, enabling the audio analyzer to acquire the analog test signal sent by the reference audio device. When the terminal controls the music player to output the test audio through the device under test, it controls the multi-select switch to connect the first input channel of the audio analyzer to the device output channel of the device under test, enabling the audio analyzer to acquire the second test signal sent by the device under test.
[0070] Audio devices are used in various scenarios involving audio input and / or output. To ensure proper operation in each scenario, it is necessary to conduct comprehensive testing on both the input and output audio stream formats. This paper categorizes audio device usage scenarios into three types: audio input, audio output, and simultaneous audio input and output. Based on these three scenarios, this application proposes an audio stream format testing method for audio devices, treating the audio device as the device under test for audio stream format testing.
[0071] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0072] Figure 2 This is a flowchart illustrating an audio stream format testing method for an audio device provided in an embodiment of this application. Figure 2 As shown, the method may include:
[0073] Step S210: The terminal acquires the target output audio stream format and multiple input audio stream formats respectively.
[0074] The target output audio stream format can be any output audio stream format of the device under test (DUT). Multiple input audio stream formats can be all input audio stream formats of the DUT.
[0075] Before executing step S210, the user sets the audio output device to the device under test (DUT) in the terminal, sets the reference audio device to the listening device of the DUT, and sets the input devices of the audio analyzer to the DUT and the reference audio device. To better analyze the test results, the volume of the DUT is adjusted to a preset volume; the maximum output volume of the audio analyzer is the preset volume; the preset volume is generally set to -3dB; and the music player is set to play a standard high-quality 1kHz sine wave audio signal from the DUT.
[0076] Step S210 may specifically include: the test module in the terminal acquiring test instructions for the output audio stream format and / or input audio stream format of the device under test.
[0077] The test module, based on the test instructions, retrieves all output audio stream formats and / or all input audio stream formats from the speaker properties of the device under test (DUT). Specifically, there are two ways to retrieve these formats: First, by directly calling API functions provided by the terminal operating system to retrieve all output and input audio stream formats from the DUT's speaker properties; this method can be understood as not displaying the retrieval process. Second, by simulating mouse operations through a function, this method can be understood as displaying the retrieval process. Specifically, first, the mouse opens the sound control panel; second, the DUT is selected; and third, the DUT's all output or all input audio stream formats are displayed.
[0078] Step S220: The terminal controls the device under test and / or the reference audio device to send the corresponding test signal to the audio analyzer based on the acquired target output audio stream format and multiple input audio stream formats.
[0079] The signal to be tested includes the analog signal to be tested and the second signal to be tested.
[0080] Since audio devices have three usage scenarios, step S220 can be divided into the following three cases:
[0081] (1) Scenario 1, a scenario where audio input and audio output coexist; the terminal, based on the acquired target output audio stream format and multiple input audio stream formats, controls the device under test and the reference audio device to send the corresponding test signals to the audio analyzer, which may include:
[0082] For the multiple input audio stream formats of the device under test, the terminal's test module selects any one of the input audio stream formats as the input audio stream format for this test.
[0083] The test module controls the audio analyzer to output a first test signal to the device under test according to the input audio stream format. The first test signal is a standard sine wave signal.
[0084] The device under test receives the first test signal through the device input channel, which means it records the first test signal. After the recording is completed, the first test signal is sent to the test module.
[0085] The test module sends the first signal to be tested received to the reference audio device.
[0086] The reference audio device performs format conversion on the received first test signal to obtain the test analog signal, and then sends the test analog signal to the audio analyzer.
[0087] Repeat the above steps until the first preset end condition is met. The reference audio device sends the analog signal under test corresponding to the first signal under test output by the device under test in each input audio stream format to the audio analyzer. The first preset end condition may include completing the test of some input audio stream formats according to the settings and completing the test of all input audio stream formats according to the settings.
[0088] Then, the test module controls the music player to select the audio to be tested according to the target output audio stream format, so that the device under test outputs the audio to be tested to the audio analyzer according to the target output audio stream format. At this time, the output to the audio analyzer is the second test signal corresponding to the audio to be tested.
[0089] The terminal's test module acquires any output audio stream format other than the target output audio stream format as the new target output audio stream format, returns to step S210, and continues until the second preset end condition is met. Then, it sends each second test signal to the audio analyzer. The second preset end condition may include completing the test of some output audio stream formats according to the setting and completing the test of all output audio stream formats according to the setting.
[0090] (2) Scenario 2, audio output scenario; the terminal controls the device under test to send the corresponding test signal to the audio analyzer according to the acquired target output audio stream format, which may include:
[0091] The test module selects any one of the output audio stream formats from all output audio stream formats as the target output audio stream format for this test.
[0092] The testing module controls the music player to select the audio to be tested based on the target output audio stream format.
[0093] The device under test outputs the audio to be tested to the audio analyzer according to the target output audio stream format. At this time, the output to the audio analyzer is the second test signal corresponding to the audio to be tested.
[0094] Repeat the above steps until all the second test signals corresponding to each output audio stream format of the device under test are sent to the audio analyzer.
[0095] It should be noted that the terminal's operating system has an audio stream format conversion function. For example, if the audio to be tested is a standard high-quality sine wave single-tone sound source signal with an audio stream format of 192kHz, 32bits, while the audio stream format that the device under test is currently testing is 48kHz, 16bits, although the two audio stream formats are different, the terminal's operating system can convert the audio stream format of the audio to be tested from 192kHz, 32bits to 48kHz, 16bits. At this time, the device under test can play the audio to be tested normally, and the test of the output audio stream format can also be performed normally.
[0096] Furthermore, in order to address the issue that the device under test cannot play the audio under test normally when the terminal's operating system does not have audio stream format conversion capabilities, a host computer is set up in the terminal's test module to convert the audio stream format.
[0097] (3) Scenario 3, audio input scenario; the terminal, based on the acquired multiple input audio stream formats, controls the reference audio device to send the corresponding test signal to the audio analyzer, which may include:
[0098] The test module selects any one of the input audio stream formats from all possible input audio stream formats as the input audio stream format for this test.
[0099] The test module controls the audio analyzer to output a first test signal to the device under test according to the input audio stream format. The first test signal is a standard sine wave signal.
[0100] The device under test receives the first test signal through the device input channel, which means it records the first test signal. After the recording is completed, the first test signal is sent to the test module.
[0101] The test module sends the first signal to be tested received to the reference audio device.
[0102] The reference audio device performs format conversion on the received first test signal to obtain the test analog signal, and then sends the test analog signal to the audio analyzer.
[0103] Repeat the above steps until all the analog signals corresponding to each input audio stream format of the device under test are sent to the audio analyzer.
[0104] This method can verify and implement the listening function and audio stream format conversion function of the terminal operating system (Windows), and can achieve closed-loop testing well without having to consider the problem of abnormal listening sound caused by different audio stream formats.
[0105] In this method, by using a set reference audio device, the first signal to be tested can be sent to the audio analyzer without distortion.
[0106] In step S230, the audio analyzer performs quality analysis on the received first test signal and / or the second test signal corresponding to the received first test signal, and obtains the corresponding first test result and / or second test result.
[0107] Based on the three usage scenarios of the audio device, step S230 may specifically include:
[0108] (1) Scenario 1, a scenario where audio input and audio output exist simultaneously; the audio analyzer performs quality analysis on the analog signal under test and the second signal under test corresponding to the first signal under test, respectively, to obtain the second test results of each output audio stream format of the device under test, and the first test results of each input audio stream format corresponding to the corresponding output audio stream format.
[0109] It should be noted that the process of performing quality analysis on the received first test signal and the second test signal can be performed simultaneously.
[0110] Based on step S230, the first test result corresponding to all input audio stream formats under the target output audio stream format and the second test result corresponding to the target output audio stream format under all input audio stream formats can be obtained.
[0111] For example, the device under test is set to one output audio stream format, which is the target audio stream format; and five input audio stream formats, which can yield five first test results corresponding to the five input audio stream formats and five second test results corresponding to the target audio stream formats.
[0112] For example, the device under test is set with 3 output audio stream formats (A, B and C) and 3 input audio stream formats (1, 2 and 3). When the audio tester has completed testing all the output audio stream formats of the device under test, it obtains 9 first test results for the 3 input audio stream formats under the 3 output audio stream formats. At the same time, it also obtains 9 second test results, as shown in Table 1 - Test Result Table.
[0113] Table 1 - Test Results
[0114]
[0115] In this method, a reference audio device is set up as the listening device for the device under test (DUT). During the test, the first test signal input and the second test signal output by the DUT can work simultaneously, and both can ultimately be received by the audio analyzer, thus enabling simultaneous testing. This method can detect all input audio stream formats and the target output audio stream format of the DUT separately, obtaining multiple first detection results and multiple second detection results. Based on these multiple first and second detection results, it can also analyze whether the target output audio stream format and all input audio stream formats interfere with each other.
[0116] (2) Scenario 2, audio output scenario; the audio analyzer performs quality analysis on the received second test signal to obtain the second test results of each output audio stream format of the device under test.
[0117] (3) Scenario 3, audio input scenario; the audio analyzer performs quality analysis on the analog signal under test corresponding to the first signal under test received, and obtains the first test results of each input audio stream format of the device under test.
[0118] In this method, the analog signal under test is emitted by a reference audio device. This process also clarifies the necessity of setting up a reference audio device. It leverages the monitoring and audio stream format conversion functions of the terminal operating system (Windows) to achieve closed-loop testing effectively, eliminating concerns about abnormal sound detection caused by different audio stream formats. Without a reference audio device, the first signal under test is recorded by the device under test (DUT), and then sent to the audio analyzer. In this process, the first signal under test undergoes both input and output stages within the DUT. The audio analyzer cannot determine whether the performance value of the first signal represents the first test result of the input audio stream format or the second test result of the output audio stream format based on the performance value of the first signal. However, by using a reference audio device to forward the first test signal, the problem of the audio analyzer being unable to determine whether the performance value represents the first test result of the input audio stream format or the second test result of the output audio stream format can be avoided.
[0119] Furthermore, the first test result can include both normal and abnormal results, and the second test result can also include both normal and abnormal results. The working status of the corresponding input audio stream format and the corresponding output audio stream format is determined based on the first and second test results.
[0120] Furthermore, for the above three scenarios, the process of the audio analyzer performing quality analysis on the analog signal under test and the second signal under test can include:
[0121] A. The audio analyzer receives the analog signal under test corresponding to the first signal under test recorded by the device under test in the input audio stream format multiple times according to a preset period.
[0122] The audio analyzer compares the performance values of a portion of the analog signal to be tested received within a preset period with the performance values of the signal to be tested emitted by the audio analyzer to determine the first comparison result within the preset period.
[0123] The first comparison results corresponding to each preset period are processed to obtain the first test result of the input audio stream format.
[0124] For example, the overall duration of the analog signal under test is 30 seconds, and it is received in 5-second cycles. The audio analyzer compares the performance values of a portion of the analog signal under test within the first cycle with the performance values of the signal under test emitted by the audio analyzer, obtaining the first comparison result for the first cycle. Similarly, the first comparison result for the second cycle is obtained, and so on, until the first comparison result for the sixth cycle is obtained. The six first comparison results are then analyzed as a whole. This analysis method involves removing the lowest and highest values from the six first comparison results and taking the average of the remaining values as the first test result for the input audio stream format.
[0125] B. The audio analyzer receives the second test signal output by the device under test in the output audio stream format multiple times according to a preset cycle.
[0126] The audio analyzer compares the performance values of a portion of the second test signal received within a preset period with a preset performance value to determine the second comparison result within the preset period.
[0127] The second comparison results corresponding to each preset period are processed to obtain the second test results of the output audio stream format.
[0128] For example, if the overall duration of the second test signal is 10 seconds, it is received in 5-second cycles. The audio analyzer compares the performance values of a portion of the second test signal within the first cycle with preset performance values to obtain the second comparison result for the first cycle. Similarly, the second comparison result for the second cycle is obtained. The two second comparison results are then analyzed as a whole. This analysis method allows the average of the two second comparison results to be taken as the second test result for the output audio stream format.
[0129] It should be noted that the performance values of the analog signal under test and the second signal under test can be understood as THD+N data. The evaluation assesses whether there are significant fluctuations or deterioration in THD+N within a preset period, thereby determining whether there are phenomena such as dropped tones, glitches, noise, or garbled characters.
[0130] This application provides a method and system for testing audio stream formats of audio devices. The method is applied to a testing system including an audio analyzer, a device under test (DUT), and a terminal. The method includes: the terminal acquiring a target output audio stream format and multiple input audio stream formats; for any input audio stream format, the DUT inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer via the terminal; the audio analyzer performs quality analysis on the received analog signal and second test signal corresponding to the first test signal until a first preset termination condition is met, obtaining a first test result for each input audio stream format and a second test result for the target output audio stream format of the DUT. This application solves the problem in the prior art where relying on manually listing test cases and performing traversal testing consumes huge manpower and time costs, and can efficiently perform comprehensive traversal testing on the input and output audio stream formats of audio devices.
[0131] This application also provides an electronic device, such as... Figure 3 As shown, it includes a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340.
[0132] Memory 330 is used to store computer programs;
[0133] When the processor 310 executes the program stored in the memory 330, it performs the following steps:
[0134] The terminal acquires a target output audio stream format and multiple input audio stream formats respectively; the target output audio stream format is any output audio stream format of the device under test; the multiple input audio stream formats are all the input audio stream formats of the device under test.
[0135] For any input audio stream format, the device under test (DUT) inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer through the terminal; the first test signal is sent to the DUT by the audio analyzer controlled by the terminal.
[0136] The audio analyzer performs quality analysis on the received first test signal and the second test signal corresponding to it, until the first preset termination condition is met, and obtains the first test result of each input audio stream format of the device under test and the second test result of the target output audio stream format; the second test signal is the audio output by the device under test controlled by the terminal in the target output audio stream format, and then the device under test sends the second test signal to the audio analyzer.
[0137] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0138] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0139] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0140] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0141] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.
[0142] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform an audio stream format testing method for an audio device as described in any of the above embodiments.
[0143] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute an audio stream format testing method for an audio device as described in any of the above embodiments.
[0144] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0146] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0147] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0148] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0149] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.
Claims
1. A method for testing the audio stream format of an audio device, characterized in that, The method, applied to a test system including an audio analyzer, a device under test (DUT), and a terminal, comprises: The terminal acquires a target output audio stream format and multiple input audio stream formats respectively; the target output audio stream format is any output audio stream format of the device under test; the multiple input audio stream formats are all the input audio stream formats of the device under test. For any input audio stream format, the device under test (DUT) inputs a first test signal according to the input audio stream format, and forwards the first test signal to the audio analyzer through the terminal; the test system also includes a reference audio device, which forwards the first test signal to the audio analyzer through the terminal, including: forwarding the first test signal to the reference audio device through the terminal; the reference audio device converts the received first test signal to obtain a test analog signal, and sends the test analog signal to the audio analyzer; the first test signal is sent to the DUT by the audio analyzer controlled by the terminal. The audio analyzer performs quality analysis on the received first test signal and the second test signal corresponding to it, until the first preset termination condition is met, and obtains the first test result of each input audio stream format of the device under test and the second test result of the target output audio stream format; the second test signal is the audio output by the device under test controlled by the terminal in the target output audio stream format, and then the device under test sends the second test signal to the audio analyzer.
2. The method as described in claim 1, characterized in that, After obtaining the first test result corresponding to each input audio stream format and the second test result of the target output audio stream format, the method further includes: The terminal acquires any output audio stream format other than the target output audio stream format, uses the output audio stream format as the new target output audio stream format, and returns to execute the steps of the terminal acquiring the target output audio stream format and multiple input audio stream formats until the second preset termination condition is met, thereby obtaining the second test results of each output audio stream format of the device under test, and the first test results of each input audio stream format corresponding to the corresponding output audio stream format.
3. The method as described in claim 1, characterized in that, The audio analyzer performs quality analysis on the received analog signal under test to obtain a first test result of the input audio stream format, including: The audio analyzer receives the analog signal under test in the input audio stream format multiple times according to a preset period; The audio analyzer compares the performance values of a portion of the analog signals to be tested received within the preset period with the performance values of the signals to be tested emitted by the audio analyzer to determine the first comparison result within the preset period. The first comparison results corresponding to each preset period are processed to obtain the first test result of the input audio stream format.
4. The method as described in claim 1, characterized in that, The audio analyzer performs quality analysis on the received second test signal to obtain a second test result for the output audio stream format, including: The audio analyzer receives the second test signal in the output audio stream format multiple times according to a preset period. The audio analyzer compares the performance value of a portion of the second test signal received within the preset period with a preset performance value to determine the second comparison result within the preset period. The second comparison results corresponding to each preset period are processed to obtain the second test result of the output audio stream format.
5. The method as described in claim 1, characterized in that, The terminal is connected to the device under test via USB; The terminal is connected to the reference audio device via a first communication bus; The terminal is connected to the audio analyzer via a second communication bus; The audio analyzer includes a first output channel, a first input channel, and a second input channel; The first output channel of the audio analyzer is connected to the device input channel of the device under test; The first input channel of the audio analyzer is connected to the device output channel of the device under test; The second input channel of the audio analyzer is connected to the reference output channel of the reference audio device.
6. The method as described in claim 1, characterized in that, After the terminal acquires the target output audio stream format, the method further includes: The terminal selects the audio to be tested according to the target output audio stream format and sends the audio to be tested to the device under test; The device under test outputs the received audio signal to obtain a second signal under test, and sends the second signal under test to the audio analyzer. The audio analyzer performs quality analysis on the second signal under test to obtain a second test result for the target output audio stream format.
7. An audio stream format testing system for an audio device, characterized in that, The testing system includes an audio analyzer, a device under test, and a terminal. The terminal is used to acquire a target output audio stream format and multiple input audio stream formats respectively; the target output audio stream format is any output audio stream format of the device under test. The multiple input audio stream formats are all the input audio stream formats of the device under test; The device under test is configured to input a first test signal according to the input audio stream format for any input audio stream format, and forward the first test signal to the audio analyzer through the terminal; The testing system further includes a reference audio device, which forwards the first test signal to the audio analyzer via the terminal, including: forwarding the first test signal to the reference audio device via the terminal; the reference audio device converting the received first test signal to obtain a test analog signal, and sending the test analog signal to the audio analyzer; the first test signal is sent to the test device by the audio analyzer controlled by the terminal. The audio analyzer is used to perform quality analysis on the received first test signal and the second test signal corresponding to the first test signal, until the first preset termination condition is met, and to obtain the first test result of each input audio stream format of the device under test and the second test result of the target output audio stream format; the second test signal is the test audio output by the device under test under the control of the terminal in the target output audio stream format, and then the device under test sends the second test signal to the audio analyzer.
8. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-6.
Citation Information
Patent Citations
Audio test system, circuit and method, terminal and storage medium
CN110493699A
Audio and video interface detection method and device
CN116366488A