CN115604621A - Earphone testing method, device, equipment and computer readable storage medium - Google Patents

Earphone testing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115604621A
CN115604621A CN202211351363.0A CN202211351363A CN115604621A CN 115604621 A CN115604621 A CN 115604621A CN 202211351363 A CN202211351363 A CN 202211351363A CN 115604621 A CN115604621 A CN 115604621A
Authority
CN
China
Prior art keywords
audio data
abnormal
test
earphone
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211351363.0A
Other languages
Chinese (zh)
Inventor
栾浩杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202211351363.0A priority Critical patent/CN115604621A/en
Publication of CN115604621A publication Critical patent/CN115604621A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a device, equipment and a computer readable storage medium for testing earphones, wherein the method comprises the following steps: sending test audio data to an earphone system to be tested in a Bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor; acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals; and analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value. The invention realizes an automatic testing scheme of the audio problem of the earphone, improves the testing accuracy, and is beneficial to finding and solving the audio problem of the earphone as early as possible.

Description

Earphone testing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of earphone technologies, and in particular, to an earphone testing method, apparatus, device, and computer readable storage medium.
Background
In recent years, true Wireless (TWS) earphones are widely popular, and compared with traditional wired earphones, the TWS earphones are convenient to carry and easy to store, but are easily interfered by the electromagnetic environment of bluetooth, and many factors such as software logic bug easily cause temporary interruption of audio data transmission, and finally cause audio problems such as jamming and POP sound of the earphones. Testing is required during early development of the headset to discover and resolve the audio problems of the headset as early as possible. The existing test adopts a manual test method, but the manual test has the condition of missing detection, so that the test accuracy is low, and the audio problem is not easy to find and solve.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for testing an earphone and a computer readable storage medium, and aims to provide an automatic testing scheme for audio problems of the earphone, improve the testing accuracy, and facilitate early finding and solving of the audio problems of the earphone.
In order to achieve the above object, the present invention provides an earphone testing method, which comprises the following steps:
sending test audio data to an earphone system to be tested in a Bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor;
acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals;
analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
Optionally, the method for testing an earphone is applied to a testing device, the testing device is in communication connection with a smart phone, the smart phone is in bluetooth communication connection with the earphone system, and the step of sending test audio data to the earphone system to be tested in a bluetooth communication manner includes:
sending the test audio data to the smart phone so that the smart phone can send the test audio data to the earphone system in a Bluetooth communication mode;
after the step of sending the test audio data to the headset system to be tested in the bluetooth communication mode, the method further comprises the following steps:
and acquiring Bluetooth HCI log information acquired by the smart phone, and responding to a log viewing instruction to output the Bluetooth HCI log information.
Optionally, when the abnormal detection item includes a mutation point detection item, and the test audio data includes a sweep tone set for the mutation point detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the determining, according to the abnormal characteristic value, a test result of the earphone system with respect to the abnormal detection item includes:
carrying out endpoint detection on the feedback audio data to obtain a feedback audio signal;
framing the feedback audio signal, and calculating an energy difference value between two adjacent framed signals;
when the energy difference value is larger than a preset mutation threshold value, obtaining a test result representing that abnormal mutation points exist in the feedback audio data;
and when the energy difference value is smaller than or equal to the preset mutation threshold value, obtaining a test result representing that the abnormal mutation point does not exist in the feedback audio data.
Optionally, after the step of obtaining a test result indicating that an abnormal discontinuity point exists in the feedback audio data when the energy difference is greater than a preset discontinuity threshold, the method further includes:
and determining the generation time of the abnormal mutation point according to the acquisition time of a target framing signal, wherein the target framing signal is two framing signals corresponding to the energy difference value which is greater than the preset mutation threshold value.
Optionally, when the abnormal detection item includes a play delay detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the determining, according to the abnormal characteristic value, a test result of the earphone system about the abnormal detection item includes:
performing endpoint detection on the feedback audio data, and determining the starting time of a feedback audio signal in the feedback audio data;
calculating a time difference between the start time and a transmission start time of the test audio data;
and obtaining a test result of the earphone system about the playing delay detection item according to the time difference.
Optionally, the step of obtaining a test result of the headphone system with respect to the play delay detection item according to the time difference includes:
when the time difference is larger than a preset delay threshold value, obtaining a test result representing the delay abnormity of the audio playing channel of the earphone system;
and when the time difference is smaller than or equal to the preset delay threshold value, obtaining a test result representing that the audio playing channel of the earphone system delays normally.
Optionally, when the abnormal detection item includes a noise introduction detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the determining, according to the abnormal characteristic value, a test result of the earphone system about the abnormal detection item includes:
acquiring delay time of an audio playing channel of the earphone system, and aligning the feedback audio data with the test audio data according to the delay time;
calculating the similarity between the aligned feedback audio data and the test audio data;
when the similarity is smaller than a preset noise introduction threshold value, obtaining a test result representing the noise introduction abnormity of the audio playing channel;
and when the similarity is greater than or equal to the preset noise introduction threshold value, obtaining a test result representing that the noise introduction of the audio playing channel is normal.
In order to achieve the above object, the present invention further provides an earphone testing device, including:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending test audio data to an earphone system to be tested in a Bluetooth communication mode so that the earphone system can convert the test audio data from a digital audio signal into an analog audio signal through a codec and then output the analog audio signal, and an audio output end of the codec is connected with two ends of a resistor;
the acquisition module is used for acquiring feedback audio data obtained by converting analog voltage signals at two ends of the resistor acquired by the signal acquisition device into digital signals;
and the analysis module is used for analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
In order to achieve the above object, the present invention also provides a test apparatus, comprising: the earphone testing program is stored on the memory and can be operated on the processor, and the steps of the earphone testing method are realized when the earphone testing program is executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which an earphone testing program is stored, and the earphone testing program implements the steps of the earphone testing method when executed by a processor.
In the invention, test audio data are sent to an earphone system to be tested in a Bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor; acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals; and analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value. The invention realizes an automatic testing scheme of the audio problem of the earphone, improves the testing accuracy, and is beneficial to finding and solving the audio problem of the earphone as early as possible.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of the testing method of the earphone according to the present invention;
fig. 3 is a schematic diagram of an earphone testing frame according to an embodiment of the present invention;
fig. 4 is a schematic diagram of functional modules of a preferred embodiment of the testing apparatus for earphones according to the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that, in the test device according to the embodiment of the present invention, the test device may be a device such as an earphone, a smart phone, or a personal computer, and is not limited herein. And a tile rescue firmware area is arranged in the storage area of the embedded equipment.
As shown in fig. 1, the test apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device configuration shown in fig. 1 does not constitute a limitation of the test device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is one type of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a headset test program. The operating system is a program that manages and controls the hardware and software resources of the device, supporting the running of the headset testing program as well as other software or programs. In the apparatus shown in fig. 1, the user interface 1003 is mainly used for data communication with a client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to invoke the headset testing program stored in the memory 1005 and perform the following operations:
sending test audio data to an earphone system to be tested in a Bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor;
acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals;
analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
Further, the test device is in communication connection with a smart phone, the smart phone is in bluetooth communication connection with the headset system, and the operation of sending test audio data to the headset system to be tested in a bluetooth communication mode includes:
sending the test audio data to the smart phone so that the smart phone can send the test audio data to the earphone system in a Bluetooth communication mode;
after the operation of sending test audio data to the headset system to be tested in the bluetooth communication manner, the processor 1001 may be further configured to call the headset test program stored in the memory 1005, and perform the following operations:
and acquiring Bluetooth HCI log information acquired by the smart phone, and responding to a log checking instruction to output the Bluetooth HCI log information.
Further, when the abnormal detection item includes a mutation point detection item, and the test audio data includes a sweep tone set for the mutation point detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the determining, according to the abnormal characteristic value, a test result of the earphone system with respect to the abnormal detection item includes:
carrying out endpoint detection on the feedback audio data to obtain a feedback audio signal;
framing the feedback audio signal, and calculating an energy difference value between two adjacent framed signals;
when the energy difference value is larger than a preset mutation threshold value, obtaining a test result representing that an abnormal mutation point exists in the feedback audio data;
and when the energy difference value is smaller than or equal to the preset mutation threshold value, obtaining a test result representing that no abnormal mutation point exists in the feedback audio data.
Further, after obtaining the operation of representing the test result that the abnormal discontinuity point exists in the feedback audio data when the energy difference is greater than the preset discontinuity threshold, the processor 1001 may be further configured to invoke an earphone test program stored in the memory 1005, and perform the following operations:
and determining the generation time of the abnormal mutation point according to the acquisition time of a target framing signal, wherein the target framing signal is two framing signals corresponding to the energy difference value which is greater than the preset mutation threshold value.
Further, when the abnormal detection item includes a play delay detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the operation of determining a test result of the headphone system with respect to the abnormal detection item according to the abnormal characteristic value includes:
performing endpoint detection on the feedback audio data, and determining the starting time of a feedback audio signal in the feedback audio data;
calculating a time difference between the start time and a transmission start time of the test audio data;
and obtaining a test result of the earphone system about the playing delay detection item according to the time difference.
Further, the operation of obtaining the testing result of the headphone system regarding the play delay detection item according to the time difference includes:
when the time difference is larger than a preset delay threshold value, obtaining a test result representing that the delay of an audio playing channel of the earphone system is abnormal;
and when the time difference is smaller than or equal to the preset delay threshold value, obtaining a test result representing that the audio playing channel of the earphone system delays normally.
Further, when the abnormal detection item includes a noise introduction detection item, the analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the operation of determining a test result of the headphone system about the abnormal detection item according to the abnormal characteristic value includes:
acquiring delay time of an audio playing channel of the earphone system, and aligning the feedback audio data with the test audio data according to the delay time;
calculating a similarity between the aligned feedback audio data and the test audio data;
when the similarity is smaller than a preset noise introduction threshold value, obtaining a test result representing the noise introduction abnormity of the audio playing channel;
and when the similarity is greater than or equal to the preset noise introduction threshold, obtaining a test result representing the normal noise introduction of the audio playing channel.
Based on the above structure, various embodiments of the earphone testing method are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a testing method of an earphone according to a first embodiment of the present invention.
Embodiments of the present invention provide embodiments of a headset testing method, and it should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein. In this embodiment, the main executing body of the earphone testing method may be a personal computer, a smart phone, a server, and the like, which is not limited in this embodiment. For convenience of description, the following description of the embodiments is made with reference to a test apparatus as an execution subject. In this embodiment, the earphone testing method includes:
step S10, sending test audio data to an earphone system to be tested in a Bluetooth communication mode so that the earphone system can convert the test audio data from a digital audio signal into an analog audio signal through a codec and then output the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor;
in this embodiment, in order to solve the problem of manually testing the audio frequency of the earphone, the problem of low test accuracy is provided with an automatic audio frequency test scheme of the earphone, which avoids missing detection and improves test accuracy.
In a specific embodiment, the headset system to be tested may be a minimum system having the audio playing function and the bluetooth communication function of the headset, so as to avoid interference of other software and hardware modules on the test of the audio playing path. It should be noted that the headphone system in the present embodiment is not limited to the TWS headphone system.
The test audio data may be set in advance according to needs, and different test audio data may be set for different anomaly detection items, which is not limited in this embodiment and may include, for example, a sweep tone, a sinusoidal signal, and the like.
After receiving the test audio data, the headphone system may perform conventional processing, such as decoding, on the test audio data to obtain a digital audio signal, and then convert the digital audio signal into an analog audio signal through a codec (codec) and output the analog audio signal. The audio output end of the codec is connected with two ends of the loudspeaker in the earphone product, in the embodiment, the loudspeaker is considered to be a capacitive load, the accuracy of the collected feedback audio signal can be influenced, and when the earphone system is tested, the loudspeaker is replaced by the resistor, so that the accuracy of the measured feedback audio signal is improved. The resistance of the resistor may be set according to a speaker to be equipped in the earphone product, which is not limited in this embodiment.
In this embodiment, a specific manner of sending the test audio data to the headset system by the test device through the bluetooth communication is not limited. For example, in the specific embodiment, the test device may directly establish a bluetooth communication connection with the headset system and then directly send the bluetooth communication connection to the headset system through the test device, or the test device may be connected with other devices in other manners, and the other devices establish a bluetooth communication connection with the headset system and forward test audio data to the headset system through the other devices.
Further, in a possible implementation, it is considered that the headset is generally connected to the smart phone, and generally receives and plays the audio data from the smart headset through a bluetooth communication manner, and may be connected to the smart phone through a test device, and connected to the headset system through a bluetooth communication manner. The connection mode between the test device and the smart headset is not limited in this embodiment, and for example, the test device may be connected to a smart phone through a TYPE-C interface (a USB interface format).
The step S10 includes:
step S101, sending the test audio data to the smart phone so that the smart phone can send the test audio data to the earphone system in a Bluetooth communication mode;
the test equipment can send the test audio data to the smart phone, and the smart phone sends the test audio data to the earphone system in a Bluetooth communication mode so as to simulate an audio playing channel from the smart phone to the earphone in a real use scene. In a specific embodiment, the test device may send a test command to the smart phone, and the smart phone sends the received test audio data to the earphone system through a bluetooth communication mode after receiving the test command.
Further, in a possible implementation manner, after the step S10, the method further includes:
step a, obtaining Bluetooth HCI log information collected by the smart phone, and responding to a log checking instruction to output the Bluetooth HCI log information.
The smart phone can collect Bluetooth HCI log information, and the test device can acquire the collected Bluetooth HCI log information from the smart phone after sending test audio data to the smart phone. In a specific embodiment, after the test is completed, that is, after the smart phone finishes sending the test audio data, the test device may obtain the bluetooth HCI log information collected by the smart phone, or after the test device sends the test audio data to the smart phone, the smart phone starts sending the collected bluetooth HCI log information to the test device until the test is completed.
The test equipment can store the acquired Bluetooth HCI log information for the user to check, or respond to a log checking instruction to output the Bluetooth HCI log information. The log viewing instruction may be triggered by a user, or may be self-triggered by the test device according to a self-defined trigger condition, which is not limited in this embodiment. There are various ways to output the bluetooth HCI log information, for example, the bluetooth HCI log information may be output to a display device for display, or may be output to a printing device for printing, and the like, and the present embodiment is not limited thereto.
In the embodiment, the Bluetooth HCI log information is acquired and output through the test equipment, so that a tester can conveniently analyze the audio problem of the earphone system according to the detailed Bluetooth HCI log information, and the audio problem is solved as soon as possible.
Step S20, obtaining feedback audio data obtained by converting analog voltage signals at two ends of the resistor collected by the signal collecting device into digital signals;
in this embodiment, the analog voltage signals at two ends of the resistor are collected by the signal collecting device, and the feedback audio data is obtained by converting the analog voltage signals into digital signals. In a specific embodiment, the test device may convert the analog voltage signal acquired by the signal acquisition device into a digital signal to obtain the feedback audio data, or convert the acquired analog voltage signal into a digital signal by the signal acquisition device to obtain the feedback audio data, and obtain the feedback audio data from the signal acquisition device.
In this embodiment, a specific implementation manner of the signal acquisition device is not limited, for example, a sound card may be used as the signal acquisition device, and this embodiment utilizes a function of converting an analog voltage signal into a digital signal by the sound card.
And S30, analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
In a specific application scenario, the anomaly detection items for the audio playback path of the headset may be different, and in this embodiment, the anomaly detection items to be tested, that is, the anomaly conditions in which aspects need to be detected, may be set in the test device in advance. The test equipment analyzes the feedback audio data to obtain an abnormal characteristic value corresponding to the abnormal detection item, and whether the earphone system is abnormal or not can be judged through the abnormal characteristic value. In this embodiment, a specific implementation manner of obtaining the abnormal characteristic value through analysis and determining the test result according to the abnormal characteristic value is not limited.
After the test result is obtained, the test result can be stored or output by the test equipment, so that a tester can know the audio problem of the earphone system according to the test result, and then the audio problem can be solved as soon as possible.
In the embodiment, test audio data are sent to the earphone system to be tested in a bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor; acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals; and analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value. The embodiment realizes an automatic testing scheme for the audio problem of the earphone, improves the testing accuracy, and is beneficial to finding and solving the audio problem of the earphone as early as possible.
In a possible implementation, the testing may be performed using a framework as shown in fig. 3, the testing device may be a 001 computer, 002 a smart phone, 003 a minimal system to support the operation of the TWS system, 004 a codec for the TWS headset to convert digital signals to analog signals, 005 a resistor (e.g., 32-16 ohms) to replace a speaker, and 006 a sound card to collect feedback signals. The 001 computer can be connected with a 002 smart phone through a TYPE-C interface, the 002 smart phone transmits test audio data to a 003TWS earphone minimum system through Bluetooth, after some decoding and algorithm processing, the minimum system sends a final digital audio signal to a 004codec to change the digital signal into an analog signal, and the output end of the 004codec is connected with two ends of a 005 resistor. 006 outside sound card passes through the wire and picks up the analog voltage signal at 005 both ends, and 006 sound card has can be with analog signal to digital signal's function, feeds back the digital signal who gathers to the 001 computer.
Further, based on the first embodiment, a second embodiment of the testing method for earphones according to the present invention is proposed, and in this embodiment, the step S30 includes:
step S301, carrying out endpoint detection on the feedback audio data to obtain an audio signal;
in this embodiment, the anomaly detection item may include a mutation point detection item, and the test audio data may include a frequency sweep tone for the detection item. The frequency sweeping sound is a sound signal with frequency continuously changing from high to low (or from low to high) in a frequency band.
The testing device may perform endpoint detection on the feedback audio data to obtain an audio signal, that is, some non-audio signals collected due to the delay of the playing of the headphone system may exist in the feedback audio data, and the audio signal is extracted by the endpoint detection. The specific implementation of endpoint detection is not limited herein.
Step S302, framing the audio signal, and calculating an energy difference value between two adjacent framed signals;
after the audio signals are extracted, the test equipment may frame the audio signals to obtain respective framed signals. The frame length may be set in advance according to needs, and is not limited in this embodiment, and may be set to 5ms, for example. The test equipment may calculate an energy value for each of the framing signals. In a specific embodiment, the calculating the energy value of the framing signal may be calculating the energy value of each frequency band in the framing signal, or calculating a weighted average of the energy values of each frequency band of the framing signal. And the testing equipment calculates the difference value of the energy values of the two adjacent framing signals to obtain the energy difference value. In a specific embodiment, if the energy values of the framing signals include energy values corresponding to respective frequency bands, the energy values of the same frequency bands of two adjacent framing signals may be calculated to obtain energy difference values corresponding to respective frequency bands when calculating the energy difference values.
Step S303, when the energy difference value is larger than a preset mutation threshold value, obtaining a test result representing that an abnormal mutation point exists in the feedback audio data;
and the testing equipment compares the energy difference value of the two framing signals with a preset mutation threshold value. In a specific embodiment, when the energy difference value of the two framing signals includes an energy difference value corresponding to each frequency band, the preset abrupt change threshold may include an abrupt change threshold corresponding to each frequency band, and the test device compares the energy difference value of each frequency band with the corresponding abrupt change threshold to obtain a comparison result corresponding to each frequency band.
Because the energy spectrum of the sweep frequency tone is uniformly changed, under the normal condition, the energy difference value between two adjacent framing signals cannot exceed the preset mutation threshold value, and when the energy difference value is greater than the preset mutation threshold value, the abnormal mutation point exists in the feedback audio data. It should be noted that, in a specific embodiment, when the comparison result between the energy difference value of the two framing signals and the preset abrupt change threshold includes the comparison result corresponding to each frequency band, the test result representing that the abnormal abrupt change point exists in the feedback audio data may be obtained when the energy difference value corresponding to at least one frequency band is greater than the corresponding abrupt change threshold.
Step S304, when the energy difference value is smaller than or equal to the preset mutation threshold value, obtaining a test result representing that abnormal mutation points do not exist in the feedback audio data.
And when the energy difference value between two adjacent framing signals is smaller than or equal to a preset mutation threshold, the energy fluctuation is in a normal range, and abnormal mutation points do not exist in the feedback audio data. It should be noted that, in a specific embodiment, when the comparison result between the energy difference value of the two framing signals and the preset abrupt change threshold includes a comparison result corresponding to each frequency band, the test result indicating that there is no abnormal abrupt change point in the feedback audio data may be obtained when the energy difference value corresponding to each frequency band is less than or equal to the corresponding abrupt change threshold.
Further, in a possible implementation manner, after the step S303, the method further includes:
step S305, determining the generation time of the abnormal mutation point according to the acquisition time of a target framing signal, where the target framing signal is two framing signals corresponding to the energy difference value greater than the preset mutation threshold.
In order to facilitate the tester to solve the cause of the abnormal mutation point as soon as possible, in the embodiment, the test equipment may further locate the generation time of the abnormal mutation point. When it is determined that an abnormal abrupt change point exists in the feedback audio data, it is indicated that an energy difference value between at least two frame framing signals is greater than a preset abrupt change threshold value, and the framing signals with the energy difference value greater than the preset abrupt change threshold value are referred to as target framing signals for distinguishing. The test equipment can acquire the acquisition time of the target framing signal and determine the generation time of the abnormal mutation point according to the acquisition time. In a specific embodiment, the determining, by the testing device, the generation time of the abnormal discontinuity point according to the collecting time may specifically be directly taking the collecting time as the generation time of the abnormal discontinuity point, or may also be subtracting, from the collecting time, a sending start time for starting sending the test audio data to the earphone system to obtain a relative time, and taking the relative time as the generation time of the abnormal discontinuity point. After the generation time is obtained, the test equipment can output the generation time and the test result together, so that a tester can find a solution as soon as possible according to the test result and the generation time of the abnormal mutation point.
Further, based on the first and/or second embodiment, a third embodiment of the testing method for earphones according to the present invention is proposed, and in this embodiment, the step S30 includes:
step S311, performing endpoint detection on the feedback audio data, and determining a start time of an audio signal in the feedback audio data;
in this embodiment, the abnormality detection item may include a play delay detection item, that is, a delay from when audio data is transmitted to the headphone system to when the headphone apparatus plays the audio data is detected. The test equipment may perform endpoint detection on the feedback audio data to determine a start time of the feedback audio signal in the feedback audio data. In a specific embodiment, the acquisition time of the signal in the feedback audio data may be recorded by a signal acquisition device, and after the feedback audio signal is obtained by performing endpoint detection on the feedback audio data, the acquisition time corresponding to the starting point of the feedback audio signal is used as the starting time of the feedback audio signal in the feedback audio data.
Step S312, calculating a time difference between the start time and the transmission start time of the test audio data;
the test device may record a transmission start time for transmitting test audio data to the headset system via bluetooth communication. In a specific embodiment, when the test device is test audio data forwarded by other devices, for example, when the test audio data is sent to the headset system through a smart phone, the test device may obtain the sending start time of the test audio data recorded by the test device from the other devices.
And step 313, obtaining a test result of the earphone system about the play delay detection item according to the time difference.
In this embodiment, the specific manner of obtaining the test result of the headphone system regarding the play delay detection item according to the time difference is not limited. In a specific embodiment, after calculating the time difference between the start time of the feedback audio signal and the transmission start time of the test audio data, the test device may directly use the time difference as a test result of the headphone system regarding the playback delay detection item, or may compare the time difference with a threshold value to obtain a test result of whether the delay of the audio playback path of the headphone system is normal.
Further, in a possible implementation, the step S313 includes:
step S3131, when the time difference is greater than a preset delay threshold, obtaining a test result representing that the delay of an audio playing channel of the earphone system is abnormal;
the preset delay threshold may be set in advance as needed. The testing device may compare the time difference with a preset delay threshold, and when the time difference is greater than the preset delay threshold, it indicates that a more serious delay exists in a section of an audio playing path from sending the test audio data to playing the audio data by the earphone system, and the delay does not fall within a normal range, that is, the delay of the audio playing path of the earphone system is abnormal.
Step S3132, when the time difference is smaller than or equal to the preset delay threshold, obtaining a test result indicating that the audio playing path of the headphone system is delayed normally.
When the time difference is smaller than or equal to the preset delay threshold, it is indicated that the delay of the audio playing path is within the normal range, and at this time, the test device may obtain a test result indicating that the delay of the audio playing path of the headphone system is normal.
Further, based on the first, second and/or third embodiments, a fourth embodiment of the testing method for headphones according to the present invention is provided, in this embodiment, when the abnormality detection item includes a noise introduction detection item, the step S30 includes:
step S321, obtaining the delay time of the audio playing channel of the earphone system, and aligning the feedback audio data with the test audio data according to the delay time;
in this embodiment, the abnormal detection item may include a noise introduction detection item, that is, whether abnormal noise is introduced in an audio playback path from when audio data is transmitted to the headphone system to when the headphone apparatus plays the audio data is detected. The test device may obtain a delay time of an audio playback path of the headphone system. In this embodiment, the manner of obtaining the delay time is not limited, for example, in a possible implementation, the time difference calculated by the above steps S311 and S312 may be used as the delay time of the audio playing path of the headphone system.
The test device may align the feedback audio data with the test audio data according to the delay time, that is, the delay time may be subtracted from the acquisition time of the feedback audio data to eliminate the influence caused by the delay of the audio playback path.
Step S322, calculating a similarity between the aligned feedback audio data and the test audio data;
and calculating the similarity of the aligned feedback audio data and the test audio data. It is understood that, in the absence of any abnormality in the audio playback path, the test audio data and the feedback audio data are theoretically identical, that is, the similarity between the aligned feedback audio data and the test audio data should be up to 100%. In this embodiment, the method for calculating the similarity between two signals is not limited.
Step S323, when the similarity is smaller than a preset noise introduction threshold, obtaining a test result representing the noise introduction abnormity of the audio playing channel;
the preset noise introduction threshold may be set in advance as needed. The test equipment can compare the similarity between the aligned feedback audio data and the test audio data with a preset noise introduction threshold, and when the similarity is smaller than the preset noise introduction threshold, it indicates that more signal components different from the test audio data in the feedback audio data are more, more noise is introduced, and the test equipment belongs to an abnormal range.
Step S324, when the similarity is greater than or equal to the preset noise introducing threshold, obtaining a test result indicating that the noise introducing of the audio playing path is normal.
When the similarity is greater than or equal to the preset noise introduction threshold, the consistency of the feedback audio data and the test audio data is high, and the introduced noise is in a normal range, at the moment, the test equipment can obtain a test result that the noise of the audio playing channel of the earphone system is introduced normally.
In addition, an embodiment of the present invention further provides an earphone testing apparatus, and referring to fig. 4, the earphone testing apparatus includes:
the system comprises a sending module 10, a receiving module and a processing module, wherein the sending module is used for sending test audio data to an earphone system to be tested in a Bluetooth communication mode so that the earphone system can convert the test audio data from a digital audio signal into an analog audio signal through a codec and then output the analog audio signal, and an audio output end of the codec is connected with two ends of a resistor;
the acquisition module 20 is configured to acquire feedback audio data obtained by converting analog voltage signals at two ends of the resistor acquired by the signal acquisition device into digital signals;
the analysis module 30 is configured to analyze the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determine a test result of the headphone system about the abnormal detection item according to the abnormal characteristic value.
Further, the earphone testing method is applied to a testing device, the testing device is in communication connection with a smart phone, the smart phone is in bluetooth communication connection with the earphone system, and the generating module 10 is further configured to:
sending the test audio data to the smart phone so that the smart phone can send the test audio data to the earphone system in a Bluetooth communication mode;
the obtaining module 20 is further configured to:
and acquiring Bluetooth HCI log information acquired by the smart phone, and responding to a log checking instruction to output the Bluetooth HCI log information.
Further, when the anomaly detection items include a mutation point detection item, and the test audio data includes a frequency sweep set for the mutation point detection item, the analysis module 30 is further configured to:
carrying out endpoint detection on the feedback audio data to obtain a feedback audio signal;
framing the feedback audio signal, and calculating an energy difference value between two adjacent framed signals;
when the energy difference value is larger than a preset mutation threshold value, obtaining a test result representing that an abnormal mutation point exists in the feedback audio data;
and when the energy difference value is smaller than or equal to the preset mutation threshold value, obtaining a test result representing that the abnormal mutation point does not exist in the feedback audio data.
Further, the analysis module 30 is further configured to:
and determining the generation time of the abnormal mutation point according to the acquisition time of a target framing signal, wherein the target framing signal is two framing signals corresponding to the energy difference value which is greater than the preset mutation threshold value.
Further, when the anomaly detection item includes a play delay detection item, the analysis module 30 is further configured to:
performing endpoint detection on the feedback audio data, and determining the starting time of a feedback audio signal in the feedback audio data;
calculating a time difference between the start time and a transmission start time of the test audio data;
and obtaining a test result of the earphone system about the playing delay detection item according to the time difference.
Further, the analysis module 30 is further configured to:
when the time difference is larger than a preset delay threshold value, obtaining a test result representing that the delay of an audio playing channel of the earphone system is abnormal;
and when the time difference is smaller than or equal to the preset delay threshold value, obtaining a test result representing that the audio playing channel of the earphone system delays normally.
Further, when the anomaly detection item includes a noise introduction detection item, the analysis module 30 is further configured to:
acquiring delay time of an audio playing channel of the earphone system, and aligning the feedback audio data with the test audio data according to the delay time;
calculating the similarity between the aligned feedback audio data and the test audio data;
when the similarity is smaller than a preset noise introduction threshold value, obtaining a test result representing the noise introduction abnormity of the audio playing channel;
and when the similarity is greater than or equal to the preset noise introduction threshold value, obtaining a test result representing that the noise introduction of the audio playing channel is normal.
The embodiments of the testing apparatus for earphones according to the present invention can refer to the embodiments of the testing method for earphones according to the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where an earphone testing program is stored on the storage medium, and the earphone testing program, when executed by the processor, implements the following steps of the earphone testing method.
The embodiments of the testing device and the computer-readable storage medium of the present invention can refer to the embodiments of the earphone testing method of the present invention, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (10)

1. A method of testing an earphone, the method comprising the steps of:
sending test audio data to an earphone system to be tested in a Bluetooth communication mode, so that the earphone system converts the test audio data from a digital audio signal into an analog audio signal through a codec and outputs the analog audio signal, wherein an audio output end of the codec is connected with two ends of a resistor;
acquiring feedback audio data obtained by converting analog voltage signals at two ends of a resistor acquired by a signal acquisition device into digital signals;
analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
2. The method for testing earphones according to claim 1, wherein the method for testing earphones is applied to a testing device, the testing device is connected with a smart phone in a communication mode, the smart phone is connected with the earphone system in a bluetooth communication mode, and the step of sending the testing audio data to the earphone system to be tested in the bluetooth communication mode comprises:
sending the test audio data to the smart phone so that the smart phone can send the test audio data to the earphone system in a Bluetooth communication mode;
after the step of sending the test audio data to the headset system to be tested in the bluetooth communication mode, the method further comprises the following steps:
and acquiring Bluetooth HCI log information acquired by the smart phone, and responding to a log checking instruction to output the Bluetooth HCI log information.
3. The method for testing the earphones according to claim 1, wherein when the abnormal detection items include abrupt point detection items and the test audio data include sweep tones set for the abrupt point detection items, the step of analyzing the feedback audio data to obtain abnormal feature values corresponding to preset abnormal detection items and determining the test result of the earphone system about the abnormal detection items according to the abnormal feature values comprises:
carrying out endpoint detection on the feedback audio data to obtain a feedback audio signal;
framing the feedback audio signal, and calculating an energy difference value between two adjacent framed signals;
when the energy difference value is larger than a preset mutation threshold value, obtaining a test result representing that an abnormal mutation point exists in the feedback audio data;
and when the energy difference value is smaller than or equal to the preset mutation threshold value, obtaining a test result representing that the abnormal mutation point does not exist in the feedback audio data.
4. The earphone testing method according to claim 3, wherein after the step of obtaining the test result indicating that the abnormal abrupt change point exists in the feedback audio data when the energy difference value is greater than a preset abrupt change threshold value, the method further comprises:
and determining the generation time of the abnormal mutation point according to the acquisition time of a target framing signal, wherein the target framing signal is two framing signals corresponding to the energy difference value which is greater than the preset mutation threshold value.
5. The method for testing earphones according to claim 1, wherein when the abnormal detection item comprises a play delay detection item, the step of analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and the step of determining the test result of the earphone system with respect to the abnormal detection item according to the abnormal characteristic value comprises:
performing endpoint detection on the feedback audio data, and determining the starting time of a feedback audio signal in the feedback audio data;
calculating a time difference between the start time and a transmission start time of the test audio data;
and obtaining a test result of the earphone system about the playing delay detection item according to the time difference.
6. The headphone testing method according to claim 5, wherein the step of obtaining the testing result of the headphone system with respect to the play delay detection item according to the time difference comprises:
when the time difference is larger than a preset delay threshold value, obtaining a test result representing that the delay of an audio playing channel of the earphone system is abnormal;
and when the time difference is smaller than or equal to the preset delay threshold value, obtaining a test result representing that the audio playing channel of the earphone system delays normally.
7. The headphone testing method according to any one of claims 1 to 6, wherein when the abnormal detection item includes a noise introduction detection item, the analyzing the feedback audio data to obtain an abnormal feature value corresponding to a preset abnormal detection item, and the determining a test result of the headphone system with respect to the abnormal detection item according to the abnormal feature value includes:
acquiring delay time of an audio playing channel of the earphone system, and aligning the feedback audio data with the test audio data according to the delay time;
calculating a similarity between the aligned feedback audio data and the test audio data;
when the similarity is smaller than a preset noise introduction threshold value, obtaining a test result representing the noise introduction abnormity of the audio playing channel;
and when the similarity is greater than or equal to the preset noise introduction threshold, obtaining a test result representing the normal noise introduction of the audio playing channel.
8. An earphone testing device, the device comprising:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending test audio data to an earphone system to be tested in a Bluetooth communication mode so that the earphone system can convert the test audio data from a digital audio signal into an analog audio signal through a codec and then output the analog audio signal, and an audio output end of the codec is connected with two ends of a resistor;
the acquisition module is used for acquiring feedback audio data obtained by converting analog voltage signals at two ends of the resistor acquired by the signal acquisition device into digital signals;
and the analysis module is used for analyzing the feedback audio data to obtain an abnormal characteristic value corresponding to a preset abnormal detection item, and determining a test result of the earphone system about the abnormal detection item according to the abnormal characteristic value.
9. A test apparatus, characterized in that the test apparatus comprises: memory, a processor and a headset testing program stored on the memory and executable on the processor, the headset testing program when executed by the processor implementing the steps of the headset testing method according to any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a headset testing program, which when executed by a processor implements the steps of the headset testing method according to any of the claims 1 to 7.
CN202211351363.0A 2022-10-31 2022-10-31 Earphone testing method, device, equipment and computer readable storage medium Pending CN115604621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211351363.0A CN115604621A (en) 2022-10-31 2022-10-31 Earphone testing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211351363.0A CN115604621A (en) 2022-10-31 2022-10-31 Earphone testing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115604621A true CN115604621A (en) 2023-01-13

Family

ID=84851553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211351363.0A Pending CN115604621A (en) 2022-10-31 2022-10-31 Earphone testing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115604621A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115775562A (en) * 2023-02-13 2023-03-10 深圳市深羽电子科技有限公司 Sound leakage detection method for Bluetooth headset
CN116701236A (en) * 2023-08-08 2023-09-05 贵州通利数字科技有限公司 APP testing method, system and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115775562A (en) * 2023-02-13 2023-03-10 深圳市深羽电子科技有限公司 Sound leakage detection method for Bluetooth headset
CN115775562B (en) * 2023-02-13 2023-04-07 深圳市深羽电子科技有限公司 Sound leakage detection method for Bluetooth headset
CN116701236A (en) * 2023-08-08 2023-09-05 贵州通利数字科技有限公司 APP testing method, system and readable storage medium
CN116701236B (en) * 2023-08-08 2023-10-03 贵州通利数字科技有限公司 APP testing method, system and readable storage medium

Similar Documents

Publication Publication Date Title
CN115604621A (en) Earphone testing method, device, equipment and computer readable storage medium
EP1913708B1 (en) Determination of audio device quality
CN110719461B (en) Audio and video equipment testing method and device and computer readable storage medium
CN108281157B (en) Method for detecting drumbeat beat in music, computer storage medium and terminal
CN109547910B (en) Electronic equipment acoustic assembly performance testing method, device, equipment and storage medium
CN112017693B (en) Audio quality assessment method and device
CN106686511A (en) Earphone function testing method and testing system
CN107026953B (en) Diagnostic device and diagnostic system
CN103179240A (en) Audio test method and system for mobile terminal
CN103179496A (en) Audio test method and system for earphone microphone and receiver of mobile terminal
CN105979462A (en) Test processing method and device based on microphone
CN113259832B (en) Microphone array detection method and device, electronic equipment and storage medium
CN115604628B (en) Filter calibration method and device based on earphone loudspeaker frequency response
US20210306116A1 (en) Measuring and Evaluating a Test Signal Generated by a Device Under Test (DUT)
CN112135235B (en) Quality detection method, system and computer readable storage medium
CN113709650A (en) Microphone testing method, device and storage medium
WO2021043414A1 (en) Microphone blocking detection control
CN111163310B (en) Television audio test method, device, equipment and computer readable storage medium
CN115175081A (en) Earphone detection method, device, equipment and computer readable storage medium
CN108322617A (en) A kind of phone Handless system audio self checking method
CN112995882A (en) Intelligent equipment audio open loop test method
CN112735455A (en) Method and device for processing sound information
CN114640926B (en) Current sound detection method, device, equipment and computer readable storage medium
CN115767396A (en) Method and system for testing sound leakage of bone conduction equipment
JP6282999B2 (en) Device for testing the directivity of hearing aids

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination