CN106126167A - A kind of sound effect treatment method and terminal unit - Google Patents
A kind of sound effect treatment method and terminal unit Download PDFInfo
- Publication number
- CN106126167A CN106126167A CN201610438866.XA CN201610438866A CN106126167A CN 106126167 A CN106126167 A CN 106126167A CN 201610438866 A CN201610438866 A CN 201610438866A CN 106126167 A CN106126167 A CN 106126167A
- Authority
- CN
- China
- Prior art keywords
- audio file
- sound effect
- frequency
- preset
- terminal unit
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
本发明实施例公开了一种音效处理方法及终端设备,其中音效处理方法可包括:检测终端设备播放的音频文件的频率;判断所述音频文件的频率中是否有频段在预设频率范围内;以及在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低播放所述音频文件的音量及/或增益。本发明实施例中,在当前播放的音频文件的频率在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。
The embodiment of the present invention discloses a sound effect processing method and a terminal device, wherein the sound effect processing method may include: detecting the frequency of an audio file played by the terminal device; judging whether any frequency band in the frequency of the audio file is within a preset frequency range; And when there is a frequency band in the frequency of the audio file within the preset frequency range, adjust the sound effect parameters of the terminal device to play the audio file according to the first preset sound effect adjustment method, wherein the first preset sound effect The adjustment method at least includes reducing the volume and/or gain of playing the audio file. In the embodiment of the present invention, when the frequency of the currently played audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and frequency of the frequency band in the audio file within the preset frequency range can be reduced. and/or volume, so that the power consumption of the terminal device can be reduced without affecting the auditory effect.
Description
技术领域technical field
本发明涉及智能终端技术领域,尤其涉及一种音效处理方法及终端设备。The present invention relates to the technical field of intelligent terminals, in particular to a sound effect processing method and a terminal device.
背景技术Background technique
随着智能终端技术的发展,市场上各种各样的智能终端层出不穷,智能终端的功能及应用也越来越丰富。其中,音频播放功能为大多数智能终端都具备的基本功能。终端中的许多应用都需要调用音频模块进行音频播放,例如播放游戏音效、音乐、视频音效等。With the development of smart terminal technology, various smart terminals emerge in an endless stream on the market, and the functions and applications of smart terminals are becoming more and more abundant. Among them, the audio playback function is a basic function that most smart terminals have. Many applications in the terminal need to call the audio module for audio playback, such as playing game sound effects, music, video sound effects, etc.
在现有技术中,为了迎合用户对听觉体验的高要求,通常会在音频文件原有的音效参数的基础上进一步增强音效。然而,增强音效虽然能在一定程度上提升用户的听觉体验,同时也会增大终端设备的功耗。In the prior art, in order to meet the user's high requirements for listening experience, the sound effect is usually further enhanced on the basis of the original sound effect parameters of the audio file. However, although enhancing the sound effect can improve the listening experience of the user to a certain extent, it will also increase the power consumption of the terminal device.
发明内容Contents of the invention
本发明实施例提供一种音效处理方法及终端设备,可在不影响听觉效果的前提下,降低终端设备播放音频文件时的功耗。Embodiments of the present invention provide an audio effect processing method and a terminal device, which can reduce the power consumption of the terminal device when playing audio files without affecting the auditory effect.
本发明实施例第一方面提供一种音效处理方法,可包括:The first aspect of the embodiments of the present invention provides a method for processing sound effects, which may include:
检测终端设备播放的音频文件的频率;Detect the frequency of the audio file played by the terminal device;
判断所述音频文件的频率中是否有频段在预设频率范围内;以及judging whether there is a frequency band in the frequency of the audio file within a preset frequency range; and
在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的的音量及/或增益。When there is a frequency band in the frequency of the audio file within the preset frequency range, adjust the sound effect parameters of the terminal device to play the audio file according to a first preset sound effect adjustment method, wherein the first preset sound effect adjustment The method at least includes reducing the volume and/or gain of the frequency band in the audio file.
在一些可选实施例中,所述根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数之前,所述方法还包括:In some optional embodiments, before adjusting the sound effect parameters of the audio file played by the terminal device according to the first preset sound effect adjustment mode, the method further includes:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第一预设条件;When there is a frequency band in the frequency of the audio file within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameters of the audio file currently played by the terminal device do not meet the first preset condition, the sound effect parameters of the audio file played by the terminal device are adjusted according to the first preset sound effect adjustment manner.
在一些可选实施例中,所述方法还包括:In some optional embodiments, the method also includes:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When there is a frequency band in the frequency of the audio file that is not within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第二预设音效调节方式至少包括增大所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。When the sound effect parameters of the audio file currently played by the terminal device do not meet the second preset condition, adjust the sound effect parameters of the audio file played by the terminal device according to a second preset sound effect adjustment method, wherein the The second preset sound effect adjustment method includes at least increasing the volume and/or gain of frequency bands in the audio file that are not within the preset frequency range.
在一些可选实施例中,,所述检测终端设备播放的音频文件的频率之前,所述方法还包括:In some optional embodiments, before the detection of the frequency of the audio file played by the terminal device, the method further includes:
根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景;judging whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device;
在所述当前场景为所述预设的触发场景时,则检测所述终端设备播放的音频文件的频率。When the current scene is the preset trigger scene, the frequency of the audio file played by the terminal device is detected.
在一些可选实施例中,,所述根据所述环境噪音判断当前场景是否为预设的触发场景之前,所述方法还包括:In some optional embodiments, before determining whether the current scene is a preset trigger scene according to the environmental noise, the method further includes:
设置所述预设的触发场景所对应的噪音范围;Setting the noise range corresponding to the preset trigger scene;
所述根据所述环境噪音判断当前场景是否为预设的触发场景,具体为:判断所述环境噪音是否在所述噪音范围内,以及所述环境噪音在所述噪音范围内时,确定当前场景为预设的触发场景。The judging whether the current scene is a preset trigger scene according to the environmental noise is specifically: judging whether the environmental noise is within the noise range, and determining the current scene when the environmental noise is within the noise range is the preset trigger scene.
本发明实施例的第二方面还公开一种终端设备,包括:The second aspect of the embodiments of the present invention also discloses a terminal device, including:
检测单元,用于检测终端设备播放的音频文件的频率;以及A detection unit, configured to detect the frequency of the audio file played by the terminal device; and
处理单元,判断所述音频文件的频率中是否有频段在在预设频率范围内,以及在所述音频文件的频率中有频段在在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的的音量及/或增益。A processing unit, judging whether there is a frequency band in the frequency of the audio file within the preset frequency range, and when there is a frequency band in the frequency of the audio file within the preset frequency range, according to the first preset sound effect adjustment method Adjusting the sound effect parameters of the audio file played by the terminal device, wherein the first preset sound effect adjustment manner at least includes reducing the volume and/or gain of the frequency band in the audio file.
在一些可选实施例中,所述处理单元还用于:In some optional embodiments, the processing unit is also used for:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第一预设条件;When there is a frequency band in the frequency of the audio file within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameters of the audio file currently played by the terminal device do not meet the first preset condition, the sound effect parameters of the audio file played by the terminal device are adjusted according to the first preset sound effect adjustment manner.
在一些可选实施例中,,所述处理单元还用于:In some optional embodiments, the processing unit is also used for:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When there is a frequency band in the frequency of the audio file that is not within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第二预设音效调节方式至少包括增大所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。When the sound effect parameters of the audio file currently played by the terminal device do not meet the second preset condition, adjust the sound effect parameters of the audio file played by the terminal device according to a second preset sound effect adjustment method, wherein the The second preset sound effect adjustment method includes at least increasing the volume and/or gain of frequency bands in the audio file that are not within the preset frequency range.
在一些可选实施例中,所述终端设备还包括确定单元,用于根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景;所述处理单元用于在当前场景为所述预设的触发场景时,检测所述终端设备播放的音频文件的频率。In some optional embodiments, the terminal device further includes a determination unit, configured to judge whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device; the processing unit is configured to determine whether the current scene is When the preset trigger scene is detected, the frequency of the audio file played by the terminal device is detected.
在一些可选实施例中,所述终端设备还包括设置单元,用于设置所述预设的触发场景所对应的噪音范围;所述确定单元用于根据所述环境噪音判断当前场景是否为预设的触发场景,具体为:所述确定单元判断所述环境噪音是否在所述噪音范围内,以及在所述环境噪音在所述噪音范围内时,确定当前场景为预设的触发场景。In some optional embodiments, the terminal device further includes a setting unit, configured to set the noise range corresponding to the preset trigger scene; the determination unit is configured to judge whether the current scene is a preset trigger scene according to the environmental noise. The set trigger scene specifically includes: the determination unit judges whether the environmental noise is within the noise range, and when the environmental noise is within the noise range, determines that the current scene is a preset trigger scene.
本发明实施例第三方面提供一种终端设备,可包括处理器、存储器、通信接口和通信总线,其中所述处理器、所述存储器、所述处理器和所述通信接口通过所述通信总线连接,所述存储器存储有可执行程序代码,所述通信接口用于无线通信;所述处理器用于调用所述存储器中存储的可执行程序代码,以执行本发明实施例第一方面或者第一方面任一可选实施例所述的音效处理方法。The third aspect of the embodiment of the present invention provides a terminal device, which may include a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, the processor, and the communication interface pass through the communication bus connected, the memory stores executable program codes, and the communication interface is used for wireless communication; the processor is used to call the executable program codes stored in the memory to execute the first aspect or the first The sound effect processing method described in any optional embodiment of this aspect.
本发明实施例中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In the embodiment of the present invention, when there is a frequency band in the frequency of the currently played audio file within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and/or volume, so that the power consumption of the terminal device can be reduced without affecting the hearing effect.
附图说明Description of drawings
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. Ordinary technicians can also obtain other drawings based on these drawings on the premise of not paying creative work.
图1是本发明的一个实施例提供的音效处理方法的流程示意图;Fig. 1 is a schematic flowchart of a sound effect processing method provided by an embodiment of the present invention;
图2是本发明的另一个实施例提供的音效处理方法的流程示意图;Fig. 2 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图3是本发明的又一个实施例提供的音效处理方法的流程示意图;Fig. 3 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图4是本发明的又一个实施例提供的音效处理方法的流程示意图;Fig. 4 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图5是本发明的一个实施例提供的终端设备的结构示意图;FIG. 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;
图6是本发明的另一个实施例提供的终端设备的结构示意图;以及FIG. 6 is a schematic structural diagram of a terminal device provided by another embodiment of the present invention; and
图7是本发明的又一个实施例提供的终端设备的结构示意图。Fig. 7 is a schematic structural diagram of a terminal device provided by another embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例提供一种音效处理方法及终端设备,可降低音频播放过程中终端设备的功耗。具体实现中,本发明实施例中描述的终端设备可包括但不限于:手机、平板电脑、笔记本电脑等终端设备。Embodiments of the present invention provide an audio effect processing method and a terminal device, which can reduce power consumption of the terminal device during audio playback. In a specific implementation, the terminal devices described in the embodiments of the present invention may include but not limited to: terminal devices such as mobile phones, tablet computers, and notebook computers.
参见图1,图1是本发明的一个实施例提供的音效处理方法的流程示意图。所述音效处理方法可由软系统控制终端设备的硬件来执行。如图1所示,所述方法可包括如下步骤:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a sound effect processing method provided by an embodiment of the present invention. The sound effect processing method can be executed by the software system controlling the hardware of the terminal equipment. As shown in Figure 1, the method may include the following steps:
S101,检测终端设备播放的音频文件的频率。S101. Detect the frequency of an audio file played by a terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above audio file may be a short section of the audio file or a complete audio file.
S102,在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S102. When a frequency band in the frequency of the audio file is within a preset frequency range, adjust a sound effect parameter for playing the audio file by the terminal device according to a first preset sound effect adjustment manner.
检测终端设备播放的音频文件的频率之后,可判断所述音频文件的频率中是否有频段在预设频率范围内。After detecting the frequency of the audio file played by the terminal device, it may be determined whether any frequency band in the frequency of the audio file is within a preset frequency range.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range refers to the sensitivity of the human ear to sound. The sound frequency that humans can hear is between 20Hz and 20KHz, and the sensitivity of the human ear to sound is different in different frequency bands. For example, the human ear is extremely insensitive to sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones Sound waves, but the ears can hardly hear; while the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the sensitivity of the human ear to the sound of other frequency bands is not much different, but can feel Different tones, such as bass or treble.
其中,所述预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。所述预设音效调节方式可为将所述音频文件中所述频段的音量降低至预设音量值及/或将播放所述音频文件中所述频段的的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中所述频段的音量降低一预设音量幅度及/或将所述音频文件中所述频段的增益降低一预设增益幅度。Wherein, the preset sound effect adjustment method at least includes reducing the volume and/or gain of the frequency band in the audio file. The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file to a preset volume value and/or reduce the gain of playing the frequency band in the audio file to a preset gain value, or The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file by a preset volume range and/or reduce the gain of the frequency band in the audio file by a preset gain range.
本实施方式中,在当前播放的音频文件中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In this embodiment, when there is a frequency band in the currently played audio file within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and/or volume of the frequency band in the audio file can be reduced, thereby On the premise of not affecting the hearing effect, the power consumption of the terminal device can be reduced.
参见图2,图2是本发明的另一个实施例提供的音效处理方法的流程示意图。所述音效处理方法可由软系统控制终端设备的硬件来执行。如图2所示,所述方法可包括如下步骤:Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention. The sound effect processing method can be executed by the software system controlling the hardware of the terminal equipment. As shown in Figure 2, the method may include the following steps:
S201,检测终端设备播放的音频文件的频率。S201. Detect the frequency of an audio file played by a terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above audio file may be a short section of the audio file or a complete audio file.
S202,在所述音频文件的频率中有频段在预设频率范围内时,判断所述终端设备播放所述音频文件的音效参数是否满足第一预设条件。如果不满足,执行步骤S203,否则执行步骤S204。S202. When a frequency band of the frequency of the audio file is within a preset frequency range, determine whether the sound effect parameter of the audio file played by the terminal device satisfies a first preset condition. If not, go to step S203, otherwise go to step S204.
检测终端设备播放的音频文件的频率之后,可判断所述音频文件的频率中是否有频段在预设频率范围内。After detecting the frequency of the audio file played by the terminal device, it may be determined whether any frequency band in the frequency of the audio file is within a preset frequency range.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range refers to the sensitivity of the human ear to sound. The sound frequency that humans can hear is between 20Hz and 20KHz, and the sensitivity of the human ear to sound is different in different frequency bands. For example, the human ear is extremely insensitive to sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones Sound waves, but the ears can hardly hear; while the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the sensitivity of the human ear to the sound of other frequency bands is not much different, but can feel Different tones, such as bass or treble.
其中,判断所述终端设备播放所述音频文件的音效参数是否满足第一预设条件具体为:判断所述终端设备当前播放所述音频文件的音量是否等于及/或小于预设音量值及/或当前播放所述音频文件的增益是否等于或小于预设增益值。Wherein, judging whether the sound effect parameter of the audio file played by the terminal device satisfies the first preset condition is specifically: judging whether the volume of the audio file currently played by the terminal device is equal to and/or less than a preset volume value and/or Or whether the gain of currently playing the audio file is equal to or less than the preset gain value.
S203,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S203. Adjust a sound effect parameter for playing the audio file by the terminal device according to a first preset sound effect adjustment manner.
其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。所述预设音效调节方式可为将所述音频文件中所述频段的音量降低至预设音量值及/或将所述音频文件中所述频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中所述频段的音量降低一预设音量幅度及/或将播放所述音频文件中所述频段的增益降低一预设增益幅度。Wherein, the first preset sound effect adjustment method at least includes reducing the volume and/or gain of the frequency band in the audio file. The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file to a preset volume value and/or reduce the gain of the frequency band in the audio file to a preset gain value, or the The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file by a preset volume range and/or reduce the gain of playing the frequency band in the audio file by a preset gain range.
S204,控制所述终端设备按照当前的音效参数播放所述音频文件。S204. Control the terminal device to play the audio file according to the current sound effect parameters.
具体地,当所述终端设备播放所述音效文件的音效参数满足所述预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameters of the sound effect file played by the terminal device meet the preset condition, it means that the sound effect parameters of the terminal device have been adjusted before, and the current sound effect parameters of the terminal device are appropriate, No further adjustments are required. Therefore, when playing audio clips with audio frequencies within the same range, only one adjustment of the sound effect parameters is required.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,当播放音频频率在同一频率范围内的音频片段时,只需经过一次调节即可,可降低所述终端设备的处理工作,从而进一步降低所述终端设备的功耗。In this embodiment, when the frequency of the currently played audio file has a frequency band within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and/or volume of the frequency band in the audio file can be reduced , so that the power consumption of the terminal device can be reduced without affecting the auditory effect. Further, when playing an audio clip with an audio frequency within the same frequency range, only one adjustment is required, which can reduce the processing work of the terminal device, thereby further reducing the power consumption of the terminal device.
参见图3,图3是本发明的另一个实施例提供的音效处理方法的流程示意图。所述音效处理方法可由软系统控制终端设备的硬件来执行。如图3所示,所述方法可包括如下步骤:Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention. The sound effect processing method can be executed by the software system controlling the hardware of the terminal equipment. As shown in Figure 3, the method may include the following steps:
S301,检测终端设备播放的音频文件的频率。S301. Detect the frequency of the audio file played by the terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above audio file may be a short section of the audio file or a complete audio file.
S302,判断在所述音频文件的频率中是否有频段不在预设频率范围内。如果是,执行步骤S303,否则执行步骤S306。S302. Determine whether any frequency band in the frequency of the audio file is not within a preset frequency range. If yes, execute step S303, otherwise execute step S306.
S303,判断所述终端设备播放所述音频文件的音效参数是否满足第二预设条件。如果是,执行步骤S304,否则执行步骤S305。S303. Determine whether the sound effect parameter of the audio file played by the terminal device satisfies a second preset condition. If yes, execute step S304, otherwise execute step S305.
其中,判断所述终端设备播放所述音频文件的音效参数是否满足第二预设条件具体为:判断所述终端设备当前播放所述音频文件的音量是否大于预设音量值及/或当前播放所述音频文件的增益是否大于预设增益值。Wherein, judging whether the sound effect parameters of the audio file played by the terminal device meet the second preset condition is specifically: judging whether the volume of the audio file currently played by the terminal device is greater than the preset volume value and/or the current playing volume. Whether the gain of the audio file is greater than a preset gain value.
S304,控制所述终端设备按照当前的音效参数播放所述音频文件。S304. Control the terminal device to play the audio file according to the current sound effect parameters.
具体地,当所述终端设备播放所述音效文件的音效参数满足所述第二预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameters of the sound effect file played by the terminal device meet the second preset condition, it means that the sound effect parameters of the terminal device have been adjusted before, and the current sound effect parameters of the terminal device are suitable. , no further adjustment is required. Therefore, when playing audio clips with audio frequencies within the same range, only one adjustment of the sound effect parameters is required.
SS305,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。SS305. Adjust a sound effect parameter for playing the audio file by the terminal device according to a second preset sound effect adjustment manner.
其中,所述第二预设音效调节方式至少包括增大播放所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。所述第二预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大至预设音量值及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大至预设增益值,或者所述预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大一预设音量幅度及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大一预设增益幅度。Wherein, the second preset sound effect adjustment method at least includes increasing the volume and/or gain of playing frequency bands in the audio file that are not within the preset frequency range. The second preset sound effect adjustment method can be to increase the volume of the frequency bands in the audio file that are not in the preset frequency range to a preset volume value and/or increase the volume of the frequency bands in the audio file that are not in the preset frequency range to a preset volume value. The gain of the frequency band in the frequency range is increased to a preset gain value, or the preset sound effect adjustment method may be to increase the volume of the frequency band in the audio file not in the preset frequency range by a preset volume range And/or increase the gain of frequency bands in the audio file that are not within the preset frequency range by a preset gain range.
S306,在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S306. When a frequency band in the frequency of the audio file is within a preset frequency range, adjust a sound effect parameter for playing the audio file by the terminal device according to a first preset sound effect adjustment manner.
其中,所述第一预设音效调节方式至少包括降低所述音频文件中在所述预设频率范围内的频段的音量及/或增益。所述第一预设音效调节方式可为将所述音频文件中在所述预设频率范围内的频段的音量降低至预设音量值及/或将所述音频文件中在所述预设频率范围内的频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中在所述预设频率范围内的频段的音量降低一预设音量幅度及/或将所述音频文件中在所述预设频率范围内的频段的增益降低一预设增益幅度。Wherein, the first preset sound effect adjustment method at least includes reducing the volume and/or gain of frequency bands within the preset frequency range in the audio file. The first preset sound effect adjustment method can be to reduce the volume of the frequency band within the preset frequency range in the audio file to a preset volume value and/or reduce the volume of the frequency band in the preset frequency range in the audio file to The gain of the frequency band within the range is reduced to a preset gain value, or the preset sound effect adjustment method may be to reduce the volume of the frequency band within the preset frequency range in the audio file by a preset volume range and/or Decrease the gain of the frequency band within the preset frequency range in the audio file by a preset gain range.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,在当前播放的音频文件的频率中有频段不在预设频率范围,即当前播放的音频为人耳敏感的音频时,可增大音频文件中不在预设频率范围内频段的增益和/或音量,从而保证用户能够得到好的听觉效果。In this embodiment, when there are frequency bands in the frequency of the currently played audio file within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the frequencies of the frequency bands in the audio file within the preset frequency range can be reduced. gain and/or volume, so that the power consumption of the terminal device can be reduced without affecting the hearing effect. Further, if there is a frequency band in the frequency of the currently played audio file that is not in the preset frequency range, that is, when the currently played audio is audio sensitive to the human ear, the gain and/or volume of the frequency band in the audio file that is not in the preset frequency range can be increased , so as to ensure that the user can obtain a good hearing effect.
参见图4,图4是本发明的一个实施例提供的音效处理方法的流程示意图。所述音效处理方法可由软系统控制终端设备的硬件来执行。如图4所示,所述方法可包括如下步骤:Referring to FIG. 4 , FIG. 4 is a schematic flowchart of a sound effect processing method provided by an embodiment of the present invention. The sound effect processing method can be executed by the software system controlling the hardware of the terminal equipment. As shown in Figure 4, the method may include the following steps:
S401,根据终端设备采集到的环境噪音判断当前场景是否为预设的触发场景。S401. Determine whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device.
作为一种可行的实施方式,在音频播放过程中,终端设备可采集环境中的噪音,根据环境噪音来判断当前场景是否为预设的触发场景,其中触发场景指的是可触发终端设备对播放的音频片段的音效参数做出调整的场景,例如是噪音较大的场景。As a feasible implementation, during the audio playback process, the terminal device can collect the noise in the environment, and judge whether the current scene is a preset trigger scene according to the environmental noise, where the trigger scene refers to the trigger scene that can trigger the terminal device to play The scene where the sound effect parameters of the audio clip are adjusted, such as a scene with a lot of noise.
具体实施中,可预先设置上述预设的触发场景所对应的噪音范围,通过判断所述环境噪音是否在所述噪音范围内来判断当前场景是否为预设的触发场景,在所述环境噪音在所述噪音范围内时,判断当前场景为预设的触发场景。In a specific implementation, the noise range corresponding to the above-mentioned preset triggering scene can be set in advance, and whether the current scene is a preset triggering scene can be judged by judging whether the environmental noise is within the noise range. When within the noise range, it is determined that the current scene is a preset trigger scene.
S402,在当前场景为预设的触发场景时,检测所述终端设备播放的音频文件的频率。S402. When the current scene is a preset trigger scene, detect the frequency of the audio file played by the terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above audio file may be a short section of the audio file or a complete audio file.
S403,当所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S403. When a frequency band in the frequency of the audio file is within a preset frequency range, adjust a sound effect parameter for playing the audio file by the terminal device according to a first preset sound effect adjustment manner.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range refers to the sensitivity of the human ear to sound. The sound frequency that humans can hear is between 20Hz and 20KHz, and the sensitivity of the human ear to sound is different in different frequency bands. For example, the human ear is extremely insensitive to sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones Sound waves, but the ears can hardly hear; while the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the sensitivity of the human ear to the sound of other frequency bands is not much different, but can feel Different tones, such as bass or treble.
其中,所述预设音效调节方式至少包括降低所述音频文件中在预设频率范围内的频段的音量及/或增益。所述预设音效调节方式可为将所述音频文件中在预设频率范围内的频段的音量降低至预设音量值及/或将所述音频文件中在预设频率范围内的频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中在预设频率范围内的频段的音量降低一预设音量幅度及/或将所述音频文件中在预设频率范围内的频段的增益降低一预设增益幅度。Wherein, the preset sound effect adjustment method at least includes reducing the volume and/or gain of the frequency band within the preset frequency range in the audio file. The preset sound effect adjustment method may be to reduce the volume of the frequency band within the preset frequency range in the audio file to a preset volume value and/or increase the gain of the frequency band within the preset frequency range in the audio file Decrease to a preset gain value, or the preset sound effect adjustment method may be to reduce the volume of the frequency band within the preset frequency range in the audio file by a preset volume range and/or reduce the volume of the frequency band in the preset frequency range in the audio file to The gain of the frequency band within the set frequency range is reduced by a preset gain range.
本实施方式中,在当前处于的场景为预设的触发场景时,即处于噪音较大的场景下,对人耳来说,本来就不敏感的声音频段更加不易被察觉,因此,在此种场景下,当播放人耳不敏感的音频时,降低播放音频文件中在预设频率范围内的频段的增益和/或音量,更加不会影响听觉效果。In this embodiment, when the current scene is the preset trigger scene, that is, in a scene with high noise, the sound bands that are originally insensitive to the human ear are more difficult to detect. Therefore, in this In this scenario, when playing audio that is not sensitive to the human ear, reducing the gain and/or volume of the frequency band in the playback audio file within the preset frequency range will not affect the auditory effect.
参见图5,图5是本发明的一个实施例提供的终端设备的结构示意图。如图5所示,所述终端设备可包括以下单元:Referring to FIG. 5 , FIG. 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention. As shown in Figure 5, the terminal device may include the following units:
检测单元501,用于检测终端设备播放的音频文件的频率。The detection unit 501 is configured to detect the frequency of the audio file played by the terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above audio file may be a short section of the audio file or a complete audio file.
处理单元502,用于判断所述音频文件的频率中是否有频段在预设频率范围内,以及在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。The processing unit 502 is configured to judge whether there is a frequency band in the frequency of the audio file within the preset frequency range, and when there is a frequency band in the frequency of the audio file within the preset frequency range, adjust the audio frequency according to the first preset sound effect The method adjusts the sound effect parameters of the terminal device playing the audio file.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range refers to the sensitivity of the human ear to sound. The sound frequency that humans can hear is between 20Hz and 20KHz, and the sensitivity of the human ear to sound is different in different frequency bands. For example, the human ear is extremely insensitive to sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones Sound waves, but the ears can hardly hear; while the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the sensitivity of the human ear to the sound of other frequency bands is not much different, but can feel Different tones, such as bass or treble.
其中,所述预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。所述预设音效调节方式可为将所述音频文件中所述频段的音量降低至预设音量值及/或将所述音频文件中所述频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中所述频段的音量降低一预设音量幅度及/或将所述音频文件中所述频段的增益降低一预设增益幅度。Wherein, the preset sound effect adjustment method at least includes reducing the volume and/or gain of the frequency band in the audio file. The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file to a preset volume value and/or reduce the gain of the frequency band in the audio file to a preset gain value, or the The preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file by a preset volume range and/or reduce the gain of the frequency band in the audio file by a preset gain range.
本实施方式中,在当前播放的音频文件中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In this embodiment, when there is a frequency band in the currently played audio file within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and/or volume of the frequency band in the audio file can be reduced, thereby On the premise of not affecting the hearing effect, the power consumption of the terminal device can be reduced.
可选实施例中,所述处理单元502还用于:In an optional embodiment, the processing unit 502 is further configured to:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备播放所述音频文件的音效参数是否满足第一预设条件;When there is a frequency band in the frequency of the audio file within the preset frequency range, judging whether the sound effect parameters of the audio file played by the terminal device meet the first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameters of the audio file currently played by the terminal device do not meet the first preset condition, the sound effect parameters of the audio file played by the terminal device are adjusted according to the first preset sound effect adjustment manner.
具体地,当所述终端设备当前播放所述音效文件的音效参数满足所述预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameters of the sound effect file currently played by the terminal device meet the preset conditions, it means that the sound effect parameters of the terminal device have been adjusted before, and the current sound effect parameters of the terminal device are suitable. , no further adjustment is required. Therefore, when playing audio clips with audio frequencies within the same range, only one adjustment of the sound effect parameters is required.
本实施方式中,在当前播放的音频文件的频率在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低播放音频文件的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,当播放音频频率在同一频率范围内的音频片段时,只需经过一次调节即可,可降低所述终端设备的处理工作,从而进一步降低所述终端设备的功耗。In this embodiment, when the frequency of the currently played audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently played audio, the gain and/or volume of the played audio file can be reduced, so as not to affect hearing Under the premise of maintaining the effect, the power consumption of the terminal device can be reduced. Further, when playing an audio clip with an audio frequency within the same frequency range, only one adjustment is required, which can reduce the processing work of the terminal device, thereby further reducing the power consumption of the terminal device.
可选实施例中,所述处理单元502还用于:In an optional embodiment, the processing unit 502 is further configured to:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备播放所述音频文件的音效参数是否满足第二预设条件;When there is a frequency band in the frequency of the audio file that is not within the preset frequency range, determine whether the sound effect parameters of the audio file played by the terminal device meet the second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameters of the audio file currently played by the terminal device do not meet the second preset condition, the sound effect parameters of the audio file played by the terminal device are adjusted according to a second preset sound effect adjustment manner.
其中,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件具体为:判断所述终端设备当前播放所述音频文件的音量是否大于预设音量值及/或当前播放所述音频文件的增益是否大于预设增益值。Wherein, judging whether the sound effect parameter of the audio file currently played by the terminal device satisfies the second preset condition is specifically: judging whether the volume of the audio file currently played by the terminal device is greater than a preset volume value and/or is currently playing Whether the gain of the audio file is greater than a preset gain value.
具体地,当所述终端设备当前播放所述音效文件的音效参数满足所述第二预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameters of the sound effect file currently played by the terminal device meet the second preset condition, it means that the sound effect parameters of the terminal device have been adjusted before, and the current sound effect parameters of the terminal device are fit, no further adjustment is required. Therefore, when playing audio clips with audio frequencies within the same range, only one adjustment of the sound effect parameters is required.
其中,所述第二预设音效调节方式至少包括增大所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。所述第二预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大至预设音量值及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大至预设增益值,或者所述预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大一预设音量幅度及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大一预设增益幅度。Wherein, the second preset sound effect adjustment method at least includes increasing the volume and/or gain of frequency bands in the audio file that are not within the preset frequency range. The second preset sound effect adjustment method can be to increase the volume of the frequency bands in the audio file that are not in the preset frequency range to a preset volume value and/or increase the volume of the frequency bands in the audio file that are not in the preset frequency range to a preset volume value. The gain of the frequency band in the frequency range is increased to a preset gain value, or the preset sound effect adjustment method may be to increase the volume of the frequency band in the audio file not in the preset frequency range by a preset volume range And/or increase the gain of frequency bands in the audio file that are not within the preset frequency range by a preset gain range.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低播放音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,在当前播放的音频文件的频率中有频段不在预设频率范围,即当前播放的音频为人耳敏感的音频时,可增大播放音频文件中不在预设频率范围内频段的增益和/或音量,从而保证用户能够得到好的听觉效果。In this embodiment, when there are frequency bands in the frequency of the currently playing audio file within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the frequency band in the playing audio file within the preset frequency range can be reduced. The gain and/or volume of the terminal device can be reduced without affecting the hearing effect. Further, if there is a frequency band in the frequency of the currently played audio file that is not within the preset frequency range, that is, when the currently played audio is audio sensitive to human ears, the gain and/or the frequency band in the played audio file that is not in the preset frequency range can be increased volume, so as to ensure that the user can get a good hearing effect.
参见图6,图6是本发明的另一个实施例提供的终端设备的结构示意图。如图6所示,所述终端设备除包括检测单元501和处理单元502外,还包括确定单元503,用于根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景。Referring to FIG. 6, FIG. 6 is a schematic structural diagram of a terminal device provided by another embodiment of the present invention. As shown in FIG. 6 , in addition to a detection unit 501 and a processing unit 502 , the terminal device also includes a determination unit 503 for judging whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device.
作为一种可行的实施方式,在音频播放过程中,终端设备可采集环境中的噪音,根据环境噪音来判断当前场景是否为预设的触发场景,其中触发场景指的是可触发终端设备对播放的音频片段的音效参数做出调整的场景,例如是噪音较大的场景。As a feasible implementation, during the audio playback process, the terminal device can collect the noise in the environment, and judge whether the current scene is a preset trigger scene according to the environmental noise, where the trigger scene refers to the trigger scene that can trigger the terminal device to play The scene where the sound effect parameters of the audio clip are adjusted, such as a scene with a lot of noise.
所述处理单元502用于在当前场景为所述预设的触发场景时,检测所述终端设备播放的音频文件的频率。The processing unit 502 is configured to detect the frequency of the audio file played by the terminal device when the current scene is the preset trigger scene.
具体实施中,终端设备还可包括设置单元504,用于预先设置上述预设的触发场景所对应的噪音范围。所述确定单元503通过判断所述环境噪音是否在所述噪音范围内来判断当前场景是否为预设的触发场景,在所述环境噪音在所述噪音范围内时,判断当前场景为预设的触发场景。In a specific implementation, the terminal device may further include a setting unit 504, configured to preset a noise range corresponding to the aforementioned preset trigger scene. The determining unit 503 judges whether the current scene is a preset trigger scene by judging whether the environmental noise is within the noise range, and judges that the current scene is a preset triggering scene when the environmental noise is within the noise range Trigger the scene.
本实施方式中,在当前处于的场景为预设的触发场景时,即处于噪音较大的场景下,对人耳来说,本来就不敏感的声音频段更加不易被察觉,因此,在此种场景下,当播放人耳不敏感的音频时,降低播放音频文件中在预设频率范围内的频段的增益和/或音量,更加不会影响听觉效果。In this embodiment, when the current scene is the preset trigger scene, that is, in a scene with high noise, the sound bands that are originally insensitive to the human ear are more difficult to detect. Therefore, in this In this scenario, when playing audio that is not sensitive to the human ear, reducing the gain and/or volume of the frequency band in the playback audio file within the preset frequency range will not affect the auditory effect.
参见图7,图7是本发明的又一个实施例提供的终端设备的结构示意图。如图7所示,所述终端设备可包括处理器701,存储器702,通信接口703和通信总线704;其中,处理器701、存储器702、指纹识别模组705和通信接口703通过通信总线704连接并完成相互间的通信;处理器701通过通信接口703控制与外部蜂窝网的无线通信;通信接口703包括但不限于天线、放大器、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。存储器702包括以下至少一种:随机存取存贮器、非易失性存储器以及外部存储器,存储器702中存储有可执行程序代码,处理器701可调用该可执行程序代码,执行以下步骤:Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a terminal device provided by another embodiment of the present invention. As shown in Figure 7, the terminal device may include a processor 701, a memory 702, a communication interface 703 and a communication bus 704; wherein, the processor 701, the memory 702, the fingerprint recognition module 705 and the communication interface 703 are connected through the communication bus 704 And complete mutual communication; Processor 701 controls the wireless communication with external cellular network through communication interface 703; Communication interface 703 includes but not limited to antenna, amplifier, transceiver, coupler, LNA (Low Noise Amplifier, low noise amplifier ), duplexer, etc. The memory 702 includes at least one of the following: random access memory, non-volatile memory, and external memory. Executable program codes are stored in the memory 702. The processor 701 can call the executable program codes to perform the following steps:
检测终端设备播放的音频文件的频率;Detect the frequency of the audio file played by the terminal device;
判断所述音频文件的频率中是否有频段是否在预设频率范围内;Judging whether there is a frequency band in the frequency of the audio file within the preset frequency range;
在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。When there is a frequency band in the frequency of the audio file within the preset frequency range, adjust the sound effect parameters of the terminal device to play the audio file according to a first preset sound effect adjustment method, wherein the first preset sound effect adjustment The method at least includes reducing the volume and/or gain of the frequency band in the audio file.
其中,所述根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数之前,所述可执行程序代码还被执行以用于:Wherein, before adjusting the sound effect parameters of the audio file played by the terminal device according to the first preset sound effect adjustment method, the executable program code is also executed for:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第一预设条件;When there is a frequency band in the frequency of the audio file within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameters of the audio file currently played by the terminal device do not meet the first preset condition, the sound effect parameters of the audio file played by the terminal device are adjusted according to the first preset sound effect adjustment manner.
其中,所述所述可执行程序代码还被执行以用于:Wherein, the executable program code is also executed for:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When there is a frequency band in the frequency of the audio file that is not within the preset frequency range, it is judged whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameters of the audio file currently played by the terminal device meet the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameters; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第二预设音效调节方式至少包括增大所述音频文件不在所述预设频率范围内的频段的音量及/或增益。When the sound effect parameters of the audio file currently played by the terminal device do not meet the second preset condition, adjust the sound effect parameters of the audio file played by the terminal device according to a second preset sound effect adjustment method, wherein the The second preset sound effect adjustment method at least includes increasing the volume and/or gain of frequency bands of the audio file that are not within the preset frequency range.
其中,所述检测终端设备播放的音频文件的频率之前,所述所述可执行程序代码还被执行以用于:Wherein, before the detection of the frequency of the audio file played by the terminal device, the executable program code is also executed for:
根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景;judging whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device;
若判断结果为是,则检测所述终端设备播放的音频文件的频率。If the judgment result is yes, the frequency of the audio file played by the terminal device is detected.
其中,所述根据所述环境噪音判断当前场景是否为预设的触发场景之前,所述可执行程序代码还被执行以用于:Wherein, before determining whether the current scene is a preset trigger scene according to the environmental noise, the executable program code is also executed for:
设置所述预设的触发场景所对应的噪音范围;Setting the noise range corresponding to the preset trigger scene;
所述根据所述环境噪音判断当前场景是否为预设的触发场景,具体为:判断所述环境噪音是否在所述噪音范围内,以及所述环境噪音在所述噪音范围内时,确定当前场景为预设的触发场景。The judging whether the current scene is a preset trigger scene according to the environmental noise is specifically: judging whether the environmental noise is within the noise range, and determining the current scene when the environmental noise is within the noise range is the preset trigger scene.
本发明所有实施例中的模块或单元,可以通过通用集成电路,例如CPU(CentralProcessing Unit,中央处理器),或通过ASIC(Application Specific IntegratedCircuit,专用集成电路)来实现。The modules or units in all the embodiments of the present invention can be implemented by a general integrated circuit, such as a CPU (Central Processing Unit, central processing unit), or an ASIC (Application Specific Integrated Circuit, application specific integrated circuit).
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the methods of the embodiments of the present invention can be adjusted, combined and deleted according to actual needs.
本发明实施例装置中的模块或单元可以根据实际需要进行合并、划分和删减。The modules or units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM) and the like.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and certainly cannot limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.
Claims (11)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610438866.XA CN106126167B (en) | 2016-06-16 | 2016-06-16 | A sound effect processing method and terminal device |
| PCT/CN2017/088761 WO2017215657A1 (en) | 2016-06-16 | 2017-06-16 | Sound effect processing method, and terminal device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610438866.XA CN106126167B (en) | 2016-06-16 | 2016-06-16 | A sound effect processing method and terminal device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106126167A true CN106126167A (en) | 2016-11-16 |
| CN106126167B CN106126167B (en) | 2019-08-27 |
Family
ID=57470853
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610438866.XA Expired - Fee Related CN106126167B (en) | 2016-06-16 | 2016-06-16 | A sound effect processing method and terminal device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106126167B (en) |
| WO (1) | WO2017215657A1 (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2017215657A1 (en) * | 2016-06-16 | 2017-12-21 | 广东欧珀移动通信有限公司 | Sound effect processing method, and terminal device |
| CN108091330A (en) * | 2017-12-13 | 2018-05-29 | 北京小米移动软件有限公司 | Output sound intensity adjusting method, device, electronic equipment and storage medium |
| CN108462911A (en) * | 2017-12-11 | 2018-08-28 | 广东思派康电子科技有限公司 | A kind of computer readable storage medium and the audio mode adaptive earphone using the medium |
| CN109817189A (en) * | 2018-12-29 | 2019-05-28 | 深圳市蔚科电子科技开发有限公司 | Adjusting method, audio adjustment equipment and the system of audio signal |
| CN110809214A (en) * | 2019-11-21 | 2020-02-18 | Oppo广东移动通信有限公司 | Audio playing method, audio playing device and terminal equipment |
| CN111580774A (en) * | 2020-04-28 | 2020-08-25 | 江苏紫米电子技术有限公司 | Sound effect adjusting method, device, equipment and storage medium |
| CN112511123A (en) * | 2020-11-30 | 2021-03-16 | 广州朗国电子科技有限公司 | Sound effect customizing method and device, electronic equipment and storage medium |
| CN112804616A (en) * | 2020-12-31 | 2021-05-14 | 青岛海信移动通信技术股份有限公司 | Mobile terminal and audio playing method thereof |
| CN115437597A (en) * | 2021-06-02 | 2022-12-06 | 深圳市万普拉斯科技有限公司 | Audio playing method and device and terminal equipment |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113409800B (en) * | 2020-03-16 | 2024-07-12 | 浙江宇视科技有限公司 | Processing method and device for monitoring audio, storage medium and electronic equipment |
| CN113923561B (en) * | 2020-07-08 | 2024-11-08 | 阿里巴巴集团控股有限公司 | A method and device for adjusting sound effects of smart speakers |
| EP3962117B1 (en) | 2020-08-27 | 2024-03-27 | Axis AB | Audio content-based speaker control |
| CN113611317B (en) * | 2021-08-03 | 2024-03-12 | 广州小鹏汽车科技有限公司 | Sound effect processing method and device, vehicle-mounted entertainment system and automobile |
| CN115811591B (en) * | 2021-09-14 | 2025-08-15 | Oppo广东移动通信有限公司 | Audio processing method, device, terminal equipment and storage medium |
| CN118158596B (en) * | 2023-12-07 | 2024-08-16 | 中国建筑科学研究院有限公司 | Intelligent soundscape control method based on masking effect for green buildings |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101014107A (en) * | 2007-01-26 | 2007-08-08 | 深圳创维-Rgb电子有限公司 | Television voice processing apparatus and method |
| CN101540943A (en) * | 2008-03-18 | 2009-09-23 | 桦勋有限公司 | Miniature loudspeaker system integrating filter circuit and power regulation circuit |
| US20130044897A1 (en) * | 2011-08-19 | 2013-02-21 | Hon Hai Precision Industry Co., Ltd. | Electronic device and audio adjustment method |
| CN103078997A (en) * | 2012-12-20 | 2013-05-01 | 广东欧珀移动通信有限公司 | Mobile terminal volume setting method, system and mobile terminal |
| CN203554677U (en) * | 2013-11-08 | 2014-04-16 | 冠捷显示科技(厦门)有限公司 | System capable of adjusting volume based on frequencies and television employing same system |
| CN104978166A (en) * | 2015-06-30 | 2015-10-14 | 北京奇艺世纪科技有限公司 | Volume adjusting method and device |
| CN105262452A (en) * | 2015-10-29 | 2016-01-20 | 小米科技有限责任公司 | Method and apparatus for adjusting volume, and terminal |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102195581A (en) * | 2010-03-18 | 2011-09-21 | 承景科技股份有限公司 | Volume adjusting method for digital audio signal |
| CN102984634A (en) * | 2011-11-22 | 2013-03-20 | 南京工程学院 | Digital hearing-aid unequal-width sub-band automatic gain control method |
| CN103177727B (en) * | 2011-12-23 | 2015-05-06 | 重庆重邮信科通信技术有限公司 | Audio frequency band processing method and system |
| CN103096230A (en) * | 2013-01-15 | 2013-05-08 | 杭州爱听科技有限公司 | All-digital type hearing-aid and changing channel matching and compensating method thereof |
| CN103247293B (en) * | 2013-05-14 | 2015-04-08 | 中国科学院自动化研究所 | Coding method and decoding method for voice data |
| CN106126167B (en) * | 2016-06-16 | 2019-08-27 | Oppo广东移动通信有限公司 | A sound effect processing method and terminal device |
-
2016
- 2016-06-16 CN CN201610438866.XA patent/CN106126167B/en not_active Expired - Fee Related
-
2017
- 2017-06-16 WO PCT/CN2017/088761 patent/WO2017215657A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101014107A (en) * | 2007-01-26 | 2007-08-08 | 深圳创维-Rgb电子有限公司 | Television voice processing apparatus and method |
| CN101540943A (en) * | 2008-03-18 | 2009-09-23 | 桦勋有限公司 | Miniature loudspeaker system integrating filter circuit and power regulation circuit |
| US20130044897A1 (en) * | 2011-08-19 | 2013-02-21 | Hon Hai Precision Industry Co., Ltd. | Electronic device and audio adjustment method |
| CN103078997A (en) * | 2012-12-20 | 2013-05-01 | 广东欧珀移动通信有限公司 | Mobile terminal volume setting method, system and mobile terminal |
| CN203554677U (en) * | 2013-11-08 | 2014-04-16 | 冠捷显示科技(厦门)有限公司 | System capable of adjusting volume based on frequencies and television employing same system |
| CN104978166A (en) * | 2015-06-30 | 2015-10-14 | 北京奇艺世纪科技有限公司 | Volume adjusting method and device |
| CN105262452A (en) * | 2015-10-29 | 2016-01-20 | 小米科技有限责任公司 | Method and apparatus for adjusting volume, and terminal |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2017215657A1 (en) * | 2016-06-16 | 2017-12-21 | 广东欧珀移动通信有限公司 | Sound effect processing method, and terminal device |
| CN108462911A (en) * | 2017-12-11 | 2018-08-28 | 广东思派康电子科技有限公司 | A kind of computer readable storage medium and the audio mode adaptive earphone using the medium |
| CN108091330B (en) * | 2017-12-13 | 2020-11-27 | 北京小米移动软件有限公司 | Output sound intensity adjustment method, device, electronic device and storage medium |
| CN108091330A (en) * | 2017-12-13 | 2018-05-29 | 北京小米移动软件有限公司 | Output sound intensity adjusting method, device, electronic equipment and storage medium |
| CN109817189A (en) * | 2018-12-29 | 2019-05-28 | 深圳市蔚科电子科技开发有限公司 | Adjusting method, audio adjustment equipment and the system of audio signal |
| CN109817189B (en) * | 2018-12-29 | 2023-09-08 | 珠海市蔚科科技开发有限公司 | Audio signal adjusting method, sound effect adjusting device and system |
| CN110809214A (en) * | 2019-11-21 | 2020-02-18 | Oppo广东移动通信有限公司 | Audio playing method, audio playing device and terminal equipment |
| CN111580774A (en) * | 2020-04-28 | 2020-08-25 | 江苏紫米电子技术有限公司 | Sound effect adjusting method, device, equipment and storage medium |
| CN111580774B (en) * | 2020-04-28 | 2023-07-14 | 江苏紫米电子技术有限公司 | Sound effect adjusting method, device, equipment and storage medium |
| CN112511123A (en) * | 2020-11-30 | 2021-03-16 | 广州朗国电子科技有限公司 | Sound effect customizing method and device, electronic equipment and storage medium |
| CN112804616A (en) * | 2020-12-31 | 2021-05-14 | 青岛海信移动通信技术股份有限公司 | Mobile terminal and audio playing method thereof |
| CN112804616B (en) * | 2020-12-31 | 2022-05-17 | 青岛海信移动通信技术股份有限公司 | Mobile terminal and audio playing method thereof |
| CN115437597A (en) * | 2021-06-02 | 2022-12-06 | 深圳市万普拉斯科技有限公司 | Audio playing method and device and terminal equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2017215657A1 (en) | 2017-12-21 |
| CN106126167B (en) | 2019-08-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106126167B (en) | A sound effect processing method and terminal device | |
| CN103295581B (en) | Method and device for increasing speech clarity and computing device | |
| CN108540906B (en) | Volume adjusting method, earphone and computer readable storage medium | |
| CN107231473B (en) | Audio output regulation and control method, equipment and computer readable storage medium | |
| CN106126164A (en) | A kind of sound effect treatment method and terminal unit | |
| CN107517428A (en) | A kind of signal output method and device | |
| US10027299B2 (en) | Volume control | |
| CN107566618B (en) | Volume adjusting method and device, terminal equipment and storage medium | |
| CN105100330B (en) | The method and mobile terminal of a kind of equipment effects,sound optimization | |
| WO2021051742A1 (en) | Method and device for audio mixing, and terminal apparatus | |
| CN111033614B (en) | Volume adjusting method and device, mobile terminal and storage medium | |
| CN105204761B (en) | A kind of volume adjusting method and user terminal | |
| KR20200017702A (en) | Electronic device and method for adjusting the output intensity of a speaker based on distance from an external electronic device | |
| CN110799936B (en) | Volume adjusting method, volume adjusting device, terminal equipment and storage medium | |
| CN107465824A (en) | volume adjusting method, device, mobile terminal and storage medium | |
| JP6381062B2 (en) | Method and device for processing audio signals for communication devices | |
| CN114071307B (en) | Headphone volume adjustment method, device, equipment and medium | |
| CN107526570B (en) | Volume adjusting method and device, terminal equipment and storage medium | |
| KR101459010B1 (en) | Apparatus and method for hearing ability protection in portable communication system | |
| CN104660197A (en) | Volume control method and playing equipment | |
| CN105049642A (en) | Method and device for volume adjustment of prompt tone of mobile terminal | |
| CN107436751A (en) | Volume adjustment method, device, terminal equipment and storage medium | |
| CN110191398A (en) | Suppressing method, device and the computer readable storage medium uttered long and high-pitched sounds | |
| CN103634731A (en) | Method for adjusting loudspeaker, and electronic device | |
| CN104349244A (en) | Information processing method and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190827 |