Audio testing method and device, electronic equipment and storage medium
By using Fourier transform and wavelet transform, the audio signals from the microphone's monitoring port and audio output port are converted into frequency domain signals for correlation calculation, which solves the problem of low accuracy in audio testing in existing technologies and achieves higher testing accuracy and improved product quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IFLYTEK CO LTD
- Filing Date
- 2023-05-30
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies that test the audio output and listening ports of microphone devices by human hearing cannot meet the needs of users with high acoustic requirements, resulting in low accuracy of audio test results.
Fourier transform is used to convert the audio signals from the microphone's monitoring port and audio output port into frequency domain signals. Correlation calculation is used to determine whether the two signals are the same. Wavelet transform is then used for noise reduction to improve test accuracy.
It improves the accuracy of audio test results for microphone equipment, increases the defect detection rate and the yield rate of finished products, enhances user satisfaction, and can provide feedback to technical personnel to improve the internal circuit design and process of the product.
Smart Images

Figure CN116506788B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information processing technology, and in particular to an audio testing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Microphone devices can output received audio signals to other application devices such as speakers, mobile phones, or computers. During the manufacturing process of microphone devices, the output audio signals are tested.
[0003] The usual testing method involves manually testing the microphone equipment. Specifically, an earphone cable is plugged into the microphone's monitoring port and audio output port, and the user listens to determine whether the microphone can output sound from these ports. If both ports output sound, the microphone passes the test and is considered a qualified product; if neither port outputs sound, the microphone fails the test and is considered a defective product.
[0004] However, for users with high acoustic requirements, simply testing that the monitoring port and audio output port produce sound is insufficient. In other words, the method of manually testing the microphone device reduces the accuracy of the audio test results. Summary of the Invention
[0005] This invention provides an audio testing method, apparatus, electronic device, and storage medium to address the shortcomings of low accuracy in audio testing of microphone devices by manual means in the prior art, thereby achieving the goal of improving the accuracy of audio testing.
[0006] This invention provides an audio testing method applied to a microphone device, the microphone device including a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter; the method includes:
[0007] Acquire a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of the receiver, and the second audio signal is a signal acquired from the audio output port of the receiver;
[0008] The first audio signal is converted into a first frequency domain signal, and the second audio signal is converted into a second frequency domain signal;
[0009] The correlation between the first frequency domain signal and the second frequency domain signal is calculated, and the first frequency domain signal and the second frequency domain signal are determined to be the same based on the calculation results.
[0010] According to the audio testing method provided by the present invention, converting the first audio signal into a first frequency domain signal includes:
[0011] Based on a preset number of sampling points, the first audio signal is converted into the first frequency domain signal through Fourier transform;
[0012] The step of converting the second audio signal into a second frequency domain signal includes:
[0013] Based on the preset number of sampling points, the second audio signal is converted into the second frequency domain signal through the Fourier transform.
[0014] According to the audio testing method provided by the present invention, converting the first audio signal into the first frequency domain signal through Fourier transform includes:
[0015] The first audio signal is windowed based on the preset number of sampling points to obtain a first windowed audio signal;
[0016] The first windowed audio signal is converted into the first frequency domain signal through the Fourier transform;
[0017] The step of converting the second audio signal into the second frequency domain signal through Fourier transform includes:
[0018] The second audio signal is windowed based on the preset number of sampling points to obtain the second windowed audio signal;
[0019] The second windowed audio signal is converted into the second frequency domain signal through the Fourier transform.
[0020] According to the audio testing method provided by the present invention, the method further includes:
[0021] The first frequency domain signal is denoised using wavelet transform to obtain a first denoised signal. Based on the first denoised signal corresponding to each microphone device, the first noise reduction performance detection result of each microphone device is determined; and / or,
[0022] The second frequency domain signal is denoised based on wavelet transform to obtain a second denoised signal. Based on the second denoised signal corresponding to each microphone device, the second noise reduction performance test result of each microphone device is determined. Each microphone device is equipped with the same noise reduction algorithm.
[0023] According to the audio testing method provided by the present invention, determining the first noise reduction performance test result of each microphone device based on the first noise cancellation signal corresponding to each microphone device includes:
[0024] For each of the microphone devices, a first error is determined based on the signal value corresponding to each frequency point in the first noise cancellation signal corresponding to the microphone device;
[0025] The first noise reduction performance test result of each microphone device is determined based on the difference between each of the first errors;
[0026] The step of determining the second noise reduction performance detection result of each microphone device based on the second noise cancellation signal corresponding to each microphone device includes:
[0027] For each of the microphone devices, a second error is determined based on the signal value corresponding to each frequency point in the second noise cancellation signal corresponding to the microphone device;
[0028] The second noise reduction performance test result of each microphone device is determined based on the difference between each of the second errors.
[0029] According to the audio testing method provided by the present invention, the microphone device further includes a second transmitter, and the receiver is further configured to receive the target audio signal output by the second transmitter;
[0030] When the receiver is in mono mode, the first audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
[0031] When the receiver is in stereo mode, the first audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
[0032] According to the audio testing method provided by the present invention, the method further includes:
[0033] If, based on the calculation results, it is determined that the first frequency domain signal and the second frequency domain signal are different, the identification information of the microphone device is stored in the detection list.
[0034] The present invention also provides an audio testing device applied to a microphone device, the microphone device including a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter; the device includes:
[0035] An acquisition unit is used to acquire a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of the receiver, and the second audio signal is a signal acquired from the audio output port of the receiver;
[0036] The conversion unit is used to convert the first audio signal into a first frequency domain signal and the second audio signal into a second frequency domain signal;
[0037] The determining unit is used to perform correlation calculation on the first frequency domain signal and the second frequency domain signal, and determine whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result.
[0038] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the audio testing methods described above.
[0039] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the audio testing method as described above.
[0040] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the audio testing method as described above.
[0041] This invention provides an audio testing method, apparatus, electronic device, and storage medium. The method acquires a first audio signal from the receiver's monitoring port and a second audio signal from the receiver's audio output port, and tests the two audio signals acquired from the receiver. The first audio signal is converted into a first frequency domain signal, and the second audio signal is converted into a second frequency domain signal. Through signal conversion, the time-domain audio signal can be converted into a frequency-domain audio signal. Analysis and comparison are performed in the frequency domain dimension of the audio signals, combining information such as the frequency and phase of the audio signals themselves to analyze the correlation between the two sets of signals. The correlation between the first and second frequency domain signals is calculated, and based on the calculation results, it is determined whether the first and second frequency domain signals are the same. Calculating the correlation between the two audio signals in the frequency domain dimension determines the similarity between the two audio signals, thereby determining whether the first and second audio signals acquired from the receiver are the same. It can be seen that this invention tests the consistency of the audio signals from the monitoring port and the audio output port, thereby improving the accuracy of audio test results for microphone devices. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the audio testing method provided in an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the audio testing system provided in an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of the structure of the audio testing device provided in an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0048] It should be noted that the serial numbers assigned to the objects described in this invention, such as "first" and "second", are only used to distinguish the objects being described and do not have any sequential or technical meaning.
[0049] With the development of mobile internet and smart mobile terminals, users' audio source acquisition devices have gradually shifted from traditional microphones to portable mobile terminal devices, and the device connection method has also gradually evolved from wired connection to wireless connection, such as wireless microphone devices.
[0050] In some scenarios, users are unable to know whether the audio received by the microphone device is the audio they want and attempt to assist in the judgment through the monitoring port. Although the monitoring port and the audio output port of the microphone device are the same path in terms of the principle of circuit design, due to factors such as circuit design, cable layout, or module assembly, the final produced finished product cannot ensure that the audio signals output by each path are consistent, that is, there are significant differences in the acoustic effects of the audio at the monitoring port and the acoustic effects of the audio at the audio output port. When the sound effect monitored by the user is the sound effect they want, but the audio output by the audio output port is inconsistent with the audio output by the monitoring port, it may cause the sound effect of the audio output by the audio output port to not meet the user's expectations, resulting in a decrease in the user's satisfaction with the microphone device.
[0051] In the prior art, audio testing of the microphone device is performed manually. When sound output can be heard at both the monitoring port and the audio output port, it is determined that the microphone device is qualified. This testing method is limited by the differences in human ear hearing and cannot test the consistency of the acoustic effects of the audio output by the monitoring port and the audio output port, resulting in a relatively low accuracy of the audio test results of the microphone device.
[0052] Based on this, the embodiments of the present invention provide an audio testing method, device, electronic device, and storage medium. This method obtains a first audio signal from the monitoring port of the receiver and a second audio signal from the audio output port of the receiver, and tests these two audio signals. During the test, the first audio signal is converted into a first frequency-domain signal, and the second audio signal is converted into a second frequency-domain signal. The above two signals are analyzed and compared in the frequency-domain dimension of the signal, the correlation between the signals is calculated, and based on the calculation result, it is determined whether the above two signals are the same signal, which can greatly improve the accuracy of the audio test results of the microphone device.
[0053] The method of the present invention can be applied to the scenario of audio detection of microphone devices on the production line. Using this method to perform audio testing on microphone devices can improve the detection rate of defective products, improve the yield rate of factory products, and enhance user satisfaction. At the same time, the defective products detected by using this method can be fed back to the technical personnel to improve the technologies or processes such as circuit design, cable layout, and module assembly inside the product to improve the product quality.
[0054] The following combines Figure 1 and Figure 2 to describe the audio testing method provided by the embodiments of the present invention.
[0055] Figure 1This is a flowchart illustrating the audio testing method provided in this embodiment of the invention. The subject executing this method can be an electronic device such as a mobile phone, camera, computer, server, or acoustic processing module, or a specially designed smart device, or an audio testing device installed in the electronic device or smart device. The audio testing device can be implemented through software, hardware, or a combination of both.
[0056] The audio testing method provided in this invention can be applied to a microphone device, which includes a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter. Figure 1 As shown, the method includes the following steps 110 to 130.
[0057] Step 110: Acquire the first audio signal and the second audio signal; the first audio signal is the signal collected from the receiver's listening port, and the second audio signal is the signal collected from the receiver's audio output port.
[0058] For example, the target audio signal can be any audio signal received or acquired by the first transmitter. For instance, the first transmitter receives an audio signal sent by a sound source device for testing; or, the first transmitter acquires an audio signal formed after the sound is emitted by a sound source. The first transmitter outputs the target audio signal, which can be received by the receiver. The method of transmitting the target audio signal can be arbitrary; for example, the first transmitter and receiver are electrically connected, and the target audio signal is transmitted via wired or wireless transmission.
[0059] The receiver includes a listening port and an audio output port. After receiving the target audio signal, the receiver can output the target audio signal through the audio output port; alternatively, it can process the target audio signal before outputting it through the audio output port. Signal processing of the target audio signal includes, but is not limited to, noise reduction processing.
[0060] Understandably, the audio output port serves as an interface for the receiver to transmit audio signals to other application devices, while the monitoring port is used to listen to the audio signal output from the audio output port. The first audio signal can be obtained through the monitoring port, and the second audio signal can be obtained through the audio output port. Both the first and second audio signals are generated based on the same target audio signal.
[0061] For example, Figure 2 This is a schematic diagram of the audio testing system provided in an embodiment of the present invention, as shown below. Figure 2As shown, the sound source computer 20 is communicatively connected to the first transmitter 201. The sound source computer 20 inputs a fixed-frequency audio signal to the first transmitter 201, and the first transmitter 201 generates a target audio signal after receiving the fixed-frequency audio signal. The receiver 21 includes a listening port 211 and an audio output port 212. The listening port 211 and the audio output port 212 are respectively connected to the acoustic processing module 22, which is connected to the analysis computer 23. The first transmitter 201 outputs the target audio signal to the receiver 21 via wireless transmission. After receiving the target audio signal, the receiver 21 outputs it through the listening port 211 and the audio output port 212. The acoustic processing module 22 can acquire a second audio signal based on the target audio signal through the audio output port 212, and acquire a first audio signal based on the target audio signal through the listening port 211. The acoustic processing module 22 inputs the first audio signal and the second audio signal into the analysis computer 23 respectively, and uses the analysis computer 23 to analyze and compare the first audio signal and the second audio signal to determine whether they are the same. It should be noted that the sound source computer 20, the acoustic processing module 22, and the analysis computer 23 can be separate devices, or they can be a single device composed of different functional modules. For example, an acoustic processing module can be loaded into a single computer, which can then send audio signals to the first transmitter 201, acquire the first and second audio signals, and analyze and compare them. Furthermore, the computer can record all data generated during the audio testing process, such as the device number of each microphone and the corresponding test results.
[0062] Step 120: Convert the first audio signal into a first frequency domain signal and convert the second audio signal into a second frequency domain signal.
[0063] For example, after acquiring the first audio signal and the second audio signal, it is necessary to perform signal conversion on the first audio signal and the second audio signal respectively, converting the time domain signal into a frequency domain signal, and then perform signal analysis and comparison on the converted first frequency domain signal and the second frequency domain signal to achieve the analysis and comparison of the first audio signal and the second audio signal.
[0064] The first audio signal is converted into a first frequency domain signal, for example, by converting the first audio signal into a first frequency domain signal through Fourier transform, or by converting the first audio signal into a first frequency domain signal through Fourier series, or by other methods. The second audio signal is converted into a second frequency domain signal, which can be done using the same conversion method as the first audio signal to the first frequency domain signal, or by a different method, depending on actual needs. This embodiment of the invention does not impose any restrictions on this.
[0065] By converting the first audio signal and the second audio signal into first frequency domain signals and second frequency domain signals respectively, the information of the audio signal can be analyzed and compared in the frequency domain dimension using the constructed two sets of frequency domain signals. The differences between the two sets of frequency domain signals can be deeply analyzed from aspects such as frequency, phase, and amplitude, so as to obtain analysis results that can accurately reflect the signal itself and improve the accuracy of audio test results.
[0066] Step 130: Perform correlation calculation on the first frequency domain signal and the second frequency domain signal, and determine whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation results.
[0067] For example, correlation calculation can be performed by analyzing and comparing the correlation between a first frequency domain signal and a second frequency domain signal. When calculating the correlation between the first and second frequency domain signals, signal correlation calculation methods can be used. For instance, based on the frequency domain energy distributions of the first and second frequency domain signals, the frequency domain energy correlation coefficient between the two signals can be calculated, and this coefficient can be used as the result of the correlation calculation. The Pearson product-moment correlation coefficient algorithm can be used when calculating the frequency domain energy correlation coefficient.
[0068] The determination of whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation results can be understood as the first frequency domain signal and the second frequency domain signal being completely identical, or as the first frequency domain signal and the second frequency domain signal being approximately identical. It can be determined according to different test accuracy requirements.
[0069] When high testing accuracy is required, if the correlation calculation results of the first and second frequency domain signals indicate that they are identical signals, then the first and second frequency domain signals are determined to be the same signal, and consequently, the first and second audio signals are also determined to be the same signal. When lower testing accuracy is required, if the correlation calculation results of the first and second frequency domain signals indicate that they are approximately the same signal, then the first and second frequency domain signals are determined to be the same signal, and consequently, the first and second audio signals are also determined to be the same signal.
[0070] For example, based on a first frequency domain signal, and using the real and imaginary parts of the first frequency domain signal, a first ratio can be obtained between the sum of energy within any frequency band of the first frequency domain signal and the total energy of the first frequency domain signal. Differentiating this first ratio yields a first derivative, which represents the frequency domain energy distribution of the first frequency domain signal. Similarly, a second derivative can be obtained based on a second frequency domain signal, representing its frequency domain energy distribution. Furthermore, based on the first derivative, the second derivative, and their product, the frequency domain energy correlation coefficient between the first and second frequency domain signals can be obtained. This correlation coefficient reflects the correlation between the two signals. For instance, a correlation coefficient close to 1 indicates that the first and second frequency domain signals tend to be similar; a correlation coefficient far from 1 indicates that the first and second frequency domain signals tend to be different.
[0071] For example, when determining whether a first frequency domain signal and a second frequency domain signal are the same based on the correlation calculation results, a threshold can be set to judge the correlation calculation results. For example, if the threshold is set to 0.8, when the frequency domain energy correlation coefficient between the first and second frequency domain signals is less than 0.8, the first and second frequency domain signals are determined to be different; when the frequency domain energy correlation coefficient between the first and second frequency domain signals is greater than or equal to 0.8, the first and second frequency domain signals are determined to be the same.
[0072] This invention provides an audio testing method. The method acquires a first audio signal from the receiver's monitoring port and a second audio signal from the receiver's audio output port, and tests the two audio signals. The first audio signal is converted into a first frequency domain signal, and the second audio signal is converted into a second frequency domain signal. This signal conversion transforms the time-domain audio signal into a frequency-domain audio signal, allowing for analysis and comparison within the frequency domain dimension. By incorporating information such as the frequency and phase of the audio signals themselves, the correlation between the two sets of signals is analyzed. The correlation between the first and second frequency domain signals is calculated, and based on the calculation results, it is determined whether the first and second frequency domain signals are identical. Calculating the correlation between the two audio signals in the frequency domain dimension determines their similarity, thereby determining whether the first and second audio signals acquired from the receiver are identical. Therefore, this invention tests the consistency of the audio signals from the monitoring port and the audio output port, thus improving the accuracy of audio test results for microphone devices.
[0073] To improve the accuracy of signal analysis and comparison by analyzing and comparing two sets of signals in the frequency domain, the time-domain signal can be converted into a frequency-domain signal. Specifically, Fourier transform can be used for signal conversion.
[0074] In one embodiment, converting a first audio signal into a first frequency domain signal includes: converting the first audio signal into a first frequency domain signal through a Fourier transform based on a preset number of sampling points; converting a second audio signal into a second frequency domain signal includes: converting the second audio signal into a second frequency domain signal through a Fourier transform based on a preset number of sampling points.
[0075] For example, when performing frequency domain signal conversion on the first audio signal and the second audio signal using Fourier transform, it can be based on a preset number of sampling points. The preset number of sampling points could be, for example, 256 sampling points. The Fourier transform can be a Fast Fourier Transform (FFT) or a Discrete Fourier Transform (DFT), etc.
[0076] For example, the acquired first audio signal is converted into a first frequency domain signal using a Fast Fourier Transform (FFT), which is the first frequency domain spectrum corresponding to the first frequency domain signal; the acquired second audio signal is converted into a second frequency domain signal using a FFT, which is the second frequency domain spectrum corresponding to the second frequency domain signal. The following example illustrates the conversion of the first audio signal to a first frequency domain signal using an FFT. The conversion methods for both sets of audio signals are the same; the method for converting the second audio signal to a second frequency domain signal using an FFT will not be repeated.
[0077] Based on the first audio signal, 256 sampling points are selected, i.e., 256 frequency points are selected. Based on the sampling theorem and the frequency range of audio signals that the human ear can distinguish, the sampling frequency of the first audio signal is determined. The sampling theorem states that during signal conversion, when the sampling frequency is greater than or equal to twice the highest frequency in the signal, the sampled signal can completely retain the information in the original signal. The frequency range of audio signals that the human ear can distinguish is from 20Hz to 20000Hz, of which 8000Hz is the highest frequency to which the human ear is most sensitive. Therefore, it can be determined that the sampling frequency of the first audio signal can be an integer multiple of 8000Hz or greater, such as 16000Hz. In this embodiment, the sampling frequency of the first audio signal is determined to be 16000Hz.
[0078] The first audio signal can be a PCM (Pulse Code Modulation) audio file. 256 frames are extracted from the first audio signal, and the time-domain continuous first audio signal is transformed using FFT to obtain resolutions ranging from 256 to 4096, corresponding to frequency division points from 0Hz to 8000Hz. Setting the 0Hz frequency point data to zero eliminates the DC component. The first audio signal is converted using the following formula (1), that is, the 256 time-domain signal data are converted into 256 frequency-domain signal data using FFT.
[0079]
[0080] Where f(t) represents the antiderivative of F(s); e represents the exponent; s represents the frequency; and t represents time.
[0081] In this embodiment, the first audio signal can be converted into a first frequency domain signal using Fourier transform, and the second audio signal can be converted into a second frequency domain signal using Fourier transform, thereby converting the two sets of audio signals from time domain signals to frequency domain signals.
[0082] When converting a time-domain signal to a frequency-domain signal, directly dividing a continuous audio signal into several segments during sampling can cause spectral leakage due to truncation. To ensure the correlation between consecutive signal frames, windowing is needed to reduce leakage distortion during spectral estimation and eliminate signal discontinuities at the edges of each short-time signal frame.
[0083] In one embodiment, converting a first audio signal into a first frequency domain signal via Fourier transform includes: windowing the first audio signal based on a preset number of sampling points to obtain a first windowed audio signal; and converting the first windowed audio signal into a first frequency domain signal via Fourier transform. Converting a second audio signal into a second frequency domain signal via Fourier transform includes: windowing the second audio signal based on a preset number of sampling points to obtain a second windowed audio signal; and converting the second windowed audio signal into a second frequency domain signal via Fourier transform.
[0084] For example, when converting a first audio signal into a first frequency domain signal using a Fourier transform, windowing can be performed based on a preset number of sampling points to obtain a first windowed audio signal. Correspondingly, when converting a second audio signal into a second frequency domain signal using a Fourier transform, windowing can be performed based on a preset number of sampling points to obtain a second windowed audio signal. The windowing process can be, for example, a Hamming window-based windowing process.
[0085] For example, based on the first audio signal, 256 sampling points are selected, and windowing processing based on the Hamming window is performed on each of the 256 sampling points. The windowing processing based on the Hamming window can be performed using the following formula (2). The amplitude-frequency characteristic of the Hamming window is that the side lobe attenuation is relatively large, and the attenuation between the peak value of the main lobe and the peak value of the first side lobe can reach 40 dB.
[0086]
[0087] Where N represents the length of the short-time Fourier transform, i.e., the length of the Hamming window; W(n) represents the Hamming window function.
[0088] Performing Fourier transforms on the first and second windowed audio signals obtained after windowing processing yields the first and second frequency domain signals, respectively. Windowing the audio signal based on a preset number of sampling points and then performing a Fourier transform on the windowed audio signal enhances the continuity of each sampling point and reduces spectral leakage that occurs during direct frequency domain transformation. This allows the obtained first and second frequency domain signals to more accurately reflect the information of the audio signal itself, thereby improving the accuracy of audio test results.
[0089] Noise may be introduced into the audio signal during acquisition or transmission. To optimize the product and improve user experience, noise reduction processing is required for the audio signal received by the receiver. In the production line, due to the influence of manufacturing process precision such as mold making or assembly, the stability of noise reduction algorithms across multiple batches of microphone equipment needs to be compared during the testing phase. By testing the noise reduction performance of each microphone device during the testing phase, the overall noise reduction stability of each batch of microphone equipment can be determined based on the test results.
[0090] In one embodiment, a first frequency domain signal is denoised based on wavelet transform to obtain a first denoised signal, and a first noise reduction performance test result for each microphone device is determined based on the first denoised signal corresponding to each microphone device; and / or, a second frequency domain signal is denoised based on wavelet transform to obtain a second denoised signal, and a second noise reduction performance test result for each microphone device is determined based on the second denoised signal corresponding to each microphone device; each microphone device is equipped with the same noise reduction algorithm.
[0091] It is understandable that both the receiver's listening port and audio output port can output the noise-reduced audio signal. Therefore, when determining the noise reduction performance test results of the microphone device, the test can be based on the first frequency domain signal, the second frequency domain signal, or both.
[0092] For example, after acquiring the first audio signal and the second audio signal, frequency domain signal transformation is performed on the two sets of audio signals respectively to obtain the first frequency domain signal and the second frequency domain signal. Based on this, wavelet transform is used to perform noise reduction processing on the first frequency domain signal and the second frequency domain signal respectively to obtain the noise-reduced first noise-reduced signal and the noise-reduced second noise-reduced signal.
[0093] Taking the first frequency domain signal as an example, for the first frequency domain signal obtained after FFT transformation, the noisy first frequency domain signal is decomposed into multiple scales based on wavelet transform. The wavelet coefficients belonging to noise are removed at each scale using binary. Then, the wavelet coefficients belonging to the noise-free first frequency domain signal are retained and enhanced. Finally, the wavelet-denoised signal is reconstructed, which is the first denoised signal corresponding to the first frequency domain signal.
[0094] Based on the first noise-cancelled signal from the microphone device, a first noise reduction performance test result can be determined by analyzing the data of the first noise-cancelled signal. Correspondingly, based on the second noise-cancelled signal from the microphone device, a second noise reduction performance test result can be determined by analyzing the data of the second noise-cancelled signal. Both the first and second noise reduction performance test results reflect the noise reduction performance of the microphone device.
[0095] By using the first and / or second noise reduction performance test results of each microphone device equipped with the same noise reduction algorithm, we can obtain the noise reduction performance of each microphone device and the overall noise reduction stability of each microphone device.
[0096] In this embodiment, the first frequency domain signal is denoised using wavelet transform to obtain a first denoised signal. The original audio signal and noise signal in the first frequency domain signal can be separated by high-frequency and low-frequency filtering, removing the noise signal and retaining the original audio signal, thus achieving denoising of the audio signal. By analyzing the first denoised signal, the first noise reduction performance test result of the microphone device can be determined. Furthermore, the overall noise reduction stability of each microphone device can be determined using the first noise reduction performance test results of each microphone device. Similarly, the same effect can be achieved by performing the above processing on the second frequency domain signal, which will not be elaborated here.
[0097] When determining the first noise reduction performance test result of the microphone device based on the first noise reduction signal or the second noise reduction performance test result of the microphone device based on the second noise reduction signal, the result can be determined based on the signal value corresponding to each frequency point in the first noise reduction signal or the second noise reduction signal.
[0098] In one embodiment, determining a first noise reduction performance test result for each microphone device based on a first noise cancellation signal corresponding to each microphone device includes: for each microphone device, determining a first error based on the signal value corresponding to each frequency point in the first noise cancellation signal corresponding to the microphone device; determining a first noise reduction performance test result for each microphone device based on the difference between each first error; and determining a second noise reduction performance test result for each microphone device based on a second noise cancellation signal corresponding to each microphone device includes: for each microphone device, determining a second error based on the signal value corresponding to each frequency point in the second noise cancellation signal corresponding to the microphone device; and determining a second noise reduction performance test result for each microphone device based on the difference between each second error.
[0099] Both the first error and the second error can be mean squared error (MSE), or both the first error and the second error can be root mean square error (RMSE).
[0100] For example, taking the case where both the first error and the second error are root mean square errors (RMSEs), the signal value corresponding to each frequency point in the first denoised signal can be the amplitude value corresponding to each frequency point in the first denoised signal. The first error can be the RMSE corresponding to all frequency points calculated based on the amplitude values corresponding to each frequency point in the first denoised signal. Similarly, the second error can be the RMSE corresponding to all frequency points calculated based on the amplitude values corresponding to each frequency point in the second denoised signal.
[0101] Taking the first frequency domain signal as an example, after performing FFT transformation on the first frequency domain signal obtained from 256 sampling points, wavelet transform is performed to denoise the first frequency domain signal, resulting in a first denoised signal. The amplitude values corresponding to the 256 frequency points of the first denoised signal are read, and the first root mean square error (RMSE) corresponding to each of the 256 frequency points can be calculated using these amplitude values. Comparing the calculated first RMSE with a preset noise reduction value determines the noise reduction performance of the microphone device. For example, if the calculated first RMSE is less than the preset noise reduction value, the noise reduction performance of the microphone device is considered acceptable; if the calculated first RMSE is greater than or equal to the preset noise reduction value, the noise reduction performance of the microphone device is considered unacceptable. The smaller the first RMSE, the better the noise reduction performance of the microphone device. The first noise reduction performance test results can reflect the overall noise reduction performance of each microphone device. For example, for the first errors of multiple microphone devices, the difference between each first error is calculated; the smaller the difference, the more stable the overall noise reduction performance of each microphone device. Similarly, the second frequency domain signal can be used to determine the second noise reduction performance test results of each microphone device, thereby determining the noise reduction performance of each microphone device and the overall noise reduction stability of each microphone device. The specific process will not be elaborated here.
[0102] In this embodiment, a first error or a second error can be determined based on the signal value corresponding to each frequency point. The first error or the second error can be used to determine the first noise reduction performance test result or the second noise reduction performance test result of each microphone device, thereby accurately determining the noise reduction performance of each microphone device and the overall noise reduction stability.
[0103] In practical applications, while testing the consistency of the audio signals output from the receiver's monitoring port and audio output port, it is also necessary to test the receiver's ability to transmit and process audio signals in stereo channel mode.
[0104] In one embodiment, the microphone device further includes a second transmitter, and the receiver is further configured to receive a target audio signal output by the second transmitter; when the receiver operates in mono mode, the first audio signal is a signal determined based on a mixture of the target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on a mixture of the target audio signal output by the first transmitter and the target audio signal output by the second transmitter; when the receiver operates in stereo mode, the first audio signal is a signal determined based on a single target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on a single target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
[0105] For example, the receiver can operate in either mono or stereo mode. When the receiver is in mono mode, the first audio signal received from the monitoring port is a mixed audio signal, that is, an audio signal formed by mixing the target audio signal output from the first transmitter and the target audio signal output from the second transmitter. Similarly, when the receiver is in mono mode, the second audio signal received from the audio output port is also a mixed audio signal.
[0106] When the receiver is operating in stereo mode, the first audio signal obtained from the monitoring port consists of two separate audio signals. One of the first audio signals is the target audio signal output by the first transmitter, and the other is the target audio signal output by the second transmitter. This can be understood as the first audio signal being the left channel audio and the right channel audio. Similarly, when the receiver is operating in stereo mode, the second audio signal obtained from the audio output port also consists of two separate audio signals.
[0107] like Figure 2 As shown, the sound source computer 20 is also communicatively connected to the second transmitter 202. To ensure the consistency of the target audio signal, the sound source computer 20 inputs the same fixed-frequency audio signal to the first transmitter 201 and the second transmitter 202. The receiver 21 is switched to stereo mode. At this time, the first audio signal obtained through the monitoring port 211 and the second audio signal obtained through the audio output port 212 are both separate audio signals. By converting the first audio signal and the second audio signal respectively, a first frequency domain signal and a second frequency domain signal can be obtained. Correlation calculations are performed on the first frequency domain signal and the second frequency domain signal, and based on the calculation results, it can be determined whether the first frequency domain signal and the second frequency domain signal are the same, and thus whether the first audio signal and the second audio signal are the same.
[0108] In this embodiment, when the receiver's operating mode is switched to stereo mode, the consistency between the first audio signal and the second audio signal can be tested simultaneously, and the receiver's audio processing function in stereo mode can also be tested, thus improving the applicability of this method.
[0109] In practical applications, microphones that fail audio tests need to be recorded for subsequent analysis or repair.
[0110] In one embodiment, if it is determined based on the calculation results that the first frequency domain signal and the second frequency domain signal are different, the identification information of the microphone device is stored in the detection list.
[0111] For example, the identification information for microphone devices can be any identification information that distinguishes each microphone device, such as the product number or serial number of the microphone device, or the identification QR code of the microphone device. The test list can be a management form set up for testing microphone devices.
[0112] If, based on the calculation results, it is determined that the first frequency domain signal and the second frequency domain signal are different, that is, the microphone device is identified as a defective product in audio signal transmission, the identification information of the microphone device is stored in the inspection list.
[0113] In this embodiment, the identification information of microphone devices whose test results are different in the first frequency domain signal and the second frequency domain signal is stored in the detection list, which facilitates subsequent processing such as detection, analysis or adjustment of unqualified microphone devices.
[0114] The audio testing method provided in this invention can be applied to product testing scenarios for microphone devices. The microphone device to be tested can be placed in a test box, and transmission lines can be inserted into the monitoring port (line in) and audio output port (line out). The audio processing module analyzes and determines the acoustic consistency of the two audio signals obtained from the monitoring port and audio output port, thereby identifying problematic devices and reducing the product defect rate. The audio processing module can be installed in electronic devices such as mobile phones, cameras, computers, and servers.
[0115] This invention proposes a method for verifying the consistency of acoustic parameters and the stability of noise reduction algorithms for two audio signals—one from the monitoring port and one from the audio output port—before users experience the product in a production workshop. Using this invention for audio testing of microphone devices avoids the need for manual one-on-one inspection of defective products in the production workshop, reducing labor costs. Recording defective products facilitates the selection of problematic products for analysis by R&D personnel, contributing to continuous improvement of product quality and enhanced user satisfaction.
[0116] The audio testing apparatus provided in the embodiments of the present invention is described below. The audio testing apparatus described below and the audio testing method described above can be referred to in correspondence.
[0117] Figure 3 This is a schematic diagram of the audio testing device provided in an embodiment of the present invention, with reference to... Figure 3 As shown, the audio testing device 300 is applied to a microphone device, which includes a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter; the audio testing device 300 includes:
[0118] The acquisition unit 310 is used to acquire a first audio signal and a second audio signal; the first audio signal is a signal acquired from the receiver's listening port, and the second audio signal is a signal acquired from the receiver's audio output port;
[0119] The conversion unit 320 is used to convert the first audio signal into a first frequency domain signal and the second audio signal into a second frequency domain signal;
[0120] The determining unit 330 is used to perform correlation calculation on the first frequency domain signal and the second frequency domain signal, and determine whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result.
[0121] In one example embodiment, the conversion unit 320 is specifically used for:
[0122] Based on a preset number of sampling points, the first audio signal is converted into a first frequency domain signal through Fourier transform;
[0123] Based on a preset number of sampling points, the second audio signal is converted into a second frequency domain signal through Fourier transform.
[0124] In one example embodiment, the conversion unit 320 is specifically used for:
[0125] The first audio signal is windowed based on a preset number of sampling points to obtain a first windowed audio signal; the first windowed audio signal is then converted into a first frequency domain signal through Fourier transform.
[0126] The second audio signal is windowed based on a preset number of sampling points to obtain a second windowed audio signal; the second windowed audio signal is then converted into a second frequency domain signal through Fourier transform.
[0127] In one example embodiment, the audio testing apparatus 300 includes a noise reduction unit;
[0128] The noise reduction unit is used to perform noise reduction processing on the first frequency domain signal based on wavelet transform to obtain a first noise-cancelled signal, and to determine the first noise reduction performance test result of each microphone device based on the first noise-cancelled signal corresponding to each microphone device; and / or,
[0129] The noise reduction unit is used to perform noise reduction processing on the second frequency domain signal based on wavelet transform to obtain the second noise-canceling signal. Based on the second noise-canceling signal corresponding to each microphone device, the second noise reduction performance test result of each microphone device is determined. Each microphone device is equipped with the same noise reduction algorithm.
[0130] In one example embodiment, the noise reduction unit is specifically used for:
[0131] For each microphone device, a first error is determined based on the signal value corresponding to each frequency point in the first noise reduction signal corresponding to the microphone device; the first noise reduction performance test result of each microphone device is determined based on the difference between each first error.
[0132] For each microphone device, a second error is determined based on the signal value corresponding to each frequency point in the second noise reduction signal of the microphone device; the second noise reduction performance test result of each microphone device is determined based on the difference between each second error.
[0133] In one example embodiment, the microphone device further includes a second transmitter, and the receiver is also configured to receive a target audio signal output by the second transmitter;
[0134] When the receiver is operating in mono mode, the first audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
[0135] When the receiver is in stereo mode, the first audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
[0136] In one example embodiment, the audio testing apparatus 300 includes a storage unit for storing the identification information of the microphone device in a detection list if it is determined, based on calculation results, that the first frequency domain signal and the second frequency domain signal are different.
[0137] The apparatus of this embodiment can be used to execute the method of any embodiment in the audio testing method side embodiment. Its specific implementation process and technical effects are similar to those in the audio testing method side embodiment. For details, please refer to the detailed description in the audio testing method side embodiment, which will not be repeated here.
[0138] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 4As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute an audio testing method, which includes: acquiring a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of a receiver, and the second audio signal is a signal acquired from the audio output port of the receiver; converting the first audio signal into a first frequency domain signal and converting the second audio signal into a second frequency domain signal; performing correlation calculation on the first frequency domain signal and the second frequency domain signal, and determining whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result.
[0139] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] On the other hand, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the audio testing method provided by the above methods. The method includes: acquiring a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of a receiver, and the second audio signal is a signal acquired from the audio output port of the receiver; converting the first audio signal into a first frequency domain signal and converting the second audio signal into a second frequency domain signal; performing correlation calculation on the first frequency domain signal and the second frequency domain signal, and determining whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result.
[0141] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute the audio testing method provided by the above methods, the method including: acquiring a first audio signal and a second audio signal; the first audio signal being a signal collected from the listening port of a receiver, and the second audio signal being a signal collected from the audio output port of the receiver; converting the first audio signal into a first frequency domain signal, and converting the second audio signal into a second frequency domain signal; performing correlation calculation on the first frequency domain signal and the second frequency domain signal, and determining whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result.
[0142] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An audio testing method, characterized in that, The method is applied to a microphone device, the microphone device including a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter; the method includes: Acquire a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of the receiver, and the second audio signal is a signal acquired from the audio output port of the receiver; wherein, both the first audio signal and the second audio signal are audio signals generated based on the same target audio signal; The first audio signal is converted into a first frequency domain signal, and the second audio signal is converted into a second frequency domain signal; The correlation between the first frequency domain signal and the second frequency domain signal is calculated, and the first frequency domain signal and the second frequency domain signal are determined to be the same based on the calculation results. The step of calculating the correlation between the first frequency domain signal and the second frequency domain signal includes: calculating the frequency domain energy correlation coefficient between the first frequency domain signal and the second frequency domain signal based on the frequency domain energy distribution of the first frequency domain signal and the frequency domain energy distribution of the second frequency domain signal, and using the frequency domain energy correlation coefficient as the result of the correlation calculation between the first frequency domain signal and the second frequency domain signal; The step of determining whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation results includes: if the frequency domain energy correlation coefficient is greater than or equal to a preset threshold, determining that the first frequency domain signal and the second frequency domain signal are the same, so as to test the consistency of the audio signals of the receiver's listening port and audio output port.
2. The audio testing method according to claim 1, characterized in that, The step of converting the first audio signal into a first frequency domain signal includes: Based on a preset number of sampling points, the first audio signal is converted into the first frequency domain signal through Fourier transform; The step of converting the second audio signal into a second frequency domain signal includes: Based on the preset number of sampling points, the second audio signal is converted into the second frequency domain signal through the Fourier transform.
3. The audio testing method according to claim 2, characterized in that, The step of converting the first audio signal into the first frequency domain signal through Fourier transform includes: The first audio signal is windowed based on the preset number of sampling points to obtain a first windowed audio signal; The first windowed audio signal is converted into the first frequency domain signal through the Fourier transform; The step of converting the second audio signal into the second frequency domain signal through Fourier transform includes: The second audio signal is windowed based on the preset number of sampling points to obtain the second windowed audio signal; The second windowed audio signal is converted into the second frequency domain signal through the Fourier transform.
4. The audio testing method according to claim 1, characterized in that, The method further includes: The first frequency domain signal is denoised using wavelet transform to obtain a first denoised signal. Based on the first denoised signal corresponding to each microphone device, the first noise reduction performance detection result of each microphone device is determined; and / or, The second frequency domain signal is denoised based on wavelet transform to obtain a second denoised signal. Based on the second denoised signal corresponding to each microphone device, the second noise reduction performance test result of each microphone device is determined. Each microphone device is equipped with the same noise reduction algorithm.
5. The audio testing method according to claim 4, characterized in that, The step of determining the first noise reduction performance test result of each microphone device based on the first noise cancellation signal corresponding to each microphone device includes: For each of the microphone devices, a first error is determined based on the signal value corresponding to each frequency point in the first noise cancellation signal corresponding to the microphone device; The first noise reduction performance test result of each microphone device is determined based on the difference between each of the first errors; The step of determining the second noise reduction performance detection result of each microphone device based on the second noise cancellation signal corresponding to each microphone device includes: For each of the microphone devices, a second error is determined based on the signal value corresponding to each frequency point in the second noise cancellation signal corresponding to the microphone device; The second noise reduction performance test result of each microphone device is determined based on the difference between each of the second errors.
6. The audio testing method according to any one of claims 1-5, characterized in that, The microphone device further includes a second transmitter, and the receiver is also used to receive the target audio signal output by the second transmitter; When the receiver is in mono mode, the first audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the mixed target audio signal output by the first transmitter and the target audio signal output by the second transmitter. When the receiver is in stereo mode, the first audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter; the second audio signal is a signal determined based on the target audio signal output by the first transmitter and the target audio signal output by the second transmitter.
7. The audio testing method according to any one of claims 1-5, characterized in that, The method further includes: If, based on the calculation results, it is determined that the first frequency domain signal and the second frequency domain signal are different, the identification information of the microphone device is stored in the detection list.
8. An audio testing device, characterized in that, Applied to a microphone device, the microphone device including a first transmitter and a receiver, the receiver being used to receive a target audio signal output by the first transmitter; the device includes: An acquisition unit is used to acquire a first audio signal and a second audio signal; the first audio signal is a signal acquired from the listening port of the receiver, and the second audio signal is a signal acquired from the audio output port of the receiver; wherein, the first audio signal and the second audio signal are both audio signals generated based on the same target audio signal; The conversion unit is used to convert the first audio signal into a first frequency domain signal and the second audio signal into a second frequency domain signal; The determining unit is used to perform correlation calculation on the first frequency domain signal and the second frequency domain signal, and determine whether the first frequency domain signal and the second frequency domain signal are the same based on the calculation result; The device is also used for: Based on the frequency domain energy distribution of the first frequency domain signal and the frequency domain energy distribution of the second frequency domain signal, the frequency domain energy correlation coefficient between the first frequency domain signal and the second frequency domain signal is calculated, and the frequency domain energy correlation coefficient is used as the calculation result of the correlation between the first frequency domain signal and the second frequency domain signal. If the frequency domain energy correlation coefficient is greater than or equal to a preset threshold, the first frequency domain signal and the second frequency domain signal are determined to be the same, so as to test the consistency of the audio signals of the receiver's listening port and audio output port.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the audio testing method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the audio testing method as described in any one of claims 1 to 7.