Microphone sealing performance detection method and device, electronic equipment and storage medium
The audio is detected and recorded through the built-in player of the terminal device. The sealing of the microphone is determined based on the signal strength of the analog audio signal, which solves the problems of detection error and cost in the prior art, and realizes effective detection of the sealing of the microphone channel .
Patent Information
- Application Number
- CN202411191050.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-26
AI Technical Summary
The existing microphone sealability detection methods require adding hole blocks, resulting in increased costs and inability to detect the sealing effect of the internal channels, and the detection error is large.
By controlling the player built-in player of the terminal device to play the detection audio and turn on the microphone simultaneously for recording, the analog audio signal is obtained, and the sealing of the microphone is determined according to the change in signal strength within the preset time period.
Simplifies operation, saves costs, avoids detection errors, and detects poor sealing of microphone channels.
Smart Images

Figure CN119031318A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to a method, device, electronic device and storage medium for detecting the sealing performance of a microphone. Background Art
[0002] Terminal equipment has very high requirements for the sealing of microphones. Poor sealing has a great impact on audio debugging and echo effects. Therefore, many projects require testing of the sealing of microphones during the trial production stage.
[0003] At present, the main method for testing the sealing of microphones is to add a hole-blocking block to the test equipment and compare the difference in the sound pressure level (SPL) of the microphone measured before and after the hole-blocking to determine the sealing effect of the microphone. However, since the hole-blocking block needs to be added to the test equipment, the cost is increased, and factors such as different hole-blocking strengths and differences in the matching between the hole-blocking block and the microphone pickup hole will affect the judgment of the sealing of the microphone. In addition, the hole-blocking test can only test the sealing effect of the entire machine, and cannot test the sealing effect of the internal microphone channel. Summary of the invention
[0004] Based on this, it is necessary to provide a microphone sealing detection method, device, electronic device and storage medium to address the above technical problems.
[0005] The present application provides a method for detecting the sealing performance of a microphone, the method comprising:
[0006] Controlling the built-in player of the terminal device to play the detection audio and simultaneously turning on the built-in microphone of the terminal device to record;
[0007] Acquire an analog audio signal obtained by recording with the microphone;
[0008] The sealing performance of the microphone is determined according to the signal strength of the analog audio signal within a preset time period.
[0009] The present application provides a device for detecting the sealing performance of a microphone, the device comprising:
[0010] A first control module, used to control a player built into a terminal device to play the detected audio and simultaneously turn on a microphone built into the terminal device to record;
[0011] A first acquisition module, used to acquire an analog audio signal obtained by recording with the microphone;
[0012] The first determination module is used to determine the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period.
[0013] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the microphone sealing detection method provided in any embodiment of the present application are implemented.
[0014] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the microphone sealing detection method provided in any embodiment of the present application are implemented.
[0015] The microphone sealing detection method, device, electronic device and storage medium provided in the embodiments of the present application can control the built-in player of the terminal device to play the detection audio and simultaneously turn on the built-in microphone of the terminal device for recording; obtain the analog audio signal obtained by the microphone through recording; and determine the sealing of the microphone according to the signal strength of the analog audio signal within a preset time period. It can be seen that the above technical solution can play the detection audio through the built-in player and record through the built-in microphone, without the need to block the microphone pickup hole, making the operation simple, and can eliminate the production of the hole blocking block, saving costs, and because there is no need to block the microphone pickup hole, it avoids detection errors caused by different blocking strengths, differences in the matching between the hole blocking block and the microphone pickup hole, and can detect poor sealing of the microphone channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic flow chart of a method for detecting the sealing performance of a microphone in one embodiment;
[0017] Figure 2 A schematic diagram of a structure in which a microphone channel is poorly sealed in one embodiment;
[0018] Figure 3 is a schematic diagram of a digital audio signal when the sealing performance of a microphone is good in one embodiment;
[0019] Figure 4 is a schematic diagram of a digital audio signal when the sealing performance of a microphone is poor in one embodiment;
[0020] Figure 5 A schematic diagram of audio recorded by a microphone when playing 1kHz detection audio in one embodiment;
[0021] Figure 6 is a schematic structural diagram of a microphone sealing detection device in one embodiment;
[0022] Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] In one embodiment, Figure 1 As shown, a method for detecting the sealing of a microphone is provided. The method can be applied to the scenario of detecting the sealing of a microphone of a terminal device. The method can be performed by a microphone sealing detection device, which can be implemented by software and / or hardware methods and can be integrated on an electronic device. The electronic device can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. In this embodiment, the method includes the following steps:
[0025] S110: Control the player built into the terminal device to play the detection audio and simultaneously turn on the microphone built into the terminal device to record.
[0026] In an embodiment of the present application, the detection audio is pre-stored in the terminal device. After the detection is turned on, the electronic device controls the built-in player of the terminal device to play the detection audio. At this time, the electronic device synchronously controls the built-in microphone of the terminal device to record.
[0027] Specifically, the terminal device includes a player and a microphone, which can be any device whose microphone sealing is to be tested. Exemplarily, the terminal device can include but is not limited to a personal computer, a laptop, a smart phone, a tablet computer, and a portable wearable device. For example, when the terminal device is a smart phone, the player in the mobile phone is controlled to start the play function to play the pre-stored test audio, and the microphone is synchronously controlled to start the recording function.
[0028] S120: Acquire an analog audio signal obtained by recording with a microphone.
[0029] In the embodiment of the present application, when the player built into the terminal device plays the detection audio, it will make a sound, and the microphone built into the terminal device can obtain an analog audio signal by picking up the sound. For a terminal device with good sealing, the microphone only picks up the sound played by the player transmitted from the external path (i.e., direct sound). For a terminal device with poor sealing, the microphone picks up the sound played by the player transmitted from the external path, as well as various reflected sounds inside the shell of the terminal device.
[0030] For example, Figure 2As shown, the terminal device 101 includes a microphone 102 and a player 103. When the player 103 plays the detection audio, the sound emitted by the player 103 will enter the pickup hole of the microphone 102 from the external path 105 (located outside the shell of the terminal device 101), and then be transmitted to the microphone 102 through the microphone channel 107 and picked up by the microphone 102, that is, the microphone 102 can pick up the direct sound outside the shell of the terminal device 101. If there is a leakage position 104 on the microphone channel 107, when the player 103 plays the detection audio, since the sound emitted by the player 103 will be reflected inside the shell of the terminal device 101, there will be a reflected sound 106 inside the shell of the terminal device 101, and then the reflected sound 106 will enter the microphone channel 107 from the leakage position 104, so as to be picked up by the microphone 102, that is, the microphone 102 can pick up the reflected sound 106 inside the shell of the terminal device 101.
[0031] S130: Determine the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period.
[0032] In the embodiment of the present application, considering that the sealing of the microphone is good, the analog audio signal finally obtained by the microphone through recording theoretically only includes the first analog audio signal, wherein the first analog audio signal is the analog audio signal obtained by the microphone picking up the direct sound; when the sealing of the microphone is poor, the analog audio signal finally obtained by the microphone through recording theoretically includes the first analog audio signal and the second analog audio signal, wherein the second analog audio signal is the analog audio signal obtained by the microphone picking up the reflected sound. In addition, considering that the propagation path of the reflected sound is complex and long, while the propagation path of the direct sound is short, the first analog audio signal corresponds to an earlier time period on the time axis, and the second analog audio signal corresponds to a later time period on the time axis. Therefore, by analyzing the signal strength of the analog audio signal within a preset time period, the sealing of the microphone can be determined, wherein the signal strength is used to characterize the signal energy.
[0033] Specifically, the preset time period at least includes a time period corresponding to the second analog audio signal on the time axis. Optionally, the preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when recording starts is a first preset time length, and the distance between the second ending time and the time when recording starts is a second preset time length, wherein the first preset time length is less than the second preset time length.
[0034] It should be noted that the specific values of the first preset duration and the second preset duration can be set by those skilled in the art according to the actual situation such as the volume of the terminal device, and are not limited here. For example, the first preset duration can be any value within 100 microseconds to 100 milliseconds, and the second preset duration can be any value within 600 microseconds to 600 milliseconds.
[0035] Further optionally, the preset time period also includes a first preset time period, the first preset time period includes a first starting time and a first ending time, the first starting time is the time when recording starts, and the distance between the first ending time and the time when recording starts is a first preset time length.
[0036] In some embodiments, S130 includes: converting the analog audio signal into a digital audio signal, wherein the digital audio signal includes a plurality of sampling moments and their corresponding signal strengths;
[0037] The sealing of the microphone is determined based on the signal strength corresponding to the sampling time within the preset time period.
[0038] Specifically, converting an analog audio signal into a digital audio signal generally includes sampling, quantization and encoding processes, wherein sampling is collecting a signal value at regular time intervals. Therefore, a digital audio signal includes multiple sampling moments and their corresponding signal strengths.
[0039] Exemplarily, a Codec (ie, a codec) is used to convert an analog audio signal into a digital audio signal.
[0040] Specifically, the "signal strength of the digital audio signal within a preset time period" can be compared with the signal strength of the reference audio signal within a preset time period to determine the sealing of the microphone, wherein the reference audio signal is a digital audio signal obtained by digitally converting an analog audio signal obtained by recording with the microphone when the sealing of the microphone is good. If the "signal strength of the digital audio signal within a preset time period" is greater than the signal strength of the reference audio signal within the preset time period, it means that the sealing of the microphone is poor.
[0041] Exemplarily, the preset time period includes a first preset time period and a second preset time period. Figure 3 As shown in FIG. 1 , the “signal strength of the reference audio signal in the preset time period” only includes the first digital audio signal 201 (corresponding to time T0) after the first analog audio signal is digitally converted. Figure 4As shown in FIG. 1 , “the signal strength of the digital audio signal in the preset time period” includes not only the first digital audio signal 201 (corresponding to time T0) after the first analog audio signal is digitally converted, but also the second digital audio signal 202 (corresponding to time T1-T6) after the second analog audio signal is digitally converted. Due to the existence of the second digital audio signal 202, “the signal strength of the digital audio signal in the preset time period” must be greater than “the signal strength of the reference audio signal in the preset time period”. For example, Figure 5 As shown, when a 1kHz detection signal is played, if the sealing of the microphone is good, a reverberation without internal reflection sound can be obtained (including only the first audio signal 301 corresponding to the direct sound); when a 1kHz detection signal is played, if the sealing of the microphone is poor, a reverberation including internal reflection sound can be obtained (including the first audio signal 301 corresponding to the direct sound and the second audio signal 302 corresponding to the reflected sound).
[0042] It can be understood that by converting analog audio signals into digital audio signals, continuous time signals can be discretized and continuous amplitude signals (i.e., signal strength) can be discretized, so that the preset time period includes multiple discrete sampling moments and their corresponding signal strengths, which facilitates various subsequent calculations and processing. This is helpful to improve the computational difficulty of microphone sealing detection.
[0043] In some other embodiments, S130 includes: calculating an average value of the signal strength of the analog audio signal within a second preset time period; if the average value is greater than a preset threshold, determining that the sealing of the microphone is poor; if the average value is less than or equal to the preset threshold, determining that the sealing of the microphone is good.
[0044] In the above-mentioned method for detecting the tightness of the microphone, the player built into the terminal device can be controlled to play the detection audio and the microphone built into the terminal device can be turned on synchronously for recording; the analog audio signal obtained by the microphone through recording is obtained; and the tightness of the microphone is determined according to the signal strength of the analog audio signal within a preset time period. It can be seen that the above-mentioned technical solution can be used to play the detection audio through the player built into the terminal device and record through the built-in microphone, without the need to block the microphone pickup hole, making the operation simple, and the production of the hole blocking block can be eliminated, saving costs, and since there is no need to block the microphone pickup hole, the detection errors caused by different blocking strengths, differences in the coordination between the hole blocking block and the microphone pickup hole, etc. are avoided, and poor sealing of the microphone channel can be detected.
[0045] In some embodiments, the preset time period includes a first preset time period, the first preset time period includes a first start time and a first end time, the first start time is the time when the recording starts, and the first end time is a first preset time length from the time when the recording starts;
[0046] The method of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes:
[0047] For the signal strength corresponding to the sampling moments within the preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a first sum value;
[0048] Divide the first sum by the total number of sampling moments and then take a square root to obtain a first square root value, wherein the total number of sampling moments is the total number of sampling moments in a preset time period;
[0049] For the signal strength corresponding to the sampling moments within the first preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a second sum value;
[0050] Divide the second sum by the total number of sampling moments and then take the square root to obtain a second square root value;
[0051] The sealing of the microphone is determined based on the first square root value and the second square root value.
[0052] Specifically, the preset time period includes a first preset time period and a second preset time period. Therefore, the "signal strength corresponding to the sampling moment within the preset time period" mentioned here means "signal strength corresponding to the sampling moment within the first preset time period and the second preset time period".
[0053] Specifically, if there is only one sampling moment within the first preset time period, the signal strength corresponding to the sampling moment within the first preset time period is squared to obtain the second sum value; if there are multiple sampling moments within the second preset time period, the signal strength corresponding to each sampling moment within the first preset time period is squared and then summed to obtain the second sum value.
[0054] For example, Figure 4 As shown, the preset time period includes 6 sampling moments, namely, T0, T1, T2, T3, T4, T5 and T6. The squares of the signal strengths corresponding to the 6 sampling moments are added together to obtain a first sum value. The first sum value is divided by the total number of sampling moments (i.e., 7) and then squared to obtain a first square root value, as follows:
[0055]
[0056] Among them, A0 is the signal strength corresponding to time T0, A1 is the signal strength corresponding to time T1, A2 is the signal strength corresponding to time T2, A3 is the signal strength corresponding to time T3, A4 is the signal strength corresponding to time T4, A5 is the signal strength corresponding to time T5, and A6 is the signal strength corresponding to time T6.
[0057] The sampling time in the first preset time period is time T0. After squaring the signal strength corresponding to time T0, a second sum value can be obtained. The second sum value is divided by the total number of sampling times (i.e. 7) and then squared to obtain a second square root value, as follows:
[0058]
[0059] Will and By comparing them, you can determine the tightness of the microphone's seal.
[0060] In the above scheme, the first root mean square value and the second root mean square value are calculated to represent the "signal strength of the digital audio signal within the preset time period" and the "signal strength of the reference audio signal within the preset time period" respectively, and then a size comparison is performed. This can make the comparison method of "the signal strength of the digital audio signal within the preset time period" and "the signal strength of the reference audio signal within the preset time period" simpler, which is conducive to improving the convenience of microphone sealing detection.
[0061] In some embodiments, if the second square root value is equal to the first square root value, it is determined that the sealing of the microphone is good; if the second square root value is greater than the first square root value, it is determined that the sealing of the microphone is poor.
[0062] For example, if the microphone has good sealing performance, since times T1, T2, T3, T4, T5 and T6 are within the time period when the microphone picks up reflected sound, their corresponding signal strengths should be 0, and the first root mean square value and the second root mean square value should be equal.
[0063] Therefore, if Make sure the microphone seal is not good; if Make sure the microphone has a good seal.
[0064] In the above scheme, by reasonably setting the first preset time period and the second preset time period, the first preset time period can correspond to the direct sound, and the second preset time period can correspond to the reflected sound. As long as the environment is kept quiet when the microphone sealing test is performed, the signal strength of the second analog audio signal can be 0 when the sealing is good. At this time, the sealing of the microphone can be determined by directly comparing the second square root value with the first square root value. The amount of calculation is small, which is beneficial to improving the detection efficiency of the microphone sealing test.
[0065] In some embodiments, determining the sealing of the microphone according to the first square root value and the second square root value includes:
[0066] Calculate the difference between the first square root value and the second square root value;
[0067] If the difference is greater than a preset difference threshold, it is determined that the sealing of the microphone is poor;
[0068] If the difference is less than or equal to the preset difference threshold, it is determined that the sealing of the microphone is good.
[0069] Specifically, the difference is obtained by subtracting the second square root value from the first square root value.
[0070] It should be noted that the specific value of the preset difference threshold can be set by those skilled in the art according to actual conditions and is not limited here.
[0071] In the above scheme, in theory, the first preset time period corresponds to direct sound, and the second preset time period corresponds to reflected sound. However, when the first preset time period and the second preset time period are improperly set and there is a deviation, there may be part of the time period in the second preset time period that corresponds to the direct sound. Therefore, by setting the difference to compare with the preset difference threshold, the sealing detection of the microphone can be made more accurate.
[0072] In some embodiments, the preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when the recording starts is a first preset time length, and the distance between the second ending time and the time when the recording starts is a second preset time length;
[0073] The sealing performance of the microphone is determined according to the signal strength corresponding to the sampling time within the second preset time period.
[0074] In the above scheme, it is taken into account that by reasonably setting the first preset time period and the second preset time period, the first preset time period can correspond to the direct sound, and the second preset time period can correspond to the reflected sound, and as long as the environment is kept quiet during the sealing detection, the signal strength of the second analog audio signal can be 0 when the sealing is good. Whether the sealing of the microphone is good is mainly reflected in the "signal strength corresponding to the sampling moment within the second preset time period". At this time, the sealing of the microphone is determined according to the signal strength corresponding to the sampling moment within the second preset time period, with less calculation amount, which is conducive to improving the detection efficiency of the sealing detection of the microphone.
[0075] In some embodiments, determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the second preset time period includes:
[0076] Calculate an average value for the signal strength corresponding to the sampling time within the second preset time period, and if the average value is greater than a preset average threshold, determine that the sealing of the microphone is poor; if the average value is less than or equal to the preset average threshold, determine that the sealing of the microphone is good;
[0077] Alternatively, for the signal strength corresponding to the sampling moment within the second preset time period, the total number of signal strengths greater than the preset strength threshold is counted. If the total number is greater than the preset total number threshold, it is determined that the sealing of the microphone is poor; if the total number is less than or equal to the preset total number threshold, it is determined that the sealing of the microphone is good.
[0078] It should be noted that the specific values of the preset average threshold, the preset intensity threshold and the preset total threshold can be set by those skilled in the art according to actual conditions and are not limited here.
[0079] In the above scheme, by comparing the average value of the signal strength corresponding to the sampling moment within the second preset time period with the preset average threshold, or the total number of signal strengths greater than the preset strength threshold with the preset total threshold, the sealing of the microphone can be determined simply and quickly with less calculation, which is beneficial to improving the detection efficiency of the sealing detection of the microphone.
[0080] In some embodiments, determining that the seal of the microphone is poor includes:
[0081] For the signal strength corresponding to the sampling time in the second preset time period, detecting whether it shows a decay trend over time;
[0082] Detecting whether the digital audio signal within a first preset time period and the digital audio signal within a second preset time period come from the same sound source;
[0083] If there is a decaying trend and the sound comes from the same source, it is determined that the microphone seal is poor.
[0084] Specifically, the energy of the leaked sound is continuously attenuated during the process of continuous reflection inside the shell of the terminal device. Therefore, when the second preset time period corresponds to the reflected sound, the signal strength corresponding to the sampling moment within the second preset time period should show a decaying trend over time. If it does not show a decaying trend, it is very likely that it is affected by external noise.
[0085] Specifically, the direct sound and the reflected sound have the same source, so the digital audio signal in the first preset time period and the digital audio signal in the second preset time period should come from the same sound source. If they do not come from the same sound source, they are likely to be affected by external noise.
[0086] It should be noted that any possible method known to those skilled in the art can be used to detect whether the digital audio signal within the first preset time period and the digital audio signal within the second preset time period come from the same sound source, such as through voiceprint recognition, spectrum analysis, etc., but is not limited to this.
[0087] In the above scheme, by taking the fact that the signal strength corresponding to the sampling moment in the second preset time period shows a decaying trend over time and the digital audio signal in the first preset time period and the digital audio signal in the second preset time period come from the same sound source as the necessary conditions for determining that the sealing of the microphone is poor, the detection error caused by external noise interference can be reduced, and the accuracy of the sealing detection of the microphone can be improved.
[0088] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0089] In one embodiment, Figure 6 As shown, a microphone sealing detection device is provided, comprising:
[0090] The first control module 610 is used to control the player built into the terminal device to play the detected audio and simultaneously turn on the microphone built into the terminal device to record;
[0091] A first acquisition module 620 is used to acquire an analog audio signal obtained by recording with a microphone;
[0092] The first determination module 630 is used to determine the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period.
[0093] Optionally, the first determining module 630 includes:
[0094] A first conversion submodule, configured to convert an analog audio signal into a digital audio signal, wherein the digital audio signal includes a plurality of sampling moments and their corresponding signal strengths;
[0095] The first determination submodule is used to determine the sealing performance of the microphone according to the signal strength corresponding to the sampling time within a preset time period.
[0096] Optionally, the preset time period includes a first preset time period, the first preset time period includes a first start time and a first end time, the first start time is a time when recording starts, and the first end time is a first preset time length from the time when recording starts;
[0097] Wherein, the first determination submodule includes:
[0098] A first summing unit, for obtaining a first sum value by summing the squares of the signal strengths corresponding to the sampling moments within a preset time period;
[0099] A first square root unit, used for dividing the first sum by the total number of sampling moments and then performing a square root operation to obtain a first square root value, wherein the total number of sampling moments is the total number of sampling moments in a preset time period;
[0100] A second adding unit is used for square and sum the signal strengths corresponding to the sampling moments within the first preset time period to obtain a second sum value;
[0101] A second square root unit, used for taking the square root of the second sum value divided by the total number of sampling moments to obtain a second square root value;
[0102] The first determining unit is used to determine the sealing performance of the microphone according to the first square root value and the second square root value.
[0103] Optionally, the first determining unit is specifically configured to determine that the sealing performance of the microphone is good if the second square root value is equal to the first square root value;
[0104] If the second square root value is greater than the first square root value, it is determined that the sealing of the microphone is poor.
[0105] Optionally, the preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when the recording starts is a first preset time length, and the distance between the second ending time and the time when the recording starts is a second preset time length;
[0106] Wherein, the first determination submodule includes:
[0107] The second determination unit is used to determine the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the second preset time period.
[0108] Optionally, the second determination unit is specifically used to calculate an average value for the signal strength corresponding to the sampling time within the second preset time period, and if the average value is greater than a preset average threshold, it is determined that the sealing of the microphone is poor; if the average value is less than or equal to the preset average threshold, it is determined that the sealing of the microphone is good;
[0109] Alternatively, for the signal strength corresponding to the sampling moment within the second preset time period, the total number of signal strengths greater than the preset strength threshold is counted. If the total number is greater than the preset total number threshold, it is determined that the sealing of the microphone is poor; if the total number is less than or equal to the preset total number threshold, it is determined that the sealing of the microphone is good.
[0110] Optionally, any one of the first determining unit and the second determining unit includes a determining subunit configured to determine whether the sealing of the microphone is poor.
[0111] The determination subunit is specifically used to detect whether the signal strength corresponding to the sampling time in the second preset time period shows a decay trend over time;
[0112] Detecting whether the digital audio signal within a first preset time period and the digital audio signal within a second preset time period come from the same sound source;
[0113] If there is a decaying trend and the sound comes from the same source, it is determined that the microphone seal is poor.
[0114] In the above-mentioned microphone sealing detection device, it is possible to control the built-in player of the terminal device to play the detection audio and simultaneously turn on the built-in microphone of the terminal device for recording; obtain the analog audio signal obtained by the microphone through recording; and determine the sealing of the microphone according to the signal strength of the analog audio signal within a preset time period. It can be seen that the above-mentioned technical solution can play the detection audio through the player of the terminal device and record it through the built-in microphone, without the operation of blocking the microphone pickup hole, making the operation simple, and can cancel the production of the hole blocking block, saving costs, and because there is no need to block the microphone pickup hole, it avoids the detection errors caused by different blocking strengths, differences in the matching between the hole blocking block and the microphone pickup hole, and can detect poor sealing of the microphone channel.
[0115] For the specific definition of the microphone sealing detection device, please refer to the definition of the microphone sealing detection method above, which will not be repeated here. Each module in the above-mentioned microphone sealing detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0116] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for detecting the sealing of a microphone is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0117] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0118] In one embodiment, the microphone sealing detection device provided in the present application can be implemented in the form of a computer program. The computer program can be used in Figure 7 The memory of the electronic device may store various program modules constituting the sealing detection device of the microphone, for example, Figure 6 The first control module 610, the first acquisition module 620, and the first determination module 630 are shown. The computer program composed of various program modules enables the processor to execute the steps of the microphone sealing detection method of various embodiments of the present application described in this specification.
[0119] For example, Figure 7 The electronic device shown can be Figure 6 The first control module 610 in the device shown controls the built-in player of the terminal device to play the detected audio and simultaneously turns on the built-in microphone of the terminal device for recording; the electronic device can obtain the analog audio signal obtained by the microphone through recording through the first acquisition module 620; the electronic device can determine the sealing of the microphone according to the signal strength of the analog audio signal within a preset time period through the first determination module 630.
[0120] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: controlling a player built into a terminal device to play detection audio and synchronously turning on a microphone built into the terminal device for recording; obtaining an analog audio signal obtained by the microphone through recording; and determining the sealing of the microphone based on the signal strength of the analog audio signal within a preset time period.
[0121] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period, including:
[0122] Converting the analog audio signal into a digital audio signal, wherein the digital audio signal includes a plurality of sampling moments and their corresponding signal strengths;
[0123] The sealing of the microphone is determined based on the signal strength corresponding to the sampling time within the preset time period.
[0124] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the preset time period includes a first preset time period, the first preset time period includes a first start time and a first end time, the first start time is the time when the recording starts, and the first end time is a first preset time length from the time when the recording starts;
[0125] The method of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes:
[0126] For the signal strength corresponding to the sampling moments within the preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a first sum value;
[0127] Divide the first sum by the total number of sampling moments and then take a square root to obtain a first square root value, wherein the total number of sampling moments is the total number of sampling moments in a preset time period;
[0128] For the signal strength corresponding to the sampling moments within the first preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a second sum value;
[0129] Divide the second sum by the total number of sampling moments and then take the square root to obtain a second square root value;
[0130] The sealing of the microphone is determined based on the first square root value and the second square root value.
[0131] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing property of the microphone according to the first square root value and the second square root value, including:
[0132] If the second square root value is equal to the first square root value, it is determined that the sealing of the microphone is good;
[0133] If the second square root value is greater than the first square root value, it is determined that the sealing of the microphone is poor.
[0134] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when the recording starts is a first preset time length, and the distance between the second ending time and the time when the recording starts is a second preset time length;
[0135] The method of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes:
[0136] The sealing performance of the microphone is determined according to the signal strength corresponding to the sampling time within the second preset time period.
[0137] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the second preset time period, including:
[0138] Calculate an average value for the signal strength corresponding to the sampling time within the second preset time period, and if the average value is greater than a preset average threshold, determine that the sealing of the microphone is poor; if the average value is less than or equal to the preset average threshold, determine that the sealing of the microphone is good;
[0139] Alternatively, for the signal strength corresponding to the sampling moment within the second preset time period, the total number of signal strengths greater than the preset strength threshold is counted. If the total number is greater than the preset total number threshold, it is determined that the sealing of the microphone is poor; if the total number is less than or equal to the preset total number threshold, it is determined that the sealing of the microphone is good.
[0140] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining whether the sealing of the microphone is poor, including:
[0141] For the signal strength corresponding to the sampling time in the second preset time period, detecting whether it shows a decay trend over time;
[0142] Detecting whether the digital audio signal within a first preset time period and the digital audio signal within a second preset time period come from the same sound source;
[0143] If there is a decaying trend and the sound comes from the same source, it is determined that the microphone seal is poor.
[0144] In the above electronic device, the built-in player of the terminal device can be controlled to play the detection audio and simultaneously turn on the built-in microphone of the terminal device for recording; the analog audio signal obtained by the microphone through recording is obtained; and the sealing of the microphone is determined according to the signal strength of the analog audio signal within a preset time period. It can be seen that the above technical solution can play the detection audio through the built-in player and record through the built-in microphone, without the need to block the microphone pickup hole, making the operation simple, and the production of the hole blocking block can be eliminated, saving costs, and since there is no need to block the microphone pickup hole, the detection errors caused by different blocking strengths, differences in the matching between the hole blocking block and the microphone pickup hole, etc. are avoided, and poor sealing of the microphone channel can be detected.
[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: controlling a player built into a terminal device to play detection audio and synchronously turning on a microphone built into the terminal device for recording; obtaining an analog audio signal obtained by the microphone through recording; and determining the sealing of the microphone based on the signal strength of the analog audio signal within a preset time period.
[0146] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period, including:
[0147] Converting the analog audio signal into a digital audio signal, wherein the digital audio signal includes a plurality of sampling moments and their corresponding signal strengths;
[0148] The sealing of the microphone is determined based on the signal strength corresponding to the sampling time within the preset time period.
[0149] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the preset time period includes a first preset time period, the first preset time period includes a first start time and a first end time, the first start time is the time when the recording starts, and the first end time is a first preset time length from the time when the recording starts;
[0150] The method of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes:
[0151] For the signal strength corresponding to the sampling moments within the preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a first sum value;
[0152] Divide the first sum by the total number of sampling moments and then take a square root to obtain a first square root value, wherein the total number of sampling moments is the total number of sampling moments in a preset time period;
[0153] For the signal strength corresponding to the sampling moments within the first preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a second sum value;
[0154] Divide the second sum by the total number of sampling moments and then take the square root to obtain a second square root value;
[0155] The sealing of the microphone is determined based on the first square root value and the second square root value.
[0156] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing property of the microphone according to the first square root value and the second square root value, including:
[0157] If the second square root value is equal to the first square root value, it is determined that the sealing of the microphone is good;
[0158] If the second square root value is greater than the first square root value, it is determined that the sealing of the microphone is poor.
[0159] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when the recording starts is a first preset time length, and the distance between the second ending time and the time when the recording starts is a second preset time length;
[0160] The method of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes:
[0161] The sealing performance of the microphone is determined according to the signal strength corresponding to the sampling time within the second preset time period.
[0162] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the second preset time period, including:
[0163] Calculate an average value for the signal strength corresponding to the sampling time within the second preset time period, and if the average value is greater than a preset average threshold, determine that the sealing of the microphone is poor; if the average value is less than or equal to the preset average threshold, determine that the sealing of the microphone is good;
[0164] Alternatively, for the signal strength corresponding to the sampling moment within the second preset time period, the total number of signal strengths greater than the preset strength threshold is counted. If the total number is greater than the preset total number threshold, it is determined that the sealing of the microphone is poor; if the total number is less than or equal to the preset total number threshold, it is determined that the sealing of the microphone is good.
[0165] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining whether the sealing of the microphone is poor, including:
[0166] For the signal strength corresponding to the sampling time in the second preset time period, detecting whether it shows a decay trend over time;
[0167] Detecting whether the digital audio signal within a first preset time period and the digital audio signal within a second preset time period come from the same sound source;
[0168] If there is a decaying trend and the sound comes from the same source, it is determined that the microphone seal is poor.
[0169] In the above-mentioned storable medium, it is possible to control the built-in player of the terminal device to play the detection audio and simultaneously turn on the built-in microphone of the terminal device for recording; obtain the analog audio signal obtained by the microphone through recording; and determine the sealing of the microphone according to the signal strength of the analog audio signal within a preset time period. It can be seen that the above-mentioned technical solution can play the detection audio through the built-in player and record through the built-in microphone, without the operation of blocking the microphone pickup hole, making the operation simple, and can cancel the production of the hole blocking block, saving costs, and because there is no need to block the microphone pickup hole, it avoids the detection errors caused by different blocking strengths, differences in the coordination between the hole blocking block and the microphone pickup hole, and can detect poor sealing of the microphone channel.
[0170] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0172] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for detecting the sealing performance of a microphone, It is characterized in that The method comprises: Controlling the built-in player of the terminal device to play the detection audio and simultaneously turning on the built-in microphone of the terminal device to record; Acquire an analog audio signal obtained by recording with the microphone; The sealing performance of the microphone is determined according to the signal strength of the analog audio signal within a preset time period.
2. The method according to claim 1, It is characterized in that The step of determining the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period includes: Converting the analog audio signal into a digital audio signal, wherein the digital audio signal includes a plurality of sampling moments and their corresponding signal strengths; The sealing performance of the microphone is determined according to the signal strength corresponding to the sampling time within the preset time period.
3. The method according to claim 2, It is characterized in that The preset time period includes a first preset time period, the first preset time period includes a first starting time and a first ending time, the first starting time is the time when the recording starts, and the distance between the first ending time and the time when the recording starts is a first preset time length; Wherein, determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes: For the signal strength corresponding to the sampling moments within the preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a first sum value; Divide the first sum by the total number of sampling moments and then take a square root to obtain a first square root value, wherein the total number of sampling moments is the total number of sampling moments in the preset time period; For the signal strength corresponding to the sampling moments within the first preset time period, square the signal strength corresponding to each sampling moment and add them up to obtain a second sum value; Divide the second sum by the total number of sampling moments and then take the square root to obtain a second square root value; The sealing quality of the microphone is determined according to the first square root value and the second square root value.
4. The method according to claim 3, It is characterized in that The step of determining the sealing performance of the microphone according to the first square root value and the second square root value includes: If the second square root value is equal to the first square root value, it is determined that the sealing performance of the microphone is good; If the second square root value is greater than the first square root value, it is determined that the sealing of the microphone is poor.
5. The method according to claim 2, It is characterized in that The preset time period includes a second preset time period, the second preset time period includes a second starting time and a second ending time, the distance between the second starting time and the time when the recording starts is a first preset time length, and the distance between the second ending time and the time when the recording starts is a second preset time length; Wherein, determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the preset time period includes: The sealing performance of the microphone is determined according to the signal strength corresponding to the sampling moment within the second preset time period.
6. The method according to claim 5, It is characterized in that The step of determining the sealing performance of the microphone according to the signal strength corresponding to the sampling time within the second preset time period includes: Calculate an average value for the signal strength corresponding to the sampling time within the second preset time period, and if the average value is greater than a preset average threshold, determine that the sealing of the microphone is poor; if the average value is less than or equal to the preset average threshold, determine that the sealing of the microphone is good; Alternatively, for the signal strength corresponding to the sampling moment within the second preset time period, the total number of signal strengths greater than a preset strength threshold is counted; if the total number is greater than the preset total number threshold, it is determined that the sealing of the microphone is poor; if the total number is less than or equal to the preset total number threshold, it is determined that the sealing of the microphone is good.
7. The method according to claim 4 or 6, It is characterized in that Determining that the sealing of the microphone is poor includes: For the signal strength corresponding to the sampling time in the second preset time period, detecting whether it shows a decay trend over time; Detecting whether the digital audio signal within the first preset time period and the digital audio signal within the second preset time period come from the same sound source; If there is a decaying trend and the sound comes from the same sound source, it is determined that the sealing of the microphone is poor.
8. A microphone sealing detection device, It is characterized in that The device comprises: A first control module, used to control a player built into a terminal device to play the detected audio and simultaneously turn on a microphone built into the terminal device to record; A first acquisition module, used to acquire an analog audio signal obtained by recording with the microphone; The first determination module is used to determine the sealing performance of the microphone according to the signal strength of the analog audio signal within a preset time period.
9. An electronic device comprising a microphone, a player, a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Audio test method, electronic device, computer program product and chip system
CN121645115A
