CN112492453A - Automatic detection method for audio interface - Google Patents

Automatic detection method for audio interface Download PDF

Info

Publication number
CN112492453A
CN112492453A CN201910862834.6A CN201910862834A CN112492453A CN 112492453 A CN112492453 A CN 112492453A CN 201910862834 A CN201910862834 A CN 201910862834A CN 112492453 A CN112492453 A CN 112492453A
Authority
CN
China
Prior art keywords
frequency
audio
sampling
fourier transform
detection method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910862834.6A
Other languages
Chinese (zh)
Inventor
王晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Deshengda Electronic Technology Co ltd
Original Assignee
Shenzhen Deshengda Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Deshengda Electronic Technology Co ltd filed Critical Shenzhen Deshengda Electronic Technology Co ltd
Priority to CN201910862834.6A priority Critical patent/CN112492453A/en
Publication of CN112492453A publication Critical patent/CN112492453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/05Detection of connection of loudspeakers or headphones to amplifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention relates to the technical field of audio interface detection, in particular to an automatic detection method for an audio interface, which comprises the following steps: s1, connecting the computer audio output end and the microphone input end directly through an audio line to form a loop, S2, generating a 10K Hz sine wave audio by the computer, sampling according to the default sampling frequency of the audio controller to generate an audio file, S3, and playing the audio file generated by S2.

Description

Automatic detection method for audio interface
Technical Field
The invention relates to the technical field of audio interface detection, in particular to an automatic detection method for an audio interface.
Background
When a traditional computer tests an audio interface, a tester needs to play audio files of different sound channels, and then the audio files are actually judged in an ear listening mode, so that the method can bring several problems:
1) different testers have different hearing frequency ranges, intensity sensitivities and the like, so that the difference of test results is easily caused;
2) the test efficiency is low, and the test requirement of a factory during mass production cannot be met;
3) the quality card can not be closed by one hundred percent through manual operation;
meanwhile, because various computer audio codec (codec) chips are different, the test programs used by the decoder source factories cannot be unified, which is easy to cause trouble to the testers.
In summary, the present invention provides an automatic detection method for an audio interface to solve the existing problems.
Disclosure of Invention
The present invention is directed to an automatic detection method for an audio interface, so as to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
an automated detection method for an audio interface, comprising the steps of:
s1, directly connecting the audio output end of the computer and the input end of the microphone into a loop through an audio line;
s2, the computer generates a 10K Hz sine wave audio frequency, and the sampling is carried out according to the default sampling frequency of the audio controller to generate an audio file;
s3, playing the audio file generated in S2;
s4, recording the audio by using a microphone and generating a wav file;
s5, filtering the valid data of the recorded wav file by the computer, and removing the invalid data;
s6, carrying out spectrum analysis on the effective audio data through fast Fourier transform to obtain the corresponding relation between frequency and amplitude;
and S7, quickly and accurately calibrating whether the audio interface of the computer is normal or not according to indexes such as peak frequency, energy density and the like.
Preferably, the S4, WAV is in a sound file format and supports msabcdm or CCITT or other compression algorithms, supports audio numbers, sampling frequency and sound channel, and has a sampling frequency of 44.1K, 16-bit quantization number, and the WAV opening tool is a WINDOWS media player.
Preferably, the default sampling frequency of the audio controller is 48000Hz at S2.
Preferably, in the step S6, fast fourier transform is performed, the sequence x (N) is finite in length, N is from 0 to N-1, then the frequency ω is sampled at equal intervals within the range of 0 to 2 π, the number of sampling points is N, and the sampling interval is 2 π/N. The frequency value corresponding to the kth sampling point is 2 pi k/N. The available discrete fourier transform and its inverse are defined as:
Figure RE-GDA0002278622800000021
Figure RE-GDA0002278622800000022
if a finite sequence is considered to be a period of a periodic sequence, the discrete Fourier transform is a Fourier series. The discrete fourier transform is also periodic, with a period of N.
The relationship between digital frequency and analog frequency is:
ω 2 π f/fs, i.e.
Figure RE-GDA0002278622800000023
The analog frequency corresponding to the kth frequency point is:
Figure RE-GDA0002278622800000024
in spectral analysis using the fast fourier transform, two important parameters are determined: sampling frequency and frequency domain sampling point number, wherein the sampling frequency can be determined according to the Nyquist sampling theorem, and the sampling point number can be determined according to the sequence length or the frequency resolution Deltaf:
Figure RE-GDA0002278622800000031
then
Figure RE-GDA0002278622800000032
The steps of analyzing the spectrum of a continuous signal using a fast fourier transform can be summarized as follows:
(1) determining a proper sampling frequency fs according to the highest frequency of the signal and the requirement of a sampling theorem;
(2) determining the number N of frequency domain sampling points according to the requirement of the frequency spectrum resolution, and determining the frequency resolution according to the actual requirement;
(3) performing fast Fourier transform of N points, expressing the ordinate by power according to a Pasteval relation, and converting the abscissa into analog frequency Hz according to a formula (1-5);
(4) and (4) carrying out analysis according to the obtained result.
Compared with the prior art, the invention has the beneficial effects that:
in the invention, the audio output of the computer and the input of the microphone are directly connected into a loop by adopting an audio line, an audio file with fixed frequency is generated and played, then audio is input from the microphone by utilizing the loop and is subjected to spectrum analysis, and finally whether the audio interface of the computer is normal or not is quickly and accurately calibrated according to indexes such as peak frequency, energy density and the like, so that full-automatic audio detection is realized, the intervention of a tester is not needed, the test error is reduced, the test efficiency is greatly improved, and meanwhile, the detection method is suitable for any hardware system with the audio interfaces for output and input simultaneously.
Drawings
FIG. 1 is a schematic diagram of a detection process structure according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.
Referring to fig. 1, the present invention provides a technical solution:
an automated detection method for an audio interface, comprising the steps of:
s1, directly connecting the audio output end of the computer and the input end of the microphone into a loop through an audio line;
s2, the computer generates a 10K Hz sine wave audio frequency, and the sampling is carried out according to the default sampling frequency of the audio controller to generate an audio file;
s3, playing the audio file generated in S2;
s4, recording the audio by using a microphone and generating a wav file;
s5, filtering the valid data of the recorded wav file by the computer, and removing the invalid data;
s6, carrying out spectrum analysis on the effective audio data through fast Fourier transform to obtain the corresponding relation between frequency and amplitude;
and S7, quickly and accurately calibrating whether the audio interface of the computer is normal or not according to indexes such as peak frequency, energy density and the like.
The S4 is a WAV with sound file format, supporting msatpcm or CCITT or other compression algorithms, supporting audio numbers, sampling frequency and sound channel, and having a sampling frequency of 44.1K, 16-bit quantization number, and the WAV opening tool is a WINDOWS media player.
And S2, the default sampling frequency of the audio controller is 48000 Hz.
And S6, performing fast Fourier transform, wherein the sequence x (N) is finite in length, N is from 0 to N-1, sampling is performed on the frequency omega within the range of 0 to 2 pi at equal intervals, the number of sampling points is N, and the sampling interval is 2 pi/N. The frequency value corresponding to the kth sampling point is 2 pi k/N. The available discrete fourier transform and its inverse are defined as:
Figure RE-GDA0002278622800000041
Figure RE-GDA0002278622800000042
if a finite sequence is considered to be a period of a periodic sequence, the discrete Fourier transform is a Fourier series. The discrete fourier transform is also periodic, with a period of N.
The relationship between digital frequency and analog frequency is:
ω 2 π f/fs, i.e.
Figure RE-GDA0002278622800000051
The analog frequency corresponding to the kth frequency point is:
Figure RE-GDA0002278622800000052
in spectral analysis using the fast fourier transform, two important parameters are determined: sampling frequency and frequency domain sampling point number, wherein the sampling frequency can be determined according to the Nyquist sampling theorem, and the sampling point number can be determined according to the sequence length or the frequency resolution Deltaf:
Figure RE-GDA0002278622800000053
then
Figure RE-GDA0002278622800000054
The steps of analyzing the spectrum of a continuous signal using a fast fourier transform can be summarized as follows:
(1) determining a proper sampling frequency fs according to the highest frequency of the signal and the requirement of a sampling theorem;
(2) determining the number N of frequency domain sampling points according to the requirement of the frequency spectrum resolution, and determining the frequency resolution according to the actual requirement;
(3) performing fast Fourier transform of N points, expressing the ordinate by power according to a Pasteval relation, and converting the abscissa into analog frequency Hz according to a formula (1-5);
(4) and (4) carrying out analysis according to the obtained result.
The specific implementation case is as follows:
step 1, directly connecting an audio output end of a computer and an input end of a microphone into a loop through an audio line;
step 2, the computer generates a 10K Hz sine wave audio frequency, and the sampling is carried out according to the default sampling frequency of the audio controller of 48000Hz to generate an audio file;
step 3, playing the audio file generated in the step 2;
step 4, recording the audio by using a microphone and generating a wav file;
step 5, the computer filters the effective data of the recorded wav file and eliminates the ineffective data;
step 6, carrying out spectrum analysis on the effective audio data through fast Fourier transform to obtain a corresponding relation between frequency and amplitude;
and 7, quickly and accurately calibrating whether the audio interface of the computer is normal or not according to indexes such as peak frequency, energy density and the like:
I. for dual channel testing, the absolute error of the peak frequency of each channel from the source frequency (10K Hz) must be less than one frequency interval (sampling frequency/number of samples), and the energy density near the peak frequency (plus or minus 5%) must be greater than 99%.
In single-channel testing, the absolute error of the peak frequency of a testing channel and the source frequency (10K Hz) must be less than one frequency interval (sampling frequency/sampling number), and the energy density near the peak frequency (plus or minus 5%) is more than 99%; other channels should satisfy the feature of silence: the maximum amplitude should be less than 1% of the maximum amplitude of the test channel, and at the same time, the peak frequency should be near the source frequency, i.e. less than one frequency interval (sampling frequency/sampling number).
In the process, an audio output and input loop is built, a sound source with obvious characteristics is played and recorded, then the recorded data is filtered and subjected to spectrum analysis, and compared with the characteristics of the sound source, and whether the hardware audio interface is abnormal or not is finally judged, so that full-automatic audio detection is realized, the intervention of testers is not needed, the test error is reduced, the test efficiency is greatly improved, and meanwhile, the detection method is suitable for any hardware system with the output and input audio interfaces.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (4)

1. An automated detection method for an audio interface, comprising the steps of:
s1, directly connecting the audio output end of the computer and the input end of the microphone into a loop through an audio line;
s2, the computer generates a 10K Hz sine wave audio frequency, and the sampling is carried out according to the default sampling frequency of the audio controller to generate an audio file;
s3, playing the audio file generated in S2;
s4, recording the audio by using a microphone and generating a wav file;
s5, filtering the valid data of the recorded wav file by the computer, and removing the invalid data;
s6, carrying out spectrum analysis on the effective audio data through fast Fourier transform to obtain the corresponding relation between frequency and amplitude;
and S7, quickly and accurately calibrating whether the audio interface of the computer is normal or not according to indexes such as peak frequency, energy density and the like.
2. An automated detection method for an audio interface according to claim 1, characterized in that: the S4 is a WAV with sound file format, supporting msatpcm or CCITT or other compression algorithms, supporting audio numbers, sampling frequency and sound channel, and having a sampling frequency of 44.1K, 16-bit quantization number, and the WAV opening tool is a WINDOWS media player.
3. An automated detection method for an audio interface according to claim 1, characterized in that: and S2, the default sampling frequency of the audio controller is 48000 Hz.
4. An automated detection method for an audio interface according to claim 1, characterized in that: and S6, performing fast Fourier transform, wherein the sequence x (N) is finite in length, N is from 0 to N-1, sampling is performed on the frequency omega within the range of 0 to 2 pi at equal intervals, the number of sampling points is N, and the sampling interval is 2 pi/N. The frequency value corresponding to the kth sampling point is 2 pi k/N. The available discrete fourier transform and its inverse are defined as:
Figure RE-FDA0002278622790000011
Figure RE-FDA0002278622790000012
if a finite sequence is considered to be a period of a periodic sequence, the discrete Fourier transform is a Fourier series. The discrete fourier transform is also periodic, with a period of N.
The relationship between digital frequency and analog frequency is:
Figure RE-FDA0002278622790000021
the analog frequency corresponding to the kth frequency point is:
Figure RE-FDA0002278622790000022
in spectral analysis using the fast fourier transform, two important parameters are determined: sampling frequency and number of sampling points in frequency domain, wherein the sampling frequency can be determined according to Nyquist sampling theorem, and the number of sampling points can be determined according to sequence length or frequency resolution delta f
Figure RE-FDA0002278622790000023
The steps of analyzing the spectrum of a continuous signal using a fast fourier transform can be summarized as follows:
(1) determining a proper sampling frequency fs according to the highest frequency of the signal and the requirement of a sampling theorem;
(2) determining the number N of frequency domain sampling points according to the requirement of the frequency spectrum resolution, and determining the frequency resolution according to the actual requirement;
(3) performing fast Fourier transform of N points, expressing the ordinate by power according to a Pasteval relation, and converting the abscissa into analog frequency Hz according to a formula (1-5);
(4) and (4) carrying out analysis according to the obtained result.
CN201910862834.6A 2019-09-12 2019-09-12 Automatic detection method for audio interface Pending CN112492453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910862834.6A CN112492453A (en) 2019-09-12 2019-09-12 Automatic detection method for audio interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910862834.6A CN112492453A (en) 2019-09-12 2019-09-12 Automatic detection method for audio interface

Publications (1)

Publication Number Publication Date
CN112492453A true CN112492453A (en) 2021-03-12

Family

ID=74920652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910862834.6A Pending CN112492453A (en) 2019-09-12 2019-09-12 Automatic detection method for audio interface

Country Status (1)

Country Link
CN (1) CN112492453A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347548A (en) * 2021-05-31 2021-09-03 深圳市视美泰技术股份有限公司 Audio system detection method and device, electronic product and storage medium
CN113596695A (en) * 2021-06-30 2021-11-02 惠州高盛达科技有限公司 Automatic detection method and system for double MEMS microphones based on FFT algorithm
CN117198373A (en) * 2023-09-26 2023-12-08 深圳市爱普泰科电子有限公司 Method for evaluating and calculating automatic performance of audio IC playing and recording channel
CN117311300A (en) * 2023-11-29 2023-12-29 西安热工研究院有限公司 Method and device for dynamically adjusting sampling frequency of distributed control system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758226A (en) * 2004-10-09 2006-04-12 鸿富锦精密工业(深圳)有限公司 The method of the automatic detection computations machine of loop-type audio frequency apparatus playing function
CN1991976A (en) * 2005-12-31 2007-07-04 潘建强 Phoneme based voice recognition method and system
CN104485117A (en) * 2014-12-16 2015-04-01 福建星网视易信息系统有限公司 Method and system for detecting sound recording equipment
US20170236529A1 (en) * 2014-08-14 2017-08-17 P Softhouse Co., Ltd. Audio signal processing device, audio signal processing method, and audio signal processing program
CN108683978A (en) * 2018-05-30 2018-10-19 中南大学 A kind of audio-frequency processing method based on frequency domain adaptive equilibrium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758226A (en) * 2004-10-09 2006-04-12 鸿富锦精密工业(深圳)有限公司 The method of the automatic detection computations machine of loop-type audio frequency apparatus playing function
CN1991976A (en) * 2005-12-31 2007-07-04 潘建强 Phoneme based voice recognition method and system
US20170236529A1 (en) * 2014-08-14 2017-08-17 P Softhouse Co., Ltd. Audio signal processing device, audio signal processing method, and audio signal processing program
CN104485117A (en) * 2014-12-16 2015-04-01 福建星网视易信息系统有限公司 Method and system for detecting sound recording equipment
CN108683978A (en) * 2018-05-30 2018-10-19 中南大学 A kind of audio-frequency processing method based on frequency domain adaptive equilibrium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347548A (en) * 2021-05-31 2021-09-03 深圳市视美泰技术股份有限公司 Audio system detection method and device, electronic product and storage medium
CN113596695A (en) * 2021-06-30 2021-11-02 惠州高盛达科技有限公司 Automatic detection method and system for double MEMS microphones based on FFT algorithm
CN117198373A (en) * 2023-09-26 2023-12-08 深圳市爱普泰科电子有限公司 Method for evaluating and calculating automatic performance of audio IC playing and recording channel
CN117311300A (en) * 2023-11-29 2023-12-29 西安热工研究院有限公司 Method and device for dynamically adjusting sampling frequency of distributed control system and electronic equipment
CN117311300B (en) * 2023-11-29 2024-02-13 西安热工研究院有限公司 Method and device for dynamically adjusting sampling frequency of distributed control system and electronic equipment

Similar Documents

Publication Publication Date Title
CN112492453A (en) Automatic detection method for audio interface
CN101202087B (en) Device and method for testing audio sound-recording
CN104485117B (en) Recording equipment detection method and system
EP3166239B1 (en) Method and system for scoring human sound voice quality
CN102103855B (en) Method and device for detecting audio clip
CN103179495A (en) Audio test method and system for earphone microphone and receiver of mobile terminal
CN104661169B (en) A kind of audio testing method and device
CN113259832B (en) Microphone array detection method and device, electronic equipment and storage medium
CN103179240A (en) Audio test method and system for mobile terminal
US8050422B2 (en) Audio test apparatus capable of decreasing noise influence in process of audio device testing and method thereof
CN103747407A (en) Audio module automatic test method based on FFT frequency sweep
CN108091352B (en) Audio file processing method and device, storage medium and terminal equipment
US7221167B2 (en) Signal distortion measurement and assessment system and method
CN116564332A (en) Frequency response analysis method, device, equipment and storage medium
CN110430519A (en) A kind of acoustics of intelligent sound box is tested automatically and analysis system and method
CN110390954B (en) Method and device for evaluating quality of voice product
US7197458B2 (en) Method and system for verifying derivative digital files automatically
CN111261194A (en) Volume analysis method based on PCM technology
JP2013195612A (en) Sound removal device, sound inspection device, method for removing sound, and sound removal program
CN111885474A (en) Microphone testing method and device
CN111953967A (en) Method for automatically testing microphone and loudspeaker of network camera
CN115691556B (en) Method for detecting multichannel voice quality of equipment side
CN116055975A (en) Earphone quality assessment method based on psychoacoustics
Nishimura et al. Measurement of sampling jitter in analog-to-digital and digital-to-analog converters using analytic signals
CN114640939B (en) Method, device and system for detecting audio playing device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210312