CN117014759A - Multichannel earphone function test method, system, equipment and storage medium - Google Patents

Multichannel earphone function test method, system, equipment and storage medium Download PDF

Info

Publication number
CN117014759A
CN117014759A CN202311099828.2A CN202311099828A CN117014759A CN 117014759 A CN117014759 A CN 117014759A CN 202311099828 A CN202311099828 A CN 202311099828A CN 117014759 A CN117014759 A CN 117014759A
Authority
CN
China
Prior art keywords
tested
product
terminal
channel
key
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
CN202311099828.2A
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.)
Optofidelity High Tech Zhuhai Ltd
Original Assignee
Optofidelity High Tech Zhuhai 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 Optofidelity High Tech Zhuhai Ltd filed Critical Optofidelity High Tech Zhuhai Ltd
Priority to CN202311099828.2A priority Critical patent/CN117014759A/en
Publication of CN117014759A publication Critical patent/CN117014759A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
    • H04R2201/105Manufacture of mono- or stereophonic headphone components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups
    • H04R2430/03Synergistic effects of band splitting and sub-band processing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)

Abstract

The application discloses a multi-channel earphone function test method, a system, equipment and a storage medium, wherein the method comprises the steps of connecting a plurality of products to be tested with a terminal in a multi-channel manner, and positioning and placing the products to be tested; receiving a multi-channel audio control signal sent by the terminal, and outputting an audio signal through a first channel of each product to be tested, wherein the frequency of the audio signal is different by a first threshold value between channels; and acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing. The embodiment of the application completes the output and input of the audio by the product itself, and the data analysis and processing are realized by the terminal, thereby reducing the test cost and being widely applied to the technical field of functional test.

Description

Multichannel earphone function test method, system, equipment and storage medium
Technical Field
The application relates to the technical field of function test, in particular to a multi-channel earphone function test method, a multi-channel earphone function test system, multi-channel earphone function test equipment and a multi-channel earphone function test storage medium.
Background
With the rapid development of science and technology and the increasing demand of electronic products, audio electronic products including headphones such as bluetooth headphones, wired headphones, etc., wherein the sound quality effect and audio experience of the wired headphones are better. However, because the wired earphone has the structures of keys, wires and the like, the related technology tests the electronic products of the wired earphone through a large number of development test boards or professional test instruments, and the hardware cost is high. In view of the foregoing, there is a need for solving the technical problems in the related art.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, a system, an apparatus, and a storage medium for testing a multi-channel earphone function, so as to reduce the cost of earphone testing.
In one aspect, the present application provides a method for testing the function of a multi-channel earphone, where the method is applied to a product to be tested, and includes:
connecting a plurality of products to be tested with a terminal in a multi-channel manner, and positioning and placing the products to be tested;
receiving a multi-channel audio control signal sent by the terminal, and outputting an audio signal through a first channel of each product to be tested, wherein the frequency of the audio signal is different by a first threshold value between channels;
and acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
Optionally, the multi-channel connection is performed on a plurality of products to be tested and the terminal, and positioning and placing are performed on the products to be tested, including:
connecting a power supply network and a communication network of the product to be tested to the terminal, supplying power to the product to be tested through the terminal, and realizing communication between the product to be tested and the terminal;
and placing the first earphone of the product to be tested and the microphone of the product to be tested close to each other, and placing the second earphone of the product to be tested and the microphone of the product to be tested far away from each other.
Optionally, the acquiring the audio signal by the microphone of the product to be tested to obtain a digital signal includes:
setting the sampling frequency of the microphone based on the Nyquist sampling law;
and acquiring the audio signal according to the set sampling frequency to obtain a digital signal.
On the other hand, the embodiment of the application also provides a multi-channel earphone function test method, which is applied to a terminal and comprises the following steps:
the key detection unit is driven by the terminal to perform key test on products to be tested which are connected in a multi-channel manner, so as to obtain key test results, wherein the key detection unit comprises a minimum control system and a cylinder driving system;
and sending an audio control signal to the first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
Optionally, the key test is performed on the product to be tested connected in the multiple channels by the terminal driving key detection unit, so as to obtain a key test result, including:
outputting a key control signal to the minimum control system according to serial port communication through the terminal;
the cylinder driving system is controlled to perform key operation on the product to be tested through the key control signal, so that key information is obtained;
and analyzing the key code of the key information through the terminal, and confirming whether the key function is realized or not to obtain a key test result.
Optionally, the performing parameter analysis processing on the digital signal to obtain a headset test result includes:
windowing is carried out on the digital signal according to a window function, and windowing data are obtained;
performing Fourier transform processing on the windowed data to obtain an imaginary number, and performing modulo processing on the imaginary number to obtain a frequency spectrum density;
calculating frequency points of target audio signal energy according to the audio signal frequency and the frequency resolution, and selecting a target range according to the frequency points;
calculating the spectrum density according to the target range to obtain initial audio signal energy;
performing difference processing on the initial audio signal energy and the environmental noise to obtain target audio signal energy;
and confirming whether the headset function is realized or not according to the target audio signal energy, and obtaining a headset test result.
On the other hand, the embodiment of the application also provides a multi-channel earphone function test system, which is applied to a product to be tested and comprises:
the first module is used for connecting a plurality of products to be tested with the terminal in a multi-channel manner and positioning and placing the products to be tested;
the second module is used for receiving the multichannel audio control signals sent by the terminal, outputting audio signals through the first sound channel of each product to be tested, and enabling the frequency of the audio signals between channels to differ by a first threshold value;
and the third module is used for acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
On the other hand, the embodiment of the application also discloses a multi-channel earphone function test system, which is applied to a terminal and comprises the following steps:
the fourth module is used for performing key testing on the products to be tested connected in a multi-channel mode through the terminal driving key detection unit to obtain key testing results, and the key detection unit comprises a minimum control system and a cylinder driving system;
and the fifth module is used for sending an audio control signal to the first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
On the other hand, the embodiment of the application also discloses electronic equipment, which comprises a processor and a memory;
the memory is used for storing programs;
the processor executes the program to implement the method as described above.
In another aspect, embodiments of the present application also disclose a computer readable storage medium storing a program for execution by a processor to implement a method as described above.
In another aspect, embodiments of the present application also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the foregoing method.
Compared with the prior art, the technical scheme provided by the application has the following technical effects: according to the embodiment of the application, the multiple products to be detected can be detected simultaneously by carrying out multi-channel connection on the multiple products to be detected and the terminal. In addition, the embodiment of the application also outputs the audio signal through the first sound channel of each product to be tested, and the microphone of the product to be tested is used for collecting the audio signal to obtain the digital signal, so that the earphone of the product to be tested can be used for realizing playing and inputting the signal from the microphone of the product to be tested, and the test cost is greatly reduced. Furthermore, the application carries out data analysis on the input signal through the terminal and carries out headset and key test by combining the key detection unit, thereby improving the test efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a multi-channel earphone function test method applied to a product to be tested according to an embodiment of the present application;
FIG. 2 is a schematic diagram of multi-channel connection between a product to be tested and a terminal according to an embodiment of the present application;
FIG. 3 is a block diagram showing a connection between a product to be tested and a terminal according to an embodiment of the present application;
fig. 4 is a flowchart of a multi-channel earphone function test method applied to a terminal according to an embodiment of the present application;
FIG. 5 is a schematic circuit diagram of a minimum control system according to an embodiment of the present application;
FIG. 6 is a schematic circuit diagram of a cylinder drive system according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a cylinder key according to an embodiment of the present application;
fig. 8 is a schematic waveform diagram of mapping an audio signal to a frequency domain according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
First, several nouns involved in the present application are parsed:
noise: the energy of the output signal when no audio signal (or audio signal of-120 dB) is input.
Nyquist sampling law: in order to recover the analog signal without distortion, the sampling frequency should be 2 times or more the highest frequency in the analog signal spectrum.
Fourier transform: representing a certain function satisfying a certain condition as a trigonometric function (sine and/or cosine function) or a linear combination of their integrals
Spectral leakage: the spectral lines in the signal spectrum are mutually influenced, so that the measurement result deviates from the actual value, and meanwhile, a plurality of false spectrums with smaller amplitude appear on other frequency points on two sides of the spectral line.
In the related art, the testing methods in the industry can be summarized into two main categories: 1. designing and developing a test board card, and detecting the key function and the audio function of the earphone; 2. and using a professional audio testing instrument, outputting an audio signal played by a product to testing equipment, performing data analysis and processing, and calculating parameters required to be tested. However, these methods are susceptible to environmental influences, are susceptible to attenuation in audio signal transmission and are interfered by other signals, resulting in low test accuracy; and the hardware cost is very high using an external audio test instrument or test board. Meanwhile, the large size of the testing equipment can increase the difficulty of production overhead lines and operation and maintenance, and the simultaneous testing of a plurality of products is difficult due to the size of the testing equipment.
In view of this, the embodiment of the application provides a multi-channel earphone function testing method, which can be applied to a terminal and also can be applied to a product to be tested. The terminal may be a tablet computer, a notebook computer, a desktop computer, a single chip microcomputer, etc., but is not limited thereto. The product to be tested is a wired earphone which comprises a left channel earphone, a right channel earphone and a microphone. Furthermore, the testing method applied to the terminal can be applied to a server, wherein the server can be an independent physical server, can be a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms, and the like.
Referring to fig. 1, an embodiment of the present application provides a multi-channel earphone function testing method, where the method is applied to a product to be tested, and includes:
s101, connecting a plurality of products to be tested with a terminal in a multi-channel manner, and positioning and placing the products to be tested;
s102, receiving a multi-channel audio control signal sent by the terminal, and outputting an audio signal through a first channel of each product to be tested, wherein the frequency of the audio signal is different by a first threshold value between channels;
s103, acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
In the embodiment of the application, a large number of external test boards and test instruments are abandoned, the test of the product to be tested of the wired earphone is divided into audio test and key test, the test is applied to the product end to be tested, a plurality of products to be tested are connected with the terminal in a multi-channel manner, and the products to be tested are positioned and placed well. And respectively receiving an audio control signal sent by the terminal through each product to be tested, and outputting an audio signal through a first channel, wherein the frequency of the audio signal between each channel differs by a first threshold value, the first channel can be a left channel or a right channel, and the first threshold value is 200Hz. It should be noted that, in this embodiment, the first threshold may be selected according to practical situations, so as to ensure that all frequencies of the audio signals are within a range of 20KHz to 20KHz. And acquiring the audio signal through a microphone of the tested product to obtain a digital signal, and transmitting the digital signal to a terminal for functional test processing. On the premise of meeting the function realization of the product, the embodiment of the application does not need to use any external test instrument or board card, the output and input of the audio are completed by the product, the data analysis and processing are realized by a computer, and the test cost is reduced.
Further as an optional implementation manner, the multi-channel connection of the multiple products to be tested and the terminal, and positioning and placing the products to be tested, includes:
connecting a power supply network and a communication network of the product to be tested to the terminal, supplying power to the product to be tested through the terminal, and realizing communication between the product to be tested and the terminal;
and placing the first earphone of the product to be tested and the microphone of the product to be tested close to each other, and placing the second earphone of the product to be tested and the microphone of the product to be tested far away from each other.
In the embodiment of the application, referring to fig. 2, a power network and a communication network of a product to be tested are connected to a computer, and the computer is used for supplying power to the product and realizing the communication of the product. In the embodiment of the application, the VBUS, DP & DN and GND of the 4 products to be tested are connected to the computer through standard USB communication lines, the USB A port, the TypeC port and the like are connected, and the computer controls the products to send instruction information. Referring to fig. 3, the headphones of the product to be tested and the microphones corresponding to the headphones are positioned in parallel, the first headphones may be left channel headphones or right channel headphones, and at this time, the second headphones are right channel headphones or left channel headphones. In one embodiment, the left ear of each channel is far from the microphone and the right ear is near to the microphone, so that when playing audio signals, whether the left and right earphones are opposite can be judged by the distance difference, and the closer the distance is, the smaller the attenuation of the audio signals is, and the more the distance is, the greater the attenuation of the audio signals is. Because the left earphone of the product is far away from the microphone of the product, the right earphone is close to the microphone of the product, and the difference of the distances from the earphone to the microphone enables signals recorded into the microphone to generate different attenuation, so that different audio signal amplitudes are calculated, the problem that wire welding is reversed can occur in the production process of the left earphone and the right earphone, for example, the wire of the left earphone is welded to the driving end of the right earphone, and the method can help the production line to detect defective products generated by the problem.
Further as an optional implementation manner, the acquiring the audio signal by the microphone of the product to be tested to obtain a digital signal includes:
setting the sampling frequency of the microphone based on the Nyquist sampling law;
and acquiring the audio signal according to the set sampling frequency to obtain a digital signal.
In the embodiment of the application, a computer controls the audio signal with fixed frequency and amplitude to be broadcast from the left channel (or the right channel) of a product to be tested, and only one channel outputs the audio signal at the moment; the audio signal output by the left channel (or the right channel) of the product to be tested is transmitted to the microphone of the product to be tested through air, and the microphone of the product to be tested converts the received audio signal into a digital signal through a set sampling rate. Microphone at presentThe sampling frequency of wind is generally divided into five grades of 11KHz, 22KHz, 24KHz, 44.1KHz and 48KHz, and the frequency range of audio signals is 20 Hz-20 KHz. Based on nyquist sampling law, the microphone sampling frequency of the embodiments of the present application should be 20KHz by 2=40 KHz or more. The higher the sampling frequency, the closer the sampled digital audio signal is to the audio signal output by the product, and therefore, the choice of using 48KHz as the sampling frequency f in the design s I.e. 48K data are acquired per second.
f s =48000
The higher the sampling frequency selection, the more data is collected at the same time, resulting in reduced data processing efficiency. Therefore, when the frequency of the audio signal is not high, the low sampling frequency can be selected, and the effect of improving the data processing efficiency is achieved. If the frequency of the audio signal output by the product is only 4KHz, the sampling frequency of 11KHz is enough to meet the requirement. It is conceivable that the design of the sampling frequency of the embodiment of the present application may be set according to the actual situation.
Then, determined by a Discrete Fourier Transform (DFT) algorithm, the number N of data subjected to DFT must be the power of 2 (i.e., n=2x, x is a positive integer); after DFT conversion, the frequency resolution f0 of the frequency domain (the minimum interval for resolving two frequency signals) is determined by the sampling frequency fs and the number of sampling points N:
when there are a plurality of frequency components in the audio signal and the frequency difference is smaller than f0, the frequency domain data cannot calculate the energy of the frequency component. In this embodiment, in order to prevent the audio signals of the channels from interfering with each other, the audio signal frequencies between the channels are set to be 200Hz apart (which can be selected according to f0 and the actual situation, so as to ensure that all the audio signal frequencies are within the range of 20-20 KHz). In consideration of the possible presence of spectral leakage, the energy of 7 frequency components (7 frequency components may be set according to the actual spectral leakage situation) before and after selecting the frequency in calculating the amplitude of the audio signal is calculated together, and the 7 frequency components are adopted in this embodiment. To ensure that there is no interference between channels, the frequency width of each channel audio signal is:
f s =48000
N>(7+7)*f s 200, i.e. N>3360,
Since n=2x, in this embodiment, at least 212=4096 (2x >3360, x is 12 or more) data are sampled, and the more data, the higher the frequency resolution, the lower the calculation efficiency; taken together, this embodiment chooses to sample 8192 (x=13) data with a frequency resolution f0=48000/8192=5.86 Hz. Likewise, the sampling length can be adjusted according to the actual situation. Finally, the digital audio signal acquired according to the appointed sampling frequency fs is x (n), n= [0, N-1].
Referring to fig. 4, on the other hand, the embodiment of the present application further provides a multi-channel earphone function testing method, where the method is applied to a terminal, and includes:
s401, performing key testing on products to be tested connected in a multi-channel mode through the terminal driving key detection unit to obtain key testing results, wherein the key detection unit comprises a minimum control system and a cylinder driving system;
s402, sending an audio control signal to a first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
In the embodiment of the application, the key detection unit is driven by the terminal to perform key test on the products to be tested connected in a multi-channel manner, the products are keyed, such as audio playing/pausing, volume increasing and volume decreasing, and then a computer analyzes the key code of the key information to confirm whether the key function is realized. The key detection unit comprises a minimum control system and a cylinder driving system. And then analyzing and processing the audio signal recorded by the microphone of the product to be tested through the terminal to obtain the parameters of the audio signal, thereby judging whether the headset function of the product is qualified.
Further as an optional implementation manner, the step of performing a key test on the product to be tested connected in the multi-channel by the terminal driving key detection unit to obtain a key test result includes:
outputting a key control signal to the minimum control system according to serial port communication through the terminal;
the cylinder driving system is controlled to perform key operation on the product to be tested through the key control signal, so that key information is obtained;
and analyzing the key code of the key information through the terminal, and confirming whether the key function is realized or not to obtain a key test result.
In the embodiment of the application, the terminal outputs a key control signal to the minimum control system according to serial port communication, and the cylinder driving system is controlled to perform key operation on a product to be tested through the key control signal to obtain key information. Referring to fig. 5, a computer controls the output IO of the minimum control system through serial communication by using a conventional minimum control system, for controlling a cylinder to perform key operation on a product to be tested. Referring to fig. 6, the cylinder driving circuit is mainly composed of an isolation IC U1, a logic IC U2, and peripheral circuits thereof, as shown in fig. 3.IO1 to IO3 are the IO of the minimum control system and are used for controlling the action of the cylinder; the U1 is used for isolating the minimum system from the electromagnetic valve driving part, preventing electromagnetic valve driving noise from interfering with the minimum system and not interfering with other functional tests (such as voltage, current and the like), and the U2 is used for enhancing driving capability. The cylinders J1-J3 are connected with the corresponding play/pause key, volume up key and volume down key respectively, as shown in figure 7. When the computer drives IO of the minimum control system, the air cylinder can start to work, keys are pressed on products, such as playing/pausing, volume increasing and volume decreasing of audio, and then the computer analyzes the key code of the key information to confirm whether the key function is realized.
Further as an optional implementation manner, the performing parameter analysis processing on the digital signal to obtain a headset test result includes:
windowing is carried out on the digital signal according to a window function, and windowing data are obtained;
performing Fourier transform processing on the windowed data to obtain an imaginary number, and performing modulo processing on the imaginary number to obtain a frequency spectrum density;
calculating frequency points of target audio signal energy according to the audio signal frequency and the frequency resolution, and selecting a target range according to the frequency points;
calculating the spectrum density according to the target range to obtain initial audio signal energy;
performing difference processing on the initial audio signal energy and the environmental noise to obtain target audio signal energy;
and confirming whether the headset function is realized or not according to the target audio signal energy, and obtaining a headset test result.
In the embodiment of the application, the audio data acquired by the computer is subjected to windowing and discrete Fourier transform, so that the audio signal is converted from a time domain to a frequency domain, and the energy of the audio signal with the corresponding frequency is calculated according to the frequency domain data. The windowing is to perform weighting processing on the signal in the time domain, which is one of effective means for reducing spectrum leakage in the time domain-to-frequency domain conversion process, and in this embodiment, a Blackman nuttal window function is used, and it is conceivable that an appropriate window function can be selected according to the actual situation, and the formula is as follows:
windowing is carried out on the collected digital audio signals:
wx(n)=x(n)*w(n)n=[0,N-1]
and carrying out Fourier transform on the data subjected to windowing treatment to obtain N Fourier series (imaginary numbers), wherein the treatment process is as follows:
the above processing formula may be abbreviated as:
modulo processing is carried out on the imaginary number obtained by DFT conversion to obtain the frequency spectrum density, and the processing process is as follows:
the power spectrum is calculated according to the frequency spectrum density, and because of the conjugate symmetry of DFT, the rear N/2-1 points obtained by DFT are redundant, and only the front N/2+1 points are needed.
Wherein the method comprises the steps ofIs the frequency point bandwidth.
Referring to fig. 8, in the present embodiment, the audio signal played by one channel has a frequency F 0 =4.7khz, using a sampling rate of 48KHz to sample 8192 points, and obtaining spectral density after windowing and fourier transform.
Frequency points of target audio signal energy are obtained through audio signal frequency and frequency resolution ratio calculation:
F 0 /f 0 =4.7K*N/f s =4.7K*8192/48K=802.13
because the aperiodic and windowing processing of the sampled data can cause spectrum leakage (the spectrum density near the target frequency point is higher) to a certain extent, 7 points before and after the target frequency point can be selected during calculation, and therefore the energy of the collected 4.7KHZ audio signal is as follows:
converted to dB values, the calculation process is as follows:
and calculating the initial audio signal energy according to the formula, performing difference processing on the initial audio signal energy and the environmental noise to obtain target audio signal energy, and determining whether the headset function is realized according to the target audio signal energy to obtain a headset test result. The embodiment of the application can detect the environmental noise before testing the audio signal, takes the environmental noise as the offset, subtracts the offset during calculation, and eliminates the interference of the external environment. Wherein, the calculation formula is as follows:
the computer controls the product to be tested to output white noise or not to output audio signals (the ambient noise has no fixed frequency), the tested noise energy should be all energy within the range of 20-20KHZ, and the calculation process is as follows:
computer-controlled output of product to be measured at a specified frequency F 0 The audio signal energy calculation process is as follows:
it should be noted that in the embodiment of the present application, 4 products, that is, 4 channels are measured simultaneously, the frequency of the audio signal selected by the first product is 4.7KHz, the audio signal frequencies between the channels are set to be 200Hz apart, and the frequencies of the audio signals selected by the other three channels are 4.9KHz, 5.1KHz and 5.3KHz respectively. When each product is tested, only the frequency range of the product is concerned, signals of other frequency bands are ignored, and the audio signals of other channels are prevented from interfering with the audio signals of the product during calculation, so that the test accuracy can be improved. Each channel uses audio signals with different frequencies for testing, such as 4.7KHz/4.9KHz/5.1KHz/5.3KHz, and only signals near the frequency of the channel are selected for calculation, and audio signals with other frequencies are filtered, so that the testing precision can be improved.
On the other hand, the embodiment of the application also provides a multi-channel earphone function test system, which is applied to a product to be tested and comprises:
the first module is used for connecting a plurality of products to be tested with the terminal in a multi-channel manner and positioning and placing the products to be tested;
the second module is used for receiving the multichannel audio control signals sent by the terminal, outputting audio signals through the first sound channel of each product to be tested, and enabling the frequency of the audio signals between channels to differ by a first threshold value;
and the third module is used for acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
On the other hand, the embodiment of the application also discloses a multi-channel earphone function test system, which is applied to a terminal and comprises the following steps:
the fourth module is used for performing key testing on the products to be tested connected in a multi-channel mode through the terminal driving key detection unit to obtain key testing results, and the key detection unit comprises a minimum control system and a cylinder driving system;
and the fifth module is used for sending an audio control signal to the first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
It can be understood that the content in the above method embodiment is applicable to the system embodiment, and the functions specifically implemented by the system embodiment are the same as those of the above method embodiment, and the achieved beneficial effects are the same as those of the above method embodiment.
Corresponding to the method of fig. 1 or fig. 4, the embodiment of the application also provides an electronic device, which comprises a processor and a memory; the memory is used for storing programs; the processor executes the program to implement the method as described above.
Corresponding to the method of fig. 1 or fig. 4, the embodiment of the present application further provides a computer-readable storage medium storing a program to be executed by a processor to implement the method as described above.
Embodiments of the present application also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the method shown in fig. 1 or fig. 4.
In summary, the embodiment of the application has the following advantages: the embodiment of the application realizes playing by utilizing the earphone of the product and inputting signals from the microphone of the product, can realize simultaneous testing of a plurality of products and greatly reduces the testing cost. According to the embodiment of the application, each channel plays different frequency signals, so that the interference between the channels is reduced, the testing efficiency is improved, and the left earphone and the right earphone can be distinguished by utilizing the distance difference between the earphone and the microphone when the audio signal is played again.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of the present application are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the application is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the described functions and/or features may be integrated in a single physical device and/or software module or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present application. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Accordingly, one of ordinary skill in the art can implement the application as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the application, which is to be defined in the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the application, the scope of which is defined by the claims and their equivalents.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments described above, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are included in the scope of the present application as defined in the appended claims.

Claims (10)

1. The method is characterized by being applied to a product to be tested and comprising the following steps of:
connecting a plurality of products to be tested with a terminal in a multi-channel manner, and positioning and placing the products to be tested;
receiving a multi-channel audio control signal sent by the terminal, and outputting an audio signal through a first channel of each product to be tested, wherein the frequency of the audio signal is different by a first threshold value between channels;
and acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
2. The method of claim 1, wherein the multi-channel connecting the plurality of products to be tested with the terminal and positioning the products to be tested comprises:
connecting a power supply network and a communication network of the product to be tested to the terminal, supplying power to the product to be tested through the terminal, and realizing communication between the product to be tested and the terminal;
and placing the first earphone of the product to be tested and the microphone of the product to be tested close to each other, and placing the second earphone of the product to be tested and the microphone of the product to be tested far away from each other.
3. The method of claim 1, wherein the capturing the audio signal by the microphone of the product under test results in a digital signal, comprising:
setting the sampling frequency of the microphone based on the Nyquist sampling law;
and acquiring the audio signal according to the set sampling frequency to obtain a digital signal.
4. The multi-channel earphone function testing method is characterized by being applied to a terminal and comprising the following steps of:
the key detection unit is driven by the terminal to perform key test on products to be tested which are connected in a multi-channel manner, so as to obtain key test results, wherein the key detection unit comprises a minimum control system and a cylinder driving system;
and sending an audio control signal to the first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
5. The method of claim 4, wherein the step of performing a key test on the product to be tested connected in the multi-channel by the terminal driving key detection unit to obtain a key test result includes:
outputting a key control signal to the minimum control system according to serial port communication through the terminal;
the cylinder driving system is controlled to perform key operation on the product to be tested through the key control signal, so that key information is obtained;
and analyzing the key code of the key information through the terminal, and confirming whether the key function is realized or not to obtain a key test result.
6. The method of claim 4, wherein the performing a parametric analysis on the digital signal to obtain a headset test result comprises:
windowing is carried out on the digital signal according to a window function, and windowing data are obtained;
performing Fourier transform processing on the windowed data to obtain an imaginary number, and performing modulo processing on the imaginary number to obtain a frequency spectrum density;
calculating frequency points of target audio signal energy according to the audio signal frequency and the frequency resolution, and selecting a target range according to the frequency points;
calculating the spectrum density according to the target range to obtain initial audio signal energy;
performing difference processing on the initial audio signal energy and the environmental noise to obtain target audio signal energy;
and confirming whether the headset function is realized or not according to the target audio signal energy, and obtaining a headset test result.
7. A multi-channel earphone function test system, wherein the system is applied to a product to be tested, comprising:
the first module is used for connecting a plurality of products to be tested with the terminal in a multi-channel manner and positioning and placing the products to be tested;
the second module is used for receiving the multichannel audio control signals sent by the terminal, outputting audio signals through the first sound channel of each product to be tested, and enabling the frequency of the audio signals between channels to differ by a first threshold value;
and the third module is used for acquiring the audio signal through the microphone of the product to be tested to obtain a digital signal, and sending the digital signal to the terminal for functional test processing.
8. A multi-channel earphone function test system, wherein the system is applied to a terminal, and comprises:
the fourth module is used for performing key testing on the products to be tested connected in a multi-channel mode through the terminal driving key detection unit to obtain key testing results, and the key detection unit comprises a minimum control system and a cylinder driving system;
and the fifth module is used for sending an audio control signal to the first channel of the product to be tested through the terminal, receiving a digital signal acquired by a microphone of the product to be tested, and carrying out parameter analysis processing on the digital signal to obtain a headset test result.
9. An electronic device comprising a memory and a processor;
the memory is used for storing programs;
the processor executing the program implements the method of any one of claims 1 to 3 or 4 to 6.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 3 or 4 to 6.
CN202311099828.2A 2023-08-29 2023-08-29 Multichannel earphone function test method, system, equipment and storage medium Pending CN117014759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311099828.2A CN117014759A (en) 2023-08-29 2023-08-29 Multichannel earphone function test method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311099828.2A CN117014759A (en) 2023-08-29 2023-08-29 Multichannel earphone function test method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117014759A true CN117014759A (en) 2023-11-07

Family

ID=88569105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311099828.2A Pending CN117014759A (en) 2023-08-29 2023-08-29 Multichannel earphone function test method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117014759A (en)

Similar Documents

Publication Publication Date Title
US8073146B2 (en) Audio test apparatus and test method thereof
CN101202087B (en) Device and method for testing audio sound-recording
US20070055398A1 (en) Content-based audio comparisons
CN109831733A (en) Test method, device, equipment and the storage medium of audio broadcast performance
JP6452653B2 (en) A system for modeling the characteristics of musical instruments
JP6552462B2 (en) How to model musical instrument characteristics
CN1979440A (en) Plate-carried audio-frequency module testing system and method
CN101192182B (en) Audio- playback test device and method
US8116466B2 (en) Apparatus and method for testing sound input and output of sound card
CN105188008A (en) Method and device for testing audio output unit
CN101620005A (en) Mainboard sound test system and method therefor
CN117014759A (en) Multichannel earphone function test method, system, equipment and storage medium
US10587983B1 (en) Methods and systems for adjusting clarity of digitized audio signals
CN113287169A (en) Apparatus, method and computer program for blind source separation and remixing
US10289377B2 (en) Method and apparatus for auscultating inaudible signals
CN112741622B (en) Audiometric system, audiometric method, audiometric device, earphone and terminal equipment
CN115243183A (en) Audio detection method, device and storage medium
Ternström et al. Personal computers in the voice laboratory: Part two—audio devices
TW201142820A (en) Acoustical wave identification system and the method thereof
CN115691556B (en) Method for detecting multichannel voice quality of equipment side
US11501745B1 (en) Musical instrument pickup signal processing system
RU150244U1 (en) PHONOMIC AUTHENTICITY DETERMINATION SYSTEM
CN117119365A (en) Acoustic testing method and system
Jones et al. Testing challenges in personal computer audio devices
Jones et al. Testing Challenges in Personal Computer Audio Systems

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