CN110349595A - A kind of audio signal auto gain control method, control equipment and storage medium - Google Patents
A kind of audio signal auto gain control method, control equipment and storage medium Download PDFInfo
- Publication number
- CN110349595A CN110349595A CN201910663246.XA CN201910663246A CN110349595A CN 110349595 A CN110349595 A CN 110349595A CN 201910663246 A CN201910663246 A CN 201910663246A CN 110349595 A CN110349595 A CN 110349595A
- Authority
- CN
- China
- Prior art keywords
- audio signal
- gain coefficient
- loudness
- gain
- factor
- 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
- 230000005236 sound signal Effects 0.000 title claims abstract description 125
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012937 correction Methods 0.000 claims abstract description 11
- 238000001514 detection method Methods 0.000 claims description 19
- 230000000694 effects Effects 0.000 claims description 17
- 238000012545 processing Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 11
- 230000003247 decreasing effect Effects 0.000 claims description 10
- 230000009286 beneficial effect Effects 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000003321 amplification Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003199 nucleic acid amplification method Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000009432 framing Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 210000003739 neck Anatomy 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0316—Speech enhancement, e.g. noise reduction or echo cancellation by changing the amplitude
- G10L21/0324—Details of processing therefor
- G10L21/034—Automatic adjustment
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/30—Automatic control in amplifiers having semiconductor devices
- H03G3/3005—Automatic control in amplifiers having semiconductor devices in amplifiers suitable for low-frequencies, e.g. audio amplifiers
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Tone Control, Compression And Expansion, Limiting Amplitude (AREA)
- Control Of Amplification And Gain Control (AREA)
Abstract
This application discloses a kind of audio signal auto gain control method, control equipment and storage mediums, the audio signal auto gain control method includes counting to the energy of input audio signal, and the corresponding initial gain factor of input audio signal is once corrected according to the energy of input audio signal, obtain the intermediate gain coefficient of input audio signal;Second-order correction is carried out to intermediate gain coefficient, obtains final gain coefficient;According to input audio signal and final gain coefficient, output signal is obtained.By the above-mentioned means, the application can dynamic adjust gain coefficient, rapidly track audio signal fluctuation, improve the quality of output signal.
Description
Technical field
This application involves signal processing technology fields, and in particular to a kind of audio signal auto gain control method, control
Equipment and storage medium.
Background technique
Digital Signal Processing has widely been deep into the every field of people's life, in voice-over-net chat, by
, microphone quality not high in the equipment precision that is sampled to voice signal be poor and both call sides are in call and microphone
Distance far neglect the influences of the factors such as close suddenly, using network transmission voice signal it is possible that the suddenly big or suddenly small situation of sound,
When situation is serious, the exchange of both call sides may be influenced.
In practical applications, for increase volume under what conditions or reduce volume, general way is using quiet
Sound detection;Once being detected as mute or noise, then it is not processed, otherwise is handled using certain strategy.Increased using automatic
Algorithm handles audio signal can make output end or receiving end for benefit control (AGC, Automatic Gain Control)
Level keep in a certain range, solve the problems, such as to obtain the higher language of quality in the unbalanced of transmission over networks voice signal
Sound;However, to ensure that the reliability of statistics, and unexpected abnormality signal is avoided for the undue interference of statistics, it needs to accumulate one
Fixed sample is counted again, it will usually using several ms or even over one hundred millisecond as the period, statistical time is longer, response speed compared with
Slowly.
Summary of the invention
The application mainly solves the problems, such as to be to provide a kind of audio signal auto gain control method, control equipment and storage
Medium, can dynamic adjust gain coefficient, rapidly track audio signal fluctuation, improve the quality of output signal.
In order to solve the above technical problems, the application the technical solution adopted is that: a kind of audio signal automatic gain control is provided
Method processed, this method comprises: the energy to input audio signal counts, and according to the energy of input audio signal to input
The corresponding initial gain factor of audio signal is once corrected, and the intermediate gain coefficient of input audio signal is obtained;To centre
Gain coefficient carries out second-order correction, obtains final gain coefficient;According to input audio signal and final gain coefficient, exported
Signal.
Wherein, the energy of input audio signal is counted, and according to the energy of input audio signal to input audio
Before the step of corresponding initial gain factor of signal is once corrected, and the intermediate gain coefficient of input audio signal is obtained,
It include: to obtain loudness gain coefficient table, and store loudness gain coefficient table according to loudness scope and contour of equal loudness is preset,
In, loudness gain coefficient table includes the mapping relations of loudness level, frequency and gain coefficient;One is selected from default loudness scope
A loudness level is as the initial loudness factor;The initial loudness factor is matched with loudness gain coefficient table, obtains initial gain
Coefficient.
Wherein, the step of energy of input audio signal being counted, comprising: input audio signal is carried out at framing
Reason, obtains multiple first audio frames;Each first audio frame is detected using voice activity detection method, it is each to judge
Whether the first audio frame is valid frame;If the first audio frame is valid frame, the energy root mean square of each valid frame is obtained, and right
The energy root mean square of whole valid frames is averaged in input audio signal, obtains average energy root mean square.
Wherein, the corresponding initial gain factor of input audio signal is once repaired according to the energy of input audio signal
Just, the step of obtaining the intermediate gain coefficient of input audio signal, comprising: it is pre- to judge whether average energy root mean square is greater than first
If energy threshold;If average energy root mean square is greater than the first preset energy threshold value, the initial loudness factor is decreased in first
Between the loudness factor;If average energy root mean square increases to the initial loudness factor in second less than the first preset energy threshold value
Between the loudness factor;The first intermediate intermediate loudness factor of the loudness factor/the second matched with loudness gain coefficient table, is obtained
Between gain coefficient.
Wherein, the corresponding initial gain factor of input audio signal is once repaired according to the energy of input audio signal
Just, the step of obtaining the intermediate gain coefficient of input audio signal, comprising: judged that a upper period for current slot was corresponding
Whether the average energy root mean square of input audio signal is greater than the second preset energy threshold value;If upper period corresponding input sound
The average energy root mean square of frequency signal is greater than the second preset energy threshold value, then the initial loudness factor is decreased to loudness among third
The factor;If the average energy root mean square of upper period corresponding input audio signal, will less than the second preset energy threshold value
The initial loudness factor increases to the 4th intermediate loudness factor;By the intermediate loudness factor of the loudness factor/4th among third and loudness
Gain coefficient table is matched, and intermediate gain coefficient is obtained.
Wherein, the step of second-order correction being carried out to intermediate gain coefficient, obtaining final gain coefficient, comprising: to input sound
Frequency signal carries out sub-frame processing, obtains multiple second audio frames;The second audio frame is divided using sound end detecting method
Analysis, obtains the corresponding audio probability value of each second audio frame, wherein audio probability value is used to indicate the second audio frame, and there are sounds
The probability of frequency;Second-order correction is carried out to the corresponding intermediate gain coefficient of each second audio frame according to audio probability value, is increased
Beneficial coefficient adjustment table;Wherein, gain coefficient adjustment table includes multiple second audio frames and right respectively with multiple second audio frames
The final gain coefficient answered.
Wherein, second-order correction is carried out to the corresponding intermediate gain coefficient of each second audio frame according to audio probability value, obtained
The step of adjusting table to gain coefficient, comprising: judge whether audio probability value is greater than predetermined probabilities threshold value;If audio probability value
Greater than predetermined probabilities threshold value, then the corresponding intermediate gain coefficient of the second audio frame is decreased to the first final gain coefficient;If
Audio probability value is less than predetermined probabilities threshold value, then the corresponding intermediate gain coefficient of the second audio frame is increased to the second final increasing
Beneficial coefficient.
Wherein, according to input audio signal and final gain coefficient, the step of obtaining output signal, comprising: by the second sound
Final gain multiplication in frequency frame and gain coefficient adjustment table, obtains output signal.
In order to solve the above technical problems, that the application uses set another solution is that providing a kind of automatic growth control
Standby, which includes: the memory and processor of interconnection, wherein memory is for storing computer
Program, computer program is when being executed by processor, for realizing above-mentioned audio signal auto gain control method.
In order to solve the above technical problems, the application use another solution is that provide a kind of computer storage medium,
The computer storage medium is for storing computer program, and computer program is when being executed by processor, for realizing above-mentioned
Audio signal auto gain control method.
Through the above scheme, the beneficial effect of the application is: carrying out modified twice to initial gain factor, corrects for the first time
It is to be adjusted according to the energy of input audio signal to initial gain factor, obtains intermediate gain coefficient, second of amendment is
Final gain coefficient is obtained using intermediate gain coefficient and input audio signal;Then input audio signal and final gain are utilized
Coefficient generates output signal;Can dynamic adjust gain coefficient, rapidly track input audio signal fluctuation, for input sound
The fluctuation of frequency signal can be adaptively adjusted gain coefficient, so that the amplitude of output signal keeps in a certain range, improving
The quality of output signal guarantees that human ear hears stable audio.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.Wherein:
Fig. 1 is the flow diagram of one embodiment of audio signal auto gain control method provided by the present application;
Fig. 2 is the flow diagram of another embodiment of audio signal auto gain control method provided by the present application;
Fig. 3 is the signal of another embodiment moderate amplitude curve of audio signal auto gain control method provided by the present application
Figure;
Fig. 4 is that the process of step 208 in another embodiment of audio signal auto gain control method provided by the present application is shown
It is intended to;
Fig. 5 is another stream of step 208 in another embodiment of audio signal auto gain control method provided by the present application
Journey schematic diagram;
Fig. 6 is the structural schematic diagram of one embodiment of automatic gain control apparatus provided by the present application;
Fig. 7 is the structural schematic diagram of one embodiment of computer storage medium provided by the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, rather than whole embodiments.Based on this
Embodiment in application, those of ordinary skill in the art are obtained every other under the premise of not making creative labor
Embodiment shall fall in the protection scope of this application.
For the gain adjustment of voice signal, there are many methods at present, for example, first method: setting voice short-time energy
High-low threshold and zero-crossing rate high-low threshold, calculate short-time energy and the zero-crossing rate of input signal, by they respectively with it is default
Thresholding be compared, thus select increase gain, reduce gain or be to maintain current gain value.This method zero-crossing rate and
The standard that the speech characteristic parameters such as short-time energy judge as end-point detection, under low signal-to-noise ratio and certain specific noise environment easily
It judges by accident, sound adjusted is caused suddenly big or suddenly small situation occur.
Second method: first pre-processing voice to be detected, then carries out voice activity detection to voice signal
(VAD, Voice Activity Detection) compares current operation window when detecting signal to be detected is voice signal
The speech signal parameter of frame and previous operation window frame exports corresponding gain adjustment number to operational amplifier according to comparison result
According to;It is initial value by the gain adjustment of operational amplifier when on startup or judgement is not voice signal.This method is completely dependent on
In voice activity detection, if voice activity detection fails, the output of whole system will appear exception.
The third method: obtaining input speech signal, and accumulative statistics peak is calculated, and calculates pulse code modulation
(PCM, Pulse Code Modulation) it is expected regulatory factor, calculates quick AGC gain, carries out AGC meter to input signal
It calculates, finally output treated voice signal.This method does not carry out voice activity detection, only calculates accumulative statistics highest
The energy size of input signal and statistics peak are compared to adjust gain by value, under certain continuous big noise situations
It is possible that mistuning is whole.
In above-mentioned method, automatic gain does not carry out voice activity detection or carries out just for certain single features when adjusting
End-point detection, it is whole under low signal-to-noise ratio to be easy to happen mistuning;Algorithm robustness is poor, is easy to appear the suddenly big or suddenly small feelings of sound
Condition;Algorithm, which calculates, needs prolonged statistics, and the length for handling frame cannot be too short, along with the processing of linear filter needs
Convergence time is wanted, therefore the response speed that comes into force of conventional method is slower.
Refering to fig. 1, Fig. 1 is the process signal of one embodiment of audio signal auto gain control method provided by the present application
Figure, this method comprises:
Step 11: the energy of input audio signal being counted, and according to the energy of input audio signal to input sound
The corresponding initial gain factor of frequency signal is once corrected, and the intermediate gain coefficient of input audio signal is obtained.
Input audio signal can be pre-processed, for example, windowing process is carried out to input audio signal, with realization pair
Input audio signal carries out smooth, reduction spectrum leakage;Or to input audio signal carry out Fast Fourier Transform (FFT) (FFT,
Fast Fourier Transformation), input audio signal is transformed from the time domain into frequency domain, is handled etc. in frequency domain.
Input audio signal corresponds to an initial gain factor, which can set for system default or user
It sets.In order to handle input audio signal, so that the amplitude of the output signal generated after processing is maintained at certain range
It is interior, modified twice is carried out to initial gain factor, the energy based on input audio signal is corrected for the first time, is believed according to input audio
Number energy initial gain factor is modified, initial gain factor is modified to intermediate gain coefficient.
Step 12: second-order correction being carried out to intermediate gain coefficient, obtains final gain coefficient.
It is getting intermediate gain coefficient and then is being modified based on intermediate gain coefficient and input audio signal, obtained
To final gain coefficient.
Step 13: according to input audio signal and final gain coefficient, obtaining output signal.
After getting final gain coefficient, by input audio signal and final gain multiplication, to obtain defeated
Signal out.
It is different from the prior art, this application provides a kind of audio signal auto gain control methods, by input sound
The energy of frequency signal is counted, and is adjusted according to the energy of input audio signal to initial gain factor, and intermediate increasing is obtained
Beneficial coefficient;Intermediate gain coefficient and input audio signal is recycled to obtain final gain coefficient, to generate output signal;It can move
State adjust gain coefficient rapidly tracks the fluctuation of input audio signal, can be adaptive for the fluctuation of input audio signal
Ground adjust gain coefficient guarantees human ear so that the amplitude of output signal keeps in a certain range, improving the quality of output signal
Hear stable audio.
Referring to Fig.2, Fig. 2 is the process signal of another embodiment of audio signal auto gain control method provided by the present application
Figure, this method comprises:
Step 201: according to default loudness scope and contour of equal loudness, obtaining loudness gain coefficient table, and store loudness increasing
Beneficial coefficient table.
The sense of hearing of people is not linear to the perception of all frequencies, follows contour of equal loudness, to allow entire frequency range
Frequency sounds that loudness is identical, need under loudness scale adjust gain, rather than in frequency domain adjust gain, according to etc. loudness it is bent
Line is weighted the frequency of audio signal, cannot be weighted using a fixed loudness level.It can first determine a loudness
Grade, is then mapped to loudness level on contour of equal loudness, determines the corresponding gain coefficient of each frequency, each loudness level corresponding one
Group gain coefficient, which includes frequency and corresponding gain coefficient.
For example, as shown in figure 3, contour of equal loudness shows acoustic pressure needed for the sound of different frequency causes same loudness
Grade, for example, for the loudness level of 110 sides, if to obtain the sound with frequency 200Hz, sound pressure level 110dB equal loudness,
The sound pressure level using 100dB is needed in the frequency of 5000Hz, just people can be made to hear same volume.
Default loudness scope can be [0, Lmax], and it is that human ear is acceptable that Lmax, which is maximum adjustable loudness threshold,
Maximum loudness grade;From the corresponding frequency of the available each loudness level of contour of equal loudness and sound pressure level;In order to reduce each gain
The processing time needed for calculating improves the response speed that comes into force, can be according to default loudness scope and contour of equal loudness, Lai Jianli loudness
Grade, the mapping relations of frequency and gain coefficient, obtain loudness gain coefficient table, i.e., loudness gain coefficient table include loudness level,
The mapping relations of frequency and gain coefficient, and loudness gain coefficient table can be stored in memory.
Step 202: selecting a loudness level as the initial loudness factor from default loudness scope.
A loudness level can be taken as the initial loudness factor between maximum adjustable loudness threshold Lmax 0.
Step 203: the initial loudness factor being matched with loudness gain coefficient table, obtains initial gain factor.
Loudness gain coefficient table is stored with the corresponding relationship of loudness level and gain coefficient, using the initial loudness factor as rope
Draw, searched in loudness gain coefficient table, to obtain initial gain factor corresponding with the initial loudness factor.
Step 204: sub-frame processing being carried out to input audio signal, obtains multiple first audio frames.
In order to count the corresponding energy of input audio signal, input audio signal is divided into smaller short section to locate
Reason, each short section are first audio frame.
Step 205: each first audio frame being detected using voice activity detection method, to judge each first sound
Whether frequency frame is valid frame.
Step 206: if the first audio frame is valid frame, obtaining the energy root mean square of each valid frame, and to input sound
The energy root mean square of whole valid frames is averaged in frequency signal, obtains average energy root mean square.
The frame that voice activity is detected using voice activity detection method, count valid frame energy root mean square (RMS,
Root Mean Square);If determining the first audio frame is not valid frame, it is not processed.
Further, it first passes through voice activity detection method to detect all first audio frames, therefrom be tested with
The audio frame of effect, is denoted as valid frame;Then the energy root mean square of each valid frame is counted, and will all be had in input audio signal
The energy root mean square for imitating frame carries out sum-average arithmetic, to obtain the corresponding average energy root mean square of input audio signal.
Step 207: one being carried out to the corresponding initial gain factor of input audio signal according to the energy of input audio signal
Secondary amendment obtains the intermediate gain coefficient of input audio signal.
In a specific embodiment, average energy root mean square can be compared with the first preset energy threshold value, according to
Comparison result is modified initial gain factor, specifically includes the following steps:
Step 2071: judging whether average energy root mean square is greater than the first preset energy threshold value.
In order to carry out the adjustment of gain coefficient, by the average value of the energy root mean square of valid frames multiple in input audio signal
It is compared with the first preset energy threshold value.
Step 2072: if average energy root mean square is greater than the first preset energy threshold value, the initial loudness factor being decreased to
The first intermediate loudness factor.
Step 2073: if average energy root mean square increases to the initial loudness factor less than the first preset energy threshold value
The second intermediate loudness factor.
The first intermediate loudness factor is less than the second intermediate loudness factor;If average energy root mean square is equal to the first default energy
Threshold value is measured, then the initial loudness factor remains unchanged;According to the size relation of average energy root mean square and the first preset energy threshold value,
To be adjusted to the initial loudness factor;If average energy root mean square is bigger than normal, the initial loudness factor is turned down;If average
Energy root mean square is less than normal, then tunes up the initial loudness factor.
Step 2074: the first intermediate intermediate loudness factor of the loudness factor/the second is matched with loudness gain coefficient table,
Obtain intermediate gain coefficient.
Using the first intermediate loudness factor or the second intermediate loudness factor as index, looked into loudness gain coefficient table
It looks for, to obtain intermediate gain coefficient corresponding with the first intermediate intermediate loudness factor of the loudness factor/the second.
In another specific embodiment, in order to be modified to initial gain factor, also using current slot
Average energy root mean square corresponding to a upper period is modified, specifically includes the following steps:
Step 2075: judging the average energy root mean square of the corresponding input audio signal of the upper period of current slot
Whether the second preset energy threshold value is greater than.
Each input audio signal respectively corresponds a period, can will be currently in the upper of the input audio signal of processing
Input audio signal corresponding to one period, the foundation as gain coefficient adjustment.
Step 2076: if the average energy root mean square of corresponding input audio signal of the upper period is greater than the second default energy
Threshold value is measured, then the initial loudness factor is decreased to the loudness factor among third.
If the average energy root mean square of upper period corresponding input audio signal is greater than the second preset energy threshold value,
Then showed that the average energy root mean square of the input audio signal of a upper period was bigger, it, can according to the continuity of audio signal
The initial loudness factor is reduced to the loudness factor among third, and using the loudness factor among third as currently processed input sound
The loudness factor corresponding to frequency signal.
Step 2077: if the average energy root mean square of corresponding input audio signal of the upper period is less than the second default energy
Threshold value is measured, then the initial loudness factor is increased into the 4th intermediate loudness factor.
If the average energy root mean square of upper period corresponding input audio signal less than the second preset energy threshold value,
Then showed that the average energy root mean square of the input audio signal of a upper period was smaller, the initial loudness factor can be increased to
The four intermediate loudness factors, and using the 4th intermediate loudness factor as loudness corresponding to currently processed input audio signal because
Son.
Step 2078: the intermediate loudness factor of the loudness factor/4th among third is matched with loudness gain coefficient table,
Obtain intermediate gain coefficient.
Using the loudness factor among third or the 4th intermediate loudness factor as index, looked into loudness gain coefficient table
It looks for, to obtain intermediate gain coefficient corresponding with the loudness intermediate loudness factor of the factor/4th among third.
Adjustment of above-mentioned method the first audio frame sluggish for voice without gain coefficient, to voice activity
The coarse adjustment of first audio frame progress gain coefficient;The loudness factor is no longer fixed and invariable, but dynamic is adjustable, can be quick
Ground adapts to the fluctuation of audio, and avoids amplification noise as far as possible.
Step 208: sub-frame processing being carried out to input audio signal, obtains multiple second audio frames.
After getting intermediate gain coefficient, input audio signal is divided into multiple second audio frames.
Step 209: the second audio frame being analyzed using sound end detecting method, obtains each second audio frame pair
The audio probability value answered.
The audio probability value is used to indicate the second audio frame there are the probability of audio, utilizes sound end detecting method
(EPD, End Point Detection) seeks each second audio frame there are the probability of voice, so as to according to audio probability value
To be modified to intermediate gain coefficient.
Step 210: second-order correction is carried out to the corresponding intermediate gain coefficient of each second audio frame according to audio probability value,
Obtain gain coefficient adjustment table.
The gain coefficient adjustment table includes multiple second audio frames and corresponding with multiple second audio frames final
Gain coefficient.
Step 211: judging whether audio probability value is greater than predetermined probabilities threshold value.
Step 212: if audio probability value is greater than predetermined probabilities threshold value, by the corresponding intermediate gain system of the second audio frame
Number is decreased to the first final gain coefficient.
Step 213: if audio probability value is less than predetermined probabilities threshold value, by the corresponding intermediate gain system of the second audio frame
Number increases to the second final gain coefficient.
First final gain coefficient and the second final gain coefficient are the final gain coefficient in gain coefficient adjustment table;It is right
Gain coefficient carries out fine tuning, if audio probability value is less than predetermined probabilities threshold value, reduces gain coefficient, i.e., by intermediate gain
Coefficient is decreased to the first final gain coefficient;If audio probability value is greater than predetermined probabilities threshold value, by intermediate gain coefficient
The second final gain coefficient is increased to, the first final gain coefficient is less than the second final gain coefficient;If audio probability value etc.
In predetermined probabilities threshold value, then without adjustment;The adjusting step of gain coefficient can be defined by the user or system default.In addition,
In order to carry out limited amplitude protection, maximum gain factor need to be less than the gain coefficient extreme value of default, in order to avoid to input audio signal
Excessively amplification.
Step 214: by the final gain multiplication in the second audio frame and gain coefficient adjustment table, obtaining output letter
Number.
For multiple second audio frames in input audio signal, they are adjusted in table most multiplied by gain coefficient respectively
Whole gain coefficient, to obtain output signal.
It is different from the prior art, this application provides a kind of audio signal auto gain control methods, by audio signal
The two kinds of priori detections of energy root mean square statistics and voice activity detection combine, and obtain valid frame by voice activity detection, and
Energy root mean square statistics is carried out, the intermediate loudness factor is obtained, inquiry loudness gain coefficient table obtains intermediate gain coefficient, realizes and increase
The first time of beneficial coefficient is corrected, and since the loudness factor becomes dynamically adjustable, can rapidly track the fluctuation of voice;Then it utilizes
Speech terminals detection is finely adjusted intermediate gain coefficient, obtains revised gain coefficient, ensure that gain coefficient statistics
Reliability promotes adjustment effect;Due to being previously obtained loudness gain coefficient table, and by the loudness gain coefficient table storage to storage
It is used as look-up table in device, processing time and overall calculation amount required for gain coefficient can be reduced, improve the response that comes into force
Speed.
It is the structural schematic diagram of one embodiment of automatic gain control apparatus provided by the present application refering to Fig. 6, Fig. 6, it is automatic to increase
Benefit control equipment 60 includes: the memory 61 and processor 62 of interconnection, wherein memory 61 is for storing computer journey
Sequence, computer program by processor 62 when being executed, for realizing the audio signal automatic growth control side in above-described embodiment
Method.
Processor 62 can be according to the energy of input audio signal come dynamic adjust gain coefficient, for the wave of audio signal
Kinetic energy is enough adaptively adjusted gain, guarantees that the amplitude of output signal keeps in a certain range, improving the quality of output signal.
It is the structural schematic diagram of one embodiment of computer storage medium provided by the present application refering to Fig. 7, Fig. 7, computer is deposited
Storage media 70 is for storing computer program 71, and computer program 71 is when being executed by processor, for realizing above-described embodiment
In audio signal auto gain control method.
Wherein, which can be server-side, USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
In several embodiments provided herein, it should be understood that disclosed method and equipment, Ke Yitong
Other modes are crossed to realize.For example, equipment embodiment described above is only schematical, for example, module or unit
Division, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.It can select some or all of unit therein according to the actual needs to realize the mesh of present embodiment scheme
's.
In addition, each functional unit in each embodiment of the application can integrate in one processing unit, it can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only embodiments herein, are not intended to limit the scope of the patents of the application, all to be said using the application
Equivalent structure or equivalent flow shift made by bright book and accompanying drawing content is applied directly or indirectly in other relevant technology necks
Domain similarly includes in the scope of patent protection of the application.
Claims (10)
1. a kind of audio signal auto gain control method characterized by comprising
The energy of input audio signal is counted, and the input audio is believed according to the energy of the input audio signal
Number corresponding initial gain factor is once corrected, and the intermediate gain coefficient of the input audio signal is obtained;
Second-order correction is carried out to the intermediate gain coefficient, obtains final gain coefficient;
According to the input audio signal and the final gain coefficient, output signal is obtained.
2. audio signal auto gain control method according to claim 1, which is characterized in that described to believe input audio
Number energy counted, and according to the energy of the input audio signal to the corresponding initial gain of the input audio signal
Before the step of coefficient is once corrected, and the intermediate gain coefficient of the input audio signal is obtained, comprising:
According to default loudness scope and contour of equal loudness, loudness gain coefficient table is obtained, and stores the loudness gain coefficient table,
Wherein, the loudness gain coefficient table includes the mapping relations of loudness level, frequency and gain coefficient;
Select a loudness level as the initial loudness factor from the default loudness scope;
The initial loudness factor is matched with the loudness gain coefficient table, obtains the initial gain factor.
3. audio signal auto gain control method according to claim 2, which is characterized in that described to believe input audio
Number energy the step of being counted, comprising:
Sub-frame processing is carried out to the input audio signal, obtains multiple first audio frames;
Each first audio frame is detected using voice activity detection method, to judge each first audio frame
It whether is valid frame;
If so, obtaining the energy root mean square of each valid frame, and to all described effective in the input audio signal
The energy root mean square of frame is averaged, and average energy root mean square is obtained.
4. audio signal auto gain control method according to claim 3, which is characterized in that described according to the input
The energy of audio signal once corrects the corresponding initial gain factor of the input audio signal, obtains the input sound
The step of intermediate gain coefficient of frequency signal, comprising:
Judge whether the average energy root mean square is greater than the first preset energy threshold value;
If so, the initial loudness factor is decreased to the first intermediate loudness factor;If it is not, then by the initial loudness factor
Increase to the second intermediate loudness factor;
The described first intermediate loudness factor/second intermediate loudness factor is matched with the loudness gain coefficient table,
Obtain the intermediate gain coefficient.
5. audio signal auto gain control method according to claim 3, which is characterized in that described according to the input
The energy of audio signal once corrects the corresponding initial gain factor of the input audio signal, obtains the input sound
The step of intermediate gain coefficient of frequency signal, comprising:
Judged whether the average energy root mean square of the corresponding input audio signal of the upper period of current slot is greater than second
Preset energy threshold value;
If so, the initial loudness factor is decreased to the loudness factor among third;If it is not, then by the initial loudness factor
Increase to the 4th intermediate loudness factor;
The loudness factor/the 4th intermediate loudness factor among the third is matched with the loudness gain coefficient table,
Obtain the intermediate gain coefficient.
6. audio signal auto gain control method according to claim 1, which is characterized in that described to the intermediate increasing
The step of beneficial coefficient carries out second-order correction, obtains final gain coefficient, comprising:
Sub-frame processing is carried out to the input audio signal, obtains multiple second audio frames;
Second audio frame is analyzed using sound end detecting method, it is corresponding to obtain each second audio frame
Audio probability value, wherein the audio probability value is used to indicate second audio frame, and there are the probability of audio;
Second-order correction is carried out to the corresponding intermediate gain coefficient of each second audio frame according to the audio probability value, is obtained
Gain coefficient adjusts table;Wherein, the gain coefficient adjustment table includes multiple second audio frames and with multiple described
The corresponding final gain coefficient of two audio frames.
7. audio signal auto gain control method according to claim 6, which is characterized in that described according to the audio
Probability value carries out second-order correction to the corresponding intermediate gain coefficient of each second audio frame, obtains gain coefficient adjustment table
Step, comprising:
Judge whether the audio probability value is greater than predetermined probabilities threshold value;
If so, the corresponding intermediate gain coefficient of second audio frame is decreased to the first final gain coefficient;If it is not,
The corresponding intermediate gain coefficient of second audio frame is then increased into the second final gain coefficient.
8. audio signal auto gain control method according to claim 6, which is characterized in that described according to the input
Audio signal and the final gain coefficient, the step of obtaining output signal, comprising:
By the final gain multiplication in second audio frame and gain coefficient adjustment table, the output is obtained
Signal.
9. a kind of automatic gain control apparatus, which is characterized in that memory and processor including interconnection, wherein described
Memory is for storing computer program, and the computer program by the processor when being executed, for realizing claim
Audio signal auto gain control method described in any one of 1-8.
10. a kind of computer storage medium, for storing computer program, which is characterized in that the computer program is being located
When managing device execution, for realizing audio signal auto gain control method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910663246.XA CN110349595B (en) | 2019-07-22 | 2019-07-22 | Audio signal automatic gain control method, control equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910663246.XA CN110349595B (en) | 2019-07-22 | 2019-07-22 | Audio signal automatic gain control method, control equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110349595A true CN110349595A (en) | 2019-10-18 |
CN110349595B CN110349595B (en) | 2021-08-31 |
Family
ID=68179740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910663246.XA Active CN110349595B (en) | 2019-07-22 | 2019-07-22 | Audio signal automatic gain control method, control equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110349595B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111243631A (en) * | 2020-01-14 | 2020-06-05 | 北京声智科技有限公司 | Automatic gain control method and electronic equipment |
CN111478675A (en) * | 2020-04-14 | 2020-07-31 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
CN111935429A (en) * | 2020-07-06 | 2020-11-13 | 瑞声新能源发展(常州)有限公司科教城分公司 | Sound quality self-adaptive adjusting method, related system and equipment and storage medium |
CN112614503A (en) * | 2020-12-14 | 2021-04-06 | 北京远鉴信息技术有限公司 | Method and device for processing heart sound signal, electronic equipment and readable storage medium |
CN113473316A (en) * | 2021-06-30 | 2021-10-01 | 苏州科达科技股份有限公司 | Audio signal processing method, device and storage medium |
CN114333894A (en) * | 2021-11-19 | 2022-04-12 | 科大讯飞股份有限公司 | Gain compensation method and related device, equipment, system and storage medium |
CN116486833A (en) * | 2023-06-21 | 2023-07-25 | 北京探境科技有限公司 | Audio gain adjustment method and device, storage medium and electronic equipment |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5307379A (en) * | 1992-04-27 | 1994-04-26 | Motorola, Inc. | Automatic noise characterization for optimally enabling a receiver |
CN101567190A (en) * | 2009-05-21 | 2009-10-28 | 深圳市科莱特斯科技有限公司 | Speech gain control method and device |
CN102017402A (en) * | 2007-12-21 | 2011-04-13 | Srs实验室有限公司 | System for adjusting perceived loudness of audio signals |
CN103124165A (en) * | 2011-11-14 | 2013-05-29 | 谷歌公司 | Automatic gain control |
CN103580631A (en) * | 2012-08-01 | 2014-02-12 | 哈曼贝克自动系统股份有限公司 | Automatic loudness control |
CN103915103A (en) * | 2014-04-15 | 2014-07-09 | 成都凌天科创信息技术有限责任公司 | Voice quality enhancement system |
CN105895084A (en) * | 2016-03-30 | 2016-08-24 | Tcl集团股份有限公司 | Signal gain method and apparatus applied to speech recognition |
US20170133022A1 (en) * | 2012-10-15 | 2017-05-11 | Digimarc Corporation | Multi-mode audio recognition and auxiliary data encoding and decoding |
CN107333076A (en) * | 2017-06-26 | 2017-11-07 | 青岛海信电器股份有限公司 | The method of adjustment of television set and its audio signal intermediate frequency point data, device |
CN107659279A (en) * | 2017-09-30 | 2018-02-02 | 杭州雄迈集成电路技术有限公司 | A kind of audio auto gain control method and device |
US20180309421A1 (en) * | 2017-04-20 | 2018-10-25 | Dts, Inc. | Loudness control with noise detection and loudness drop detection |
US10355658B1 (en) * | 2018-09-21 | 2019-07-16 | Amazon Technologies, Inc | Automatic volume control and leveler |
-
2019
- 2019-07-22 CN CN201910663246.XA patent/CN110349595B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5307379A (en) * | 1992-04-27 | 1994-04-26 | Motorola, Inc. | Automatic noise characterization for optimally enabling a receiver |
CN102017402A (en) * | 2007-12-21 | 2011-04-13 | Srs实验室有限公司 | System for adjusting perceived loudness of audio signals |
CN101567190A (en) * | 2009-05-21 | 2009-10-28 | 深圳市科莱特斯科技有限公司 | Speech gain control method and device |
CN103124165A (en) * | 2011-11-14 | 2013-05-29 | 谷歌公司 | Automatic gain control |
CN103580631A (en) * | 2012-08-01 | 2014-02-12 | 哈曼贝克自动系统股份有限公司 | Automatic loudness control |
US20170133022A1 (en) * | 2012-10-15 | 2017-05-11 | Digimarc Corporation | Multi-mode audio recognition and auxiliary data encoding and decoding |
CN103915103A (en) * | 2014-04-15 | 2014-07-09 | 成都凌天科创信息技术有限责任公司 | Voice quality enhancement system |
CN105895084A (en) * | 2016-03-30 | 2016-08-24 | Tcl集团股份有限公司 | Signal gain method and apparatus applied to speech recognition |
US20180309421A1 (en) * | 2017-04-20 | 2018-10-25 | Dts, Inc. | Loudness control with noise detection and loudness drop detection |
CN107333076A (en) * | 2017-06-26 | 2017-11-07 | 青岛海信电器股份有限公司 | The method of adjustment of television set and its audio signal intermediate frequency point data, device |
CN107659279A (en) * | 2017-09-30 | 2018-02-02 | 杭州雄迈集成电路技术有限公司 | A kind of audio auto gain control method and device |
US10355658B1 (en) * | 2018-09-21 | 2019-07-16 | Amazon Technologies, Inc | Automatic volume control and leveler |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111243631A (en) * | 2020-01-14 | 2020-06-05 | 北京声智科技有限公司 | Automatic gain control method and electronic equipment |
CN111478675A (en) * | 2020-04-14 | 2020-07-31 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
CN111478675B (en) * | 2020-04-14 | 2024-02-09 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
CN111935429A (en) * | 2020-07-06 | 2020-11-13 | 瑞声新能源发展(常州)有限公司科教城分公司 | Sound quality self-adaptive adjusting method, related system and equipment and storage medium |
CN111935429B (en) * | 2020-07-06 | 2021-10-19 | 瑞声新能源发展(常州)有限公司科教城分公司 | Sound quality self-adaptive adjusting method, related system and equipment and storage medium |
CN112614503A (en) * | 2020-12-14 | 2021-04-06 | 北京远鉴信息技术有限公司 | Method and device for processing heart sound signal, electronic equipment and readable storage medium |
CN113473316A (en) * | 2021-06-30 | 2021-10-01 | 苏州科达科技股份有限公司 | Audio signal processing method, device and storage medium |
CN113473316B (en) * | 2021-06-30 | 2023-01-31 | 苏州科达科技股份有限公司 | Audio signal processing method, device and storage medium |
CN114333894A (en) * | 2021-11-19 | 2022-04-12 | 科大讯飞股份有限公司 | Gain compensation method and related device, equipment, system and storage medium |
CN116486833A (en) * | 2023-06-21 | 2023-07-25 | 北京探境科技有限公司 | Audio gain adjustment method and device, storage medium and electronic equipment |
CN116486833B (en) * | 2023-06-21 | 2023-09-22 | 北京探境科技有限公司 | Audio gain adjustment method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110349595B (en) | 2021-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110349595A (en) | A kind of audio signal auto gain control method, control equipment and storage medium | |
US20210074312A1 (en) | Method and Apparatus for Detecting a Voice Activity in an Input Audio Signal | |
JP3626492B2 (en) | Reduce background noise to improve conversation quality | |
KR100443703B1 (en) | Method and apparatus for dynamically changing audio response of a wireless receiver | |
US8204742B2 (en) | System for processing an audio signal to enhance speech intelligibility | |
EP1312162B1 (en) | Voice enhancement system | |
EP2283484B1 (en) | System and method for dynamic sound delivery | |
KR101597375B1 (en) | System for adjusting perceived loudness of audio signals | |
US8983833B2 (en) | Method and apparatus for masking wind noise | |
US6360199B1 (en) | Speech coding rate selector and speech coding apparatus | |
US20060126865A1 (en) | Method and apparatus for adaptive sound processing parameters | |
US8437480B2 (en) | Adaptive loudness levelling for digital audio signals | |
US20020152066A1 (en) | Method and system for noise supression using external voice activity detection | |
US20110125494A1 (en) | Speech Intelligibility | |
US8321215B2 (en) | Method and apparatus for improving intelligibility of audible speech represented by a speech signal | |
US8924199B2 (en) | Voice correction device, voice correction method, and recording medium storing voice correction program | |
JPH08221093A (en) | Method of noise reduction in voice signal | |
US11164592B1 (en) | Responsive automatic gain control | |
US20110125492A1 (en) | Speech Intelligibility | |
EP2478444A1 (en) | System for adaptive voice intelligibility processing | |
CN104867499A (en) | Frequency-band-divided wiener filtering and de-noising method used for hearing aid and system thereof | |
CN103544961A (en) | Voice signal processing method and device | |
US9614486B1 (en) | Adaptive gain control | |
CN114697810A (en) | Method for muting and canceling muting a microphone signal | |
WO2001037254A2 (en) | A noise suppression method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |