[go: up one dir, main page]

CN115175081A - Earphone detection method, device, equipment and computer readable storage medium - Google Patents

Earphone detection method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115175081A
CN115175081A CN202210763620.5A CN202210763620A CN115175081A CN 115175081 A CN115175081 A CN 115175081A CN 202210763620 A CN202210763620 A CN 202210763620A CN 115175081 A CN115175081 A CN 115175081A
Authority
CN
China
Prior art keywords
earphone
data
audio data
detection
detected
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.)
Granted
Application number
CN202210763620.5A
Other languages
Chinese (zh)
Other versions
CN115175081B (en
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 Goertek Technology Co ltd
Original Assignee
Shenzhen Goertek 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 Goertek Technology Co ltd filed Critical Shenzhen Goertek Technology Co ltd
Priority to CN202210763620.5A priority Critical patent/CN115175081B/en
Publication of CN115175081A publication Critical patent/CN115175081A/en
Application granted granted Critical
Publication of CN115175081B publication Critical patent/CN115175081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/001Monitoring arrangements; Testing arrangements for loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R5/00Stereophonic arrangements
    • H04R5/033Headphones for stereophonic communication

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Headphones And Earphones (AREA)

Abstract

本发明公开了一种耳机检测方法、装置、设备及计算机可读存储介质,其中,耳机检测方法包括:通过耳机的发声装置播放预设测试数据以输出声学信号;通过耳机的麦克风采集声学信号以获取耳机的待检测音频数据;将待检测音频数据与预设测试数据进行比对分析,生成耳机的检测结果。即耳机老化系统使用耳机内置的麦克风采集耳机发声装置播放特定信号产生音频数据,并将采集到的音频数据用于耳机播放质量的分析检测,相比于目前使用专业音频分析设备对耳机进行检测,本实施例方案无需额外分析设备,降低生产成本,且无需等待专业音频分析设备空闲,实现多只或者多对耳机同步检测。

Figure 202210763620

The invention discloses an earphone detection method, device, equipment and computer-readable storage medium, wherein the earphone detection method comprises: playing preset test data through a sound generating device of an earphone to output an acoustic signal; collecting the acoustic signal through a microphone of the earphone to output an acoustic signal; Acquire the audio data to be detected of the earphone; compare and analyze the audio data to be detected with the preset test data to generate a detection result of the earphone. That is, the earphone aging system uses the built-in microphone of the earphone to collect the earphone sounding device to play a specific signal to generate audio data, and uses the collected audio data for the analysis and detection of the earphone playback quality. Compared with the current professional audio analysis equipment to detect the earphone, The solution of this embodiment does not require additional analysis equipment, reduces production costs, and does not need to wait for the professional audio analysis equipment to be idle, thereby realizing synchronous detection of multiple or multiple pairs of earphones.

Figure 202210763620

Description

耳机检测方法、装置、设备及计算机可读存储介质Headphone detection method, apparatus, device, and computer-readable storage medium

技术领域technical field

本发明涉及耳机检测技术领域,尤其涉及一种耳机检测方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of earphone detection, and in particular, to a method, apparatus, device and computer-readable storage medium for earphone detection.

背景技术Background technique

随着TWS(True Wireless Stereo,真正的无线立体声)耳机的日渐普及,人们对TWS耳机的稳定性及音质的可靠性的要求越来越高。耳机“煲机”是一种快速使耳机老化稳定的措施,是人为的以非正常使用的方式加速器件进入成熟期的过程,因此,老化工序对于音频类产品来说是很常见的一种生产工序。对于TWS耳机类产品来说,一般都是通过软件驱动硬件输出一定功率的信号使其喇叭振膜不停的振动来实现的。With the increasing popularity of TWS (True Wireless Stereo, true wireless stereo) earphones, people have higher and higher requirements for the stability of TWS earphones and the reliability of sound quality. Headphone "burning-in" is a measure to quickly and stabilize the aging of headphones. It is an artificial way of accelerating the process of devices entering the mature stage in an abnormal way. Therefore, the aging process is a very common production process for audio products. process. For TWS earphone products, it is generally realized by software driving the hardware to output a signal of a certain power to make the speaker diaphragm vibrate continuously.

但是,由于老化的过程往往较长,系统的负荷也较大,流程也比较复杂,在老化的过程中可能会使部分性能不太稳定的机器在结构组装、电子器件、声学器件上出现一些异常(表现可能是概率的短暂的轻微的一些杂音)。为了避免这些表现为概率的、短暂的、轻微的不良机器流向市场,确保耳机的高品质,我们通常会对经过老化的耳机进行检测。常规的做法需要通过专业的音频检测设备(如音频分析仪)去测量耳机输出的声学信号来实现,但针对老化这种耗时较长、过程繁琐的工序来说,使用专业设备来监测每一台设备的实时情况,这显然是不现实的,这会极大的影响生产的效率及增大生产的成本。因此,亟需一种高效率的检测方法来减小生产成本。However, because the aging process is often long, the system has a large load, and the process is more complicated, some machines with unstable performance may have some abnormalities in structural assembly, electronic devices, and acoustic devices during the aging process. (The performance may be a brief slight murmur of probability). In order to prevent these probabilistic, short-lived, slightly bad machines from flowing into the market and ensure the high quality of the earphones, we usually test the aged earphones. Conventional practice requires professional audio testing equipment (such as an audio analyzer) to measure the acoustic signal output by the headphones, but for the time-consuming and cumbersome process of aging, professional equipment is used to monitor every sound. The real-time situation of the equipment is obviously unrealistic, which will greatly affect the production efficiency and increase the production cost. Therefore, an efficient detection method is urgently needed to reduce the production cost.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist the understanding of the technical solutions of the present invention, and does not mean that the above content is the prior art.

发明内容SUMMARY OF THE INVENTION

本发明的主要目的在于提供一种耳机检测方法、装置、设备及计算机可读存储介质,旨在解决目前耳机检测对生产效率影响大及生产成本过高的技术问题。The main purpose of the present invention is to provide an earphone detection method, device, equipment and computer-readable storage medium, which aims to solve the technical problems that earphone detection has a great impact on production efficiency and high production cost.

为实现上述目的,本发明提供一种耳机检测方法,所述耳机检测方法包括以下步骤:In order to achieve the above object, the present invention provides an earphone detection method, and the earphone detection method includes the following steps:

通过耳机的发声装置播放预设测试数据以输出声学信号;Play the preset test data through the sound device of the earphone to output the acoustic signal;

通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;Collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone;

将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。The to-be-detected audio data is compared and analyzed with the preset test data to generate a detection result of the earphone.

进一步的,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:Further, before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further includes:

通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定。The pink noise data is played through the sound generating device to accelerate the aging stabilization of the earphone device.

进一步的,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:Further, before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further includes:

在所述粉噪数据与所述预设测试数据之间插入静音数据,以使所述发声装置按照粉噪数据、静音数据和预设测试数据的先后顺序进行播放。The mute data is inserted between the pink noise data and the preset test data, so that the sound generating device plays in the order of the pink noise data, the mute data and the preset test data.

进一步的,所述通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据的步骤包括:Further, the step of collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone includes:

当通过所述发声装置播放所述静音数据时,启动并通过所述麦克风采集所述发声装置输出的声学信号以生成音频数据;When the mute data is played by the sound-generating device, start and collect the acoustic signal output by the sound-generating device through the microphone to generate audio data;

将预设时间段内采集生成的音频数据作为所述待检测音频数据。The audio data collected and generated within a preset time period is used as the audio data to be detected.

进一步的,所述将所述待检测音频数据与预设测试数据进行比对分析,生成所述耳机的检测结果的步骤包括:Further, the step of comparing and analyzing the audio data to be detected and the preset test data, and generating the detection result of the earphone includes:

基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;Filtering the to-be-detected audio data based on the preset test data to generate a cumulative distortion amount;

根据所述失真累计量生成所述耳机的检测结果。The detection result of the earphone is generated according to the accumulated distortion amount.

进一步的,所述根据所述失真累计量生成所述耳机的检测结果的步骤包括:Further, the step of generating the detection result of the earphone according to the accumulated distortion amount includes:

当所述失真累计量大于预设失真阈值时,确定所述耳机的测试结果为次品;When the cumulative amount of distortion is greater than a preset distortion threshold, determining that the test result of the earphone is a defective product;

当所述失真累计量小于或者等于所述预设失真阈值时,确定所述耳机的测试结果为良品。When the cumulative amount of distortion is less than or equal to the preset distortion threshold, it is determined that the test result of the earphone is a good product.

进一步的,在所述生成所述耳机的检测结果的步骤之后,所述方法包括:Further, after the step of generating the detection result of the earphone, the method includes:

当所述耳机的检测结果为次品时,停止所述发声装置播放所述粉噪数据,并输出所述耳机为次品的提示信息。When the detection result of the earphone is a defective product, stop the sound generating device from playing the pink noise data, and output a prompt message that the earphone is a defective product.

此外,为实现上述目的,本发明还提供一种耳机检测装置,所述耳机检测装置包括:In addition, in order to achieve the above purpose, the present invention also provides an earphone detection device, the earphone detection device includes:

老化信号输出模块,用于通过耳机的发声装置播放预设测试数据以输出声学信号;The aging signal output module is used to play the preset test data through the sounding device of the earphone to output the acoustic signal;

信号分析模块,用于通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。a signal analysis module, configured to collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone; compare and analyze the audio data to be detected and the preset test data to generate the audio data to be detected Headphone test results.

此外,为实现上述目的,本发明还提供一种耳机检测设备,所述耳机检测设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机检测程序,所述耳机检测程序被所述处理器执行时实现如上述的耳机检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides an earphone detection device, the earphone detection device includes: a memory, a processor, and an earphone detection program stored in the memory and executable on the processor, When the earphone detection program is executed by the processor, the steps of the earphone detection method as described above are implemented.

此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有耳机检测程序,所述耳机检测程序被处理器执行时实现如上述的耳机检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, on which an earphone detection program is stored, and when the earphone detection program is executed by a processor, the above-mentioned earphone detection method is implemented A step of.

本发明实施例提出的一种耳机检测方法,通过耳机的发声装置播放预设测试数据以输出声学信号;通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。即耳机老化系统使用耳机内置的麦克风采集耳机发声装置播放特定信号产生音频数据,并将采集到的音频数据用于耳机播放质量的分析检测,相比于目前使用专业音频分析设备对耳机进行检测,本实施例方案无需额外分析设备,降低生产成本,且无需等待专业音频分析设备空闲,实现多只或者多对耳机同步检测。In an earphone detection method proposed by an embodiment of the present invention, preset test data is played through a sound generating device of an earphone to output an acoustic signal; the acoustic signal is collected by a microphone of the earphone to obtain audio data to be detected of the earphone; The audio data to be detected is compared and analyzed with the preset test data to generate a detection result of the earphone. That is, the earphone aging system uses the built-in microphone of the earphone to collect the earphone sounding device to play a specific signal to generate audio data, and uses the collected audio data for the analysis and detection of the earphone playback quality. Compared with the current professional audio analysis equipment to detect the earphone, The solution of this embodiment does not require additional analysis equipment, reduces production costs, and does not need to wait for the professional audio analysis equipment to be idle, thereby realizing synchronous detection of multiple or multiple pairs of headphones.

附图说明Description of drawings

图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention;

图2为本发明耳机检测方法的第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the earphone detection method of the present invention;

图3为本发明耳机检测方法的第二实施例的流程示意图;3 is a schematic flowchart of a second embodiment of the earphone detection method of the present invention;

图4为本发明耳机检测方法中待检测音频数据的信号频谱图;4 is a signal spectrum diagram of audio data to be detected in the earphone detection method of the present invention;

图5为本发明耳机检测方法中待检测音频数据经过滤波后的信号频谱图;5 is a signal spectrum diagram of the audio data to be detected after filtering in the earphone detection method of the present invention;

图6为本发明耳机检测方法中数据播放顺序示意图;6 is a schematic diagram of data playback sequence in the earphone detection method of the present invention;

图7为本发明耳机检测方法中耳机检测装置的一优选结构的结构示意图。FIG. 7 is a schematic structural diagram of a preferred structure of an earphone detection device in the earphone detection method of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

本发明实施例的主要解决方案是:通过耳机的发声装置播放预设测试数据以输出声学信号;通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。The main solutions of the embodiments of the present invention are: playing preset test data through the sound generating device of the earphone to output an acoustic signal; collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone; The audio data to be detected is compared and analyzed with the preset test data to generate a detection result of the earphone.

由于目前使用专业的音频检测设备对经过老化处理的耳机进行品质检测,存在影响生产效率及增大生产成本的问题。Because professional audio testing equipment is currently used for quality testing of aged earphones, there are problems of affecting production efficiency and increasing production costs.

本发明提供一种解决方案,耳机老化系统使用耳机内置的麦克风采集耳机发声装置产生音频数据,并将采集到的音频数据用于耳机播放质量的分析检测,相比于目前使用专业音频分析设备对耳机进行检测,本实施例方案无需额外分析设备,降低生产成本,且无需等待专业音频分析设备空闲,实现多只或者多对耳机同步检测。The present invention provides a solution. The earphone aging system uses the built-in microphone of the earphone to collect the earphone sounding device to generate audio data, and uses the collected audio data for the analysis and detection of the earphone playback quality. Headphones are detected. The solution of this embodiment does not require additional analysis equipment, reduces production costs, and does not need to wait for the professional audio analysis equipment to be idle, so that multiple or multiple pairs of headphones can be detected synchronously.

如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention.

本发明实施例设备可以是PC,也可以是智能手机、平板电脑、便携计算机等具有数据处理功能的电子终端设备。The device in the embodiment of the present invention may be a PC, or may be an electronic terminal device with a data processing function, such as a smart phone, a tablet computer, and a portable computer.

如图1所示,该设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the device may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 . Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (eg, a WI-FI interface). The memory 1005 may be high-speed RAM memory, or may be non-volatile memory, such as disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .

可选地,设备还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动设备移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Optionally, the device may further include a camera, an RF (Radio Frequency, radio frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors such as light sensors, motion sensors and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and/or when the mobile device is moved to the ear Backlight. As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of mobile terminals (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.

本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 1 does not constitute a limitation on the device, and may include more or less components than the one shown, or combine some components, or arrange different components.

如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及耳机检测程序。As shown in FIG. 1, the memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an earphone detection program.

在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的耳机检测程序,并执行以下操作:In the terminal shown in FIG. 1 , the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect to the client (client) and perform data communication with the client; and the processor 1001 can be used to call the earphone detection program stored in memory 1005 and perform the following operations:

通过耳机的发声装置播放预设测试数据以输出声学信号;Play the preset test data through the sound device of the earphone to output the acoustic signal;

通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;Collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone;

将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。The to-be-detected audio data is compared and analyzed with the preset test data to generate a detection result of the earphone.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:Before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further includes:

通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定。The pink noise data is played through the sound generating device to accelerate the aging stabilization of the earphone device.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:Before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further includes:

在所述粉噪数据与所述预设测试数据之间插入静音数据,以使所述发声装置按照粉噪数据、静音数据和预设测试数据的先后顺序进行播放。The mute data is inserted between the pink noise data and the preset test data, so that the sound generating device plays in the order of the pink noise data, the mute data and the preset test data.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

所述通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据的步骤包括:The step of collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone includes:

当通过所述发声装置播放所述静音数据时,启动并通过所述麦克风采集所述发声装置输出的声学信号以生成音频数据;When the mute data is played by the sound-generating device, start and collect the acoustic signal output by the sound-generating device through the microphone to generate audio data;

将预设时间段内采集生成的音频数据作为所述待检测音频数据。The audio data collected and generated within a preset time period is used as the audio data to be detected.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

所述将所述待检测音频数据与预设测试数据进行比对分析,生成所述耳机的检测结果的步骤包括:The step of comparing and analyzing the audio data to be detected and the preset test data, and generating the detection result of the earphone includes:

基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;Filtering the to-be-detected audio data based on the preset test data to generate a cumulative distortion amount;

根据所述失真累计量生成所述耳机的检测结果。The detection result of the earphone is generated according to the accumulated distortion amount.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

所述根据所述失真累计量生成所述耳机的检测结果的步骤包括:The step of generating the detection result of the earphone according to the accumulated distortion amount includes:

当所述失真累计量大于预设失真阈值时,确定所述耳机的测试结果为次品;When the cumulative amount of distortion is greater than a preset distortion threshold, determining that the test result of the earphone is a defective product;

当所述失真累计量小于或者等于所述预设失真阈值时,确定所述耳机的测试结果为良品。When the cumulative amount of distortion is less than or equal to the preset distortion threshold, it is determined that the test result of the earphone is a good product.

进一步地,处理器1001可以调用存储器1005中存储的耳机检测程序,还执行以下操作:Further, the processor 1001 can call the earphone detection program stored in the memory 1005, and also perform the following operations:

在所述生成所述耳机的检测结果的步骤之后,所述方法包括:After the step of generating the detection result of the earphone, the method includes:

当所述耳机的检测结果为次品时,停止所述发声装置播放所述粉噪数据,并输出所述耳机为次品的提示信息。When the detection result of the earphone is a defective product, stop the sound generating device from playing the pink noise data, and output a prompt message that the earphone is a defective product.

参照图2,本发明耳机检测方法的第一实施例,所述耳机检测方法包括:2, the first embodiment of the earphone detection method of the present invention, the earphone detection method includes:

步骤S10,通过耳机的发声装置播放预设测试数据以输出声学信号;Step S10, playing the preset test data through the sound generating device of the earphone to output the acoustic signal;

在本实施例中,实施主体为耳机老化系统(或耳机老化管理模块等),耳机老化系统是指,通过控制耳机播放特定的音频数据,加速耳机老化稳定,从而使得器件快速进入成熟期的系统。当耳机老化系统对耳机进行老化之后,耳机老化系统通过耳机的发声装置(如喇叭、扬声器等)播放预设测试数据,使得发声装置输出声学信号(引起空气震动)。In this embodiment, the main body of implementation is the earphone aging system (or the earphone aging management module, etc.). The earphone aging system refers to a system that controls the earphone to play specific audio data to accelerate the aging and stability of the earphone, so that the device quickly enters the mature stage. . After the earphone aging system ages the earphones, the earphone aging system plays the preset test data through the sound-generating device (such as a speaker, a speaker, etc.) of the earphone, so that the sound-generating device outputs an acoustic signal (causing air vibration).

步骤S20,通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;Step S20, collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone;

具体的,上述耳机是指内置有麦克风的耳机,例如主动降噪耳机。主动降噪耳机通常是由用于通话的主麦克风、用于检测外部环境的前馈麦克风、用于检测噪声残余的后馈麦克风以及喇叭组成。上述发声装置即为主动降噪耳机的喇叭。可以理解的是,主动降噪耳机的主麦克风、前馈麦克风和后馈麦克风均可以采集发声装置输出的声学信号,其中,后馈麦克风与发声装置(喇叭)距离较近(或位于发声装置的发声方向),可较为清晰的接收到发声装置输出的声学信号,因此,在本实施例中优先使用后馈麦克风采集声学信号。耳机麦克风可采集耳机发声装置基于预设测试数据发出的声音,并将采集到的声音转化为电信号即为待检测音频数据。Specifically, the above-mentioned earphones refer to earphones with built-in microphones, such as active noise reduction earphones. Active noise-cancelling headphones are usually composed of a main microphone for talking, a feed-forward microphone for detecting the external environment, a feed-back microphone for detecting noise residuals, and a speaker. The above-mentioned sounding device is the speaker of the active noise reduction earphone. It can be understood that the main microphone, the feed-forward microphone and the feed-back microphone of the active noise reduction headset can all collect the acoustic signal output by the sound-generating device, wherein the feed-back microphone is relatively close to the sound-generating device (speaker) (or is located at the end of the sound-generating device). sounding direction), the acoustic signal output by the sounding device can be received relatively clearly. Therefore, in this embodiment, the feedback microphone is preferentially used to collect the acoustic signal. The earphone microphone can collect the sound emitted by the earphone sounding device based on the preset test data, and convert the collected sound into an electrical signal, which is the audio data to be detected.

进一步的,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定。Further, before the step of playing the preset test data through the sounding device of the earphone to output the acoustic signal, the method further includes: playing pink noise data through the sounding device to speed up the aging and stabilization of the earphone device.

具体的,耳机老化系统将还将粉噪数据输入给耳机,耳机基于接收到的粉噪数据进行发声,粉噪数据被耳机播放时,可加速耳机的老化,使得耳机元器件稳定,该过程也被称为“煲机”。因此,耳机实际播放内容可以是,一段粉噪数据后再接一段测试数据以此循环播放,又或者,在耳机老化处理过程快要结束时,播放预设测试数据,而在此之前均是粉噪数据。而预设测试数据则用于检验耳机是否出现异常,且预设测试数据通常选取较为规律的音频信号,例如1KHz单频信号,可以理解的是,较为规律的音频信号可方便后续耳机异常分析。耳机老化系统将通过耳机的发声装置来播放粉噪数据和预设测试数据,同时也通过耳机的麦克风采集发声装置实际播放粉噪数据和预设测试数据产生的音频数据。此时,麦克风采集的音频数据包括了粉噪数据和预设测试数据,而采集的音频数据中播放预设测试数据的部分将被作为待检测音频数据。Specifically, the earphone aging system will also input the pink noise data to the earphone, and the earphone will sound based on the received pink noise data. When the pink noise data is played by the earphone, the aging of the earphone can be accelerated and the earphone components can be stabilized. This process also Known as "burning in". Therefore, the actual playback content of the headphones can be a loop of pink noise data followed by a section of test data, or, when the earphone aging process is about to end, the preset test data is played, and before that, all pink noise is played. data. The preset test data is used to check whether the headset is abnormal, and the preset test data usually selects a relatively regular audio signal, such as a 1KHz single-frequency signal. It is understandable that a relatively regular audio signal can facilitate the subsequent analysis of the abnormality of the headset. The earphone aging system will play the pink noise data and the preset test data through the sound device of the earphone, and also collect the audio data generated by the sound device to actually play the pink noise data and the preset test data through the microphone of the earphone. At this time, the audio data collected by the microphone includes pink noise data and preset test data, and the part of the collected audio data that plays the preset test data will be used as the audio data to be detected.

可以理解的是,在本实施例中,耳机老化系统使用耳机内置的麦克风采集耳机发声装置产生音频数据,并将采集到的音频数据用于耳机播放质量的分析检测,相比于目前使用专业音频分析设备对耳机进行检测,本实施例方案无需额外分析设备,降低生产成本,且无需等待专业音频分析设备空闲,实现多只或者多对耳机同步检测。此外,预设检测数据将与粉噪数据一同输入至耳机播放,使得参与老化的耳机可同步进行播放质量的检测,也实现了在耳机老化时同步进行质量检测,提高了耳机检测效率和出厂效率。It can be understood that, in this embodiment, the earphone aging system uses the built-in microphone of the earphone to collect the audio data from the earphone sounding device, and uses the collected audio data for analysis and detection of the playback quality of the earphone. Compared with the current use of professional audio The analysis equipment detects the earphones. The solution of this embodiment does not require additional analysis equipment, reduces the production cost, and does not need to wait for the professional audio analysis equipment to be idle, and realizes the simultaneous detection of multiple or multiple pairs of earphones. In addition, the preset detection data will be input to the headphone playback together with the pink noise data, so that the headphones involved in the aging can be synchronously tested for the playback quality, and the quality detection can be performed simultaneously when the headphones are aging, which improves the detection efficiency of the headphones and the delivery efficiency. .

步骤S30,将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。Step S30, compare and analyze the audio data to be detected and the preset test data to generate a detection result of the earphone.

具体的,当耳机仅播放预设测试数据时,此时耳机麦克风采集到的音频数据均是基于预设测试数据产生的,因此,该音频数据可直接作为待检测音频数据与预设测试数据进行比对分析。当耳机老化系统向耳机输出预设综合数据(包括粉噪数据和预设测试数据)时,此时耳机麦克风采集到的音频数据将是基于粉噪数据和预设测试数据生成的。因此,耳机老化系统在向耳机输出预设测试数据时,耳机老化系统则可以开启耳机麦克风对耳机播放装置产生的声学信号进行采集。将此时采集到的音频数据作为待检测音频数据,且对待检测音频数据进行比对分析。可以理解的是,待检测音频数据是耳机麦克风播放预设测试数据的音频数据,用于对比分析的预设测试数据则为原始的预设测试数据。将原始的预设测试数据与待检测音频数据进行对比分析,基于二者之间的差别或者不同度,即可判断出耳机的播放质量(差别越大播放质量就越差,反之差别越小播放质量越好),根据耳机播放质量生成耳机的检测结果。Specifically, when the headset only plays the preset test data, the audio data collected by the headset microphone is generated based on the preset test data. Therefore, the audio data can be directly used as the audio data to be detected and the preset test data. Comparative analysis. When the earphone aging system outputs preset comprehensive data (including pink noise data and preset test data) to the headset, the audio data collected by the headset microphone will be generated based on the pink noise data and the preset test data. Therefore, when the earphone aging system outputs the preset test data to the earphone, the earphone aging system can turn on the earphone microphone to collect the acoustic signal generated by the earphone playback device. The audio data collected at this time is used as the audio data to be detected, and the audio data to be detected is compared and analyzed. It can be understood that the audio data to be detected is the audio data of the headset microphone playing the preset test data, and the preset test data used for comparative analysis is the original preset test data. Compare and analyze the original preset test data and the audio data to be detected. Based on the difference or degree of difference between the two, the playback quality of the headphones can be judged (the bigger the difference, the worse the playback quality, and the smaller the difference, the worse the playback quality. The better the quality), the detection result of the headset is generated according to the playback quality of the headset.

进一步的,基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;根据所述失真累计量生成所述耳机的检测结果。Further, the audio data to be detected is filtered based on the preset test data to generate a cumulative distortion amount; the detection result of the earphone is generated according to the cumulative distortion amount.

具体的,如图4所示,为待检测音频数据的信号频谱,信号频谱的横坐标为波幅,纵坐标为频率。待检测音频数据包括了基波、2次谐波、3次谐波、4次谐波,其中,基波对应频率F、2次谐波对应频率2F、3次谐波对应频率3F、4次谐波对应4F,此外,还将包括噪声(噪声的频率通常是随机的)。在检测过程中,基波为上述预设测试数据,如1KHz基波信号。而2次谐波、3次谐波、4次谐波和噪声均是影响耳机播放质量的因素,也是用来衡量耳失真程度的依据。将基于述预设测试数据(1KHz基波信号)对待检测音频数据进行滤波处理,即将待检测音频数据中基波滤去,剩下2次谐波、3次谐波、4次谐波和噪声,如图5所示,为待检测音频数据经过滤波后的信号频谱,信号频谱的横坐标为波幅,纵坐标为频率。计算2次谐波、3次谐波、4次谐波和噪声的累计能量,得到失真累计量。根据失真累计量多少来判断耳机是否存在异常,并生成对应的检测结果。或者对待检测音频数据进行THD+N(Total HormonicDistortion+Noise,总谐波失真加噪声)计算分析,生成该耳机的失真程度,基于失真程度生成对应的检测结果。Specifically, as shown in FIG. 4 , it is the signal spectrum of the audio data to be detected, the abscissa of the signal spectrum is the amplitude, and the ordinate is the frequency. The audio data to be detected includes the fundamental wave, the 2nd harmonic, the 3rd harmonic, and the 4th harmonic. Among them, the fundamental wave corresponds to the frequency F, the 2nd harmonic corresponds to the frequency 2F, and the 3rd harmonic corresponds to the frequency 3F and the 4th harmonic. Harmonics correspond to 4F and, in addition, will include noise (the frequency of noise is usually random). In the detection process, the fundamental wave is the above-mentioned preset test data, such as a 1KHz fundamental wave signal. The 2nd harmonic, 3rd harmonic, 4th harmonic and noise are all factors that affect the playback quality of headphones, and are also used to measure the degree of ear distortion. The audio data to be detected will be filtered based on the preset test data (1KHz fundamental wave signal), that is, the fundamental wave in the audio data to be detected will be filtered out, and the 2nd harmonic, 3rd harmonic, 4th harmonic and noise will remain. , as shown in FIG. 5 , is the signal spectrum of the audio data to be detected after filtering, the abscissa of the signal spectrum is the amplitude, and the ordinate is the frequency. Calculate the cumulative energy of the 2nd harmonic, 3rd harmonic, 4th harmonic and noise to obtain the cumulative amount of distortion. According to the cumulative amount of distortion, it is judged whether there is an abnormality in the earphone, and the corresponding detection result is generated. Or perform THD+N (Total Hormonic Distortion+Noise, total harmonic distortion plus noise) calculation and analysis on the audio data to be detected, generate the distortion degree of the earphone, and generate a corresponding detection result based on the distortion degree.

进一步的,当所述失真累计量大于预设失真阈值时,所述耳机的测试结果为次品;当所述失真累计量小于或者等于所述预设失真阈值时,所述耳机的测试结果为良品。Further, when the cumulative amount of distortion is greater than the preset distortion threshold, the test result of the earphone is a defective product; when the cumulative amount of distortion is less than or equal to the preset distortion threshold, the test result of the earphone is: Good product.

具体的,将失真累计量与预设失真阈值进行比较,若失真累计量大于预设失真阈值则判定该耳机为次品,对应的耳机检测结果为次品,若失真累计量小于或者等于预设失真阈值则判定该耳机为良品。其中,具体的预设失真阈值可以技术人根据实际的耳机出厂标准设置。Specifically, the cumulative amount of distortion is compared with the preset distortion threshold. If the cumulative amount of distortion is greater than the preset distortion threshold, the earphone is determined to be defective, and the corresponding detection result of the earphone is defective. If the cumulative amount of distortion is less than or equal to the preset value The distortion threshold determines that the earphone is a good product. The specific preset distortion threshold can be set by a technician according to the actual factory standard of the earphone.

在本实施例中,通过耳机的发声装置播放预设测试数据以输出声学信号;通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。即耳机老化系统使用耳机内置的麦克风采集耳机发声装置产生音频数据,并将采集到的音频数据用于耳机播放质量的分析检测,相比于目前使用专业音频分析设备对耳机进行检测,本实施例方案无需额外分析设备,降低生产成本,且无需等待专业音频分析设备空闲,实现多只或者多对耳机同步检测。In this embodiment, the preset test data is played by the sound generating device of the earphone to output the acoustic signal; the acoustic signal is collected by the microphone of the earphone to obtain the audio data to be detected of the earphone; the audio data to be detected is acquired Compare and analyze with the preset test data to generate the detection result of the earphone. That is, the earphone aging system uses the built-in microphone of the earphone to collect the earphone sounding device to generate audio data, and uses the collected audio data for the analysis and detection of the earphone playback quality. Compared with the current professional audio analysis equipment to detect the earphone, this embodiment The solution does not require additional analysis equipment, reduces production costs, and does not need to wait for professional audio analysis equipment to be idle, enabling simultaneous detection of multiple or multiple pairs of headphones.

参照图3,本发明耳机检测方法的第二实施例,所述耳机检测方法包括:Referring to FIG. 3, the second embodiment of the earphone detection method of the present invention, the earphone detection method includes:

步骤S100,通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定;Step S100, playing pink noise data through the sounding device to speed up the aging and stabilization of the earphone device;

具体的,耳机老化系统将通过耳机的发声装置播放粉噪数据,使得耳机的震动器件在播放粉噪数据器件快速磨合,从而加快震动器件的老化,使其趋于稳定,从而保证耳机的播放效果。Specifically, the earphone aging system will play the pink noise data through the sound device of the earphone, so that the vibration device of the earphone will quickly run in when playing the pink noise data device, thereby accelerating the aging of the vibration device and making it more stable, thereby ensuring the playback effect of the earphone. .

步骤S200,通过耳机的发声装置播放预设测试数据以输出声学信号;Step S200, playing the preset test data through the sound generating device of the earphone to output the acoustic signal;

进一步的,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:在所述粉噪数据与所述预设测试数据之间插入静音数据,以使所述发声装置按照粉噪数据、静音数据和预设测试数据的先后顺序进行播放。Further, before the step of playing the preset test data through the earphone sounding device to output the acoustic signal, the method further includes: inserting mute data between the pink noise data and the preset test data to The sound generating device is made to play in the order of pink noise data, mute data and preset test data.

具体的,在本实施例中,还将在粉噪数据和预设测试数据之间插入静音数据,即耳机老化系统将通过耳机的发声装置按顺序播放粉噪数据、预设测试数据和静音数据。如图6所述的音频数据顺序示意图,且各类数据的占比可由技术人员根据实际情况设置,通常情况下粉噪数据的占比较多,静音数据占比较少。可以理解的是,耳机老化需要较长时间,耳机老化系统可按照粉噪数据、预设测试数据和静音数据进行循环播放,以增加耳机播放粉噪数据的时长,且耳机每经过一次老化都将会进行一次检测。Specifically, in this embodiment, mute data is also inserted between the pink noise data and the preset test data, that is, the earphone aging system will play the pink noise data, the preset test data, and the mute data in sequence through the sound generating device of the earphone . Figure 6 is a schematic diagram of the sequence of audio data, and the proportion of various types of data can be set by the technician according to the actual situation. Usually, the proportion of pink noise data is more, and the proportion of mute data is less. It is understandable that it takes a long time for the earphone to age. The earphone aging system can play the pink noise data, the preset test data and the mute data in a loop to increase the time for the earphone to play the pink noise data. A test will be performed.

步骤S300,通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;Step S300, collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone;

具体的,此时耳机的发声装置产生的声学信号将包括播放粉噪数据、静音数据和预设测试数据产生的声学信号,而用于耳机检测为播放预设测试数据部分的声学信号。Specifically, at this time, the acoustic signal generated by the sound generating device of the earphone will include the acoustic signal generated by playing pink noise data, mute data and preset test data, and the acoustic signal used for earphone detection to play the part of the preset test data.

进一步的,当通过所述发声装置播放所述静音数据时,启动并通过所述麦克风采集所述发声装置输出的声学信号以生成音频数据;将预设时间段内采集生成的音频数据作为所述待检测音频数据。Further, when the mute data is played by the sounding device, start and collect the acoustic signal output by the sounding device through the microphone to generate audio data; use the audio data collected and generated within a preset time period as the Audio data to be detected.

具体的,当耳机老化系统控制耳机当前发声装置播放静音数据后,耳机老化系统开启耳机麦克风音频数据的采集,将预设时间段内采集到的数据作为所述待检测音频数据。其中,预设时间段可与每次预设测试数据的播放时长相同,以保证获取的到的待检测音频数据是发声装置播放预设测试数据时产生的。即静音数据用于粉噪数据和预设检测数据过度,以及提示开始采集待检测音频数据。Specifically, after the earphone aging system controls the current sounding device of the earphone to play the mute data, the earphone aging system starts the collection of audio data of the earphone microphone, and uses the data collected within a preset time period as the audio data to be detected. The preset time period may be the same as the playing time of each preset test data, so as to ensure that the acquired audio data to be detected is generated when the sound generating device plays the preset test data. That is, mute data is used for pink noise data and excessive preset detection data, as well as a prompt to start collecting audio data to be detected.

步骤S400,将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。Step S400, compare and analyze the audio data to be detected and the preset test data to generate a detection result of the earphone.

进一步的,基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;根据所述失真累计量生成所述耳机的检测结果。Further, the audio data to be detected is filtered based on the preset test data to generate a cumulative distortion amount; the detection result of the earphone is generated according to the cumulative distortion amount.

进一步的,当所述失真累计量大于预设失真阈值时,确定所述耳机的测试结果为次品;当所述失真累计量小于或者等于所述预设失真阈值时,确定所述耳机的测试结果为良品。Further, when the cumulative amount of distortion is greater than a preset distortion threshold, the test result of the earphone is determined to be a defective product; when the cumulative amount of distortion is less than or equal to the preset distortion threshold, the test of the earphone is determined. The result is good.

进一步的,在所述生成所述耳机的检测结果的步骤之后,所述方法包括:当所述耳机的检测结果为次品时,停止所述发声装置播放所述粉噪数据,并输出所述耳机为次品的提示信息。Further, after the step of generating the detection result of the earphone, the method includes: when the detection result of the earphone is a defective product, stopping the sounding device from playing the pink noise data, and outputting the A message indicating that the headset is a defective product.

具体的,当判定该耳机为次品时,耳机老化系统将停止向所述耳机发送粉噪数据,即停止对该耳机的老化处理,并对应的输出该耳机为次品的提示信息。Specifically, when it is determined that the earphone is a defective product, the earphone aging system will stop sending pink noise data to the earphone, that is, stop the aging process of the earphone, and correspondingly output a prompt message that the earphone is a defective product.

此外,需要说明的是,在本实施例中与第一实施例相同步骤的详细过程可参照第一实施例,此处不再赘述。In addition, it should be noted that the detailed process of the steps in this embodiment that are the same as those in the first embodiment may refer to the first embodiment, which will not be repeated here.

在本实施例中,耳机老化系统可循环播放粉噪数据、静音数据和预设测试数据,耳机老化系统在耳机每经过一次老化之后都将会对耳机的播放质量进行检测,从而实现所有参与老化处理的耳机在老化过程的实时检测。而且相对于目前在耳机老化完成之后再用专业音频分析设备对耳机进行检测方法,本实施例中的耳机老化系统可在耳机的老化过程中对耳机的播放质量进行检测,因此,当在老化中途判定耳机为次品后,可停止该耳机的老化,从而避免对次品耳机进行不必要的老化处理,增加整体生产效率。In this embodiment, the earphone aging system can cyclically play pink noise data, mute data and preset test data, and the earphone aging system will check the playback quality of the earphones after each aging of the earphones, so as to realize all participants in the aging process. Real-time detection of processed headphones during the aging process. Moreover, compared with the current method of detecting the earphones with professional audio analysis equipment after the earphones are aging, the earphone aging system in this embodiment can detect the playback quality of the earphones during the aging process of the earphones. After it is determined that the earphone is a defective product, the aging of the earphone can be stopped, thereby avoiding unnecessary aging treatment of the defective earphone and increasing the overall production efficiency.

此外,本发明实施例还提出一种耳机检测装置,所述耳机检测装置包括:In addition, an embodiment of the present invention also provides an earphone detection device, where the earphone detection device includes:

老化信号输出模块,用于通过耳机的发声装置播放预设测试数据以输出声学信号;The aging signal output module is used to play the preset test data through the sounding device of the earphone to output the acoustic signal;

信号分析模块,用于通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。a signal analysis module, configured to collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone; compare and analyze the audio data to be detected and the preset test data to generate the audio data to be detected Headphone test results.

可选地,所述老化信号输出模块用于:Optionally, the aging signal output module is used for:

通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定。The pink noise data is played through the sound generating device to accelerate the aging stabilization of the earphone device.

可选地,所述老化信号输出模块还用于:Optionally, the aging signal output module is also used for:

在所述粉噪数据与所述预设测试数据之间插入静音数据,以使所述发声装置按照粉噪数据、静音数据和预设测试数据的先后顺序进行播放。The mute data is inserted between the pink noise data and the preset test data, so that the sound generating device plays in the order of the pink noise data, the mute data and the preset test data.

可选地,所述信号分析模块还用于:Optionally, the signal analysis module is also used for:

当通过所述发声装置播放所述静音数据时,开始通过所述麦克风采集对所述发声装置输出的声学信号进行采集以生成音频数据;When the mute data is played by the sound-generating device, start collecting the acoustic signal output by the sound-generating device by the microphone to generate audio data;

将预设时间段内采集生成的音频数据作为所述待检测音频数据。The audio data collected and generated within a preset time period is used as the audio data to be detected.

可选地,所述信号分析模块还用于:Optionally, the signal analysis module is also used for:

基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;Filtering the to-be-detected audio data based on the preset test data to generate a cumulative distortion amount;

根据所述失真累计量生成所述耳机的检测结果。The detection result of the earphone is generated according to the accumulated distortion amount.

可选地,所述信号分析模块还用于:Optionally, the signal analysis module is also used for:

当所述失真累计量大于预设失真阈值时,确定所述耳机的测试结果为次品;When the cumulative amount of distortion is greater than a preset distortion threshold, determining that the test result of the earphone is a defective product;

当所述失真累计量小于或者等于所述预设失真阈值时,确定所述耳机的测试结果为良品。When the cumulative amount of distortion is less than or equal to the preset distortion threshold, it is determined that the test result of the earphone is a good product.

可选地,所述耳机检测装置还包括老化管理,所述老化模块用于:Optionally, the earphone detection device further includes aging management, and the aging module is used for:

当所述耳机的检测结果为次品时,停止所述发声装置播放所述粉噪数据,并输出所述耳机为次品的提示信息。When the detection result of the earphone is a defective product, stop the sound generating device from playing the pink noise data, and output a prompt message that the earphone is a defective product.

本发明提供的耳机检测装置,采用上述实施例中的耳机检测方法,解决目前通过专业的音频检测设备去测量耳机输出的声学信号来实现耳机检测的方式会影响生产的效率及增大生产的成本。与现有技术相比,本发明实施例提供的耳机检测装置的有益效果与上述实施例提供的耳机检测方法的有益效果相同,且该耳机检测装置中的其他技术特征与上述实施例方法公开的特征相同,在此不做赘述。The earphone detection device provided by the present invention adopts the earphone detection method in the above-mentioned embodiment, so as to solve the problem that the current method of realizing earphone detection by measuring the acoustic signal output by the earphone through professional audio detection equipment will affect the production efficiency and increase the production cost. . Compared with the prior art, the beneficial effects of the earphone detection device provided by the embodiments of the present invention are the same as those of the earphone detection method provided by the above-mentioned embodiments, and other technical features of the earphone detection device are the same as those disclosed in the methods of the above-mentioned embodiments. The features are the same and will not be repeated here.

参照图7,本发明耳机检测装置的一优选实施例,所述耳机检测装置包括:老化管理模块1、消息分发模块2、老化信号输出模块3和信号分析模块4,其中,所述老化管理模块1包括老化流程控制1-1和老化结果管理1-2。老化管理模块1通过消息分发模块2分别与老化信号输出模块3和信号分析模块4进行数据通信。在进行耳机的老化过程中,老化流程控制1-1通过消息分发模块2向老化信号输出模块3发送打开输出的指令(可包括循环次数),老化信号输出模块3接收到打开输出的指令后开始向需要老化耳机输出音频数据,(包括播放顺序)音频数据由粉噪数据、静音数据和预设测试数据(1KHz单频信号)组成,且耳机按照上述顺序进行粉噪播放、静音播放和1KHz单频播放,放完后将停止输出,等待下一次打开输出的指令。若老化信号输出模块3接收到老化流程控制1-1通过消息分发模块2发送的关闭输出指令,则直接关闭向耳机输出音频通路。当耳机在播放静音数据时,老化流程控制1-1通过消息分发模块2向信号分析模块4发送打开分析的指令,信号分析模块4接收到打开分析的指令后将打开反馈MIC(Microphone,麦克风)进行录音,信号分析模块4将预设时间段内的麦克风采集到的音频数据进行THD实时计算(Total Hormonic Distortion,总谐波失真),而THD实时计算即可计算出耳机的失真程度。当反馈MIC(麦克风)打开预设时间段后,老化流程控制1-1通过消息分发模块2向信号分析模块4发送关闭指令,信号分析模块4接收到关闭指令后,将关闭反馈MIC录音,生成THD实时计算结果。信号分析模块4将THD结果上报给消息分发模块2,消息分发模块2再将THD结果发送给老化结果管理模块3。老化结果管理模块3再基于THD结果(耳机的失真程度)判断该耳机为次品或者良品。Referring to FIG. 7, a preferred embodiment of the earphone detection device of the present invention includes: an aging management module 1, a message distribution module 2, an aging signal output module 3 and a signal analysis module 4, wherein the aging management module 1 Including aging process control 1-1 and aging result management 1-2. The aging management module 1 performs data communication with the aging signal output module 3 and the signal analysis module 4 through the message distribution module 2 respectively. During the aging process of the earphones, the aging process control 1-1 sends an instruction (which may include the number of cycles) to turn on the output to the aging signal output module 3 through the message distribution module 2, and the aging signal output module 3 starts after receiving the command to turn on the output. Output audio data to the headphones that need to be aged, (including playback sequence) audio data consists of pink noise data, mute data and preset test data (1KHz single frequency signal), and the headphones perform pink noise playback, mute playback and 1KHz single frequency signal in the above order. After playing, it will stop the output and wait for the next command to turn on the output. If the aging signal output module 3 receives the close output instruction sent by the aging process control 1-1 through the message distribution module 2, it directly closes the output audio channel to the earphone. When the headset is playing the mute data, the aging process control 1-1 sends an instruction to open the analysis to the signal analysis module 4 through the message distribution module 2, and the signal analysis module 4 will open the feedback MIC (Microphone, microphone) after receiving the instruction to open the analysis. For recording, the signal analysis module 4 performs real-time THD calculation (Total Hormonic Distortion, total harmonic distortion) on the audio data collected by the microphone within the preset time period, and the real-time calculation of the THD can calculate the distortion degree of the earphone. When the feedback MIC (microphone) is turned on for a preset period of time, the aging process control 1-1 sends a closing instruction to the signal analysis module 4 through the message distribution module 2. After the signal analysis module 4 receives the closing instruction, it will close the feedback MIC recording and generate THD calculates results in real time. The signal analysis module 4 reports the THD result to the message distribution module 2 , and the message distribution module 2 sends the THD result to the aging result management module 3 . The aging result management module 3 then determines whether the earphone is a defective product or a good product based on the THD result (distortion degree of the earphone).

此外,本发明实施例还提出一种耳机检测设备,所述耳机检测设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机检测程序,所述耳机检测程序被所述处理器执行时实现如上述的耳机检测方法的步骤。In addition, an embodiment of the present invention also provides an earphone detection device, the earphone detection device includes: a memory, a processor, and an earphone detection program stored in the memory and executable on the processor, the earphone detection program When the program is executed by the processor, the steps of the earphone detection method as described above are implemented.

本发明耳机检测设备的具体实施方式与上述耳机检测方法各实施例基本相同,在此不再赘述。The specific implementations of the earphone detection device of the present invention are basically the same as those of the above-mentioned embodiments of the earphone detection method, and are not repeated here.

此外,本发明实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有耳机检测程序,所述耳机检测程序被处理器执行时实现如上述的耳机检测方法的步骤。In addition, an embodiment of the present invention also provides a computer-readable storage medium, where an earphone detection program is stored thereon, and the earphone detection program implements the steps of the above-mentioned earphone detection method when executed by a processor.

本发明介质具体实施方式与上述耳机检测方法各实施例基本相同,在此不再赘述。The specific implementation manner of the medium of the present invention is basically the same as the above-mentioned embodiments of the earphone detection method, and details are not described herein again.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disc), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.

Claims (10)

1.一种耳机检测方法,其特征在于,所述耳机检测方法包括以下步骤:1. an earphone detection method, is characterized in that, described earphone detection method comprises the following steps: 通过耳机的发声装置播放预设测试数据以输出声学信号;Play the preset test data through the sound device of the earphone to output the acoustic signal; 通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;Collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone; 将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。The to-be-detected audio data is compared and analyzed with the preset test data to generate a detection result of the earphone. 2.如权利要求1所述的耳机检测方法,其特征在于,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:2. The earphone detection method according to claim 1, characterized in that, before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further comprises: 通过所述发声装置播放粉噪数据以加快所述耳机器件的老化稳定。The pink noise data is played through the sound generating device to accelerate the aging stabilization of the earphone device. 3.如权利要求2所述的耳机检测方法,其特征在于,在所述通过耳机的发声装置播放预设测试数据以输出声学信号的步骤之前,所述方法还包括:3. The earphone detection method according to claim 2, wherein, before the step of playing the preset test data through the sound generating device of the earphone to output the acoustic signal, the method further comprises: 在所述粉噪数据与所述预设测试数据之间插入静音数据,以使所述发声装置按照粉噪数据、静音数据和预设测试数据的先后顺序进行播放。The mute data is inserted between the pink noise data and the preset test data, so that the sound generating device plays in the order of the pink noise data, the mute data and the preset test data. 4.如权利要求3所述的耳机检测方法,其特征在于,所述通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据的步骤包括:4. The earphone detection method according to claim 3, wherein the step of collecting the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone comprises: 当通过所述发声装置播放所述静音数据时,启动并通过所述麦克风采集所述发声装置输出的声学信号以生成音频数据;When the mute data is played by the sound-generating device, start and collect the acoustic signal output by the sound-generating device through the microphone to generate audio data; 将预设时间段内采集生成的音频数据作为所述待检测音频数据。The audio data collected and generated within a preset time period is used as the audio data to be detected. 5.如权利要求2所述的耳机检测方法,其特征在于,所述将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果的步骤包括:5. The earphone detection method according to claim 2, wherein the comparison and analysis of the audio data to be detected and the preset test data are carried out, and the step of generating the detection result of the earphone comprises: 基于所述预设测试数据对所述待检测音频数据进行滤波生成失真累计量;Filtering the to-be-detected audio data based on the preset test data to generate a cumulative distortion amount; 根据所述失真累计量生成所述耳机的检测结果。The detection result of the earphone is generated according to the accumulated distortion amount. 6.如权利要求5所述的耳机检测方法,其特征在于,所述根据所述失真累计量生成所述耳机的检测结果的步骤包括:6. The earphone detection method according to claim 5, wherein the step of generating the detection result of the earphone according to the accumulated distortion amount comprises: 当所述失真累计量大于预设失真阈值时,确定所述耳机的测试结果为次品;When the cumulative amount of distortion is greater than a preset distortion threshold, determining that the test result of the earphone is a defective product; 当所述失真累计量小于或者等于所述预设失真阈值时,确定所述耳机的测试结果为良品。When the cumulative amount of distortion is less than or equal to the preset distortion threshold, it is determined that the test result of the earphone is a good product. 7.如权利要求6所述的耳机检测方法,其特征在于,在所述生成所述耳机的检测结果的步骤之后,所述方法包括:7. The earphone detection method according to claim 6, wherein after the step of generating the detection result of the earphone, the method comprises: 当所述耳机的检测结果为次品时,停止所述发声装置播放所述粉噪数据,并输出所述耳机为次品的提示信息。When the detection result of the earphone is a defective product, stop the sound generating device from playing the pink noise data, and output a prompt message that the earphone is a defective product. 8.一种耳机检测装置,其特征在于,所述耳机检测装置包括:8. An earphone detection device, characterized in that the earphone detection device comprises: 老化信号输出模块,用于通过耳机的发声装置播放预设测试数据以输出声学信号;The aging signal output module is used to play the preset test data through the sounding device of the earphone to output the acoustic signal; 信号分析模块,用于通过所述耳机的麦克风采集所述声学信号以获取所述耳机的待检测音频数据;将所述待检测音频数据与所述预设测试数据进行比对分析,生成所述耳机的检测结果。a signal analysis module, configured to collect the acoustic signal through the microphone of the earphone to obtain the audio data to be detected of the earphone; compare and analyze the audio data to be detected and the preset test data to generate the audio data to be detected Headphone test results. 9.一种耳机检测设备,其特征在于,所述耳机检测设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机检测程序,所述耳机检测程序被所述处理器执行时实现如权利要求1至7中任一项所述的耳机检测方法的步骤。9. An earphone detection device, characterized in that the earphone detection device comprises: a memory, a processor, and an earphone detection program stored on the memory and executable on the processor, the earphone detection program being The processor implements the steps of the earphone detection method according to any one of claims 1 to 7 when executed. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有耳机检测程序,所述耳机检测程序被处理器执行时实现如权利要求1至7中任一项所述的耳机检测方法的步骤。10. A computer-readable storage medium, characterized in that, an earphone detection program is stored on the computer-readable storage medium, and when the earphone detection program is executed by a processor, any one of claims 1 to 7 is implemented. The steps of the earphone detection method described above.
CN202210763620.5A 2022-06-30 2022-06-30 Headphone detection method, device, equipment and computer-readable storage medium Active CN115175081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210763620.5A CN115175081B (en) 2022-06-30 2022-06-30 Headphone detection method, device, equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210763620.5A CN115175081B (en) 2022-06-30 2022-06-30 Headphone detection method, device, equipment and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN115175081A true CN115175081A (en) 2022-10-11
CN115175081B CN115175081B (en) 2025-01-28

Family

ID=83488496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210763620.5A Active CN115175081B (en) 2022-06-30 2022-06-30 Headphone detection method, device, equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115175081B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440307A (en) * 2023-12-20 2024-01-23 深圳市昂思科技有限公司 Intelligent earphone detection method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970400A (en) * 2012-11-09 2013-03-13 深圳市金立通信设备有限公司 Method and system for testing receiver aging
CN104486713A (en) * 2014-11-25 2015-04-01 宁波中荣声学科技有限公司 Audio power amplifier testing system and method
US20180035225A1 (en) * 2015-02-26 2018-02-01 Kyocera Corporation Measurement system and measurement method
CN107948904A (en) * 2017-12-26 2018-04-20 深圳Tcl新技术有限公司 The method, apparatus and computer-readable recording medium of speaker degradation
CN111385715A (en) * 2020-03-19 2020-07-07 锐迪科微电子(上海)有限公司 Audio output device and automatic cooker method thereof
US20210136503A1 (en) * 2019-11-04 2021-05-06 Cirrus Logic International Semiconductor Ltd. Methods and apparatus for headset diagnostics
CN113923577A (en) * 2021-09-09 2022-01-11 珠海慧联科技有限公司 Acoustic response measurement system and method
CN114554341A (en) * 2022-02-07 2022-05-27 头领科技(昆山)有限公司 Intelligent earphone support

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970400A (en) * 2012-11-09 2013-03-13 深圳市金立通信设备有限公司 Method and system for testing receiver aging
CN104486713A (en) * 2014-11-25 2015-04-01 宁波中荣声学科技有限公司 Audio power amplifier testing system and method
US20180035225A1 (en) * 2015-02-26 2018-02-01 Kyocera Corporation Measurement system and measurement method
CN107948904A (en) * 2017-12-26 2018-04-20 深圳Tcl新技术有限公司 The method, apparatus and computer-readable recording medium of speaker degradation
US20210136503A1 (en) * 2019-11-04 2021-05-06 Cirrus Logic International Semiconductor Ltd. Methods and apparatus for headset diagnostics
CN111385715A (en) * 2020-03-19 2020-07-07 锐迪科微电子(上海)有限公司 Audio output device and automatic cooker method thereof
CN113923577A (en) * 2021-09-09 2022-01-11 珠海慧联科技有限公司 Acoustic response measurement system and method
CN114554341A (en) * 2022-02-07 2022-05-27 头领科技(昆山)有限公司 Intelligent earphone support

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "好音质煲出来——浅谈耳机煲机", 《电脑爱好者》, 28 February 2011 (2011-02-28) *
肖钢: "SF200L耳机综合测试仪的典型使用方法", 《电子质量》, 30 September 2005 (2005-09-30) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440307A (en) * 2023-12-20 2024-01-23 深圳市昂思科技有限公司 Intelligent earphone detection method and system
CN117440307B (en) * 2023-12-20 2024-03-22 深圳市昂思科技有限公司 Intelligent earphone detection method and system

Also Published As

Publication number Publication date
CN115175081B (en) 2025-01-28

Similar Documents

Publication Publication Date Title
US10461712B1 (en) Automatic volume leveling
WO2018205423A1 (en) Method and terminal for playing audio, and computer-readable storage medium
CN109474879A (en) Microphone test method, device and storage medium
CN104601769B (en) A kind of cell phone mainboard automated audio test system
CN106126172A (en) A sound effect processing method and mobile terminal
WO2023070792A1 (en) Volume balancing method and device for talk-on doorbell, and readable storage medium
CN111083289A (en) Audio playing method and device, storage medium and mobile terminal
TW201528761A (en) Method and apparatus for audio testing
CN113068100A (en) Closed-loop automatic detection vibration reduction method, system, terminal and storage medium
CN105764008B (en) A method and device for debugging the transmission frequency characteristics of a sound reinforcement system
CN115175081A (en) Earphone detection method, device, equipment and computer readable storage medium
CN108235215B (en) Wire control earphone testing device and testing circuit thereof
US20240244371A1 (en) Smart device and control method therefor, computer readable storage medium
TWI606390B (en) Method for automatic adjusting output of sound and electronic device
US20240414470A1 (en) Noise reduction adjusting method, earphone and computer-readable storage medium
WO2021127842A1 (en) Equalizer setting method, apparatus and device, and computer readable storage medium
WO2020102994A1 (en) 3d sound effect realization method and apparatus, and storage medium and electronic device
CN111510841A (en) Audio component detection method and device and electronic equipment
CN111464930A (en) Howling detection method, detection device and storage medium of earphone
WO2020118560A1 (en) Recording method and apparatus, electronic device and computer readable storage medium
CN114845232A (en) Method, device and equipment for testing bottom noise of Bluetooth headset and storage medium
CN209561002U (en) A voice testing device
CN116132869A (en) Earphone volume adjusting method, earphone and storage medium
CN113990363A (en) Audio playing parameter adjusting method and device, electronic equipment and storage medium
WO2020107385A1 (en) Gain processing method and device implementing same, electronic apparatus, signal acquisition method and system implementing same

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
GR01 Patent grant
GR01 Patent grant