CN100593323C - Method and system for automatic volume adjustment - Google Patents
Method and system for automatic volume adjustment Download PDFInfo
- Publication number
- CN100593323C CN100593323C CN200610023869A CN200610023869A CN100593323C CN 100593323 C CN100593323 C CN 100593323C CN 200610023869 A CN200610023869 A CN 200610023869A CN 200610023869 A CN200610023869 A CN 200610023869A CN 100593323 C CN100593323 C CN 100593323C
- Authority
- CN
- China
- Prior art keywords
- module
- data
- automatic volume
- audio data
- low
- 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
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000005236 sound signal Effects 0.000 claims abstract description 6
- 238000004364 calculation method Methods 0.000 claims description 16
- 210000003127 knee Anatomy 0.000 claims description 14
- 238000009499 grossing Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 2
- 230000001105 regulatory effect Effects 0.000 claims 6
- 230000002452 interceptive effect Effects 0.000 claims 3
- 230000003111 delayed effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 239000000872 buffer Substances 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Control Of Amplification And Gain Control (AREA)
Abstract
本发明涉及一种可以自动进行音量调节的方法及系统,具体包括:将输入音频数据分成高低两个频段;分别计算高低频段数据的平均音量;将平均音量数据转换到对数域,根据控制曲线取值获得控制增益数据;将获得的数据转换到线性域,分别与经过延迟的对应频段数据相乘;将相乘后得到的高低频段音频数据相加输出。本发明实现了对音频音量的自动调节,使输出音量控制在用户指定的范围之内,并且不会造成声音失真。这种方法及系统不仅仅可以应用于电视系统,更可以推广到移动终端、广播系统、电脑、车载CD等使用音频信号的领域。
The present invention relates to a method and system capable of automatic volume adjustment, specifically comprising: dividing input audio data into high and low frequency bands; calculating the average volume of the high and low frequency band data respectively; converting the average volume data to logarithmic domain, and according to the control curve Take the value to obtain the control gain data; convert the obtained data to the linear domain, and multiply them with the corresponding delayed frequency band data respectively; add and output the multiplied high and low frequency band audio data. The invention realizes the automatic adjustment of the audio volume, controls the output volume within the range specified by the user, and does not cause sound distortion. The method and system can not only be applied to television systems, but can also be extended to fields using audio signals such as mobile terminals, broadcasting systems, computers, and vehicle-mounted CDs.
Description
技术领域 technical field
本发明涉及一种自动音量调节的方法及系统,尤其涉及一种可以自动进行音量调节,防止音量突然变化的方法及系统。The invention relates to a method and system for automatic volume adjustment, in particular to a method and system for automatically adjusting volume and preventing sudden changes in volume.
背景技术 Background technique
用户可以通过手动设置将电视节目的音量等参数设置为一定数值,但电视不同节目源音量或大或小,比如,不同频道信号源的音频音量差距极大;同时,插播的广告出于引起观众注意的目的,往往大于正常节目的音量。因此,在电视频道改变或者某一频道的节目变化时,往往带来音量的突然升高或降低,带给观众不舒服的感受。Users can manually set the volume and other parameters of TV programs to a certain value, but the volume of different TV program sources may be loud or small. For example, the audio volume of different channel signal sources varies greatly; The purpose of attention is often greater than the volume of normal programs. Therefore, when the TV channel is changed or the program of a certain channel is changed, the volume often increases or decreases suddenly, which brings uncomfortable feeling to the audience.
专利号为200320119709的实用新型从对模拟信号进行处理的角度提出了如下的技术方案来解决上述问题:通过检测电路检测音频输入端的伴音音量信号并送入控制电路,当发生音频信号过载失真或者偏移应需音量时,控制电路接通音量调节电路;通过音量调节电路使用“加”或“减”键调节伴音电压振幅实现自动音量控制的目的。The utility model with the patent No. 200320119709 proposes the following technical solution from the perspective of analog signal processing to solve the above problems: detect the audio volume signal at the audio input end through the detection circuit and send it to the control circuit. When the required volume is shifted, the control circuit is connected to the volume adjustment circuit; through the volume adjustment circuit, the "plus" or "minus" key is used to adjust the voltage amplitude of the accompanying sound to realize the purpose of automatic volume control.
上面的技术方案在一定程度上实现了音量的自动调节,但仅仅通过对模拟音频信号振幅进行修正的技术方案进行,通过“加”或“减”键调节伴音电压振幅,有可能因为控制信号过快的变化而引入额外的噪声。The above technical solution realizes the automatic adjustment of the volume to a certain extent, but only through the technical solution of modifying the amplitude of the analog audio signal. Adjusting the voltage amplitude of the accompanying sound through the "plus" or "minus" key may cause the control signal to be too high. Rapid changes introduce additional noise.
同时,目前市场上也出现了从数字处理角度对音量进行自动控制的方法,通过A/D转换器对模拟信号进行处理,并利用缓冲器计算处理后的音频数据的均方根,获得输入数据的平均音量,在对数域给出对输入数据平均音量的控制规律后,经D/A转换器输出。由于上述技术方案对输入的音频进行统一处理,当输入信号的低频成分占主导地位时,经过上述方法处理,会将原本幅度很小的高频成分损失掉,使得处理后的音频失去了原有的音色或内容;使用缓冲器计算均方根占据大量系统资源。At the same time, a method of automatically controlling the volume from the perspective of digital processing has also appeared on the market. The analog signal is processed through the A/D converter, and the buffer is used to calculate the root mean square of the processed audio data to obtain the input data. After the average volume of the input data is given in the logarithmic domain to control the average volume of the input data, it is output through the D/A converter. Since the above-mentioned technical solution uniformly processes the input audio, when the low-frequency component of the input signal is dominant, the high-frequency component with a small amplitude will be lost after the above-mentioned method, so that the processed audio loses its original timbre or content; using buffers to calculate RMS takes a lot of system resources.
为了克服上述问题,需要一种可以自动进行音量调节的方法和系统,使输出音量的突然变化可以控制在一定范围之内,并且不会造成声音失真。这种方法及系统不仅仅可以应用于电视系统,更可以推广到移动终端、广播系统、电脑、车载CD等使用音频信号的领域。In order to overcome the above problems, there is a need for a method and system that can automatically adjust the volume, so that the sudden change of the output volume can be controlled within a certain range without causing sound distortion. The method and system can not only be applied to television systems, but can also be extended to fields using audio signals such as mobile terminals, broadcasting systems, computers, and vehicle-mounted CDs.
发明内容 Contents of the invention
本发明的目的在于针对现有音频处理技术在音量自动调节方面的缺陷,提供一种可实现音量自动调节的方法,该方法通过区分音频数据的高频、低频并有针对性的分别处理,使输出音频数据高频信号部分不会发生丢失;通过引入平滑滤波器和设计控制曲线,使控制信号的变化趋于平滑。The purpose of the present invention is to provide a method for automatic volume adjustment in view of the defects of the existing audio processing technology in the aspect of automatic volume adjustment. The high-frequency signal part of the output audio data will not be lost; by introducing a smoothing filter and designing a control curve, the change of the control signal tends to be smooth.
本发明的目的还在于提供一种音量自动调节的系统,可以广泛使用于电视、移动终端、电脑、车载CD等系统中,实现对音量的自动调节,不会对音频的效果造成影响。The purpose of the present invention is also to provide a system for automatic volume adjustment, which can be widely used in systems such as televisions, mobile terminals, computers, and vehicle-mounted CDs, to realize automatic volume adjustment without affecting audio effects.
为实现上述目的,本发明提供了一种自动音量调节的方法,包括下述步骤:To achieve the above object, the present invention provides a method for automatic volume adjustment, comprising the following steps:
步骤1、将输入音频数据分成高频段音频数据和低频段音频数据;
步骤2、分别计算高、低频段音频数据的平均音量参数;Step 2, calculating the average volume parameters of the high and low frequency band audio data respectively;
步骤3、将平均音量数据转换到对数域,根据控制曲线取值获得控制增益数据;Step 3. Convert the average volume data to the logarithmic domain, and obtain the control gain data according to the value of the control curve;
步骤4、将获得的数据转换到线性域,分别与经过延迟的对应频段数据相乘;Step 4, converting the obtained data into the linear domain, and multiplying them with the delayed corresponding frequency band data respectively;
步骤5、将相乘后得到的高、低频段音频数据相加输出。Step 5, adding and outputting the high and low frequency band audio data obtained after multiplication.
本发明还提供了一种自动音量调节系统,接收A/D转换器输出的音频信号,进行自动音量调节后发送出去;包括依次连接的低通滤波器、均方根计算模块、控制模块和乘法器模块,低通滤波器模块通过延迟模块连接到乘法模块;还包括依次连接的高通滤波器、均方根计算模块、控制模块和乘法器模块,高通滤波器模块通过延迟模块连接到乘法模块;所述的两个乘法模块分别连接到加法器模块。The present invention also provides an automatic volume adjustment system, which receives the audio signal output by the A/D converter and sends it out after automatic volume adjustment; it includes a low-pass filter connected in sequence, a root mean square calculation module, a control module and a multiplication The low-pass filter module is connected to the multiplication module through the delay module; it also includes a high-pass filter, root mean square calculation module, control module and multiplier module connected in sequence, and the high-pass filter module is connected to the multiplication module through the delay module; The two multiplication modules are respectively connected to the adder module.
因此,本发明具有以下优点:Therefore, the present invention has the following advantages:
1、自动音量调节将输出音频的音量控制在一定范围之内,防止音量突然增大或减小,使听众获得舒适的听觉感受;1. Automatic volume adjustment controls the volume of the output audio within a certain range to prevent the volume from suddenly increasing or decreasing, so that the audience can obtain a comfortable hearing experience;
2、采用高通/低通滤波器将输入音频信号分成两个频段进行针对性处理,保存了处理前原有的音色和内容;2. Using high-pass/low-pass filters to divide the input audio signal into two frequency bands for targeted processing, preserving the original timbre and content before processing;
3、均方根计算采用一定时间常数的一阶无线脉冲滤波器进行计算,避免了采用通常利用缓冲器进行计算方法中计算所需资源过大的问题;3. The root mean square calculation uses a first-order wireless pulse filter with a certain time constant for calculation, which avoids the problem of excessive calculation resources required in the calculation method that usually uses a buffer;
4、控制曲线采用软拐点(soft knee)控制曲线,同时使用平滑滤波器进行平滑处理,避免了由于控制信号过快变化而引入额外的噪声。4. The control curve adopts a soft knee control curve, and at the same time uses a smoothing filter for smoothing, which avoids the introduction of additional noise due to the rapid change of the control signal.
下面结合附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.
附图说明 Description of drawings
图1为现有技术中音频处理方法的流程图;Fig. 1 is the flowchart of audio processing method in the prior art;
图2为本发明自动音量调节方法的流程图;Fig. 2 is the flowchart of automatic volume adjustment method of the present invention;
图3为本发明自动音量处理中进行均方根计算的方法示意图;Fig. 3 is the schematic diagram of the method for root mean square calculation in the automatic volume processing of the present invention;
图4为本发明自动音量处理中soft knee控制曲线示意图;Fig. 4 is the soft knee control curve schematic diagram in the automatic volume processing of the present invention;
图5为现有技术中进行音频处理的系统框图;Fig. 5 is a system block diagram of audio processing in the prior art;
图6为本发明进行自动音量调节的系统框图。Fig. 6 is a system block diagram of automatic volume adjustment in the present invention.
具体实施方式 Detailed ways
通常的音频处理将输入音频数据转换为数字音频数据,并根据用户设置的参数进行控制,再转换为模拟音频数据输出;同时,为了克服音量的突然变化,在根据用户设置控制音频数据之前,加入自动音量调节的方法。参见图1,是现有技术中音频处理方法的流程图。The usual audio processing converts the input audio data into digital audio data, controls it according to the parameters set by the user, and then converts it into analog audio data output; at the same time, in order to overcome the sudden change of the volume, before controlling the audio data according to the user setting, add A method for automatic volume adjustment. Referring to FIG. 1 , it is a flowchart of an audio processing method in the prior art.
本发明提供了一种针对现有自动音量调节的缺陷,进行自动音量调节的方法,参见图2,包括下述步骤:The present invention provides a method for automatic volume adjustment aimed at the defects of existing automatic volume adjustment, as shown in Figure 2, including the following steps:
步骤101、使用高通/低通滤波器将输入音频数据分成高频段音频数据和低频段音频数据;因为通常重低音的频率范围选择0-200Hz,因此区分高低两个频段的截止频率(cutoff frequency)是200Hz,200Hz以下的音频数据为低频段音频数据,200Hz以上的音频数据为高频段音频数据;
步骤102、使用具有一定时间常数的一阶无限脉冲响应滤波器分别计算高低频段数据的均方根(Root Mean Square,简称RMS),获得高低频段各自的平均音量参数;
步骤103、将获得的平均音量数据转换到对数域;
步骤104、根据预先设定的soft knee控制曲线取值,获得控制增益数据;
步骤105、将根据控制曲线获得的对数域音频数据转换到线性域;
步骤106、使用一阶无限脉冲响应滤波器进行低通平滑滤波;
步骤107、经过滤波处理的高低频段音频数据分别与本频段经过延迟的对应数据相乘;
步骤108、相乘后得到的高低频段音频数据相加;
步骤109、输出。
在上面的步骤102中,进行RMS运算的示意图参见图3。传递函数为:In
其中,TAV是平均系数,它的取值与采用滑动窗求平均时所用的窗长度RMS_average_in_Samples的关系如下:Among them, TAV is the average coefficient, and the relationship between its value and the window length RMS_average_in_Samples used when the sliding window is used for averaging is as follows:
TAV=exp(ln(0.01)/RMS_average_in_Samples);TAV=exp(ln(0.01)/RMS_average_in_Samples);
RMS计算公式如下:The RMS calculation formula is as follows:
在上面的步骤104中,根据soft knee控制曲线取值,参见图4,对数域上soft knee控制曲线是根据硬拐点控制曲线设计的。在hard knee曲线中,当输入的dB值小于-30dB时,输出与输入相同,即控制增益为0dB;而当输入的dB值大于-30dB时,输出值均保持为-30dB,即控制增益是虽输入的变化而变化的;soft knee曲线是依据在hard knee拐角处按光滑过渡的思想进行设计。在输入值为-30dB附近时,输出值按照图中光滑曲线进行取值,这就是根据预先设定的soft knee控制曲线取值。In the
在步骤105中,平滑滤波的算法同求取RMS的算法相同,但其传递函数中的平均系数TAV不是恒定不变的,针对控制增益呈上升趋势和处于下降趋势这两种情况,TAV的取值是不同的,上升趋势时的时间常数(20ms)比下降时(16s)要小。In
参见图5,是现有技术中进行音频处理的系统示意图,包括依次连接的A/D转换模块、音频处理模块和D/A转换模块;其中,音频处理模块根据用户设定对音频数据进行控制处理。同时,为了克服音量的突然变化,在音频处理模块之前,加入自动音量调节模块。Referring to Figure 5, it is a schematic diagram of a system for audio processing in the prior art, including an A/D conversion module, an audio processing module, and a D/A conversion module connected in sequence; wherein, the audio processing module controls audio data according to user settings deal with. At the same time, in order to overcome sudden changes in volume, an automatic volume adjustment module is added before the audio processing module.
参见图6,是本发明中的自动音量调节系统的系统框图,该自动音量调节模块自动调节输入音频数据RMS的大小,将输出音频的音量控制在一定范围之内,防止音量的突然增大。Referring to Fig. 6, it is a system block diagram of the automatic volume adjustment system in the present invention, the automatic volume adjustment module automatically adjusts the size of the input audio data RMS, controls the volume of the output audio within a certain range, and prevents the sudden increase of the volume.
自动音量调节系统包括依次连接的低通滤波器1、均方根计算模块31、对数域转换模块41、动态控制规律和阈限模块51、线性域转换模块61、平滑滤波器模块71和乘法器模块81,低通滤波器1通过延迟模块91连接到乘法模块81;还包括依次连接的高通滤波器2、均方根计算模块32、对数域转换模块42、动态控制规律和阈限模块52、线性域转换模块62、平滑滤波器模块72和乘法器模块82,高通滤波器2通过延迟模块92连接到乘法模块82;两个乘法模块81和82分别连接到加法器模块10。The automatic volume adjustment system includes a low-
该系统中,低通滤波器1和高通滤波器2采用的是二阶无线脉冲响应滤波器;均方根计算模块31和32都是具有一定时间常数的一阶无限脉冲响应滤波器;动态控制规律和阈限模块51和52中预先设计soft knee控制曲线,使接收到的对数域音频数据按照软拐点控制曲线取值,获得控制增益;平滑滤波器模块71和72采用对于信号增大和减小情况具有不同时间常数的一阶无线脉冲相应滤波器。In this system, the low-
最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be The scheme shall be modified or equivalently replaced without departing from the spirit and scope of the technical scheme of the present invention.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200610023869A CN100593323C (en) | 2006-02-14 | 2006-02-14 | Method and system for automatic volume adjustment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200610023869A CN100593323C (en) | 2006-02-14 | 2006-02-14 | Method and system for automatic volume adjustment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101022518A CN101022518A (en) | 2007-08-22 |
| CN100593323C true CN100593323C (en) | 2010-03-03 |
Family
ID=38710155
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200610023869A Expired - Fee Related CN100593323C (en) | 2006-02-14 | 2006-02-14 | Method and system for automatic volume adjustment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100593323C (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5527878B2 (en) * | 2009-07-30 | 2014-06-25 | トムソン ライセンシング | Display device and audio output device |
| CN101694987B (en) * | 2009-10-20 | 2012-07-04 | 大连捷成实业发展有限公司 | A loudness control system and control method |
| CN102316396B (en) * | 2010-07-09 | 2014-12-31 | 深圳市宇恒互动科技开发有限公司 | Method and device for realizing automatic control over sounds in large dynamic range by using sensor |
| JP5702666B2 (en) * | 2011-05-16 | 2015-04-15 | 富士通テン株式会社 | Acoustic device and volume correction method |
| CN103384316B (en) * | 2012-05-04 | 2016-12-21 | 瑞萨电子(中国)有限公司 | Radiotelevisor and volume curve adjustment method thereof |
| CN103871439B (en) * | 2012-12-11 | 2016-08-03 | 腾讯科技(深圳)有限公司 | The method of a kind of audio frequency broadcasting, Apparatus and system |
| CN105991103A (en) * | 2015-04-27 | 2016-10-05 | 乐视致新电子科技(天津)有限公司 | Volume control method and device |
| FR3052951B1 (en) * | 2016-06-20 | 2020-02-28 | Arkamys | METHOD AND SYSTEM FOR OPTIMIZING THE LOW FREQUENCY AUDIO RENDERING OF AN AUDIO SIGNAL |
| CN108958704B (en) * | 2017-05-18 | 2020-12-15 | 华为技术有限公司 | A data processing device and method |
| CN114879929B (en) * | 2022-04-11 | 2025-06-03 | 维沃移动通信有限公司 | Multimedia file playing method and device |
-
2006
- 2006-02-14 CN CN200610023869A patent/CN100593323C/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN101022518A (en) | 2007-08-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100593323C (en) | Method and system for automatic volume adjustment | |
| US9729969B2 (en) | System and method for bass enhancement | |
| EP2819307B1 (en) | System and method for narrow bandwidth digital signal processing | |
| US10750278B2 (en) | Adaptive bass processing system | |
| US9985597B2 (en) | Digital compressor for compressing an audio signal | |
| CN101599747B (en) | Volume control apparatus and method | |
| US8868414B2 (en) | Audio signal processing device with enhancement of low-pitch register of audio signal | |
| WO2016150085A1 (en) | Dynamic low-frequency enhancement method and system based on equal loudness contour | |
| JP2008085417A (en) | Speaker sound enhancing apparatus | |
| CN101843115A (en) | Auditory sensibility correction device | |
| CN103517183A (en) | Method and device for strengthening subwoofer signals | |
| JP6669176B2 (en) | Signal processing device and signal processing method | |
| JP2003299181A (en) | Apparatus and method for processing audio signal | |
| CN108599732A (en) | A kind of method for controlling volume and system | |
| CN118301520A (en) | Sound signal processing method for improving product tone quality | |
| CN117376778A (en) | Low-frequency loudness compensation method, electronic device and storage medium | |
| US7774079B2 (en) | Method and system for receiving and decoding audio signals | |
| JP4732231B2 (en) | Mute circuit | |
| JPH05145991A (en) | Low range characteristic correction circuit | |
| CN113727244B (en) | Audio processing device and related audio processing method | |
| CN111556408A (en) | Intelligent power control system of loudspeaker and control method thereof | |
| CN114501233A (en) | A signal processing method, device and electronic device | |
| US9398371B2 (en) | Analog signal transfer system, variable compressor, and variable expander | |
| CN115866482A (en) | Audio processing method and device | |
| HK1262053A1 (en) | System and method for narrow bandwidth digital signal processing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100303 Termination date: 20180214 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |