Microphone measurement method, equipment and medium

CN119603619APending Publication Date: 2025-03-11SHENZHEN W D DETECTION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411610982.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

现有技术一般通过手动校准进行麦克风的测试,测试得到的数据误差过大,测试效率低、测试效果差

Benefits of technology

[0053] Implementing the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a microphone measurement method, including: calibrating the hardware device and obtaining initialized hardware, the hardware device characterizes the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; excites signals to the speaker through the upper computer and the sound card to make the speaker play excitation audio; collects the excitation audio through the microphone to be tested and generates a microphone signal; preprocessing the microphone signal through the upper computer obtains a preprocessing signal, and the preprocessing characterizes channel separation and frequency point data separation; optimizes the preprocessing signal through the upper computer to data to obtain an optimized signal; converts the optimized signal through the upper computer to data to obtain a measurement signal, and the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibels. By calibrating the hardware device, the interference of the hardware device's own factors on microphone testing is reduced, the accuracy of the test is improved, and the measurement signal is obtained by performing different processing of the collected microphone signals, filtering out interference noise, good test effect, and automatic test, improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603619A_ABST
    Figure CN119603619A_ABST
Patent Text Reader

Abstract

The invention discloses a microphone measurement method, equipment and a medium. The method comprises the following steps: calibrating hardware equipment to obtain initialized hardware; a microphone signal is generated after the excitation audio is collected by the microphone to be tested; preprocessing the microphone signal to obtain a preprocessed signal; performing data optimization on the preprocessed signal to obtain an optimized signal; and performing data conversion on the optimized signal to obtain a measurement signal, wherein the measurement signal comprises sensitivity, total harmonic distortion, frequency response and decibel. By calibrating the hardware equipment, interference of factors of the hardware equipment on microphone testing is reduced, the testing precision is improved, the measurement signals are obtained by performing different processing on the collected microphone signals, interference noise is filtered out, the testing effect is good, testing is completed automatically, and the testing efficiency is improved. The method can be widely applied to the technical field of microphone testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microphone testing technology, and in particular to a microphone measuring method, device and medium. Background Art

[0002] During the microphone production process, it is necessary to test various parameters of the microphone, such as decibel value, harmonics, sensitivity, background noise, etc. The test process usually involves playing audio through a speaker. After the microphone receives the sound, various parameters are obtained by analyzing the sound received by the microphone. The prior art generally tests the microphone through manual calibration, and the error of the test data is too large, the test efficiency is low, and the test effect is poor. Summary of the invention

[0003] In view of this, an object of the embodiments of the present invention is to provide a microphone measurement method, device and medium, which can improve the test efficiency and test effect of the microphone.

[0004] In a first aspect, an embodiment of the present invention provides a microphone measurement method, which is applied to a microphone measurement system, wherein the microphone measurement system includes a host computer, a sound card, a standard microphone, a speaker, and a microphone to be tested, and the microphone measurement method includes:

[0005] After calibrating the hardware device, the initialized hardware is obtained, wherein the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker;

[0006] Sending an excitation signal to the speaker through the host computer and the sound card, so that the speaker plays the excitation audio;

[0007] After collecting the excitation audio through the microphone to be tested, a microphone signal is generated;

[0008] Preprocessing the microphone signal by the host computer to obtain a preprocessed signal, wherein the preprocessing represents channel separation and frequency point data separation;

[0009] The host computer performs data optimization on the preprocessed signal to obtain an optimized signal;

[0010] The host computer performs data conversion on the optimization signal to obtain a measurement signal, which includes sensitivity, total harmonic distortion, frequency response and decibel.

[0011] In some optional embodiments, the step of calibrating the hardware device to obtain the initialized hardware includes:

[0012] Calibrate the input channel and output channel of the sound card to obtain an initialized sound card;

[0013] Calibrate the standard microphone to obtain an initialized standard microphone;

[0014] The speaker is calibrated based on the initialization standard microphone to obtain an initialized speaker, and the initialization hardware includes the initialization sound card, the initialization standard microphone and the initialization speaker.

[0015] In some optional embodiments, calibrating the input channel and the output channel of the sound card to obtain the initialized sound card includes:

[0016] Setting the digital reference voltage of the output channel;

[0017] Calculating a first maximum effective value of the digital reference voltage, and obtaining a proportionality coefficient by calculating the digital reference voltage and the first maximum effective value;

[0018] Measuring a first voltage analog quantity of the output channel;

[0019] Calculate the second maximum effective value of the first voltage analog quantity according to the proportionality coefficient;

[0020] Calculate and obtain a first peak voltage of the output channel according to the second maximum effective value;

[0021] Connecting the output channel to the input channel;

[0022] Acquire a second voltage analog value of the input channel;

[0023] Obtaining a second peak voltage of the input channel by calculation according to the first peak voltage, the digital reference voltage and the second voltage analog quantity;

[0024] The initialized sound card is obtained by configuring the peak voltage of the output channel to be the first peak voltage and the peak voltage of the input channel to be the second peak voltage.

[0025] In some optional embodiments, calibrating the standard microphone to obtain the initialized standard microphone includes:

[0026] Inserting the standard microphone into the calibrator and setting the sound of the calibrator;

[0027] Measuring a first voltage after the standard microphone receives the sound of the calibrator;

[0028] The first voltage is corrected according to the calibrated voltage of the standard microphone and then saved in a first calibration file.

[0029] In some optional embodiments, calibrating the speaker based on the initialization standard microphone to obtain the initialized speaker includes:

[0030] Generating a sine wave of a preset frequency to the speaker so that the speaker outputs a calibrated audio;

[0031] Control the initialized standard microphone to record the calibration audio to obtain a standard microphone voltage;

[0032] Adjusting the output gain of the speaker so that the standard microphone voltage is equal to the first voltage;

[0033] Testing the frequency response curve of the speaker by using audio of a preset octave and a preset frequency;

[0034] Adjusting the speaker gain corresponding to each frequency point in the frequency response curve so that each frequency point has a preset sensitivity to the sine wave of the preset frequency;

[0035] The gain coefficient of the speaker gain corresponding to each frequency point is saved in a gain array, and the gain array is saved in a second verification file. The speaker having the gain coefficient is the initialized speaker.

[0036] In some optional embodiments, the channel separation includes:

[0037] After performing interval unit data sampling on the microphone signal, a first array is obtained, and remaining data of the microphone signal is configured as a second array;

[0038] The first array is configured as left channel data, and the second array is configured as right channel data.

[0039] In some optional embodiments, the frequency point data separation includes:

[0040] Obtaining a sampling frequency of the microphone signal;

[0041] Get the duration of each frequency point in the frequency sweep;

[0042] Calculate the number of samples of a single frequency point according to the sampling frequency and the duration;

[0043] Calculate the theoretical sampling quantity according to the sampling number;

[0044] Calculating a sampling delay based on the theoretical number of samples;

[0045] The audio data of each frequency point is extracted based on the sampling delay to obtain the preprocessed signal.

[0046] In some optional embodiments, the step of performing data optimization on the preprocessed signal by the host computer to obtain an optimized signal includes:

[0047] Removing 10% of the data before and after each frequency point in the preprocessed signal by the host computer to obtain first intermediate data;

[0048] Removing the maximum value and the minimum value of the first intermediate data to obtain second intermediate data;

[0049] The data of each frequency point in the second intermediate data is cut to obtain the third intermediate data, so that the starting point and the ending point of each frequency point are both Sin(90 ° );

[0050] The optimized signal is obtained by periodically extending each frequency point in the third intermediate data.

[0051] In a second aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the steps of the above method are implemented when the computer program is executed by the processor.

[0052] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to perform the method as described above.

[0053] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a microphone measurement method, including: obtaining initialization hardware after calibrating the hardware device, the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; sending an excitation signal to the speaker through the host computer and the sound card, so that the speaker plays the excitation audio; generating a microphone signal after collecting the excitation audio through the microphone to be tested; preprocessing the microphone signal through the host computer to obtain a preprocessed signal, the preprocessing represents channel separation and frequency point data separation; optimizing the preprocessed signal through the host computer to obtain an optimized signal; converting the optimized signal through the host computer to obtain a measurement signal, the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibel. By calibrating the hardware device, the interference of the hardware device's own factors on the microphone test is reduced, the accuracy of the test is improved, the measurement signal is obtained by performing different processing on the collected microphone signal, the interference noise is filtered out, the test effect is good, the test is completed automatically, and the test efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a structural block diagram of a microphone measurement system provided by an embodiment of the present invention;

[0055] Figure 2is a flowchart of the steps of a microphone measurement method provided by an embodiment of the present invention;

[0056] Figure 3 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0058] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0059] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0060] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0061] The embodiment of the present invention provides a microphone measurement method, device and medium, wherein a microphone measurement method includes: calibrating the hardware device to obtain the initialized hardware, the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; through the host computer and the sound card, the speaker is stimulated by the signal, so that the speaker plays the excitation audio; the microphone signal is generated after the excitation audio is collected by the microphone to be tested; the microphone signal is preprocessed by the host computer to obtain a preprocessed signal, and the preprocessing represents the channel separation and the frequency point data separation; the preprocessed signal is optimized by the host computer to obtain the optimized signal; the optimized signal is converted by the host computer to obtain the measurement signal, and the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibel. By calibrating the hardware device, the interference of the hardware device's own factors on the microphone test is reduced, and the accuracy of the test is improved. By performing different processing on the collected microphone signal to obtain the measurement signal, the interference noise is filtered out, the test effect is good, the test is completed automatically, and the test efficiency is improved.

[0062] The allocation method of the embodiment of the present invention is further described below.

[0063] Reference Figure 1 , Figure 1 The specific microphone measurement system of the embodiment of the present invention includes a host computer, a sound card, a standard microphone, a speaker and a microphone to be tested. The microphone measurement system can also be provided with multiple manipulators to complete the test of multiple microphones to be tested. The multiple microphones to be tested can be transmitted to the manipulator through a transmission belt, and the microphone to be tested is moved to the test position by the manipulator. After the test is completed, the microphone to be tested is moved to the corresponding storage area. Specifically, the quality level or defect of the microphone can be determined according to the test result of the microphone, so that the microphone to be tested is placed in different storage areas according to the corresponding quality level or defect. The host computer uniformly controls the microphone measurement system and receives the corresponding microphone signal, and processes and generates the corresponding measurement signal. The sound card can convert the digital audio signal into an analog signal and output the sound through the connected speaker or speaker; through the microphone or other audio input device, the sound card can capture the sound and convert it into a digital signal for the host computer to process. The speaker can be calibrated by a standard microphone to ensure the audio output quality of the speaker.

[0064] Figure 2 A flowchart of a microphone measurement method provided by an embodiment of the present invention, the microphone measurement method includes but is not limited to the following steps:

[0065] S100, calibrating the hardware device to obtain initialized hardware, wherein the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker;

[0066] S200, sending an excitation signal to the speaker through the host computer and the sound card, so that the speaker plays an excitation audio;

[0067] S300, generating a microphone signal after collecting the excitation audio through the microphone to be tested;

[0068] S400, preprocessing the microphone signal by the host computer to obtain a preprocessed signal, wherein the preprocessing represents channel separation and frequency point data separation;

[0069] S500, optimizing the preprocessed signal by the host computer to obtain an optimized signal;

[0070] S600, obtaining a measurement signal by performing data conversion on the optimization signal through the host computer, wherein the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibel.

[0071] It should be noted that the initialized hardware is a calibrated sound card, a standard microphone and a speaker; after calibration, the excitation audio is output through the speaker, and the microphone signal collected by the microphone to be tested is processed by the sound card and transmitted to the host computer for processing to obtain the corresponding measurement signal, thereby completing the test of the microphone. The tested microphone is removed by the robot and replaced with other microphones to be tested, thereby completing continuous testing of multiple microphones, with high test efficiency, low test cost, automated test completion and good test effect. Specifically, the sound card configuration will be performed after the sound card is calibrated: first, obtain the list of sound cards inserted in the system, read the preset equalizer configuration, and then configure the equalizer of the sound card inserted in the system; switch the sound card of the current system to the saved sound card (that is, bind the inserted sound card so that the system defaults to the inserted sound card); switch the current audio source input channel to the saved input channel, and switch the current audio source output channel to the saved output channel (that is, bind the output / input channel, and configure the input / output channel of the inserted sound card to the saved input / output channel, so that the system defaults to it as the audio input / output channel); match the Vp (peak voltage) calibration information of the current sound card in the saved calibration information (that is, the calibration information of the bound sound card), and then complete the sound card configuration.

[0072] In some optional embodiments, when initializing, the present application also includes initializing the system software, specifically including: 1. Setting the test type, including "testing the sensitivity of the microphone", "testing the frequency response curve of the microphone", "testing the frequency sweep of the microphone at a certain frequency", "sweeping frequency and sweeping amplitude test, and measuring the total harmonic distortion under the microphone amplitude", "testing the sound leakage of the microphone", "microphone amplitude impact test", etc., which are not specifically limited here; 2. Setting the test range, that is, setting the range of the sweeping frequency test or the sweeping amplitude test; 3. Setting the octave, that is, testing the octave of the frequency sweep.

[0073] In some optional embodiments, step S100 includes but is not limited to the following steps: calibrating the input channel and the output channel of the sound card to obtain an initialized sound card; calibrating the standard microphone to obtain an initialized standard microphone; calibrating the speaker based on the initialized standard microphone to obtain an initialized speaker, and the initialized hardware includes the initialized sound card, the initialized standard microphone and the initialized speaker.

[0074] In some optional embodiments, the step of calibrating the input channel and output channel of the sound card to obtain an initialized sound card includes: setting a digital reference voltage of the output channel; calculating a first maximum effective value of the digital reference voltage, and calculating a proportionality coefficient through the digital reference voltage and the first maximum effective value; measuring a first voltage analog quantity of the output channel; calculating a second maximum effective value of the first voltage analog quantity according to the proportionality coefficient; calculating a first peak voltage of the output channel according to the second maximum effective value; connecting the output channel to the input channel; obtaining a second voltage analog quantity of the input channel; calculating a second peak voltage of the input channel according to the first peak voltage, the digital reference voltage, and the second voltage analog quantity; and obtaining the initialized sound card after configuring the peak voltage of the output channel to the first peak voltage and the peak voltage of the input channel to the second peak voltage.

[0075] Specifically, the calibration of the sound card is to perform Vp calibration on the output channel of the sound card and Vp calibration on the input channel of the sound card; that is, to calibrate the calibration value of the electrical sensitivity of the input / output channel of the sound card, where the Vp value represents the maximum peak value of the sine wave, that is, the peak voltage. When calibrating the output channel, first set the digital reference voltage Digital Ref Vrms corresponding to the output channel = 1 / 4; measure the voltage analog value Analog Measure OutputVrms of the output channel of the current sound card, that is, the actual output voltage of the output channel; calculate the first maximum effective value of the digital reference voltage It is the RMS value of the digital reference voltage. By dividing the first maximum effective value by the digital reference voltage, the proportional coefficient between the voltage value and the effective value is obtained, that is, the proportional coefficient k = (Digital MaxVrms) ÷ (Digital Ref Vrms); by multiplying the proportional coefficient by the first voltage analog value of the output channel, the second maximum effective value of the first voltage analog value of the output channel can be obtained, Analog Max Vrms = (Analog Measure OutputVrms) × k; the second maximum effective value is divided by one, and then divided by the square root of two to obtain the first peak voltage of the output channel, that is, the first peak voltage That is to say, the Vp calibration of the output channel is completed.

[0076] When performing Vp calibration of the input channel: connect the output channel to the input channel so that the output channel and the input channel have the same digital reference voltage, read the second voltage analog quantity Analog ReadInputVrms of the current input channel, which is the voltage input value of the input channel; calculate the second peak voltage Analog Input Vp of the input channel according to the first peak voltage, the digital reference voltage and the second voltage analog quantity = [(Digital Ref Vrms) ÷ (AnalogRead Input Vrms)] × (Analog Output Vp).

[0077] In some optional embodiments, calibrating the standard microphone to obtain an initialized standard microphone includes: inserting the standard microphone into a calibrator and setting the calibrator to emit sound; measuring a first voltage of the standard microphone after receiving the sound of the calibrator; and correcting the first voltage according to the calibrated voltage of the standard microphone and saving it to a first verification file.

[0078] Specifically, the robot or other equipment can be controlled to insert the standard microphone into the calibrator, and the calibrator is set to sound, generally set to 1kHz@94dBSPL (sound wave with a frequency of 1000 Hz, and a sound pressure level of 94 decibels). Measure the voltage of the standard microphone at this time, and refer to the factory calibration voltage of the standard microphone to ensure that the voltage is within the calibration error range. Record the first voltage value: v_std_mic_cal, and save it as the first calibration file: std_mic_cal_input1.

[0079] In some optional embodiments, the calibrating the speaker based on the initialization standard microphone to obtain the initialized speaker includes: generating a sine wave of a preset frequency to the speaker so that the speaker outputs a calibration audio; controlling the initialization standard microphone to record the calibration audio to obtain a standard microphone voltage; adjusting the output gain of the speaker so that the standard microphone voltage is equal to the first voltage; testing the frequency response curve of the speaker through audio of a preset octave and a preset frequency; adjusting the speaker gain corresponding to each frequency point in the frequency response curve so that each frequency point has a preset sensitivity to the sine wave of the preset frequency; saving the gain coefficient of the speaker gain corresponding to each frequency point to a gain array, and saving the gain array to a second verification file, and the speaker with the gain coefficient is the initialized speaker.

[0080] Specifically, when calibrating the speaker, first call the first calibration file generated after the standard microphone is calibrated: std_mic_cal_input1. Generate a sine wave signal with a frequency of 1000 Hz to the speaker, the speaker outputs the calibration audio, and starts the standard microphone (initialized standard microphone after calibration) for recording, and adjust the output gain speaker_ref_gai of the speaker until the voltage of the standard microphone is equal to the first voltage value v_std_mic_cal; then set the octave to R40, and the sound wave signal with a frequency of 100-10KHz to test the frequency response curve of the speaker, and adjust the speaker gain corresponding to each frequency point according to the frequency response curve, so that each frequency point and the preset frequency sine wave (that is, when a 1000 Hz sine wave is input to the speaker, the output gain speaker_ref_gai of the speaker) has a preset sensitivity. Save the gain coefficient of each frequency point as the gain array speaker_cal_gain_array, and save the gain array to the second calibration file speaker_cal_output1.

[0081] In some optional embodiments, an excitation signal is sent to the speaker through the host computer and the sound card to make the speaker play the excitation audio, specifically including: setting the sampling frequency std_mic_sample_rate when the microphone collects signals, the length frame_size of the sampling frame, and creating MicSampleData after starting sampling; at the same time, setting the octave tone_octave, the duration tone_frequency_duration of each frequency point and the waveform type wave_type of the swept frequency sound source played by the speaker, and after the setting is completed, reading the reference gain speaker_ref_gain, matching the FR (sensitivity) calibration gain of the frequency point from the gain array speaker_cal_gain_array, generating audio data tone_wave, waiting for recording delay synchronization, and then playing the set excitation audio through the speaker.

[0082] In some optional embodiments, the channel separation includes: sampling the microphone signal at intervals to obtain a first array, and configuring the remaining data of the microphone signal as a second array; configuring the first array as left channel data and the second array as right channel data.

[0083] Specifically, channel separation is to separate the microphone signal collected by the microphone to be tested into left channel and right channel, that is, to separate the left channel data and right channel data in the microphone signal. The microphone signal contains the byte data of the left and right channels, and the sampling depth is 32 bits, that is, every 4 bytes are one audio data. Therefore, every 4 bytes are merged into a floating-point data. The floating-point audio data group AIISamples obtained after the merger is separated into channels. The AIISamples array contains the left and right channel data, and its arrangement is ABAB, so the left channel data and the right channel data can be obtained after skip sampling, that is, the left channel data is A, and the right channel data is B.

[0084] In some optional embodiments, the frequency point data separation includes: obtaining the sampling frequency of the microphone signal; obtaining the duration of each frequency point in the frequency sweep; calculating the number of samples of a single frequency point based on the sampling frequency and the duration; obtaining a theoretical number of samples based on the number of samples; calculating a sampling delay based on the theoretical number of samples; and extracting the audio data of each frequency point based on the sampling delay to obtain the preprocessed signal.

[0085] Specifically, since the microphone under test is subjected to a frequency sweep test, the sampled data (i.e., the microphone signal) contains data of all frequency points, so the data of each frequency point must be separated before the result calculation can be performed. First, obtain the sampling frequency SampleRate of the microphone signal, obtain the duration Duration PerFrequency of each frequency point in the frequency sweep, and calculate the number of samples of a single frequency point based on the sampling frequency and duration, that is, the number of samples SampleCount Per Frequency = Duration Per Frequency ÷ SampleRte; calculate the theoretical number of samples based on the number of samples, which is the theoretical number of samples of a single frequency point, Valid Sample Count = SampleCount Per Fre quency × Sample Count Per Frequency, where the number of samples is Valid SampleCount. Calculate sampling delay: Because there is a time difference between the start of audio playback and the start of sampling, plus the hardware input delay, the sampling input will be slower than the audio output. To ensure that the complete audio output data can be recorded, the input acquisition usually precedes the audio output. Therefore, the first sampled data in the collected data is not the expected audio data, but the noise data before the audio output begins. Therefore, the valid audio samples are found in the sampled data and the invalid noise samples are removed. The specific calculation and processing of sampling delay includes: obtaining the number of synchronous waiting samples Delay Samples for acquisition and output, that is, the number of samples corresponding to the microphone signal that has not been processed; obtaining the theoretical first frame (the first sampling frequency point) data, that is, calculating the first frame data Frame according to the number of synchronous waiting samples Delay Samples and the number of samples of a single frequency point; calculating the effective value FrameRms of Frame, and then traversing all samples SamplesData to find the inflection point. When the inflection point value is greater than FrameRms, this inflection point value is the starting point of the effective audio sampling. Extracting audio sampling data from the starting point to obtain valid audio data Tone Samples, that is, to obtain the preprocessed signal.

[0086] In some optional embodiments, the optimizing the preprocessed signal by the host computer to obtain the optimized signal includes: removing 10% of the data before and after each frequency point in the preprocessed signal by the host computer to obtain the first intermediate data; removing the maximum value and the minimum value of the first intermediate data to obtain the second intermediate data; cutting the data of each frequency point in the second intermediate data to obtain the third intermediate data, so that the starting point and the end point of each frequency point are both Sin(90 ° ); performing period expansion on each frequency point in the third intermediate data to obtain the optimized signal.

[0087] Specifically, when the host computer optimizes the data, it removes 10% of the data before and after each frequency point in the preprocessed signal, that is, the effective audio data ToneSamples, to obtain the first intermediate data. The maximum and minimum values ​​of the first intermediate data are removed to obtain the second intermediate data, and the data of each frequency point of Tone Samples is trimmed so that the starting point and the ending point of each frequency point are both Sin(90 ° ), thereby reducing signal leakage during the period extension, thereby ensuring the quality of signal processing. Periodically extending each frequency point of the third intermediate data to obtain new frequency point data is to optimize the signal Samples PerFrequency.

[0088] In some optional embodiments, the host computer performs data conversion on the optimization signal to obtain a measurement signal, including: 1. Performing root mean square conversion on the optimization signal Samples Per Frequency to obtain a root mean square optimization signal 2. Fourier transform: Specifically, perform Fourier transform on the optimized signal SamplesPer Frequency to obtain the frequency domain expression of each frequency point; 3. Perform dB conversion based on the optimized signal after Fourier transform to obtain the decibel of the optimized signal SamplesPer Frequency, perform FR conversion to obtain the specific frequency response curve, perform Sens conversion to obtain the sensitivity, and perform THD conversion to obtain the total harmonic distortion. Thus, the required measurement signal is obtained, and the quality and defects of the microphone to be tested can be determined based on the measurement signal.

[0089] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a microphone measurement method, including: obtaining initialization hardware after calibrating the hardware device, the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; sending an excitation signal to the speaker through the host computer and the sound card, so that the speaker plays the excitation audio; generating a microphone signal after collecting the excitation audio through the microphone to be tested; preprocessing the microphone signal through the host computer to obtain a preprocessed signal, the preprocessing represents channel separation and frequency point data separation; optimizing the preprocessed signal through the host computer to obtain an optimized signal; converting the optimized signal through the host computer to obtain a measurement signal, the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibel. By calibrating the hardware device, the interference of the hardware device's own factors on the microphone test is reduced, the accuracy of the test is improved, the measurement signal is obtained by performing different processing on the collected microphone signal, the interference noise is filtered out, the test effect is good, the test is completed automatically, and the test efficiency is improved.

[0090] like Figure 3 As shown, in the second aspect, an embodiment of the present invention further provides a computer device, which can be a terminal. The computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, enable the processor to execute any one of the methods for visualizing management of industrial equipment. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium, which, when executed by the processor, enables the processor to execute any one of the methods for visualizing management of industrial equipment. The network interface is used for network communications, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include Figure 3 More or less components shown in, or some components are combined, or there are different component arrangements. It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In one embodiment, the processor is used to run a computer program stored in a memory to implement the following steps: calibrating the hardware device to obtain initialized hardware, the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; sending an excitation signal to the speaker through the host computer and the sound card so that the speaker plays the excitation audio; collecting the excitation audio through the microphone to be tested to generate a microphone signal; preprocessing the microphone signal through the host computer to obtain a preprocessed signal, the preprocessing represents channel separation and frequency point data separation; optimizing the preprocessed signal through the host computer to obtain an optimized signal; converting the optimized signal through the host computer to obtain a measurement signal, the measurement signal includes sensitivity, total harmonic distortion, frequency response and decibel.

[0091] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0092] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0093] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as processors, such as software executed by a central processing unit, a digital information processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other data processing technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, program modules, or other data in modulated data information such as carrier waves or other transport mechanisms, and may include any information delivery media.

[0094] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.

Claims

1. A microphone measurement method, characterized in that: Applied to a microphone measurement system, the microphone measurement system includes a host computer, a sound card, a standard microphone, a speaker and a microphone to be tested, and the microphone measurement method includes: After calibrating the hardware device, the initialized hardware is obtained, wherein the hardware device represents the sound card, the standard microphone and the speaker, and the standard microphone is used to calibrate the speaker; Sending an excitation signal to the speaker through the host computer and the sound card, so that the speaker plays the excitation audio; After collecting the excitation audio through the microphone to be tested, a microphone signal is generated; Preprocessing the microphone signal by the host computer to obtain a preprocessed signal, wherein the preprocessing represents channel separation and frequency point data separation; The host computer performs data optimization on the preprocessed signal to obtain an optimized signal; The host computer performs data conversion on the optimization signal to obtain a measurement signal, which includes sensitivity, total harmonic distortion, frequency response and decibel.

2. The method according to claim 1, characterized in that: The step of calibrating the hardware device to obtain the initialized hardware includes: Calibrate the input channel and output channel of the sound card to obtain an initialized sound card; Calibrate the standard microphone to obtain an initialized standard microphone; The speaker is calibrated based on the initialization standard microphone to obtain an initialized speaker, and the initialization hardware includes the initialization sound card, the initialization standard microphone and the initialization speaker.

3. The method according to claim 2, characterized in that The step of calibrating the input channel and the output channel of the sound card to obtain an initialized sound card includes: Setting the digital reference voltage of the output channel; Calculating a first maximum effective value of the digital reference voltage, and obtaining a proportionality coefficient by calculating the digital reference voltage and the first maximum effective value; Measuring a first voltage analog quantity of the output channel; Calculate the second maximum effective value of the first voltage analog quantity according to the proportionality coefficient; Calculate and obtain a first peak voltage of the output channel according to the second maximum effective value; Connecting the output channel to the input channel; Acquire a second voltage analog value of the input channel; Obtaining a second peak voltage of the input channel by calculation according to the first peak voltage, the digital reference voltage and the second voltage analog quantity; The initialized sound card is obtained by configuring the peak voltage of the output channel to be the first peak voltage and the peak voltage of the input channel to be the second peak voltage.

4. The method according to claim 2, characterized in that: The step of calibrating the standard microphone to obtain an initialized standard microphone includes: Inserting the standard microphone into the calibrator and setting the sound of the calibrator; Measuring a first voltage after the standard microphone receives the sound of the calibrator; The first voltage is corrected according to the calibrated voltage of the standard microphone and then saved in a first calibration file.

5. The method according to claim 4, characterized in that The step of calibrating the speaker based on the initialization standard microphone to obtain the initialized speaker comprises: Generating a sine wave of a preset frequency to the speaker so that the speaker outputs a calibrated audio; Control the initialized standard microphone to record the calibration audio to obtain a standard microphone voltage; Adjusting the output gain of the speaker so that the standard microphone voltage is equal to the first voltage; Testing the frequency response curve of the speaker by using audio of a preset octave and a preset frequency; Adjusting the speaker gain corresponding to each frequency point in the frequency response curve so that each frequency point has a preset sensitivity to the sine wave of the preset frequency; The gain coefficient of the speaker gain corresponding to each frequency point is saved in a gain array, and the gain array is saved in a second verification file. The speaker having the gain coefficient is the initialized speaker.

6. The method according to claim 1, characterized in that The channel separation comprises: After performing interval unit data sampling on the microphone signal, a first array is obtained, and remaining data of the microphone signal is configured as a second array; The first array is configured as left channel data, and the second array is configured as right channel data.

7. The method according to claim 1, characterized in that The frequency point data separation includes: Obtaining a sampling frequency of the microphone signal; Get the duration of each frequency point in the frequency sweep; Calculate the number of samples of a single frequency point according to the sampling frequency and the duration; Calculate the theoretical sampling quantity according to the sampling number; Calculating a sampling delay based on the theoretical number of samples; The audio data of each frequency point is extracted based on the sampling delay to obtain the preprocessed signal.

8. The method according to claim 7, characterized in that The step of optimizing the preprocessed signal by the host computer to obtain an optimized signal includes: Removing 10% of the data before and after each frequency point in the preprocessed signal by the host computer to obtain first intermediate data; Removing the maximum value and the minimum value of the first intermediate data to obtain second intermediate data; The data of each frequency point in the second intermediate data is cut to obtain the third intermediate data, so that the starting point and the ending point of each frequency point are both Sin(90 ° ); The optimized signal is obtained by periodically extending each frequency point in the third intermediate data.

9. A computer device, wherein: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 8 when executed by the processor.