CN110139181A - Audio-frequency processing method, device, earphone, terminal device and medium - Google Patents
Audio-frequency processing method, device, earphone, terminal device and medium Download PDFInfo
- Publication number
- CN110139181A CN110139181A CN201910362786.4A CN201910362786A CN110139181A CN 110139181 A CN110139181 A CN 110139181A CN 201910362786 A CN201910362786 A CN 201910362786A CN 110139181 A CN110139181 A CN 110139181A
- Authority
- CN
- China
- Prior art keywords
- band
- frequency sub
- frequency
- audio
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1025—Accumulators or arrangements for charging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2201/00—Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
- H04R2201/10—Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Circuit For Audible Band Transducer (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a kind of audio-frequency processing method, device, earphone, terminal device and medium, audio-frequency processing method includes: to obtain audio frame to be played in the case where playing audio, and audio frame includes multiple frequency sub-band;Determine that the energy value of each frequency sub-band, the energy value and threshold of audibility of frequency sub-band correspond;In the case where the energy value of at least one frequency sub-band is greater than corresponding threshold of audibility, decaying and/or pressure limit processing are implemented at least one frequency sub-band.The embodiment of the present invention can be realized the hearing protection processing that frequency-division section is carried out to the audio frame that audio system plays.
Description
Technical field
The present embodiments relate to Audiotechnica field more particularly to a kind of audio-frequency processing method, device, earphone, terminals
Equipment and medium.
Background technique
More and more consumers is listened to music using earphone, if playing music with larger volume for a long time, it is easy to
The human ear at family causes to damage, and with the prehuman scientific and technological level of mesh, the injury that hearing organ is subject to is generally irreversible, therefore, listens
Trying hard to keep, it is particularly significant to protect.
Medium-high frequency is much larger than low frequency to the damage of human ear under identical volume;Currently, in the full range of audio system output audio
It, can be by by the corresponding energy adjusting of full frequency band to less than or equal to people when the corresponding energy of section is greater than human auditory system secure threshold
Ear sense of hearing secure threshold, to solve damage of the high frequency to human ear.But when the audio of system output is intended to medium-high frequency single-tone
When (i.e. single-frequency point or single-frequency point and its higher hamonic wave), the gross energy of the full frequency band of the audio of system output is often less than peace
Full threshold value, but still hearing impairment can be caused to thermal man's ear, the above method will not can solve damage of the high frequency to human ear at this time.Separately
Outside, the method for being decayed to full frequency band or pressing limit is generallyd use in the prior art, extremely by the corresponding energy adjusting of full frequency band
Less than or equal to human auditory system secure threshold, will lead to user in this way can't hear complete details, be easy that user is promoted to open big sound
Amount, is less useful for hearing protection.
Summary of the invention
The embodiment of the present invention provides a kind of audio-frequency processing method, device, earphone, terminal device and medium, to realize audio
Hearing user is protected in broadcasting.
In a first aspect, present example provides a kind of audio-frequency processing method, audio-frequency processing method includes: to play audio
In the case where, audio frame to be played is obtained, audio frame includes multiple frequency sub-band;Determine the energy value of each frequency sub-band, son
The energy value and threshold of audibility of frequency range correspond;It is greater than the feelings of corresponding threshold of audibility in the energy value of at least one frequency sub-band
Under condition, decaying and/or pressure limit processing are implemented at least one frequency sub-band.
Second aspect, the embodiment of the invention provides a kind of apparatus for processing audio, apparatus for processing audio includes: acquisition mould
Block, for obtaining audio frame to be played, audio frame includes multiple frequency sub-band in the case where playing audio;Determining module is used
In the energy value for determining each frequency sub-band, the energy value and threshold of audibility of frequency sub-band are corresponded;Processing module, for extremely
In the case that the energy value of a few frequency sub-band is greater than corresponding threshold of audibility, at least one frequency sub-band implement decaying and/or
Press limit processing.
The third aspect the embodiment of the invention provides a kind of earphone, including loudspeaker, processor, memory and is stored in
On memory and the computer program that can run on a processor, such as above-mentioned implementation is realized when computer program is executed by processor
The method of first aspect in mode.
Fourth aspect the embodiment of the invention provides a kind of terminal device, including processor, memory and is stored in described
It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor
Now such as the method for first aspect in above embodiment.
5th aspect, the embodiment of the invention provides computer readable storage medium, the computer-readable storage of terminal device
Computer program is stored on medium, is realized when terminal device computer program is executed by processor as first in above embodiment
The method of aspect.
The embodiment of the present invention, based on audio frame to be played is obtained, which includes multiple frequency sub-band, and determination is each
The energy value of a frequency sub-band, the energy value and threshold of audibility of frequency sub-band correspond, and according to obtained by hearing user specificity analysis
Threshold of audibility the energy of frequency sub-band is made decisions, at least one frequency sub-band energy value be greater than corresponding threshold of hearing
In the case where value, decaying and/or pressure limit processing are implemented to the energy value of at least one frequency sub-band;And then audio frame is divided
The hearing protection processing of section.
Detailed description of the invention
The present invention may be better understood from the description with reference to the accompanying drawing to a specific embodiment of the invention wherein,
The same or similar appended drawing reference indicates the same or similar feature.
Fig. 1 is an implement scene schematic diagram of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of audio-frequency processing method of the embodiment of the present invention;
Fig. 3 is a kind of flow chart of the energy value of calculating frequency sub-band of the embodiment of the present invention;
Fig. 4 is the flow chart of another audio-frequency processing method of the embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of apparatus for processing audio of the embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of terminal device of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Fig. 1 is an implement scene schematic diagram of the embodiment of the present invention.As shown in Figure 1, the application environment includes that terminal is set
Standby 10 and the earphone 20 that is communicated with the terminal device 10.
Wherein, playing on terminal device 10 has audio data, which includes but be not limited to song, video sound, lead to
Speech etc., terminal device 10 are communicatively coupled with earphone 20.The type of earphone 20 can be In-Ear Headphones, PlayGear Stealth
With headphone etc., terminal device 10 can be communicated with earphone 20 by wired or wireless mode, realize audio number
According to transmission.
The embodiment of the present invention, based on audio frame to be played is obtained, which includes multiple frequency sub-band, determines each son
The energy value of frequency range, the energy value and threshold of audibility of frequency sub-band correspond, and listen according to hearing user specificity analysis is resulting
Feel that threshold value makes decisions the energy of frequency sub-band, is greater than corresponding threshold of audibility in the energy value of at least one frequency sub-band
In the case of, decaying and/or pressure limit processing are implemented to the corresponding frequency sub-band of the energy value of at least one frequency sub-band;And then to audio frame
Carry out the hearing protection processing of frequency-division section.
Fig. 2 is a kind of flow chart of audio-frequency processing method of the embodiment of the present invention.As shown in Fig. 2, the audio-frequency processing method
May include:
Step 201: in the case where playing audio, obtaining audio frame to be played, audio frame includes multiple frequency sub-band;
Specifically, the audio frame of audio system playing audio-fequency data is obtained, and according to preset rules, audio frame is divided into
Multiple frequency sub-band;Wherein, audio frame can store in local, can also obtain from outside.
In embodiments of the present invention, preset rules refer to according to the main test frequency point of human ear hearing test (centered on point)
Subregion is done to other tests frequency point (for other central points).Wherein, exponentially type is distributed the subregion of normal human ear.
It should be understood that the wideband combination of everyday sound, therefore when doing human ear hearing test, often
Human ear is tested to the capture ability of each frequency point sound.Each frequency point includes main test frequency point and other test frequency points, human ear
Stronger in the capture ability that the capture ability of mainly test frequency point compares other test frequency points, sensibility is also higher.
Step 202: determining that the energy value of each frequency sub-band, the energy value and threshold of audibility of frequency sub-band correspond;
In embodiments of the present invention, the energy value of each frequency sub-band of determination described in step 202, comprising the following steps:
Step 2021: windowing process is carried out to audio frame;Wherein, the window function during windowing process can be according to audio
The computing capability and processing accuracy of system select;
Step 2022: by after windowing process result carry out Fast Fourier Transform (FFT) (FFT), obtain audio frame phase and
Amplitude;Wherein, FFT can be selected according to the computing capability and processing accuracy of audio system;
Step 2023: FFT treated result being carried out square, obtains energy spectrum, and according to the unit frequency in frequency sub-band
Point obtains the energy of frequency sub-band.
Step 203: comparing the energy value and corresponding threshold of audibility of each frequency sub-band;
In embodiments of the present invention, the corresponding threshold of audibility of multiple frequency sub-band of audio frame may be the same or different.
The embodiment of the present invention targetedly adjusts frequency sub-band by the way that different threshold of audibility is arranged to each frequency sub-band
It is whole, so that the energy value of frequency sub-band is less than corresponding threshold of audibility, play the role of protecting hearing.
Step 204: in the case where the energy value of at least one frequency sub-band is greater than corresponding threshold of audibility, at least
The corresponding frequency sub-band of the energy value of one frequency sub-band implements decaying and/or pressure limit processing.
The embodiment of the present invention, based on audio frame to be played is obtained, which includes multiple frequency sub-band, determines each son
The energy value of frequency range, the energy value and threshold of audibility of frequency sub-band correspond, and listen according to hearing user specificity analysis is resulting
Feel that threshold value makes decisions the energy of frequency sub-band, is greater than corresponding threshold of audibility in the energy value of at least one frequency sub-band
In the case of, decaying and/or pressure limit processing are implemented to the corresponding frequency sub-band of the energy value of at least one frequency sub-band;And then to audio frame
Carry out the hearing protection processing of frequency-division section.
The embodiment of the present invention, by audio frame carry out frequency-division section attenuation processing and/or pressure limit processing, can to enable amount compared with
Small frequency sub-band is retained, and the frequency sub-band of big energy does not damage human ear hearing, and then can protect while protecting hearing user
Stay audio details.
Since attenuation processing and the processing of pressure limit are all the energy for adjusting audio frame, can be obtained based on the process of attenuation processing
The process of pressure limit processing, therefore, for convenience, the hereafter only process of example attenuation processing.
In embodiments of the present invention, it is greater than described in step 204 in the energy value of at least one frequency sub-band corresponding
In the case where threshold of audibility, attenuation processing is implemented to the corresponding frequency sub-band of the energy value of at least one frequency sub-band, comprising: at least
When the energy value of one frequency sub-band is greater than corresponding threshold of audibility, set up the first adjustment factor, and based on the first adjustment because
Son implements attenuation processing to the corresponding frequency sub-band of the energy value of at least one frequency sub-band.
In embodiments of the present invention, the number of the first adjustment factor can be one, can also be multiple.Wherein, Duo Ge
One Dynamic gene can be gradually increased from low-frequency range to high band, and then targetedly be decayed to frequency sub-band.
In the embodiment of the present invention, after step 204, audio-frequency processing method, further includes:
Step 1: calculating the gross energy of audio frame;
Step 2: comparing gross energy and preset threshold;If gross energy is greater than preset threshold, will be in multiple frequency sub-band
At least one high frequency frequency sub-band implements attenuation processing, so that gross energy is less than or equal to preset threshold.
The embodiment of the present invention is sentenced by carrying out energy threshold to the obtained preset threshold of hearing user specificity analysis
Certainly, in the case that the gross energy described in second step is greater than preset threshold, attenuation processing is implemented at least one high frequency frequency sub-band,
And then the hearing protection for carrying out frequency-division section to audio frame is handled.
It in embodiments of the present invention, will be in multiple frequency sub-band if gross energy described in second step is greater than preset threshold
At least one high frequency frequency sub-band implement attenuation processing, comprising: if gross energy be greater than preset threshold, set up multiple second adjustments
The factor, and multiple second adjustment factors are based on, the second attenuation processing is implemented at least one high frequency frequency sub-band;Wherein, at least one
The corresponding second adjustment factor of each frequency sub-band in a high frequency frequency sub-band.
It should be noted that each second adjustment factor of multiple second adjustment factors may be the same or different.
In embodiments of the present invention, the size of multiple second adjustment factors can be with the increase of the energy of high frequency frequency sub-band
And increase, and then realize and targetedly decay to frequency sub-band.
The embodiment of the present invention, during implementing the second attenuation processing, it is understood that there may be repeatedly decaying.Once number of decaying
Excessively, user will be allowed in the feeling for acoustically generating pause, and then reduce user experience;The embodiment of the present invention can be set one
It is a to be used to limit the excessive predetermined threshold value of decaying number, and further include:
After implementing the second attenuation processing each time, once counted;When implementation number reaches predetermined threshold value,
Third Dynamic gene is set up, and is based on third Dynamic gene, attenuation processing is implemented at least one described high frequency frequency sub-band.
Wherein, third Dynamic gene can be the product of the first adjustment factor and the second adjustment factor.
Wherein, third Dynamic gene may be multiple second adjustment factors used by the second attenuation processing of multiple implementation
Product.
It should be noted that the first adjustment factor is definite value, it is more used by the second attenuation processing of embodiment each time
A second adjustment factor can increase with low frequency to high frequency.In addition, repeatedly implementing multiple the used by the second attenuation processing
Two Dynamic genes can also reduce with the increase of number, and currently employed multiple second adjustment factors, past under normal circumstances
Toward the second adjustment factor that can be less than last use.Because with the increase of decaying number, gross energy described in second step with
Difference between preset threshold can be smaller and smaller, therefore needs to reduce with the increase of number the second decaying of implementation each time and adopted
Multiple second adjustment factors, and then gross energy described in second step can accurately be made to be less than or equal to preset threshold.
The purpose of third Dynamic gene setting are as follows: be on the one hand to accelerate decaying;It on the other hand is to allow as far as possible
Dynamic gene more meets the energy of frequency sub-band, and then can accurately retain audio details.As long as being therefore able to achieve above-mentioned mesh, being all can
To be included in the range of the embodiment of the present invention.
The embodiment of the present invention can more fully retain details by the setting second adjustment factor and third Dynamic gene, and
While rapid decay, it can more completely retain the decaying of details.
In embodiments of the present invention, in the energy value of multiple frequency sub-band respectively less than or equal to corresponding threshold of audibility
In the case of, the audio-frequency processing method further include:
Step 1: the gross energy of audio frame is calculated;
Step 2: gross energy is compared with preset threshold, if gross energy is greater than preset threshold, by multiple son frequencies
At least one high frequency frequency sub-band in section implements attenuation processing, so that gross energy is less than or equal to preset threshold.
Gross energy is compared described in step 2 by the embodiment of the present invention with preset threshold, if gross energy be greater than it is default
At least one high frequency frequency sub-band in multiple frequency sub-band is then implemented attenuation processing by threshold value, until gross energy is less than or equal in advance
If threshold value, comprising:
At least one high frequency frequency sub-band is selected from multiple frequency sub-band of audio frame, and real at least one high frequency frequency sub-band
Attenuation processing is applied, so that gross energy is less than or equal to preset threshold.Wherein, the number of at least one high frequency frequency sub-band can be according to
Difference described in 2 steps between gross energy and preset threshold selects.Wherein, gross energy described in step 2 is all frequency sub-band
The sum of energy.
Wherein, attenuation processing described in step 2 includes: based on the 4th Dynamic gene, at least one frequency sub-band
The corresponding frequency sub-band of energy value implements the 4th attenuation processing.The number of 4th Dynamic gene can be one, or multiple.
The embodiment of the present invention, during implementing four attenuation processings, it is understood that there may be repeatedly decaying.Once number of decaying
Excessively, user will be allowed in the feeling for acoustically generating pause, and then reduce user experience;The embodiment of the present invention can be set one
It is a for limit the excessive predetermined threshold value of decaying number, and further include: after the 4th attenuation processing of implementation each time,
Once counted;When implementation number reaches predetermined threshold value, the 5th Dynamic gene is set up, and be based on the 5th Dynamic gene,
Attenuation processing is implemented at least one described high frequency frequency sub-band.
Wherein, the 5th Dynamic gene may be multiple 4th Dynamic genes used by the 4th attenuation processing of multiple implementation
Product.
It should be noted that multiple 4th Dynamic genes can be with low frequency when the number of the 4th Dynamic gene is multiple
Increase to high frequency.In addition, repeatedly implement the 4th attenuation processing used by it is multiple
4th Dynamic gene can also reduce with the increase of number, and under normal circumstances currently employed multiple four
Dynamic gene is often less than last the 4th Dynamic gene used.Because with the increase of decaying number, described in step 2
Gross energy and preset threshold between difference can be smaller and smaller, therefore need to reduce with the increase of number and implement each time
Multiple 4th Dynamic genes used by two decaying, and then it is default that gross energy described in step 2 can accurately be made to be less than or equal to
Threshold value.
The purpose of 5th Dynamic gene setting are as follows: be on the one hand to accelerate decaying;It on the other hand is to allow as far as possible
Dynamic gene more meets the energy of frequency sub-band, and then can accurately retain audio details.As long as being therefore able to achieve above-mentioned mesh, being all can
To be included in the range of the embodiment of the present invention.
In embodiments of the present invention, threshold of audibility and preset threshold are divided by the hearing user feature stored in audio system
Data are analysed, preset threshold is the energy threshold of normal human ear, and threshold of audibility is the corresponding threshold of a frequency sub-band in energy threshold
Value, energy threshold are the hearing energy threshold of terminal user.Wherein, the division of the energy threshold of frequency sub-band and frequency sub-band
It divides consistent;I.e. each frequency sub-band is corresponding with the energy threshold of frequency sub-band.
In addition, the embodiment of the present invention, is first made decisions based on threshold of audibility, then judged again based on preset threshold;
In the case where the energy value of frequency sub-band meets corresponding threshold of audibility, the ear auditory range of terminal user is further judged
Whether in the normal range, if not in the normal range, i.e. the gross energy of frequency sub-band does not meet preset threshold, need at this time by
The gross energy of frequency sub-band adjust to less than or be equal to preset threshold, and then realize the hearing protection to terminal user;If
In the normal range, it also further illustrates, energy threshold is identical as preset threshold (i.e. sense of hearing secure threshold).
The embodiment of the present invention is decaying to frequency sub-band and then is carrying out inverse FFT transform, the audio after being decayed, in turn
The hearing protection processing of frequency-division section is carried out to audio frame.
Terminal device 10 in the embodiment of the present invention, in Fig. 1, it is possible to implement above-mentioned step is implemented in terminal device 10
After complete above-mentioned steps, the audio after decaying is delivered to earphone 20.In addition, the earphone in Fig. 1, also can be implemented above-mentioned step
Suddenly, earphone 20 obtains the audio frame played from terminal device 10, and after having implemented above-mentioned steps, and the audio after decaying is defeated
It send to human ear.
Fig. 4 is the flow chart of another audio-frequency processing method of the embodiment of the present invention.As shown in figure 4, the audio processing side
Method includes:
Step 401: judging whether the energy of each frequency sub-band of current audio frame is greater than corresponding threshold of audibility respectively;Such as
Fruit is greater than, and thens follow the steps 402;If it is less than or be equal to, then follow the steps 403;
Step 402: the frequency sub-band that will be greater than corresponding threshold of audibility sets up a Dynamic gene, and calculates the total energy of audio
Amount;
Step 403: judging whether the gross energy of present video is greater than preset threshold;If it does, executing step 404;Such as
Fruit is less than or equal to, then terminates;
It should be noted that the preset threshold of step 403 is the people of terminal user after executing the step 402
Ear Hearing Threshold;If it is after executing step 401, the preset threshold of step 403 is normal human ear Hearing Threshold.
Step 404: multiple Dynamic genes being set up at least one high frequency frequency sub-band, until the gross energy of present video is less than
Or it is equal to preset threshold, and the corresponding Dynamic gene of each high frequency frequency sub-band, Dynamic gene energy corresponding with high frequency frequency sub-band
Measure directly proportional, that is, the corresponding energy of high frequency frequency sub-band is bigger, and corresponding Dynamic gene is bigger.
Fig. 5 is a kind of schematic diagram of apparatus for processing audio of the embodiment of the present invention.As shown in figure 5, the apparatus for processing audio
Include:
Module 501 is obtained, for obtaining audio frame to be played, audio frame includes multiple in the case where playing audio
Frequency sub-band;
Determining module 502, for determining the energy value of each frequency sub-band, the energy value of frequency sub-band and multiple threshold of audibility
It corresponds;
Comparison module 503, for the energy value of frequency sub-band to be compared with corresponding threshold of audibility;
Processing module 504, for the energy value of at least one frequency sub-band be greater than corresponding threshold of audibility in the case where, it is right
At least one frequency sub-band implements decaying and/or pressure limit processing.
Optionally, after implementing decaying and/or pressure limit processing at least one frequency sub-band, determining module 502 is also used to:
Calculate the gross energy of audio frame;
Comparison module 503 is also used to for gross energy being compared with preset threshold;
Processing module 504, if being also used to gross energy greater than preset threshold, at least one of multiple frequency sub-band height
Frequency frequency sub-band implements decaying and/or pressure limit processing, so that the gross energy of audio frame is less than or equal to preset threshold.
Optionally, in the case where the energy value of multiple frequency sub-band is respectively less than or is equal to corresponding threshold of audibility,
Determining module 502, is also used to: calculating the gross energy of audio frame;
Comparison module 503 is also used to for gross energy being compared with preset threshold;
Processing module 504, if being also used to gross energy greater than preset threshold, by least one of multiple frequency sub-band height
Frequency frequency sub-band implements decaying and/or pressure limit processing, until gross energy is less than or equal to preset threshold.
Wherein, be based on the first adjustment factor, frequency sub-band corresponding to the energy at least one frequency sub-band implement decaying and/
Or pressure limit processing;Based on the second adjustment factor, decaying and/or pressure are implemented at least one high frequency frequency sub-band in multiple frequency sub-band
Limit processing.
Optionally, apparatus for processing audio, further includes: statistical module is based on the second adjustment factor for counting, at least
One high frequency frequency sub-band implements decaying and/or pressure limit number of processing;
Processing module 504 is based on third Dynamic gene, at least one if being also used to number reaches predetermined threshold value
A high frequency frequency sub-band implements decaying and/or pressure limit processing;Wherein, third Dynamic gene be the first adjustment factor and second adjustment because
The product of son.
Wherein, the corresponding threshold of audibility of each of multiple frequency sub-band frequency sub-band is different.
The embodiment of the present invention targetedly adjusts frequency sub-band by the way that different threshold of audibility is arranged to each frequency sub-band
It is whole, so that the energy value of frequency sub-band is less than corresponding threshold of audibility, play the role of protecting hearing.
Terminal device provided in an embodiment of the present invention can be realized terminal device in the embodiment of the method for Fig. 2 and Fig. 4 and realize
Each process, to avoid repeating, which is not described herein again.
The embodiment of the present invention, based on audio frame to be played is obtained, which includes multiple frequency sub-band, determines each
The energy value of frequency sub-band, the energy value and threshold of audibility of frequency sub-band correspond, and resulting according to hearing user specificity analysis
Threshold of audibility makes decisions the energy of frequency sub-band, is greater than corresponding threshold of audibility in the energy value of at least one frequency sub-band
In the case where, decaying and/or pressure limit processing are implemented to the corresponding frequency sub-band of the energy value of at least one frequency sub-band, and then to audio
Frame carries out the hearing protection processing of frequency-division section.
The embodiment of the invention provides a kind of earphones comprising loudspeaker, processor and memory;It is stored on memory
The computer program run on a processor can be used, above-mentioned audio processing side is realized when computer program is executed by processor
Method;Loudspeaker, for by attenuation processing and/or pressure limit treated audio transmission to human ear.
The embodiment of the present invention, by audio frame to be played, which includes multiple frequency sub-band;And determine each height
The energy value of frequency range, the energy value and threshold of audibility of frequency sub-band correspond, and according to obtained by hearing user specificity analysis
The threshold of audibility arrived carries out threshold value judgement to the energy of frequency sub-band, is greater than the corresponding sense of hearing in the energy value of at least one frequency sub-band
In the case where threshold value, implement decaying and/or pressure limit processing for frequency sub-band, and then can be realized the audio played to audio system
The hearing protection of frame progress frequency-division section.
A kind of hardware structural diagram of Fig. 6 terminal device of each embodiment to realize the present invention.
The terminal device 10 includes but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input
Unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor
The components such as 110 and power supply 111.It will be understood by those skilled in the art that terminal device structure shown in Fig. 6 is not constituted
Restriction to terminal device, terminal device may include than illustrating more or fewer components, perhaps combine certain components or
Different component layouts.In embodiments of the present invention, terminal device include but is not limited to mobile phone, tablet computer, laptop,
Palm PC, vehicle-mounted terminal equipment, wearable device and pedometer etc..
The embodiment of the present invention, based on audio frame to be played is obtained, which includes multiple frequency sub-band, determines each
The energy value of frequency sub-band, the energy value and threshold of audibility of frequency sub-band correspond, and resulting according to hearing user specificity analysis
Threshold of audibility makes decisions the energy of frequency sub-band, is greater than corresponding threshold of audibility in the energy value of at least one frequency sub-band
In the case where, decaying and/or pressure limit processing are implemented to the corresponding frequency sub-band of the energy value of at least one frequency sub-band, and then to audio
Frame carries out the hearing protection processing of frequency-division section.
It should be understood that the embodiment of the present invention in, radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal
Send and receive, specifically, by from base station downlink data receive after, to processor 110 handle;In addition, by uplink
Data are sent to base station.In general, radio frequency unit 101 includes but is not limited to antenna, at least one amplifier, transceiver, coupling
Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 101 can also by wireless communication system and network and other set
Standby communication.
Terminal device provides wireless broadband internet by network module 102 for user and accesses, and such as user is helped to receive
It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 103 can be received by radio frequency unit 101 or network module 102 or in memory 109
The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide and end
The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that end equipment 10 executes.
Audio output unit 103 includes loudspeaker, buzzer and receiver etc..
Input unit 104 is for receiving audio or video signal.Input unit 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or network module 102.Mike
Wind 1042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be
The format output that mobile communication base station can be sent to via radio frequency unit 101 is converted in the case where telephone calling model.
Terminal device 10 further includes at least one sensor 105, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment light
The light and shade of line adjusts the brightness of display panel 1061, and proximity sensor can close aobvious when terminal device 10 is moved in one's ear
Show panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally
Three axis) acceleration size, can detect that size and the direction of gravity when static, can be used to identify terminal device posture (such as
Horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Sensing
Device 105 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, humidity
Meter, thermometer, infrared sensor etc., details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with terminal device
Family setting and the related key signals input of function control.Specifically, user input unit 107 include touch panel 1071 and
Other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation).Touch panel 1071 may include both touch detecting apparatus and touch controller.Wherein, touch detection
Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control
Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 110, receiving area
It manages the order that device 110 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc.
Seed type realizes touch panel 1071.In addition to touch panel 1071, user input unit 107 can also include other input equipments
1072.Specifically, other input equipments 1072 can include but is not limited to physical keyboard, function key (such as volume control button,
Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 1071 can be covered on display panel 1061, when touch panel 1071 is detected at it
On or near touch operation after, send processor 110 to determine the type of touch event, be followed by subsequent processing device 110 according to touching
The type for touching event provides corresponding visual output on display panel 1061.Although in Fig. 6, touch panel 1071 and display
Panel 1061 is the function that outputs and inputs of realizing terminal device as two independent components, but in some embodiments
In, can be integrated by touch panel 1071 and display panel 1061 and realize the function that outputs and inputs of terminal device, it is specific this
Place is without limitation.
Interface unit 108 is the interface that external device (ED) is connect with terminal device 10.For example, external device (ED) may include wired
Or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end
Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module
Mouthful etc..Interface unit 108 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and
By one or more elements that the input received is transferred in terminal device 10 or can be used in terminal device 10 and outer
Data are transmitted between part device.
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area
The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function
Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of terminal device, to carry out integral monitoring to terminal device.Place
Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Terminal device 10 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
In addition, terminal device 10 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of terminal device, including processor 110, and memory 109 is stored in
On memory 109 and the computer program that can run on the processor 110, the computer program are executed by processor 110
Each process of Shi Shixian above-mentioned audio-frequency processing method embodiment, and identical technical effect can be reached, to avoid repeating, this
In repeat no more.
The embodiment of the present invention also provides storage medium, is stored with computer program on computer readable storage medium, the meter
Calculation machine program realizes each process of above-mentioned audio-frequency processing method embodiment when being executed by processor, and can reach identical skill
Art effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as read-only memory
(Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disk
Or CD etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form belongs within protection of the invention.
Claims (11)
1. a kind of audio-frequency processing method characterized by comprising
In the case where playing audio, audio frame to be played is obtained, the audio frame includes multiple frequency sub-band;
Determine that the energy value of each frequency sub-band, the energy value and threshold of audibility of the frequency sub-band correspond;
It is real at least one described frequency sub-band in the case where the energy value of at least one frequency sub-band is greater than corresponding threshold of audibility
Apply decaying and/or pressure limit processing.
2. the method according to claim 1, wherein at least one described frequency sub-band implement decaying and/or
After pressing limit processing, the method also includes:
Calculate the gross energy of the audio frame;
It is real at least one high frequency frequency sub-band in the multiple frequency sub-band in the case where gross energy is greater than the preset threshold
Decaying and/or pressure limit processing are applied, so that the gross energy of the audio frame is less than or equal to the preset threshold.
3. the method according to claim 1, wherein wherein, being less than or equal in the energy value of multiple frequency sub-band
In the case where corresponding threshold of audibility, the method also includes:
Calculate the gross energy of the audio frame;
In the case where the gross energy is greater than the preset threshold, at least one high frequency frequency in the multiple frequency sub-band
Section implements decaying and/or pressure limit processing, so that the gross energy of the audio frame is less than or equal to the preset threshold.
4. according to the method described in claim 2, it is characterized in that, it is described at least one described frequency sub-band implement decaying and/
Or pressure limit processing, comprising:
Based on the first adjustment factor, decaying and/or pressure limit processing are implemented at least one described frequency sub-band.
5. according to the method described in claim 4, it is characterized in that, at least one high frequency frequency in the multiple frequency sub-band
Section implements decaying and/or pressure limit processing, comprising:
Based on the second adjustment factor, decaying and/or pressure limit processing are implemented at least one described high frequency frequency sub-band.
6. according to the method described in claim 5, it is characterized in that, implementing to decay at least one described high frequency frequency sub-band
And/or after pressure limit processing, further includes:
Record implements decaying and/or pressure limit number of processing at least one described high frequency frequency sub-band;
If the number reaches predetermined threshold value, it is based on third Dynamic gene, it is real at least one described high frequency frequency sub-band
Apply decaying and/or pressure limit processing;
Wherein, the third Dynamic gene is the product of the first adjustment factor and the second adjustment factor.
7. the method according to claim 1, wherein each of the multiple frequency sub-band frequency sub-band is corresponding
Threshold of audibility is different.
8. a kind of apparatus for processing audio, which is characterized in that described device includes:
Module is obtained, in the case where playing audio, obtaining audio frame to be played, the audio frame includes multiple son frequencies
Section;
Determining module, for determining that the energy value of each frequency sub-band, the energy value and threshold of audibility one of the frequency sub-band are a pair of
It answers;
Processing module, for the energy value of at least one frequency sub-band be greater than corresponding threshold of audibility in the case where, to it is described extremely
A few frequency sub-band implements decaying and/or pressure limit processing.
9. a kind of earphone, which is characterized in that including loudspeaker, processor, memory and be stored on the memory and can be
The computer program run on the processor realizes such as claim 1 when the computer program is executed by the processor
The step of to audio-frequency processing method described in any one of 7.
10. a kind of terminal device, which is characterized in that including processor, memory and be stored on the memory and can be in institute
The computer program run on processor is stated, such as claim 1 to 7 is realized when the computer program is executed by the processor
Any one of described in audio-frequency processing method the step of.
11. computer readable storage medium, which is characterized in that computer program is stored on the computer readable storage medium,
The step of the audio-frequency processing method as described in any one of claims 1 to 7 is realized when the computer program is executed by processor
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910362786.4A CN110139181B (en) | 2019-04-30 | 2019-04-30 | Audio processing method and device, earphone, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910362786.4A CN110139181B (en) | 2019-04-30 | 2019-04-30 | Audio processing method and device, earphone, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110139181A true CN110139181A (en) | 2019-08-16 |
CN110139181B CN110139181B (en) | 2020-11-06 |
Family
ID=67575963
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910362786.4A Active CN110139181B (en) | 2019-04-30 | 2019-04-30 | Audio processing method and device, earphone, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110139181B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021244019A1 (en) * | 2020-06-05 | 2021-12-09 | 全景声科技南京有限公司 | Hearing protection apparatus and method based on auditory characteristics of human ears |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026362A (en) * | 2006-02-18 | 2007-08-29 | 鸿富锦精密工业(深圳)有限公司 | Hearing protection, method and sound output device |
US20130336502A1 (en) * | 2007-02-01 | 2013-12-19 | Samsung Electronics Co., Ltd | Audio reproduction method and apparatus with auto volume control function |
CN106604179A (en) * | 2015-10-20 | 2017-04-26 | 马维尔国际贸易有限公司 | An audio processing circuit |
CN106714033A (en) * | 2016-11-25 | 2017-05-24 | 深圳市金立通信设备有限公司 | Method for preventing cracking voice of audio device, and terminal |
CN107135665A (en) * | 2014-09-24 | 2017-09-05 | 泰克宣技术有限公司 | Produce the system and method for activating plane motion for the damping electromagnetic of audio frequency vibration |
CN108804072A (en) * | 2018-06-13 | 2018-11-13 | 广州酷狗计算机科技有限公司 | Audio-frequency processing method, device, storage medium and terminal |
CN108834020A (en) * | 2018-07-17 | 2018-11-16 | 苏州科技大学 | A kind of volume adjusting method and system for protecting ear auditory |
-
2019
- 2019-04-30 CN CN201910362786.4A patent/CN110139181B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026362A (en) * | 2006-02-18 | 2007-08-29 | 鸿富锦精密工业(深圳)有限公司 | Hearing protection, method and sound output device |
US20130336502A1 (en) * | 2007-02-01 | 2013-12-19 | Samsung Electronics Co., Ltd | Audio reproduction method and apparatus with auto volume control function |
CN107135665A (en) * | 2014-09-24 | 2017-09-05 | 泰克宣技术有限公司 | Produce the system and method for activating plane motion for the damping electromagnetic of audio frequency vibration |
CN106604179A (en) * | 2015-10-20 | 2017-04-26 | 马维尔国际贸易有限公司 | An audio processing circuit |
CN106714033A (en) * | 2016-11-25 | 2017-05-24 | 深圳市金立通信设备有限公司 | Method for preventing cracking voice of audio device, and terminal |
CN108804072A (en) * | 2018-06-13 | 2018-11-13 | 广州酷狗计算机科技有限公司 | Audio-frequency processing method, device, storage medium and terminal |
CN108834020A (en) * | 2018-07-17 | 2018-11-16 | 苏州科技大学 | A kind of volume adjusting method and system for protecting ear auditory |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021244019A1 (en) * | 2020-06-05 | 2021-12-09 | 全景声科技南京有限公司 | Hearing protection apparatus and method based on auditory characteristics of human ears |
Also Published As
Publication number | Publication date |
---|---|
CN110139181B (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105280195B (en) | The processing method and processing device of voice signal | |
CN108737921B (en) | Play control method, system, earphone and mobile terminal | |
CN109086027B (en) | Audio signal playing method and terminal | |
CN109511037A (en) | Earpiece volume adjusting method, device and computer readable storage medium | |
CN108491123A (en) | A kind of adjusting application program image target method and mobile terminal | |
CN107562406A (en) | A kind of volume adjusting method, mobile terminal and computer-readable recording medium | |
CN110012143B (en) | Telephone receiver control method and terminal | |
CN107911445A (en) | A kind of information push method, mobile terminal and storage medium | |
CN110460721B (en) | Starting method and device and mobile terminal | |
CN109918039A (en) | A kind of volume adjusting method and mobile terminal | |
CN108063999A (en) | A kind of dust-proof network detecting method, mobile terminal | |
CN109361797A (en) | A kind of vocal technique and mobile terminal | |
CN108848267B (en) | Audio playing method and mobile terminal | |
CN110351407A (en) | A kind of audio frequency playing method and mobile terminal | |
CN111182118B (en) | Volume adjusting method and electronic equipment | |
CN110058837B (en) | Audio output method and terminal | |
CN114125639A (en) | Audio signal processing method and device and electronic equipment | |
CN110297543B (en) | Audio playing method and terminal equipment | |
CN107705804A (en) | A kind of audible device condition detection method and mobile terminal | |
CN109873894B (en) | Volume adjusting method and mobile terminal | |
CN108377483A (en) | A kind of processing method and mobile terminal of bluetooth channel | |
CN110995921A (en) | Call processing method, electronic device and computer readable storage medium | |
CN107016990A (en) | Audio signal generation method and device | |
CN111049972A (en) | Audio playing method and terminal equipment | |
CN108319440B (en) | Audio output method and mobile terminal |
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 |