CN106126167B - A sound effect processing method and terminal device - Google Patents
A sound effect processing method and terminal device Download PDFInfo
- Publication number
- CN106126167B CN106126167B CN201610438866.XA CN201610438866A CN106126167B CN 106126167 B CN106126167 B CN 106126167B CN 201610438866 A CN201610438866 A CN 201610438866A CN 106126167 B CN106126167 B CN 106126167B
- Authority
- CN
- China
- Prior art keywords
- audio file
- terminal device
- preset
- sound effect
- frequency
- 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.)
- Expired - Fee Related
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
-
- 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
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
本发明实施例公开了一种音效处理方法及终端设备,其中音效处理方法可包括:检测终端设备播放的音频文件的频率;判断所述音频文件的频率中是否有频段在预设频率范围内;以及在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低播放所述音频文件的音量及/或增益。本发明实施例中,在当前播放的音频文件的频率在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。
Embodiments of the present invention disclose 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 a frequency band in the frequency of the audio file is within a preset frequency range; and when a frequency band of the audio file is within a 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 The adjustment method includes at least reducing the volume and/or gain of playing the audio file. In the embodiment of the present invention, when the frequency of the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the gain 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, and in particular, to a sound effect processing method and a terminal device.
背景技术Background technique
随着智能终端技术的发展,市场上各种各样的智能终端层出不穷,智能终端的功能及应用也越来越丰富。其中,音频播放功能为大多数智能终端都具备的基本功能。终端中的许多应用都需要调用音频模块进行音频播放,例如播放游戏音效、音乐、视频音效等。With the development of intelligent terminal technology, various types of intelligent terminals emerge in an endless stream on the market, and the functions and applications of intelligent terminals are becoming more and more abundant. Among them, the audio playback function is a basic function possessed by most smart terminals. Many applications in the terminal need to call the audio module for audio playback, such as playing game sound effects, music, and video sound effects.
在现有技术中,为了迎合用户对听觉体验的高要求,通常会在音频文件原有的音效参数的基础上进一步增强音效。然而,增强音效虽然能在一定程度上提升用户的听觉体验,同时也会增大终端设备的功耗。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 user's listening experience to a certain extent, it also increases the power consumption of the terminal device.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种音效处理方法及终端设备,可在不影响听觉效果的前提下,降低终端设备播放音频文件时的功耗。Embodiments of the present invention provide a sound effect processing method and a terminal device, which can reduce the power consumption when the terminal device plays an audio file without affecting the auditory effect.
本发明实施例第一方面提供一种音效处理方法,可包括:A first aspect of the embodiments of the present invention provides a sound effect processing method, which may include:
检测终端设备播放的音频文件的频率;Detect the frequency of audio files played by the terminal device;
判断所述音频文件的频率中是否有频段在预设频率范围内;以及Determine whether there is a frequency band in the frequency of the audio file within the preset frequency range; and
在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的的音量及/或增益。When a frequency band of the audio file is within a preset frequency range, adjust the sound effect parameters of the terminal device for playing the audio file according to a first preset sound effect adjustment method, wherein the first preset sound effect adjustment The manner includes at least 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 a frequency band in the frequency of the audio file is within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameter of the audio file currently played by the terminal device does not meet the first preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the first preset sound effect adjustment method.
在一些可选实施例中,所述方法还包括:In some optional embodiments, the method further includes:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When a frequency band in the frequency of the audio file is not within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第二预设音效调节方式至少包括增大所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。When the sound effect parameter of the audio file currently played by the terminal device does not meet the second preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the 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 in the audio file that are not within the preset frequency range.
在一些可选实施例中,,所述检测终端设备播放的音频文件的频率之前,所述方法还包括:In some optional embodiments, before the detecting the frequency of the audio file played by the terminal device, the method further includes:
根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景;Determine 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 when the environmental noise is within the noise range, determining the current scene For the preset trigger scene.
本发明实施例的第二方面还公开一种终端设备,包括:A second aspect of the embodiments of the present invention further discloses a terminal device, including:
检测单元,用于检测终端设备播放的音频文件的频率;以及a detection unit for detecting the frequency of the audio file played by the terminal device; and
处理单元,判断所述音频文件的频率中是否有频段在在预设频率范围内,以及在所述音频文件的频率中有频段在在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的的音量及/或增益。The processing unit determines whether a frequency band in the frequency of the audio file is 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 method 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 further configured to:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第一预设条件;When a frequency band in the frequency of the audio file is within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameter of the audio file currently played by the terminal device does not meet the first preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the first preset sound effect adjustment method.
在一些可选实施例中,,所述处理单元还用于:In some optional embodiments, the processing unit is further configured to:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When a frequency band in the frequency of the audio file is not within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第二预设音效调节方式至少包括增大所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。When the sound effect parameter of the audio file currently played by the terminal device does not meet the second preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the 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 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 determine whether the current scene is a preset trigger scene according to the ambient noise collected by the terminal device; the processing unit is configured to determine whether the current scene is a preset trigger scene. In the preset trigger scenario, 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 a noise range corresponding to the preset triggering scene; the determining unit is configured to determine whether the current scene is a preset according to the environmental noise The set triggering scene is specifically: the determining unit determines whether the environmental noise is within the noise range, and when the environmental noise is within the noise range, determining that the current scene is a preset triggering scene.
本发明实施例第三方面提供一种终端设备,可包括处理器、存储器、通信接口和通信总线,其中所述处理器、所述存储器、所述处理器和所述通信接口通过所述通信总线连接,所述存储器存储有可执行程序代码,所述通信接口用于无线通信;所述处理器用于调用所述存储器中存储的可执行程序代码,以执行本发明实施例第一方面或者第一方面任一可选实施例所述的音效处理方法。A third aspect of the embodiments 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 configured to call the executable program codes stored in the memory to execute the first aspect or the first aspect of the embodiments of the present invention. The sound effect processing method described in any optional embodiment of the aspect.
本发明实施例中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In this embodiment of the present invention, when a frequency band in the frequency of the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the gain and/or the gain of the frequency band in the audio file can be reduced. volume, so that the power consumption of the terminal device can be reduced without affecting the auditory effect.
附图说明Description of drawings
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention, which are of great significance to the art For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1是本发明的一个实施例提供的音效处理方法的流程示意图;1 is a schematic flowchart of a sound effect processing method provided by an embodiment of the present invention;
图2是本发明的另一个实施例提供的音效处理方法的流程示意图;2 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图3是本发明的又一个实施例提供的音效处理方法的流程示意图;3 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图4是本发明的又一个实施例提供的音效处理方法的流程示意图;4 is a schematic flowchart of a sound effect processing method provided by another embodiment of the present invention;
图5是本发明的一个实施例提供的终端设备的结构示意图;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 ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本发明实施例提供一种音效处理方法及终端设备,可降低音频播放过程中终端设备的功耗。具体实现中,本发明实施例中描述的终端设备可包括但不限于:手机、平板电脑、笔记本电脑等终端设备。Embodiments of the present invention provide a sound effect processing method and a terminal device, which can reduce the power consumption of the terminal device during audio playback. In specific implementation, the terminal devices described in the embodiments of the present invention may include, but are 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 device. As shown in Figure 1, the method may include the following steps:
S101,检测终端设备播放的音频文件的频率。S101. Detect the frequency of the audio file played by the terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above-mentioned audio file may be a small segment of the audio file or a complete audio file.
S102,在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S102, when a frequency band 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 method.
检测终端设备播放的音频文件的频率之后,可判断所述音频文件的频率中是否有频段在预设频率范围内。After detecting the frequency of the audio file played by the terminal device, it can be determined whether any frequency band in the frequency of the audio file is within the preset frequency range.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range is set with reference to the sensitivity of the human ear to sound. The frequency of sound 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 the sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones. Sound waves, but the ear is almost inaudible; the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the human ear is not much different in sensitivity to the sound in other frequency bands, 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 decrease the volume of the frequency band in the audio file by a preset volume amount and/or decrease the gain of the frequency band in the audio file by a preset gain amount.
本实施方式中,在当前播放的音频文件中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In this embodiment, when a frequency band in the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the gain and/or volume of the frequency band in the audio file can be reduced, thereby reducing the gain and/or volume of the frequency band in the audio file. On the premise that the auditory effect is not affected, 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 device. As shown in Figure 2, the method may include the following steps:
S201,检测终端设备播放的音频文件的频率。S201. Detect the frequency of the audio file played by the terminal device.
可选地,上述音频文件可以是音频文件中的一小段或者是完整的音频文件。Optionally, the above-mentioned audio file may be a small segment of the audio file or a complete audio file.
S202,在所述音频文件的频率中有频段在预设频率范围内时,判断所述终端设备播放所述音频文件的音效参数是否满足第一预设条件。如果不满足,执行步骤S203,否则执行步骤S204。S202, when a frequency band in the frequency of the audio file is within a preset frequency range, determine whether a 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 can be determined whether any frequency band in the frequency of the audio file is within the preset frequency range.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range is set with reference to the sensitivity of the human ear to sound. The frequency of sound 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 the sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones. Sound waves, but the ear is almost inaudible; the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the human ear is not much different in sensitivity to the sound in other frequency bands, 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 the audio file currently playing is equal to or less than a preset gain value.
S203,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S203: Adjust, according to a first preset sound effect adjustment mode, a sound effect parameter of the terminal device playing the audio file.
其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。所述预设音效调节方式可为将所述音频文件中所述频段的音量降低至预设音量值及/或将所述音频文件中所述频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中所述频段的音量降低一预设音量幅度及/或将播放所述音频文件中所述频段的增益降低一预设增益幅度。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 decrease the volume of the frequency band in the audio file by a preset volume amount and/or decrease the gain of the frequency band in the audio file to play by a preset gain amount.
S204,控制所述终端设备按照当前的音效参数播放所述音频文件。S204, controlling the terminal device to play the audio file according to the current sound effect parameters.
具体地,当所述终端设备播放所述音效文件的音效参数满足所述预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameter of the sound effect file played by the terminal device satisfies the preset condition, it means that the sound effect parameter of the terminal device has been adjusted before, and the current sound effect parameter of the terminal device is suitable, No further adjustment is required. Therefore, when playing audio clips whose audio frequencies are in the same range, only one sound effect parameter adjustment is required.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,当播放音频频率在同一频率范围内的音频片段时,只需经过一次调节即可,可降低所述终端设备的处理工作,从而进一步降低所述终端设备的功耗。In this embodiment, when a frequency band in the frequency of the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing 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 hearing effect. Further, when playing audio clips whose audio frequencies are 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 device. 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-mentioned audio file may be a small segment of the audio file or a complete audio file.
S302,判断在所述音频文件的频率中是否有频段不在预设频率范围内。如果是,执行步骤S303,否则执行步骤S306。S302. Determine whether there is a frequency band in the frequency of the audio file that is not within a preset frequency range. If yes, go to step S303, otherwise go to step S306.
S303,判断所述终端设备播放所述音频文件的音效参数是否满足第二预设条件。如果是,执行步骤S304,否则执行步骤S305。S303: Determine whether a sound effect parameter of the audio file played by the terminal device satisfies a second preset condition. If yes, go to step S304, otherwise go to step S305.
其中,判断所述终端设备播放所述音频文件的音效参数是否满足第二预设条件具体为:判断所述终端设备当前播放所述音频文件的音量是否大于预设音量值及/或当前播放所述音频文件的增益是否大于预设增益值。Wherein, judging whether the sound effect parameter of the audio file 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 the preset volume value and/or the current playing volume Whether the gain of the audio file is greater than the preset gain value.
S304,控制所述终端设备按照当前的音效参数播放所述音频文件。S304, controlling the terminal device to play the audio file according to the current sound effect parameters.
具体地,当所述终端设备播放所述音效文件的音效参数满足所述第二预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameter of the sound effect file played by the terminal device satisfies the second preset condition, it indicates that the sound effect parameter of the terminal device has been adjusted before, and the current sound effect parameter of the terminal device is suitable , no further adjustment is required. Therefore, when playing audio clips whose audio frequencies are in the same range, only one sound effect parameter adjustment is required.
SS305,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。SS305: Adjust, according to a second preset sound effect adjustment mode, sound effect parameters of the terminal device playing the audio file.
其中,所述第二预设音效调节方式至少包括增大播放所述音频文件中不在所述预设频率范围内的频段的音量及/或增益。所述第二预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大至预设音量值及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大至预设增益值,或者所述预设音效调节方式可为将所述音频文件中不在所述预设频率范围内的频段的音量增大一预设音量幅度及/或将所述音频文件中不在所述预设频率范围内的频段的增益增大一预设增益幅度。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 may be to increase the volume of the frequency band in the audio file that is not within the preset frequency range to a preset volume value and/or to increase the volume of the audio file not within the preset frequency range to a preset volume value. The gain of the frequency band within 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 that is not within the preset frequency range by a preset volume amplitude and/or increasing the gain of a frequency band in the audio file that is not within the predetermined frequency range by a predetermined gain magnitude.
S306,在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S306 , when a frequency band 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 method.
其中,所述第一预设音效调节方式至少包括降低所述音频文件中在所述预设频率范围内的频段的音量及/或增益。所述第一预设音效调节方式可为将所述音频文件中在所述预设频率范围内的频段的音量降低至预设音量值及/或将所述音频文件中在所述预设频率范围内的频段的增益降低至预设增益值,或者所述预设音效调节方式可为将所述音频文件中在所述预设频率范围内的频段的音量降低一预设音量幅度及/或将所述音频文件中在所述预设频率范围内的频段的增益降低一预设增益幅度。Wherein, the first preset sound effect adjustment method at least includes reducing the volume and/or gain of a frequency band in the audio file within the preset frequency range. The first preset sound effect adjustment method may be to reduce the volume of the frequency band in the audio file within the preset frequency range to a preset volume value and/or to adjust the audio frequency in the audio file to the preset frequency. 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 in the audio file within the preset frequency range by a preset volume amplitude and/or Decrease the gain of the frequency band within the preset frequency range in the audio file by a preset gain amount.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,在当前播放的音频文件的频率中有频段不在预设频率范围,即当前播放的音频为人耳敏感的音频时,可增大音频文件中不在预设频率范围内频段的增益和/或音量,从而保证用户能够得到好的听觉效果。In this embodiment, when the frequency of the currently playing audio file has a frequency band within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the frequency of the frequency band within the preset frequency range in the audio file can be reduced. gain and/or volume, so that the power consumption of the terminal device can be reduced without affecting the auditory effect. Further, if there is a frequency band in the frequency of the currently playing audio file that is not within the preset frequency range, that is, when the currently playing audio is sensitive to human ears, the gain and/or volume of the frequency band in the audio file that is not within the preset frequency range can be increased. , so as to ensure that the user can get 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 device. 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 manner, during the audio playback process, the terminal device can collect noise in the environment, and determine whether the current scene is a preset trigger scene according to the ambient noise, where the trigger scene refers to the trigger scene that can trigger the terminal device to play A scene in which 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 preset trigger scene can be preset, and it is determined whether the current scene is the preset trigger scene by judging whether the environmental noise is within the noise range. When the noise is within the 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-mentioned audio file may be a small segment of the audio file or a complete audio file.
S403,当所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。S403 , when a frequency band in 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 method.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range is set with reference to the sensitivity of the human ear to sound. The frequency of sound 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 the sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones. Sound waves, but the ear is almost inaudible; the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the human ear is not much different in sensitivity to the sound in other frequency bands, 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 a frequency band in the audio file within a preset frequency range. 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 to increase the gain of the frequency band within the preset frequency range in the audio file Reduce 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 within the preset frequency range by a preset volume amount and/or to set the audio file in the preset volume. The gain of the frequency band within the set frequency range is reduced by a predetermined gain amount.
本实施方式中,在当前处于的场景为预设的触发场景时,即处于噪音较大的场景下,对人耳来说,本来就不敏感的声音频段更加不易被察觉,因此,在此种场景下,当播放人耳不敏感的音频时,降低播放音频文件中在预设频率范围内的频段的增益和/或音量,更加不会影响听觉效果。In this implementation manner, when the current scene is a preset trigger scene, that is, in a scene with relatively large noise, the sound frequency band that is inherently insensitive to the human ear is more difficult to detect. Therefore, in this kind of In this scenario, when playing audio that is not sensitive to human ears, reducing the gain and/or volume of the frequency band within the preset frequency range in the playing audio file 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-mentioned audio file may be a small segment of the audio file or a complete audio file.
处理单元502,用于判断所述音频文件的频率中是否有频段在预设频率范围内,以及在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。The processing unit 502 is configured to determine 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 according to the first preset sound effect way to adjust the sound effect parameters of the terminal device to play the audio file.
其中,所述预设频率范围的设置参考人耳对声音的敏感度进行设置。人类能听到的声音频率在20Hz至20KHz之间,其中在不同频段人耳对声音的灵敏度不一样,例如:人耳对15KHz至20KHz频段的声音极度不敏感,虽然可以通过人体和骨骼来感受声波,但耳朵是几乎听不到的;而人耳对1KHz至4KHz频段的声音极度敏感,感受到的穿透率最强;人耳对其他频段的声音的灵敏度相差不大,但能感受到不同的音色,例如低音或高音。Wherein, the setting of the preset frequency range is set with reference to the sensitivity of the human ear to sound. The frequency of sound 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 the sound in the 15KHz to 20KHz frequency band, although it can be felt through the human body and bones. Sound waves, but the ear is almost inaudible; the human ear is extremely sensitive to the sound in the 1KHz to 4KHz frequency band, and the penetration rate is the strongest; the human ear is not much different in sensitivity to the sound in other frequency bands, 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 predetermined volume amount and/or reduce the gain of the frequency band in the audio file by a predetermined gain amount.
本实施方式中,在当前播放的音频文件中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低音频文件中所述频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。In this embodiment, when a frequency band in the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the gain and/or volume of the frequency band in the audio file can be reduced, thereby reducing the gain and/or volume of the frequency band in the audio file. On the premise that the auditory effect is not affected, the power consumption of the terminal device can be reduced.
可选实施例中,所述处理单元502还用于:In an optional embodiment, the processing unit 502 is further configured to:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备播放所述音频文件的音效参数是否满足第一预设条件;When a frequency band in the frequency of the audio file is within the preset frequency range, determine whether the sound effect parameter of the audio file played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameter of the audio file currently played by the terminal device does not meet the first preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the first preset sound effect adjustment method.
具体地,当所述终端设备当前播放所述音效文件的音效参数满足所述预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。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 whose audio frequencies are in the same range, only one sound effect parameter adjustment is required.
本实施方式中,在当前播放的音频文件的频率在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低播放音频文件的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,当播放音频频率在同一频率范围内的音频片段时,只需经过一次调节即可,可降低所述终端设备的处理工作,从而进一步降低所述终端设备的功耗。In this embodiment, when the frequency of the currently playing audio file is within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the gain and/or volume of the playing audio file can be reduced, so as to not affect the hearing. On the premise of the effect, the power consumption of the terminal device can be reduced. Further, when playing audio clips whose audio frequencies are 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 a frequency band in the frequency of the audio file is not within the preset frequency range, determine whether the sound effect parameter of the audio file played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第二预设条件时,根据第二预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameter of the audio file currently played by the terminal device does not meet the second preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the second preset sound effect adjustment method.
其中,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件具体为:判断所述终端设备当前播放所述音频文件的音量是否大于预设音量值及/或当前播放所述音频文件的增益是否大于预设增益值。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 currently playing Whether the gain of the audio file is greater than the preset gain value.
具体地,当所述终端设备当前播放所述音效文件的音效参数满足所述第二预设条件时,表示之前已经对所述终端设备的音效参数进行调节,所述终端设备当前的音效参数是合适的,无需再进行调节。因此,在播放音频频率在同一范围内的音频片段时,只需进行一次音效参数调节即可。Specifically, when the sound effect parameters of the sound effect file currently played by the terminal device satisfy 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 whose audio frequencies are in the same range, only one sound effect parameter adjustment 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 may be to increase the volume of the frequency band in the audio file that is not within the preset frequency range to a preset volume value and/or to increase the volume of the audio file not within the preset frequency range to a preset volume value. The gain of the frequency band within 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 that is not within the preset frequency range by a preset volume amplitude and/or increasing the gain of a frequency band in the audio file that is not within the predetermined frequency range by a predetermined gain magnitude.
本实施方式中,在当前播放的音频文件的频率中有频段在预设频率范围内时,即人耳对当前播放的音频不敏感时,可降低播放音频文件中在预设频率范围内的频段的增益和/或音量,从而在不影响听觉效果的前提下,可降低所述终端设备的功耗。进一步,在当前播放的音频文件的频率中有频段不在预设频率范围,即当前播放的音频为人耳敏感的音频时,可增大播放音频文件中不在预设频率范围内频段的增益和/或音量,从而保证用户能够得到好的听觉效果。In this embodiment, when the frequency of the currently playing audio file has a frequency band within the preset frequency range, that is, when the human ear is not sensitive to the currently playing audio, the frequency band within the preset frequency range in the playing audio file can be reduced Therefore, the power consumption of the terminal device can be reduced without affecting the auditory effect. Further, if there is a frequency band in the frequency of the currently playing audio file that is not within the preset frequency range, that is, when the currently playing audio is audio sensitive to human ears, the gain and/or the gain of the frequency band not within the preset frequency range in the playing audio file 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 the detection unit 501 and the processing unit 502, the terminal device further includes a determination unit 503 for determining whether the current scene is a preset trigger scene according to the ambient noise collected by the terminal device.
作为一种可行的实施方式,在音频播放过程中,终端设备可采集环境中的噪音,根据环境噪音来判断当前场景是否为预设的触发场景,其中触发场景指的是可触发终端设备对播放的音频片段的音效参数做出调整的场景,例如是噪音较大的场景。As a feasible implementation manner, during the audio playback process, the terminal device can collect noise in the environment, and determine whether the current scene is a preset trigger scene according to the ambient noise, where the trigger scene refers to the trigger scene that can trigger the terminal device to play A scene in which 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 for presetting the noise range corresponding to the above-mentioned 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 when the environmental noise is within the noise range, judges that the current scene is a preset trigger scene. Trigger the scene.
本实施方式中,在当前处于的场景为预设的触发场景时,即处于噪音较大的场景下,对人耳来说,本来就不敏感的声音频段更加不易被察觉,因此,在此种场景下,当播放人耳不敏感的音频时,降低播放音频文件中在预设频率范围内的频段的增益和/或音量,更加不会影响听觉效果。In this implementation manner, when the current scene is a preset trigger scene, that is, in a scene with relatively large noise, the sound frequency band that is inherently insensitive to the human ear is more difficult to detect. Therefore, in this kind of In this scenario, when playing audio that is not sensitive to human ears, reducing the gain and/or volume of the frequency band within the preset frequency range in the playing audio file 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 FIG. 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 the mutual communication; the processor 701 controls the wireless communication with the external cellular network through the communication interface 703; the communication interface 703 includes but is not limited to antennas, amplifiers, transceivers, couplers, LNA (Low Noise Amplifier, low noise amplifier ), duplexers, etc. The memory 702 includes at least one of the following: random access memory, non-volatile memory and external memory, the memory 702 stores executable program codes, and the processor 701 can call the executable program codes to perform the following steps:
检测终端设备播放的音频文件的频率;Detect the frequency of audio files played by the terminal device;
判断所述音频文件的频率中是否有频段是否在预设频率范围内;Determine whether the frequency of the audio file has a frequency band within the preset frequency range;
在所述音频文件的频率中有频段在预设频率范围内时,根据第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数,其中,所述第一预设音效调节方式至少包括降低所述音频文件中所述频段的音量及/或增益。When a frequency band of the audio file is within a preset frequency range, adjust the sound effect parameters of the terminal device for playing the audio file according to a first preset sound effect adjustment method, wherein the first preset sound effect adjustment The manner includes at least 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 further executed for:
在所述音频文件的频率中有频段在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第一预设条件;When a frequency band in the frequency of the audio file is within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a first preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第一预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the first preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; and
在所述终端设备当前播放所述音频文件的音效参数不满足所述第一预设条件时,根据所述第一预设音效调节方式调节所述终端设备播放所述音频文件的音效参数。When the sound effect parameter of the audio file currently played by the terminal device does not meet the first preset condition, adjust the sound effect parameter of the audio file played by the terminal device according to the first preset sound effect adjustment method.
其中,所述所述可执行程序代码还被执行以用于:Wherein, the executable program code is also executed for:
在所述音频文件的频率中有频段不在所述预设频率范围内时,判断所述终端设备当前播放所述音频文件的音效参数是否满足第二预设条件;When a frequency band in the frequency of the audio file is not within the preset frequency range, determine whether the sound effect parameter of the audio file currently played by the terminal device satisfies a second preset condition;
在所述终端设备当前播放所述音频文件的音效参数满足所述第二预设条件时,控制所述终端设备按照当前的音效参数播放所述音频文件;以及When the sound effect parameter of the audio file currently played by the terminal device satisfies the second preset condition, controlling the terminal device to play the audio file according to the current sound effect parameter; 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 the 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 the frequency band of the audio file that is 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 further executed for:
根据所述终端设备采集到的环境噪音判断当前场景是否为预设的触发场景;Determine whether the current scene is a preset trigger scene according to the environmental noise collected by the terminal device;
若判断结果为是,则检测所述终端设备播放的音频文件的频率。If the determination result is yes, the frequency of the audio file played by the terminal device is detected.
其中,所述根据所述环境噪音判断当前场景是否为预设的触发场景之前,所述可执行程序代码还被执行以用于:Wherein, before judging whether the current scene is a preset trigger scene according to the environmental noise, the executable program code is further 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 when the environmental noise is within the noise range, determining the current scene For the preset trigger scene.
本发明所有实施例中的模块或单元,可以通过通用集成电路,例如CPU(CentralProcessing Unit,中央处理器),或通过ASIC(Application Specific IntegratedCircuit,专用集成电路)来实现。The modules or units in all the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit, central processing unit), or an ASIC (Application Specific Integrated Circuit, an application-specific integrated circuit).
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be adjusted, combined and deleted in sequence according to actual needs.
本发明实施例装置中的模块或单元可以根据实际需要进行合并、划分和删减。The modules or units in the apparatus of the embodiment of the present invention may 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 by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. Among them, the storage medium can be a disk, disc, only read-only memory (ROM) or random storage memory (RAM).
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still 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 CN106126167A (en) | 2016-11-16 |
| CN106126167B true 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) |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106126167B (en) * | 2016-06-16 | 2019-08-27 | Oppo广东移动通信有限公司 | A 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 |
| CN109817189B (en) * | 2018-12-29 | 2023-09-08 | 珠海市蔚科科技开发有限公司 | Audio signal adjusting method, sound effect adjusting device and system |
| CN110809214B (en) * | 2019-11-21 | 2021-01-08 | Oppo广东移动通信有限公司 | Audio playing method, audio playing device and terminal equipment |
| CN113409800B (en) * | 2020-03-16 | 2024-07-12 | 浙江宇视科技有限公司 | Processing method and device for monitoring audio, storage medium and electronic equipment |
| CN111580774B (en) * | 2020-04-28 | 2023-07-14 | 江苏紫米电子技术有限公司 | Sound effect adjusting method, device, equipment and storage medium |
| 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 |
| CN112511123A (en) * | 2020-11-30 | 2021-03-16 | 广州朗国电子科技有限公司 | Sound effect customizing method and device, electronic equipment and storage medium |
| 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 |
| 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 (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| 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 (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100556101C (en) * | 2007-01-26 | 2009-10-28 | 深圳创维-Rgb电子有限公司 | A kind of television voice processing apparatus and method |
| CN101540943A (en) * | 2008-03-18 | 2009-09-23 | 桦勋有限公司 | Miniature loudspeaker system integrating filter circuit and power regulation circuit |
| CN102195581A (en) * | 2010-03-18 | 2011-09-21 | 承景科技股份有限公司 | Volume adjusting method for digital audio signal |
| CN102956247B (en) * | 2011-08-19 | 2016-08-17 | 富泰华工业(深圳)有限公司 | Audio playback device and audio adjustment method |
| 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 |
| CN103078997A (en) * | 2012-12-20 | 2013-05-01 | 广东欧珀移动通信有限公司 | Mobile terminal volume setting method, system and mobile terminal |
| 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 |
| CN203554677U (en) * | 2013-11-08 | 2014-04-16 | 冠捷显示科技(厦门)有限公司 | System capable of adjusting volume based on frequencies and television employing same system |
| 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 (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| 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 |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2017215657A1 (en) | 2017-12-21 |
| CN106126167A (en) | 2016-11-16 |
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 | |
| EP3416041B1 (en) | Sound effect processing method, and terminal device | |
| CN107231473B (en) | Audio output regulation and control method, equipment and computer readable storage medium | |
| CN107517428A (en) | A kind of signal output method and device | |
| US10027299B2 (en) | Volume control | |
| CN105100330B (en) | The method and mobile terminal of a kind of equipment effects,sound optimization | |
| CN107566618B (en) | Volume adjusting method and device, terminal equipment and storage medium | |
| US11201598B2 (en) | Volume adjusting method and mobile terminal | |
| CN104486668B (en) | A kind of volume adjusting method | |
| CN105204761B (en) | A kind of volume adjusting method and user terminal | |
| CN110809214A (en) | Audio playing method, audio playing device and terminal equipment | |
| 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 | |
| WO2022252781A1 (en) | Noise reduction control method, electronic device, and computer-readable storage apparatus | |
| JP6381062B2 (en) | Method and device for processing audio signals for communication devices | |
| WO2022199518A1 (en) | Audio signal processing method and apparatus, electronic device, and storage medium | |
| CN111343497A (en) | Sound effect adjustment method of playback device, playback device and storage medium | |
| CN114071307B (en) | Headphone volume adjustment method, device, equipment and medium | |
| CN107465824A (en) | volume adjusting method, device, mobile terminal and storage medium | |
| WO2019033940A1 (en) | Volume adjustment method and apparatus, terminal device, and storage medium | |
| CN104660197A (en) | Volume control method and playing equipment | |
| CN110191398A (en) | Suppressing method, device and the computer readable storage medium uttered long and high-pitched sounds | |
| CN107483734B (en) | Volume adjustment method, device, terminal device and storage medium | |
| CN104769966A (en) | Receiver |
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 |