Disclosure of Invention
The embodiment of the invention provides an earphone fault detection method and an earphone special for an examination, which can detect whether a loudspeaker and a microphone of the earphone have faults or not and ensure the fairness of the examination.
The embodiment of the invention provides a method for detecting earphone faults, which comprises the following steps:
judging whether the loudspeaker is triggered to play voice when the microphone is in a non-recording state;
if not, returning to continue judging;
if so, acquiring first energy at the position of the microphone; the first energy comprises: external sound energy received by the microphone and horn sound energy transmitted to the microphone by the horn through a sound guide tube; the loudspeaker is connected with the microphone through the sound guide pipe;
calculating N horn energy ratios in N time periods according to the first energy; wherein N is more than or equal to 2;
when the energy ratios of the N loudspeakers are all smaller than a first threshold value, acquiring second energy at the position of the microphone when the loudspeakers are in a non-playing state;
according to the second energy, M horn energy ratios in M time periods are calculated; wherein M is more than or equal to 2;
judging whether the difference values of the M horn energy ratios and a preset reference value are all smaller than a second threshold value;
if yes, determining that the microphone is in failure;
otherwise, determining that the horn is in fault.
Further, the earphone failure detection method further includes: when the N horn energy ratios are not all less than a first threshold, then it is determined that the microphone is not malfunctioning.
Further, the calculating, according to the first energy, N horn energy ratios in N time periods specifically includes:
calculating N horn energy ratios in N time periods by the following formula;
αi =10log10 (Φi /Φ0 );
wherein alpha isi Is the ith horn energy ratio; phi (i The first energy collected in the ith unit time; phi (0 Is the reference value.
Further, the loudspeaker is connected with the microphone through the sound guide tube, and specifically comprises:
one end of the sound guide pipe is connected to the sounding vibrating diaphragm of the loudspeaker, and the other end of the sound guide pipe is connected to the vibration sensor of the microphone.
Further, the reference value is the sum of the energies of the microphones in the interval 300Hz to 3400Hz in the unit time under the quiet environment.
Correspondingly, the embodiment of the invention also provides a special earphone for examinations, which comprises: the loudspeaker, the microphone, the sound guide tube and the controller;
wherein the loudspeaker is connected with the microphone through the sound guide pipe;
the controller is respectively connected with the loudspeaker and the microphone;
the controller is configured to perform the headset malfunction detection method of any one of claims 1 to 4.
Further, the loudspeaker is connected with the microphone through the sound guide pipe, and specifically comprises:
one end of the sound guide pipe is connected to the sounding vibrating diaphragm of the loudspeaker, and the other end of the sound guide pipe is connected to the vibration sensor of the microphone.
Further, the test-dedicated headset further includes: an indicator light;
the indicator light is connected with the controller and used for being started when the controller determines that the loudspeaker or the microphone has a fault so as to indicate a supervisor to replace faulty equipment.
Further, the microphone is a cardioid directional microphone.
The embodiment of the invention has the following beneficial effects:
according to the earphone fault detection method and the special earphone for the examination, the loudspeaker is connected with the microphone through the sound guide pipe and transmits sound, the controller collects first energy when the microphone is in a non-recording state and the loudspeaker is in a playing state, N loudspeaker energy ratios are calculated according to the first energy, finally when the N loudspeaker energy ratios are smaller than a first threshold value, the controller collects second energy when the loudspeaker is in the non-playing state, whether the difference value between the second energy and a reference value is smaller than a second threshold value or not is detected, if yes, the microphone is determined to be in fault, and if not, the loudspeaker is determined to be in fault. The invention connects the loudspeaker and the microphone through the sound guide pipe, and transmits the sound source played by the loudspeaker to the microphone through the sound guide pipe in the non-recording period, thereby realizing the simultaneous detection of the loudspeaker and the microphone and ensuring the fairness of the examination. In addition, the earphone does not need to be additionally provided with a sound production device like the prior art, so that devices are reduced, and the reliability of the earphone is improved.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Referring to fig. 1, it is a schematic flow chart of an embodiment of the earphone failure detection method provided in the present invention, the method includessteps 101 to 109, specifically as follows:
step 101: judging whether the loudspeaker is triggered to play voice when the microphone is in a non-recording state; if not, returning to thestep 101; if yes, go tostep 102.
In this embodiment, the controller in the headset defines 4 status points at the same time, which are: a recording start point, a recording end point, a play start point, and a play end point. The recording starting point and the recording ending point aim at the working state of the microphone, and the playing starting point and the playing ending point aim at the working state of the loudspeaker. From the corresponding start and end points, the controller may determine that the microphone is in a recording state or a non-recording state, and that the speaker is in a playing state or a non-playing state.
Step 102: acquiring a first energy at the location of the microphone; the first energy comprises: external sound energy received by the microphone and horn sound energy transmitted to the microphone by the horn through the sound guide tube; the loudspeaker is connected with the microphone through the sound guide tube.
In this embodiment, the speaker is connected to the microphone through the sound guiding tube, specifically: one end of the sound guide tube is connected to the sounding vibrating diaphragm of the loudspeaker, and the other end of the sound guide tube is connected to the vibration sensor of the microphone. The sound guide tube may be, but not limited to, closely attached to the sound producing diaphragm or the vibration sensor, and may be spaced apart by a certain distance, such as 2 mm to 3 mm.
In this embodiment, the first energy includes: external sound energy received by the microphone and horn sound energy transmitted to the microphone by the horn through the sound guide tube.
Step 103: calculating N horn energy ratios in N time periods according to the first energy; wherein N is more than or equal to 2.
In this embodiment,step 103 specifically includes: calculating N horn energy ratios in N time periods by the following formula;
αi =10log10 (Φi /Φ0 );
wherein alpha isi The unit is in dB for the ith horn energy ratio. Phi (alpha)i Is the first energy collected in the ith unit time. Phi (0 The reference value is the sum of the energies of the microphones in the interval 300Hz to 3400Hz in the quiet environment in unit time. The reference value is influenced by a plurality of parameters such as white noise after the loudspeaker is electrified, the material of the sound guide pipe, the appearance of the sound guide pipe, the type of the microphone and the like, but the reference value is a fixed parameter for the same type of earphone and is obtained by detection in a sound deadening room before delivery,
step 104: and judging whether the N horn energy ratios are all smaller than a first threshold value, if so, executing astep 106, and otherwise, executing astep 105.
In this embodiment, taking N as 10 as an explanation, if 10 horn energy ratios in 10 consecutive unit times are all smaller than the first threshold, where the first threshold is preset to be 10dB, it can be determined that the horn is out of order.
Step 105: it is determined that the microphone is not malfunctioning.
In the present embodiment, if the N horn energy ratios are not all less than the first threshold value, it may be determined that the microphone is not malfunctioning, but it may not be determined whether the horn is malfunctioning. For example, when the loudspeaker is broken, the system collects the background sound with larger external decibel as the loudspeaker playing sound, and at this time, the energy ratios of the N loudspeakers are not all smaller than the first threshold value. The invention can not identify whether the loudspeaker has a fault under the condition, but compared with the prior art, the invention can still identify whether the loudspeaker has a fault under the normal condition, therefore, the invention has creativity and practicability.
Step 106: when the loudspeaker is in a non-playing state, acquiring second energy at the position of the microphone, and calculating M loudspeaker capacity ratios in M time periods according to the second energy; wherein M is more than or equal to 2.
Step 107: and judging that the difference values of the M horn energy ratios and the preset reference value are all smaller than a second threshold value, if not, executingstep 108, and if so, executingstep 109.
In this embodiment, the second threshold is an error value, which can be adjusted by a user according to different headphone parameters, and it is only necessary to detect that the energy ratios of the M speakers are all approximately equal to the reference value, which of the microphone and the speaker fails can be described.
Step 108: and determining that the horn is faulty.
Step 109: it is determined that the microphone is malfunctioning.
On the other hand, referring to fig. 2, fig. 2 is a schematic structural diagram of an embodiment of the test-dedicated headset provided in the present invention. As shown in fig. 2, the examination-dedicated headset includes: a loudspeaker 201, a microphone 203, a sound guide tube 202 and a controller 204.
Wherein, the loudspeaker 201 is connected with the microphone 203 through the sound guide tube 202. The controller 204 is connected to the speaker 201 and the microphone 203, respectively. The controller 204 is configured to perform the headset fault detection method described above.
In this embodiment, the speaker is connected to the microphone through the sound guiding tube, specifically: one end of the sound guide tube is connected to the sounding vibrating diaphragm of the loudspeaker, and the other end of the sound guide tube is connected to the vibration sensor of the microphone.
As an example of this embodiment, the examination dedicated headset further includes: and an indicator light. The indicator light is connected to the controller 204 for activation when the controller 204 determines that the speaker 201 or the microphone 203 is malfunctioning, to instruct the inspector to replace the malfunctioning device. In addition, the earphone can be further provided with a communication module, warning information is sent to a computer terminal connected with the earphone through the communication module, the warning information can be directly displayed on the computer terminal of the examinee, and can also be directly displayed on a control computer of the invigilator, and the supervision efficiency of the invigilator on the whole process of the examination is improved.
As an example of this embodiment, the microphone 203 may be, but is not limited to, a cardioid directional microphone, which is implemented to weaken the surrounding voice signal and improve the signal-to-noise ratio of the answer of the examinee and the background sound. The heart-shaped microphone enables the front side and the back side of the sound recognizer to form sound cavities with different sizes, and experiments prove that the effect that the ratio of the volume of the spare part of the front sound cavity to the volume of the spare part of the back sound cavity is 3:1 is the best. The test result of the anechoic darkroom indicates that the difference of the sensitivity of the front side and the sensitivity of the back side can exceed 25dB, thereby being beneficial to automatic voice recognition and eliminating background sound.
Referring to fig. 3 as an example of this embodiment, fig. 3 is a schematic structural diagram of another embodiment of the test-dedicated headset according to the present invention. As shown in fig. 3, the examination-dedicated headset includes: a left horn 301, a right horn 302, a first sound tube 303, a second sound tube 304, a microphone 305, and a controller 306. The special earphone for examination in this example is provided with the double sound guide tubes respectively connected with the left side loudspeaker 301 and the right side loudspeaker 302 of the earphone, and the left side loudspeaker 301 or the right side loudspeaker 302 can be further measured to be in fault when the left side loudspeaker 301 or the right side loudspeaker 302 sends out a fault through the control of the controller to control the left side loudspeaker and the right side loudspeaker to independently sound.
As can be seen from the above, according to the earphone failure detection method and the special earphone for examination provided by the embodiments of the present invention, the speaker is connected to the microphone through the sound guide tube and transmits sound, the controller collects the first energy when the microphone is in the non-recording state and the speaker is in the playing state, and calculates the N speaker energy ratios according to the first energy, and finally, when the N speaker energy ratios are all smaller than the first threshold, the controller collects the second energy when the speaker is in the non-playing state, and at this time, it is detected whether the difference between the second energy and the reference value is smaller than the second threshold, if yes, it is determined that the microphone has failed, otherwise, it is determined that the speaker has failed. Compared with the prior art that an additional sound source is added at the position of a microphone to cause original sound damage, and a loudspeaker detection method is not adopted, the loudspeaker and the microphone are connected through the sound guide pipe, and the sound source played by the loudspeaker is transmitted to the microphone through the sound guide pipe in a non-recording period, so that simultaneous detection of the loudspeaker and the microphone is realized, and fairness of an examination is guaranteed. In addition, the earphone does not need to be additionally provided with a sounding device like the prior art, so that devices are reduced, and the reliability of the earphone is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.