[go: up one dir, main page]

CN107705804A - A kind of audible device condition detection method and mobile terminal - Google Patents

A kind of audible device condition detection method and mobile terminal Download PDF

Info

Publication number
CN107705804A
CN107705804A CN201710882928.0A CN201710882928A CN107705804A CN 107705804 A CN107705804 A CN 107705804A CN 201710882928 A CN201710882928 A CN 201710882928A CN 107705804 A CN107705804 A CN 107705804A
Authority
CN
China
Prior art keywords
energy value
ultrasonic
mobile terminal
supersonic range
state
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
CN201710882928.0A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710882928.0A priority Critical patent/CN107705804A/en
Publication of CN107705804A publication Critical patent/CN107705804A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/21Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being power information
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/10537Audio or video recording
    • G11B2020/10546Audio or video recording specifically adapted for audio data

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例提供了一种发声设备状态检测方法及移动终端,所述方法包括:录制播放的超声音频信号生成第一录制文件;获取所述第一录制文件中预设时长的第一超声波段;计算所述第一超声波段的能量值;将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。通过检测异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比第一超声波段能量值的强弱,能够实现确定移动终端的发声设备的状态,且仅在发声口中进入微量异物或灰尘初期,也可即时的察觉到发声设备的状态,从而提升用户的听觉体验。

An embodiment of the present invention provides a method for detecting the state of a sounding device and a mobile terminal, the method comprising: recording and playing an ultrasonic audio signal to generate a first recording file; obtaining a first ultrasonic segment with a preset duration in the first recording file ; Calculating the energy value of the first ultrasonic segment; comparing the energy value of the first ultrasonic segment with a preset energy value, and outputting a state detection result of the sounding device according to the comparison result. The energy value of the ultrasonic wave by detecting the abnormal sounding device will be weaker than the normal ultrasonic energy value, so by comparing the strength of the energy value of the first ultrasonic segment, it can be realized to determine the state of the sounding device of the mobile terminal, and only enter in the sounding port In the early stage of a small amount of foreign matter or dust, the status of the sound-generating device can also be detected in real time, thereby improving the user's listening experience.

Description

一种发声设备状态检测方法及移动终端A method for detecting the state of a sounding device and a mobile terminal

技术领域technical field

本发明涉及通信技术领域,特别是涉及一种发声设备状态检测方法及移动终端。The invention relates to the field of communication technology, in particular to a method for detecting the state of a sounding device and a mobile terminal.

背景技术Background technique

目前随着数据科技的蓬勃发展,智能手机、平板电脑等移动终端成为人们日常生活不可或缺的工具,且人们对各种移动终端的品质要求也越来越高,尤其是对移动终端中所安装的发声设备的音质要求已成为移动终端用户所关注的重点。At present, with the vigorous development of data technology, mobile terminals such as smart phones and tablet computers have become indispensable tools in people's daily life, and people's requirements for the quality of various mobile terminals are also getting higher and higher, especially for mobile terminals. The sound quality requirements of installed sound emitting devices have become the focus of attention of mobile terminal users.

在移动终端的使用过程中其发声设备,如听筒、喇叭等的发声口,易被灰尘或者进异物堵住,导致发声设备出现异常,影响所发出音频信号的效果。然而,目前人们对发声设备的状态的检测方法还局限在人为进行检测,当发声口被严重堵塞时,人们可以通过观察发声口是否存在异物来确定发声设备的状态,而当发声口仅进入微量异物或者灰尘时,则无法检测发声设备的状态,可见,目前对发声设备状态的检测方法,无法对发声设备的状态进行准确的判断。During the use of the mobile terminal, its sound emitting devices, such as earpieces, speakers, etc., are easily blocked by dust or foreign objects, which will cause abnormalities in the sound generating devices and affect the effect of the emitted audio signals. However, at present, people's detection methods for the state of the sounding device are still limited to artificial detection. When the sounding port is severely blocked, people can determine the state of the sounding device by observing whether there is foreign matter in the sounding port. When there is foreign matter or dust, the state of the sound-emitting device cannot be detected. It can be seen that the current detection method for the state of the sound-emitting device cannot accurately judge the state of the sound-emitting device.

发明内容Contents of the invention

本发明提供了一种发声设备状态检测方法及移动终端,以解决现有技术存在的无法对发声设备状态检测的问题。The invention provides a method for detecting the state of a sounding device and a mobile terminal to solve the problem in the prior art that the state of the sounding device cannot be detected.

为了解决上述技术问题,本发明是这样实现的:一种发声设备状态检测方法,所述方法包括:录制播放的超声音频信号生成第一录制文件;获取所述第一录制文件中预设时长的第一超声波段;计算所述第一超声波段的能量值;将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。In order to solve the above-mentioned technical problems, the present invention is implemented as follows: a method for detecting the state of a sound-emitting device, the method comprising: recording and playing an ultrasonic audio signal to generate a first recording file; obtaining a preset duration in the first recording file The first ultrasonic segment; calculating the energy value of the first ultrasonic segment; comparing the energy value of the first ultrasonic segment with a preset energy value, and outputting a state detection result of the sounding device according to the comparison result.

第一方面,本发明实施例还提供了一种移动终端,所述移动终端包括:录制模块,用于录制播放的超声音频信号生成第一录制文件;获取模块,用于获取所述第一录制文件中预设时长的第一超声波段;计算模块,用于计算所述第一超声波段的能量值;输出模块,用于将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。In the first aspect, the embodiment of the present invention also provides a mobile terminal, which includes: a recording module, configured to record and play ultrasonic audio signals to generate a first recorded file; an obtaining module, configured to obtain the first recorded file The first ultrasonic segment of the preset duration in the file; the calculation module is used to calculate the energy value of the first ultrasonic segment; the output module is used to compare the energy value of the first ultrasonic segment with the preset energy value, According to the comparison result, the state detection result of the sound emitting device is output.

第二方面,本发明实施例还提供了一种移动终端,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的发声设备状态检测计算机程序,所述发声设备状态检测计算机程序被所述处理器执行时实现所述的发声设备状态检测方法的步骤。In the second aspect, the embodiment of the present invention also provides a mobile terminal, including: a memory, a processor, and a computer program for detecting the state of a sounding device that is stored on the memory and can run on the processor, and the sounding device When the state detection computer program is executed by the processor, the steps of the state detection method of the sound emitting device are realized.

第三方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有发声设备状态检测计算机程序,所述发声设备状态检测计算机程序被处理器执行时实现所述的发声设备状态检测方法的步骤。In the third aspect, the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program for detecting the state of the sounding device, and the computer program for detecting the state of the sounding device is implemented when executed by a processor. The steps of the method for detecting the state of the sounding device.

在本发明实施例中,通过对所播放的超声音频信号录制得到的第一录制文件中的第一超声波段的能量与预设能量值进行比较,以检测移动终端发声设备的是否异常,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,通过检测异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比第一超声波段能量值的强弱,能够实现确定移动终端的发声设备的状态,且仅在发声口中进入微量异物或灰尘初期,也可即时的察觉到发声设备的状态,从而提升用户的听觉体验。In the embodiment of the present invention, by comparing the energy of the first ultrasonic segment in the first recording file obtained by recording the played ultrasonic audio signal with the preset energy value, it is detected whether the sounding device of the mobile terminal is abnormal. It is a high-frequency wave. If it is blocked during the transmission process, it will cause reflection. The energy value of the ultrasonic wave detected by the abnormal sound-generating device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the strength of the energy value of the first ultrasonic segment, it can be determined. The state of the sound-generating device of the mobile terminal, and only at the initial stage of a small amount of foreign matter or dust entering the sound-emitting port, the state of the sound-generating device can be detected in real time, thereby improving the user's listening experience.

附图说明Description of drawings

图1是本发明实施例一的一种发声设备状态检测方法的步骤流程图;FIG. 1 is a flow chart of the steps of a method for detecting the state of a sounding device according to Embodiment 1 of the present invention;

图2是本发明实施例二的一种发声设备状态检测方法的步骤流程图;FIG. 2 is a flow chart of steps of a method for detecting the state of a sounding device according to Embodiment 2 of the present invention;

图3是本发明实施例三的一种移动终端的结构框图;FIG. 3 is a structural block diagram of a mobile terminal according to Embodiment 3 of the present invention;

图4是本发明实施例四的一种移动终端的结构框图;FIG. 4 is a structural block diagram of a mobile terminal according to Embodiment 4 of the present invention;

图5是本发明实施例五的一种移动终端的结构框图。FIG. 5 is a structural block diagram of a mobile terminal according to Embodiment 5 of the present invention.

具体实施方式detailed description

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

实施例一Embodiment one

参照图1,示出了本发明实施例一的一种发声设备状态检测方法的步骤流程图。Referring to FIG. 1 , it shows a flow chart of steps of a method for detecting the state of a sound emitting device according to Embodiment 1 of the present invention.

本发明实施例提供的发声设备状态检测方法包括以下步骤:The method for detecting the state of a sounding device provided in an embodiment of the present invention includes the following steps:

步骤101:录制播放的超声音频信号生成第一录制文件。Step 101: Record and play the ultrasonic audio signal to generate a first recording file.

本发明实施例中,在对发声设备状态进行检测时可以通过发声设备播放高于20kHz的超声音频信号,具体地可以播放23kHz、24kHz或者更高频率的超声音频信号,并录制所播放的超声音频信号,将录制的音频文件确定为第一录制文件,并将第一录制文件存储至移动终端中。In the embodiment of the present invention, when detecting the state of the sounding device, the ultrasonic audio signal higher than 20kHz can be played through the sounding device, specifically, the ultrasonic audio signal of 23kHz, 24kHz or higher frequency can be played, and the played ultrasonic audio can be recorded. signal, determine the recorded audio file as the first recording file, and store the first recording file in the mobile terminal.

需要说明的是,发声设备可以为听筒、喇叭等发声设备,本发明实施例中对于发声设备的具体类型不作限定。It should be noted that the sound-generating device may be a sound-generating device such as an earpiece or a speaker, and the specific type of the sound-generating device is not limited in the embodiment of the present invention.

步骤102:获取第一录制文件中预设时长的第一超声波段。Step 102: Obtain a first ultrasonic segment with a preset duration in the first recording file.

需要说明的是,本领域技术人员可以根据实际情况对预设时长进行选择,其中,预设时长可以为100ms、200ms、300ms等,本发明实施例对预设时长不作具体限制。It should be noted that those skilled in the art can select the preset duration according to the actual situation. The preset duration can be 100ms, 200ms, 300ms, etc. The embodiment of the present invention does not specifically limit the preset duration.

获取第一录制文件中的超声波,并按照预设时长对超声波进行截取得到第一超声波段,其中第一超声波段对应有波峰、波谷以及每一时刻对应的信号值。Obtain the ultrasonic waves in the first recording file, and intercept the ultrasonic waves according to the preset time length to obtain the first ultrasonic segment, wherein the first ultrasonic segment corresponds to a peak, a trough, and a signal value corresponding to each moment.

步骤103:计算第一超声波段的能量值。Step 103: Calculate the energy value of the first ultrasonic segment.

本领域技术人员,可以通过任意适当的方式计算得到第一超声波段的能量值;例如:计算超声波段的能量值时,可以从超声波段中进行信号采样,依据各采样信号的信号强度计算得到超声波段的能量值。本发明实施例中对此不作具体限制。Those skilled in the art can calculate the energy value of the first ultrasonic segment by any appropriate method; for example, when calculating the energy value of the ultrasonic segment, signal sampling can be performed from the ultrasonic segment, and the ultrasonic wave can be obtained by calculating the signal strength of each sampled signal. segment energy value. This is not specifically limited in the embodiments of the present invention.

步骤104:将第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。Step 104: Compare the energy value of the first ultrasonic segment with a preset energy value, and output a state detection result of the sounding device according to the comparison result.

通过第一超声波段中的信号强度计算第一超声波段对应的能量值,将计算的第一超声波段的能量值与采用正常发声设备计算出的预设能量值进行比较。当第一超声波段的能量值小于预设能量值,则表明发声设备的发声口存在异物或者灰尘,当第一超声波段的能量值与预设能量值一致,则表明发声设备正常,不存在有灰尘或者异物填堵发声口的问题。The energy value corresponding to the first ultrasonic segment is calculated according to the signal strength in the first ultrasonic segment, and the calculated energy value of the first ultrasonic segment is compared with a preset energy value calculated by using a normal sounding device. When the energy value of the first ultrasonic segment is less than the preset energy value, it indicates that there are foreign objects or dust in the sound outlet of the sounding device; when the energy value of the first ultrasonic segment is consistent with the preset energy value, it indicates that the sounding device is normal and there is no The problem of dust or foreign matter filling the sound outlet.

通过判断第一超声波段的能量值与预设能量值相差情况,可以判断发声设备的发声口的填堵情况。By judging the difference between the energy value of the first ultrasonic segment and the preset energy value, it is possible to judge the blocking of the sound outlet of the sound emitting device.

本发明实施例提供的发声设备状态检测方法,通过对所播放的超声音频信号录制得到的第一录制文件中的第一超声波段的能量与预设能量值进行比较,以检测移动终端发声设备的是否异常,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,通过检测异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比第一超声波段能量值的强弱,能够实现确定移动终端的发声设备的状态,且仅在发声口中进入微量异物或灰尘初期,也可即时的察觉到发声设备的状态,从而提升用户的听觉体验。The method for detecting the state of the sounding device provided by the embodiment of the present invention compares the energy of the first ultrasonic segment in the first recording file obtained by recording the played ultrasonic audio signal with the preset energy value to detect the sounding device of the mobile terminal. Whether it is abnormal, because the ultrasonic wave is a high-frequency wave, if it is blocked in the transmission process, it will cause reflection. The energy value of the ultrasonic wave of the abnormal sounding device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the energy value of the first ultrasonic segment. Weak, it is possible to determine the state of the sound emitting device of the mobile terminal, and only when a small amount of foreign matter or dust enters the sound outlet, the state of the sound emitting device can be detected in real time, thereby improving the user's listening experience.

实施例二Embodiment two

参照图2,示出了本发明实施例二的一种发声设备状态检测方法的步骤流程图。Referring to FIG. 2 , it shows a flow chart of steps of a method for detecting the state of a sound emitting device according to Embodiment 2 of the present invention.

本发明实施例提供的发声设备状态检测方法包括以下步骤:The method for detecting the state of a sounding device provided in an embodiment of the present invention includes the following steps:

步骤201:同时播放音频文件以及超声音频信号,并录制生成录制文件。Step 201: Simultaneously play the audio file and the ultrasonic audio signal, and record to generate a recording file.

本发明实施例中,在移动终端播放声音或者音乐时,同时播放超声音频信号,由于超声波是一种超过人可听范围20-20kHz的声波,频率在20kHz以上,因此在使用过程中并不影响用户听感,故可以在播放音乐的同时播放超声音频信号,以便于在使用过程中对发声设备状态进行检测。并且,超声波与发声设备相互作用,可以实现在不损坏发声设备的同时完成对发声设备的检测。In the embodiment of the present invention, when the mobile terminal plays sound or music, the ultrasonic audio signal is played at the same time. Since the ultrasonic wave is a sound wave beyond the human audible range of 20-20kHz, and the frequency is above 20kHz, it does not affect the audio frequency during use. The user's sense of hearing, so the ultrasonic audio signal can be played while playing music, so as to detect the state of the sound-emitting device during use. Moreover, the ultrasonic wave interacts with the sound-generating device, so that the detection of the sound-generating device can be completed without damaging the sound-generating device.

步骤202:将录制文件中的音频文件过滤生成第一录制文件。Step 202: Filter the audio files in the recorded files to generate a first recorded file.

其中第一录制文件中只存在超声音频信号。Wherein only ultrasonic audio signals exist in the first recording file.

由于录制文件中存在音频文件或者音频信号,以及超声信号,使用高通滤波将低频信号,即音频文件以及音频信号进行过滤,在实际过程中,还可能由于录制环境嘈杂导致录制文件中存在噪音,也可以通过高通滤波将杂音滤掉,使得第一录制文件中只存在超声音频信号。Due to the presence of audio files or audio signals and ultrasonic signals in the recorded files, high-pass filtering is used to filter low-frequency signals, that is, audio files and audio signals. In the actual process, there may be noise in the recorded files due to the noisy recording environment. Noise can be filtered out by high-pass filtering, so that only ultrasonic audio signals exist in the first recording file.

步骤203:获取第一录制文件中预设时长的第一超声波段。Step 203: Obtain the first ultrasonic segment with a preset duration in the first recording file.

获取第一录制文件中的超声波,并按照预设时长对超声波进行截取,截取第一录制文件中的某一段,以用于后续对该超声波段进行算法计算。Acquiring the ultrasound in the first recording file, intercepting the ultrasound according to a preset time length, and intercepting a certain segment in the first recording file for subsequent algorithm calculation on the ultrasound segment.

需要说明的是,本领域技术人员可以根据实际情况对预设时长进行选择,其中,预设时长可以为100ms、200ms、300ms等,本发明实施例对预设时长不作具体限制。It should be noted that those skilled in the art can select the preset duration according to the actual situation. The preset duration can be 100ms, 200ms, 300ms, etc. The embodiment of the present invention does not specifically limit the preset duration.

步骤204:获取第一超声波段中的每个采样信号对应的信号强度。Step 204: Obtain the signal strength corresponding to each sampled signal in the first ultrasonic band.

将第一超声波段按照采样个数离散为多个采样信号,获取这些采样信号对应的信号强度。The first ultrasonic segment is discretized into a plurality of sampling signals according to the sampling number, and signal strengths corresponding to these sampling signals are acquired.

采样频率越高,采样的间隔时间越短,则在单位时间内计算机得到的样本数据就越多,对信号波形的表示也越精确。采样频率与原始信号频率之间有一定的关系,根据奈奎斯特理论,只有采样频率高于原始信号最高频率的两倍时,才能把数字信号表示的信号还原成为原来信号,因此一种优选的采用方式为将第一超声波段信号,按照超声信号频率的两倍进行采样。The higher the sampling frequency and the shorter the sampling interval, the more sample data the computer can obtain per unit time, and the more accurate the representation of the signal waveform. There is a certain relationship between the sampling frequency and the original signal frequency. According to the Nyquist theory, only when the sampling frequency is higher than twice the highest frequency of the original signal can the signal represented by the digital signal be restored to the original signal. Therefore, an optimal The adopting method is to sample the first ultrasonic band signal according to twice the frequency of the ultrasonic signal.

步骤205:计算各信号强度的平方之和,得到第一超声波段的能量值。Step 205: Calculate the sum of the squares of the signal strengths to obtain the energy value of the first ultrasonic segment.

通过公式:计算第一超声波段的能量值,其中n为采样个数,x(n)为各个采样信号。By formula: Calculate the energy value of the first ultrasonic segment, where n is the number of samples, and x(n) is each sampled signal.

步骤206:计算第一超声波段的能量值与预设能量值的差值。Step 206: Calculate the difference between the energy value of the first ultrasonic segment and a preset energy value.

其中,预设能量值通过以下方式生成:采用发声设备状态正常的移动终端,录制播放的超声音频信号生成第二录制文件;获取第二录制文件中预设时长的第二超声波段;计算第二超声波段的能量值,将第二超声波段的能量值确定为预设能量值。Among them, the preset energy value is generated in the following way: using a mobile terminal with a normal sounding device, recording and playing the ultrasonic audio signal to generate a second recording file; obtaining the second ultrasonic segment with a preset duration in the second recording file; calculating the second The energy value of the ultrasonic segment, determining the energy value of the second ultrasonic segment as the preset energy value.

计算第一超声波段的能量值与预设能量值的差值,通过差值可以表明发声设备的填堵程度。Calculate the difference between the energy value of the first ultrasonic segment and the preset energy value, and the difference can indicate the blocking degree of the sound-generating device.

步骤207:将差值与差值阈值进行比较。Step 207: Compare the difference with a difference threshold.

步骤208:当差值小于或者等于差值阈值时,则输出用于指示发声设备状态正常的第一提示信息。Step 208: When the difference is less than or equal to the difference threshold, output first prompt information for indicating that the state of the sound generating device is normal.

步骤209:当差值大于差值阈值时,则输出用于指示发声设备状态异常的第二提示信息。Step 209: When the difference is greater than the difference threshold, output second prompt information for indicating that the state of the sound generating device is abnormal.

本领域技术人员可以根据实际情况对差值阈值进行设定,例如:差值阈值可以设定为10、20、30等,本发明实施例对差值阈值的设定不作具体限制。Those skilled in the art can set the difference threshold according to the actual situation, for example, the difference threshold can be set to 10, 20, 30, etc. The embodiment of the present invention does not specifically limit the setting of the difference threshold.

当差值阈值为20时,且计算出的差值为10时,10小于20,则表明发声设备状态正常,同时输出提示发声设备状态正常的提示消息,其中,可以为振动、闪烁文字以及弹出提示框的方式输出第一提示信息。When the difference threshold is 20, and the calculated difference is 10, if 10 is less than 20, it indicates that the sound-emitting device is in normal state, and at the same time output a prompt message prompting that the state of the sound-emitting device is normal, which can be vibration, flashing text and pop-up Output the first prompt message in the form of a prompt box.

当差值阈值为20时,计算出的差值为30时,30大于20,表明发声设备状态异常,当计算差值为40时,40大于20,则差值为40的发声设备状态异常的程度高于差值为30的发声设备,可以依据异常的等级,发出不同的第二提示信息,以提示用户发声设备的状态。When the difference threshold is 20, when the calculated difference is 30, 30 is greater than 20, indicating that the state of the sounding device is abnormal; when the calculated difference is 40, and 40 is greater than 20, the state of the sounding device with a difference of 40 is abnormal The sound-generating device whose degree is higher than the difference of 30 can send out different second prompt information according to the level of the abnormality, so as to remind the user of the state of the sound-generating device.

本发明实施例提供的发声设备状态检测方法,通过对所播放音频文件以及超声音频信号进行录制生成录制文件,对录制文件进行过滤,得到第一录制文件,经过过滤的程序,使得过滤后的第一录制文件不存在杂音,将第一录制文件中的第一超声波段的能量与预设能量值的差值与差值阈值比较,通过比较结果,确定移动终端发声设备的状态,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比差值与差值阈值的大小,可以判断移动终端的发声设备的状态,当发声设备被堵时,则通过差值与差值阈值相差的大小程度,确定移动终端的发生设备的被堵程度,并且,在发声口中进入微量异物或灰尘初期,也可及时的察觉到发声设备的状态,并及时提示用户发声设备的状态,用户依据发声设备的状态,采取必要的措施,从而可以提升用户的听觉体验。The sound-emitting device state detection method provided by the embodiment of the present invention generates a recording file by recording the played audio file and the ultrasonic audio signal, and filters the recording file to obtain the first recording file. After the filtering program, the filtered first recording file is obtained. There is no noise in the recording file, compare the difference between the energy of the first ultrasonic segment in the first recording file and the preset energy value with the difference threshold, and determine the state of the mobile terminal sounding device by comparing the results. If the transmission process is blocked, it will cause reflection. The energy value of the ultrasonic wave of the abnormal sounding device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the difference value and the difference threshold value, the sounding device of the mobile terminal can be judged. state, when the sound emitting device is blocked, the degree of blockage of the mobile terminal’s generating device is determined by the difference between the difference value and the difference threshold value, and it can also be detected in time when a small amount of foreign matter or dust enters the sound emitting port The status of the sound-emitting device is detected, and the user is promptly notified of the state of the sound-emitting device. The user takes necessary measures according to the state of the sound-emitting device, thereby improving the user's listening experience.

实施例三Embodiment three

参照图3,示出了本发明实施例三的一种移动终端的结构框图。Referring to FIG. 3 , it shows a structural block diagram of a mobile terminal according to Embodiment 3 of the present invention.

本发明实施例提供的移动终端包括:录制模块301,用于录制播放的超声音频信号生成第一录制文件;获取模块302,用于获取所述第一录制文件中预设时长的第一超声波段;计算模块303,用于计算所述第一超声波段的能量值;输出模块304,用于将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。The mobile terminal provided by the embodiment of the present invention includes: a recording module 301, configured to record and play an ultrasonic audio signal to generate a first recording file; an obtaining module 302, configured to obtain a first ultrasonic segment of a preset duration in the first recording file ; The calculation module 303 is used to calculate the energy value of the first ultrasonic segment; the output module 304 is used to compare the energy value of the first ultrasonic segment with a preset energy value, and output the state detection of the sounding device according to the comparison result result.

本发明实施例提供的移动终端,通过对所播放的超声音频信号录制得到的第一录制文件中的第一超声波段的能量与预设能量值进行比较,以检测移动终端发声设备的是否异常,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,通过检测异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比第一超声波段能量值的强弱,可以判断移动终端的发声设备是否异常,故仅在发声口中进入微量异物或灰尘初期,即可即时的察觉到发声设备的异常,以即时提示用户解决该异常,从而提升用户的听觉体验。The mobile terminal provided by the embodiment of the present invention compares the energy of the first ultrasonic segment in the first recording file obtained by recording the played ultrasonic audio signal with a preset energy value to detect whether the sounding device of the mobile terminal is abnormal, Since the ultrasonic wave is a high-frequency wave, if it is blocked during the transmission process, it will cause reflection. The energy value of the ultrasonic wave detected by the abnormal sound-generating device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the strength of the energy value of the first ultrasonic segment, you can Judging whether the sounding device of the mobile terminal is abnormal, so only a small amount of foreign matter or dust enters the sounding port, and the abnormality of the sounding device can be detected immediately, and the user can be prompted to solve the abnormality immediately, thereby improving the user's listening experience.

实施例四Embodiment four

参照图4,示出了本发明实施例四的一种移动终端的结构框图。Referring to FIG. 4 , it shows a structural block diagram of a mobile terminal according to Embodiment 4 of the present invention.

本发明实施例提供的移动终端包括:录制模块401,用于录制播放的超声音频信号生成第一录制文件;获取模块402,用于获取所述第一录制文件中预设时长的第一超声波段;计算模块403,用于计算所述第一超声波段的能量值;输出模块404,用于将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果。The mobile terminal provided by the embodiment of the present invention includes: a recording module 401, configured to record and play an ultrasonic audio signal to generate a first recording file; an obtaining module 402, configured to obtain a first ultrasonic segment of a preset duration in the first recording file ; The calculation module 403 is used to calculate the energy value of the first ultrasonic segment; the output module 404 is used to compare the energy value of the first ultrasonic segment with a preset energy value, and output the state detection of the sounding device according to the comparison result result.

优选地,所述计算模块403包括:第一获取子模块4031,用于获取所述第一超声波段中的每个采样信号对应的信号强度;第一计算子模块4032,用于计算各所述信号强度的平方之和,得到所述第一超声波段的能量值。Preferably, the calculation module 403 includes: a first acquisition submodule 4031, configured to acquire the signal strength corresponding to each sampling signal in the first ultrasonic band; a first calculation submodule 4032, configured to calculate each of the The sum of the squares of the signal intensities is used to obtain the energy value of the first ultrasonic segment.

优选地,所述输出模块404包括:第二计算子模块4041,用于计算所述第一超声波段的能量值与所述预设能量值的差值;比较子模块4042,用于将所述差值与差值阈值进行比较;第一输出子模块4043,用于当所述差值小于或者等于所述差值阈值时,则输出用于指示发声设备状态正常的第一提示信息;第二输出子模块4044,用于当所述差值大于所述差值阈值时,则输出用于指示发声设备状态异常的第二提示信息。Preferably, the output module 404 includes: a second calculation submodule 4041, used to calculate the difference between the energy value of the first ultrasonic band and the preset energy value; a comparison submodule 4042, used to compare the The difference is compared with the difference threshold; the first output submodule 4043 is used to output the first prompt information indicating that the state of the sounding device is normal when the difference is less than or equal to the difference threshold; the second The output sub-module 4044 is configured to, when the difference is greater than the difference threshold, output second prompt information indicating that the state of the sounding device is abnormal.

优选地,所述录制模块401包括:录制子模块4011,用于同时播放音频文件以及超声音频信号,并录制生成录制文件;过滤子模块4012,用于将所述录制文件中的音频文件过滤生成第一录制文件,其中所述第一录制文件中只存在超声音频信号。Preferably, the recording module 401 includes: a recording submodule 4011, which is used to simultaneously play audio files and ultrasonic audio signals, and record and generate recording files; a filtering submodule 4012, which is used to filter and generate audio files in the recording files A first recording file, wherein only ultrasonic audio signals exist in the first recording file.

优选地,所述预设能量值通过以下方式生成:采用发声设备状态正常的移动终端,录制播放的超声音频信号生成第二录制文件;获取所述第二录制文件中预设时长的第二超声波段;计算所述第二超声波段的能量值,将所述第二超声波段的能量值确定为预设能量值。Preferably, the preset energy value is generated in the following manner: using a mobile terminal with a normal sounding device, recording and playing an ultrasonic audio signal to generate a second recording file; obtaining a second ultrasonic wave with a preset duration in the second recording file segment; calculating an energy value of the second ultrasonic segment, and determining the energy value of the second ultrasonic segment as a preset energy value.

本发明实施例提供的移动终端能够实现图1至图2的方法实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal provided by the embodiment of the present invention can implement various processes implemented by the mobile terminal in the method embodiments shown in FIG. 1 to FIG. 2 , and details are not repeated here to avoid repetition.

本发明实施例提供的移动终端,通过对所播放音频文件以及超声音频信号进行录制生成录制文件,对录制文件进行过滤,得到第一录制文件,经过过滤的过程,使得过滤后的第一录制文件不存在杂音,将第一录制文件中的第一超声波段的能量与预设能量值的差值与差值阈值比较,通过比较结果,确定移动终端发声设备的状态,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比差值与差值阈值的大小,可以判断移动终端的发声设备的状态,当发声设备被堵时,则通过差值与差值阈值相差的大小程度,确定移动终端的发生设备的被堵程度,,并且,在发声口中进入微量异物或灰尘初期,也可及时的察觉到发声设备的状态,并及时提示用户发声设备的状态,用户依据发声设备的状态,采取必要的措施,从而可以提升用户的听觉体验。In the mobile terminal provided by the embodiment of the present invention, the recorded file is generated by recording the played audio file and the ultrasonic audio signal, and the recorded file is filtered to obtain the first recorded file. After the filtering process, the filtered first recorded file There is no noise, compare the difference between the energy of the first ultrasonic segment in the first recorded file and the preset energy value with the difference threshold, and determine the state of the sounding device of the mobile terminal by comparing the results. Since the ultrasonic wave is a high-frequency wave, If the sending process is blocked, it will cause reflection, and the energy value of the ultrasonic wave of the abnormal sounding device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the difference value with the difference threshold, the state of the sounding device of the mobile terminal can be judged. When the sound emitting device is blocked, the degree of blockage of the mobile terminal device is determined by the difference between the difference value and the difference threshold value, and the sound can also be detected in time when a small amount of foreign matter or dust enters the sound emitting port. The state of the device, and promptly remind the user of the state of the sounding device, and the user can take necessary measures according to the state of the sounding device, so as to improve the user's listening experience.

实施例五Embodiment five

参照图5,示出了本发明实施例的移动终端的结构框图。Referring to FIG. 5 , it shows a structural block diagram of a mobile terminal according to an embodiment of the present invention.

图5为实现本发明各个实施例的一种移动终端的硬件结构示意图,FIG. 5 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention,

该移动终端500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、处理器510、以及电源511等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。The mobile terminal 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and Power supply 511 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in Figure 5 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than shown in the figure, or combine some components, or different components layout. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, and a pedometer.

其中,处理器510,用于录制播放的超声音频信号生成第一录制文件;获取所述第一录制文件中预设时长的第一超声波段;计算所述第一超声波段的能量值;将所述第一超声波段的能量值与预设能量值进行比较,依据比较结果输出发声设备状态检测结果;Wherein, the processor 510 is used to record and play the ultrasonic audio signal to generate a first recording file; obtain the first ultrasonic segment with a preset duration in the first recording file; calculate the energy value of the first ultrasonic segment; Comparing the energy value of the first ultrasonic segment with the preset energy value, and outputting the state detection result of the sounding device according to the comparison result;

通过对所播放的超声音频信号录制得到的第一录制文件中的第一超声波段的能量与预设能量值进行比较,以检测移动终端发声设备的是否异常,由于超声波是一种高频波,发送过程如果被阻挡会引起反射,通过检测异常的发声设备的超声波的能量值会比正常的超声波能量值弱,因此通过对比第一超声波段能量值的强弱,能够实现检测移动终端的发声设备的状态,故仅在发声口中进入微量异物或灰尘初期,即可即时的察觉到发声设备的状态是否异常,从而提升用户的听觉体验。By comparing the energy of the first ultrasonic segment in the first recording file obtained by recording the played ultrasonic audio signal with the preset energy value, to detect whether the sounding device of the mobile terminal is abnormal. Since the ultrasonic wave is a high-frequency wave, the sending process If it is blocked, it will cause reflection. The energy value of the ultrasonic wave detected by the abnormal sounding device will be weaker than the normal ultrasonic energy value. Therefore, by comparing the strength of the energy value of the first ultrasonic wave segment, the state of the sounding device of the mobile terminal can be detected. , so only when a small amount of foreign matter or dust enters the sound outlet, you can immediately detect whether the state of the sound device is abnormal, thereby improving the user's listening experience.

应理解的是,本发明实施例中,射频单元501可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器510处理;另外,将上行的数据发送给基站。通常,射频单元501包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元501还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, after receiving the downlink data from the base station, the processor 510 processes it; Uplink data is sent to the base station. Generally, the radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.

移动终端通过网络模块502为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides users with wireless broadband Internet access through the network module 502, such as helping users send and receive emails, browse web pages, and access streaming media.

音频输出单元503可以将射频单元501或网络模块502接收的或者在存储器509中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元503还可以提供与移动终端500执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元503包括扬声器、蜂鸣器以及受话器等。The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 can also provide audio output related to a specific function performed by the mobile terminal 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver and the like.

输入单元504用于接收音频或视频信号。输入单元504可以包括图形处理器(Graphics Processing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元506上。经图形处理器5041处理后的图像帧可以存储在存储器509(或其它存储介质)中或者经由射频单元501或网络模块502进行发送。麦克风5042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元501发送到移动通信基站的格式输出。The input unit 504 is used for receiving audio or video signals. The input unit 504 may include a graphics processing unit (Graphics Processing Unit, GPU) 5041 and a microphone 5042, and the graphics processor 5041 is used for still pictures or video images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frames may be displayed on the display unit 506 . The image frames processed by the graphics processor 5041 may be stored in the memory 509 (or other storage media) or sent via the radio frequency unit 501 or the network module 502 . The microphone 5042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 501 for output in the case of a phone call mode.

移动终端500还包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板5061的亮度,接近传感器可在移动终端500移动到耳边时,关闭显示面板5061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器505还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The mobile terminal 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and the display panel 5061 when the mobile terminal 500 moves to the ear / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of mobile terminals (such as horizontal and vertical screen switching, related games, etc.) , magnetometer attitude calibration), vibration recognition-related functions (such as pedometer, knocking), etc.; the sensor 505 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.

显示单元506用于显示由用户输入的信息或提供给用户的信息。显示单元506可包括显示面板5061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板5061。The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.

用户输入单元507可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板5071上或在触控面板5071附近的操作)。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器510,接收处理器510发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板5071。除了触控面板5071,用户输入单元507还可以包括其他输入设备5072。具体地,其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 507 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072 . The touch panel 5071, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger and a stylus on the touch panel 5071 or near the touch panel 5071). operate). The touch panel 5071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to For the processor 510, receive the command sent by the processor 510 and execute it. In addition, the touch panel 5071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 5071 , the user input unit 507 may also include other input devices 5072 . Specifically, other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板5071可覆盖在显示面板5061上,当触控面板5071检测到在其上或附近的触摸操作后,传送给处理器510以确定触摸事件的类型,随后处理器510根据触摸事件的类型在显示面板5061上提供相应的视觉输出。虽然在图5中,触控面板5071与显示面板5061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板5071与显示面板5061集成而实现移动终端的输入和输出功能,具体此处不做限定。Furthermore, the touch panel 5071 can be covered on the display panel 5061, and when the touch panel 5071 detects a touch operation on or near it, it will be sent to the processor 510 to determine the type of the touch event, and then the processor 510 can The type of event provides a corresponding visual output on the display panel 5061 . Although in FIG. 5, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated. The implementation of the input and output functions of the mobile terminal is not specifically limited here.

接口单元508为外部装置与移动终端500连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元508可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端500内的一个或多个元件或者可以用于在移动终端500和外部装置之间传输数据。The interface unit 508 is an interface for connecting an external device to the mobile terminal 500 . For example, an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 508 can be used to receive input from an external device (for example, data information, power, etc.) transfer data between devices.

存储器509可用于存储软件程序以及各种数据。存储器509可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器509可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 509 can be used to store software programs as well as various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

处理器510是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器510可包括一个或多个处理单元;优选的,处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。The processor 510 is the control center of the mobile terminal, and uses various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 509, and calling data stored in the memory 509 , execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 510 .

移动终端500还可以包括给各个部件供电的电源511(比如电池),优选的,电源511可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 500 can also include a power supply 511 (such as a battery) for supplying power to various components. Preferably, the power supply 511 can be logically connected to the processor 510 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. and other functions.

另外,移动终端500包括一些未示出的功能模块,在此不再赘述。In addition, the mobile terminal 500 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种移动终端,包括处理器510,存储器509,存储在存储器509上并可在所述处理器510上运行的计算机程序,该计算机程序被处理器510执行时实现上述发声设备状态检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides a mobile terminal, including a processor 510, a memory 509, and a computer program stored in the memory 509 and operable on the processor 510. When the computer program is executed by the processor 510 The various processes of the above embodiments of the method for detecting the state of the sounding device can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述发声设备检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned embodiment of the sound-emitting device detection method can be achieved, and the same Technical effects, in order to avoid repetition, will not be repeated here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

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

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

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive, and those of ordinary skill in the art will Under the enlightenment of the present invention, without departing from the gist of the present invention and the protection scope of the claims, many forms can also be made, all of which belong to the protection of the present invention.

Claims (12)

1. a kind of audible device condition detection method, it is characterised in that methods described includes:
Record the recorded file of ultrasonic audio signal generation first played;
Obtain the first supersonic range of preset duration in first recorded file;
Calculate the energy value of first supersonic range;
By the energy value of first supersonic range compared with preset energy value, according to comparative result output audible device shape State testing result.
2. according to the method for claim 1, it is characterised in that the step of the energy value for calculating first supersonic range Suddenly, including:
Obtain signal intensity corresponding to each sampled signal in first supersonic range;
Square sum of each signal intensity is calculated, obtains the energy value of first supersonic range.
3. according to the method for claim 2, it is characterised in that the energy value by first supersonic range is with presetting The step of energy value is compared, and foundation comparative result exports audible device state-detection result, including:
Calculate the energy value of first supersonic range and the difference of the preset energy value;
By the difference compared with difference threshold;
When the difference is less than or equal to the difference threshold, then export for indicating audible device state normal first Prompt message;
When the difference is more than the difference threshold, then the second prompting letter for indicating audible device abnormal state is exported Breath.
4. according to the method for claim 1, it is characterised in that the ultrasonic audio signal generation first played of recording is recorded The step of file processed, including:
Audio file and ultrasonic audio signal are played simultaneously, and records generation recorded file;
Audio file filtering in the recorded file is generated into the first recorded file, wherein only being deposited in first recorded file In ultrasonic audio signal.
5. according to the method for claim 1, it is characterised in that the preset energy value generates in the following manner:
Using the normal mobile terminal of audible device state, the recorded file of ultrasonic audio signal generation second of broadcasting is recorded;
Obtain the second supersonic range of preset duration in second recorded file;
The energy value of second supersonic range is calculated, the energy value of second supersonic range is defined as preset energy value.
6. a kind of mobile terminal, it is characterised in that the mobile terminal includes:
Module is recorded, for recording the recorded file of ultrasonic audio signal generation first played;
Acquisition module, for obtaining the first supersonic range of preset duration in first recorded file;
Computing module, for calculating the energy value of first supersonic range;
Output module, for by the energy value of first supersonic range compared with preset energy value, according to comparative result Export audible device state-detection result.
7. mobile terminal according to claim 6, it is characterised in that the computing module includes:
First acquisition submodule, for obtaining signal intensity corresponding to each sampled signal in first supersonic range;
First calculating sub module, for calculating square sum of each signal intensity, obtain the energy of first supersonic range Value.
8. mobile terminal according to claim 7, it is characterised in that the output module includes:
Second calculating sub module, for calculating the energy value of first supersonic range and the difference of the preset energy value;
Comparison sub-module, for by the difference compared with difference threshold;
First output sub-module, it is used to indicate hair for when the difference is less than or equal to the difference threshold, then exporting Normal first prompt message of acoustic equipment state;
Second output sub-module, it is used to indicate audible device shape for when the difference is more than the difference threshold, then exporting The second abnormal prompt message of state.
9. mobile terminal according to claim 6, it is characterised in that the recording module includes:
Submodule is recorded, for playing audio file and ultrasonic audio signal simultaneously, and records generation recorded file;
Filter submodule, for by audio file filtering the first recorded file of generation in the recorded file, wherein described the Ultrasonic audio signal is only existed in one recorded file.
10. mobile terminal according to claim 6, it is characterised in that the preset energy value generates in the following manner:
Using the normal mobile terminal of audible device state, the recorded file of ultrasonic audio signal generation second of broadcasting is recorded;
Obtain the second supersonic range of preset duration in second recorded file;
The energy value of second supersonic range is calculated, the energy value of second supersonic range is defined as preset energy value.
A kind of 11. mobile terminal, it is characterised in that including:Memory, processor and it is stored on the memory and can be in institute The audible device state-detection computer program run on processor is stated, the audible device state-detection computer program is by institute The step of audible device condition detection method as any one of claim 1 to 5 being realized when stating computing device.
12. a kind of computer-readable recording medium, it is characterised in that be stored with sounding on the computer-readable recording medium and set Standby state-detection computer program, realize that right such as will when the audible device state-detection computer program is executed by processor The step of seeking the audible device condition detection method any one of 1 to 5.
CN201710882928.0A 2017-09-26 2017-09-26 A kind of audible device condition detection method and mobile terminal Pending CN107705804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710882928.0A CN107705804A (en) 2017-09-26 2017-09-26 A kind of audible device condition detection method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710882928.0A CN107705804A (en) 2017-09-26 2017-09-26 A kind of audible device condition detection method and mobile terminal

Publications (1)

Publication Number Publication Date
CN107705804A true CN107705804A (en) 2018-02-16

Family

ID=61176036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710882928.0A Pending CN107705804A (en) 2017-09-26 2017-09-26 A kind of audible device condition detection method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107705804A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109121059A (en) * 2018-07-26 2019-01-01 Oppo广东移动通信有限公司 Loudspeaker hole blocking detection method and related product
CN110875058A (en) * 2018-08-31 2020-03-10 中国移动通信有限公司研究院 Voice communication processing method, terminal equipment and server
CN110995921A (en) * 2019-11-19 2020-04-10 维沃移动通信有限公司 Call processing method, electronic device and computer-readable storage medium
CN114464212A (en) * 2021-08-30 2022-05-10 荣耀终端有限公司 Noise detection method for audio signal and related electronic equipment
CN115052240A (en) * 2022-06-14 2022-09-13 彩音(深圳)数码科技有限公司 Method and device for automatically detecting active sound box fault, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773605A (en) * 2004-11-12 2006-05-17 中国科学院声学研究所 A Speech Endpoint Detection Method Applied to Speech Recognition System
US20140358535A1 (en) * 2013-05-28 2014-12-04 Samsung Electronics Co., Ltd. Method of executing voice recognition of electronic device and electronic device using the same
CN104640054A (en) * 2015-02-12 2015-05-20 广东欧珀移动通信有限公司 Earphone/loudspeaker testing method and system for mobile terminal
CN105246015A (en) * 2015-11-11 2016-01-13 上海斐讯数据通信技术有限公司 Electronic device and method and system for detecting loudspeaker sound source thereof
CN105979053A (en) * 2016-04-18 2016-09-28 广东欧珀移动通信有限公司 Method and device for detecting microphone in mobile terminal and mobile terminal
CN106791186A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 It is a kind of to detect the method and system that microphone sound hole is blocked

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773605A (en) * 2004-11-12 2006-05-17 中国科学院声学研究所 A Speech Endpoint Detection Method Applied to Speech Recognition System
US20140358535A1 (en) * 2013-05-28 2014-12-04 Samsung Electronics Co., Ltd. Method of executing voice recognition of electronic device and electronic device using the same
CN104640054A (en) * 2015-02-12 2015-05-20 广东欧珀移动通信有限公司 Earphone/loudspeaker testing method and system for mobile terminal
CN105246015A (en) * 2015-11-11 2016-01-13 上海斐讯数据通信技术有限公司 Electronic device and method and system for detecting loudspeaker sound source thereof
CN105979053A (en) * 2016-04-18 2016-09-28 广东欧珀移动通信有限公司 Method and device for detecting microphone in mobile terminal and mobile terminal
CN106791186A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 It is a kind of to detect the method and system that microphone sound hole is blocked

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩志艳: "《面向语音与面部表情信号的多模式情感识别技术研究》", 31 January 2017, 东北大学出版社 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109121059A (en) * 2018-07-26 2019-01-01 Oppo广东移动通信有限公司 Loudspeaker hole blocking detection method and related product
CN110875058A (en) * 2018-08-31 2020-03-10 中国移动通信有限公司研究院 Voice communication processing method, terminal equipment and server
CN110995921A (en) * 2019-11-19 2020-04-10 维沃移动通信有限公司 Call processing method, electronic device and computer-readable storage medium
CN114464212A (en) * 2021-08-30 2022-05-10 荣耀终端有限公司 Noise detection method for audio signal and related electronic equipment
CN115052240A (en) * 2022-06-14 2022-09-13 彩音(深圳)数码科技有限公司 Method and device for automatically detecting active sound box fault, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108551631A (en) A kind of sound quality compensation method and mobile terminal
CN111477243B (en) Audio signal processing method and electronic equipment
CN109982228B (en) Microphone fault detection method and mobile terminal
CN108848267B (en) Audio playback method and mobile terminal
CN108335703B (en) Method and apparatus for determining accent position of audio data
CN107749306B (en) A vibration optimization method and mobile terminal
CN108540900A (en) Volume adjusting method and related product
CN107705804A (en) A kind of audible device condition detection method and mobile terminal
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN110097872A (en) A kind of audio-frequency processing method and electronic equipment
CN108063999A (en) A kind of dust-proof network detecting method, mobile terminal
CN109994111A (en) A kind of exchange method, device and mobile terminal
CN107911777B (en) Processing method and device for return-to-ear function and mobile terminal
CN108521501A (en) Voice input method and mobile terminal
CN110995921A (en) Call processing method, electronic device and computer-readable storage medium
CN108900688B (en) Voice control method, device, electronic device and computer readable medium
CN110471808A (en) A pressure button detection method, device and mobile terminal
CN110297543A (en) A kind of audio frequency playing method and terminal device
CN107920310A (en) A kind of method and mobile terminal of multi-microphone recording
CN108305638B (en) Signal processing method, signal processing device and terminal equipment
CN108810787A (en) Foreign matter detecting method and device based on audio frequency apparatus, terminal
CN108650392A (en) A kind of call recording method and mobile terminal
CN108683975A (en) an audio device
CN109963235B (en) Sound signal processing method and mobile terminal
CN110677770B (en) Sound production control method, electronic device, and 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

Application publication date: 20180216

RJ01 Rejection of invention patent application after publication