Summary of the invention
The main object of the present invention is to provide a kind of volume adjusting method, system and storage medium, realizes that intelligence adjusts soundAmount, to adapt to user demand.
The present invention proposes a kind of volume adjusting method, comprising:
When receiving specific voice signal, obtain between the corresponding sound source of specific voice signal and sound control componentDistance;
According to default volume indicator, the volume adjustment of audio will be exported between the sound source and the sound control componentCorresponding first volume of distance;Wherein, it presets volume indicator and includes at least the distance between sound source and sound control component and theThe corresponding relationship of one volume.
Further, sound control component includes microphone array, when receiving specific voice signal, is obtained specificThe step of the distance between corresponding sound source of voice signal and sound control component, comprising:
When receiving specific voice signal by microphone array, records each microphone in microphone array and receiveThe time point of specific voice signal;
According to various time points, the time for receiving specific voice signal in microphone array between each microphone is calculatedDifference;
According to the time difference, the distance between the corresponding sound source of specific voice signal and sound control component are obtained.
Further, it according to the time difference, obtains between the corresponding sound source of specific voice signal and sound control componentApart from the step of, comprising:
Read the geometrical relationship of position between preset each microphone, the sound source and the sound control componentFormula;
According to geometrical relationship formula and time difference, according to preset formula be calculated between sound source and sound control component away fromFrom.
Further, according to default volume indicator, the volume adjustment of audio will be exported between sound source and sound control componentDistance corresponding first volume the step of after, comprising:
Ambient noise is detected, the noise figure in environment is obtained;
According to noise figure, the second volume is calculated according to preset rules;
The volume adjustment of audio will be exported to the second volume.
Further, according to noise figure, the step of the second volume is calculated according to preset rules, comprising:
According to preset weighting coefficient table, the corresponding weighting coefficient of noise figure is obtained;Wherein, preset weighting coefficient table packetInclude the corresponding relationship of noise figure and weighting coefficient;
According to noise figure and weighting coefficient, weighting volume is calculated;Wherein, volume=noise figure * weighting coefficient is weighted;
Second volume is calculated according to weighting volume;Wherein, the second volume=first volume+weighting volume.
Further, according to default volume indicator, the volume adjustment of audio will be exported between sound source and sound control componentDistance corresponding first volume the step of after, further includes:
The audio signal of output audio is acquired by analog-digital converter and obtains the volume of audio signal;
Whether within a preset range to judge the volume of audio signal;
If not within a preset range, by adjusting the amplification factor of power amplifier with adjust output audio volume toIn preset range.
Further, if not within a preset range, by adjusting the amplification factor of power amplifier to adjust output soundStep in the volume to preset range of frequency, comprising:
If the volume for exporting audio is greater than preset range, by reducing the amplification factor of power amplifier to reduce outputIn the volume to preset range of audio;
If the volume for exporting audio is less than preset range, by improving the amplification factor of power amplifier to improve outputIn the volume to preset range of audio.
The present invention also provides a kind of sound volume regulating systems, comprising:
Module being obtained, when for receiving specific voice signal, obtaining the corresponding sound source of specific voice signal to soundThe distance of sound control assembly;
First adjustment module, for according to volume indicator is preset, will export the volume adjustment of audio to sound source harmony sound controlCorresponding first volume of the distance between component processed;Wherein, preset volume indicator include at least sound source to sound control component away fromFrom the corresponding relationship with the first volume.
Further, sound control component includes microphone array, obtains module, comprising:
Recording unit when for receiving specific voice signal by microphone array, records each in microphone arrayA microphone receives the time point of specific voice signal;
First computing unit, for calculating in microphone array and receiving spy between each microphone according to various time pointsThe time difference of fixed voice signal;
First acquisition unit, for obtaining the corresponding sound source of specific voice signal and sound control group according to the time differenceThe distance between part.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, computer program quiltThe step of processor realizes above-mentioned volume adjusting method when executing.
The present invention executes volume adjustment operation by receiving specific voice signal, to avoid due to other sound source factorsIncorrect volume adjustment is caused, so that volume adjustment is more targeted;By obtain sound source and sound control component away fromFrom and combine default volume indicator, obtain the volume for being suitble to hearing user, and then realize volume adjustment to suitable hearing userVolume;Whole process is more in line with the demand of user's intelligence life by sound intelligent control, the size of adjusting volume.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, one embodiment of volume adjusting method of the present invention, comprising:
S1 when receiving specific voice signal, obtains the corresponding sound source of specific voice signal and sound control componentThe distance between;
S2, according to default volume indicator, will export the volume adjustment of audio to the sound source and the sound control componentThe distance between corresponding first volume;Wherein, it presets volume indicator and includes at least the distance between sound source and sound control componentWith the corresponding relationship of the first volume.
In above-mentioned steps S1, present invention can apply on intelligent terminal, but it is not limited to intelligent terminal;Above sound controlComponent can integrate on intelligent terminal, and above-mentioned intelligent terminal includes mobile phone, tablet computer, laptop, PDA(Personal Digital Assistant, personal digital assistant), POS (Point of Sales, point-of-sale terminal), vehicle mounted electricAny terminal device such as brain, intelligent sound box, multi-feature telephone;Above-mentioned specific voice signal can be the finger issued by userIt enables, above-metioned instruction may include keyword, such as " small fertile ", " Hi, Alexa ", " too loud ", " volume raising point " etc.;OnStating keyword can also be according to the variation of scene, using the keyword for being suitble to the scene, for example, user is connected by mobile terminalIntelligent sound box carries out mobile call, when intelligent sound box determines talkthrough, " feeds, you are good when user says!" etc. keywords when,Intelligent sound box also can automatic regulating volume;Above sound signal is received by the microphone array in sound control component, microphoneArray includes at least two microphones;When each microphone of microphone array receives voice signal, each Mike is recordedWind is respectively received the time of above sound signal;Above-mentioned sound source is to issue the place of specific voice signal;Above-mentioned distance isDistance of the place that sound issues to sound control component center, it is preferred that above sound control assembly center and microphone arrayColumn center is identical;The time difference that each microphone receives voice signal is calculated, is determined using time delay auditory localization technology specificPosition of the corresponding sound source of voice signal apart from sound control component.
Referring to Fig.1 1, in above-mentioned steps S2, between the sound source and sound control component in above-mentioned default volume indicator away fromFrom can be distance range, the first volume in default volume indicator can be the volume of suitable normal person's earshot, above-mentioned pre-If volume indicator exports table comprising the volume of distance range and the first volume corresponding relationship, such as: to 0-0.5m, 0.5-1m, 1-The corresponding output volume of the equidistant range of 1.5m, 1.5-2m, 2-2.5m, 2.5-3m establishes volume output reference data table;It is countingIt is above-mentioned corresponding to the distance range of place by tabling look-up to obtain after calculation obtains the distance between sound source and sound control componentFirst volume, and then sound control component exports audio with the first volume;Such as Figure 11, above-mentioned distance range is circular scope, exampleSuch as: the distance between the sound source being calculated and intelligent terminal are 0.8m, then distance range is 0.5-1m, and the first volume is 0.5-Volume value corresponding to 1m.
The present invention executes volume adjustment operation by receiving specific voice signal, to avoid due to other sound source factorsIncorrect volume adjustment is caused, so that volume adjustment is more targeted;By obtain sound source and sound control component away fromFrom and combine default volume indicator, obtain the volume for being suitble to hearing user, and then realize volume adjustment to suitable hearing userVolume;Whole process is more in line with the demand of user's intelligence life by sound intelligent control, the size of adjusting volume.
In an embodiment of the present invention, above sound control assembly includes microphone array, above-mentioned to receive specific soundWhen sound signal, the step S1 of the distance between the corresponding sound source of specific voice signal and sound control component is obtained, comprising:
S11 when receiving specific voice signal by the microphone array, records each Mike in microphone arrayWind receives the time point of specific voice signal;
S12 is calculated in microphone array according to various time points and is received specific voice signal between each microphoneTime difference;
S13 obtains the distance between the corresponding sound source of specific voice signal and sound control component according to the time difference.
In above-mentioned steps S11, because position of each microphone in microphone array apart from sound source is different, receiveTime point to specific voice signal is also different, therefore different according to the time point that each microphone receives voice signal, then benefitThe distance between sound source and sound control component are obtained with time delay auditory localization technology.
In above-mentioned steps S12, the above-mentioned time difference be microphone array each microphone in receive sound between any twoThe time difference of signal, by taking wheat, barley and highland barley array as an example, the first microphone, second microphone and third microphone receive voice signalTime point be respectively a, b, c, then the time difference that voice signal is received between the first microphone and second microphone is a-b'sThe calculation of absolute value, i.e. positive number, the time difference between other microphones is identical.
In above-mentioned steps S13, the spread speed of sound can correspond to different biographies according to tabling look-up to obtain different propagation mediumsSpeed is broadcast, under conditions of known speed and time difference, the range difference that sound source reaches different microphones can be obtained;Above-mentioned each MikeThe distance at wind to sound control component center can install microphone array according to pre-determined distance when producing sound control component;AgainAccording to the geometrical relationship that is formed between each microphone and sound source, range difference can be calculated sound source to sound control component away fromFrom, and then realize that intelligence adjusts the volume of sound control component according to default volume indicator, sound is manually adjusted without userAmount, it is easy to operate, it is more in line with user demand, promotes user experience.
In an embodiment of the present invention, above-mentioned according to the time difference, obtain the corresponding sound source of specific voice signal and intelligenceThe step S13 of the distance between speaker, comprising:
S131, position is several between the preset each microphone of reading, the sound source and the sound control componentWhat relational expression;
S132, according to geometrical relationship formula and time difference, according to preset formula be calculated sound source and sound control component itBetween distance.
Referring to Fig. 2, in above-mentioned steps S131, above-mentioned microphone array by taking four wheat circular array as an example (it is understood thatIt is the microphone array for being also possible to other shapes, quantity), microphone A, B, C, D are defined on circle, and center of circle O is sound controlThe center of component, and the rectangular coordinate system with X-axis and Y-axis is established as origin using center of circle O, round radius is r, sound source Q to circleThe distance of the heart is that the angle of the straight line and reference axis X-axis where s, center of circle O and sound source Q is θ, sound source Q to microphone A, B, C away fromFrom respectively s1, s2, s3, wherein r is distance of each microphone to sound control component center, is production sound control componentWhen the radius that presets, as known quantity, in non-circular microphone array, each microphone to sound control component center away fromFrom can be unequal, but the known quantity that while being the manufacturing just presets;It can be obtained according to the cosine law in trigonometric function:
Further obtain geometrical relationship formula of the microphone A at a distance from sound source Q:
Geometrical relationship formula of the microphone B at a distance from sound source Q:
And geometrical relationship formula of the microphone B at a distance from sound source Q:
Above-mentioned geometrical relationship formula is pre-stored in sound control component, above-mentioned geometrical relationship formula is read when needing, utilization is severalWhat algorithm is calculated.
In above-mentioned steps S132, by taking above-mentioned four wheats circular array as an example, the spread speed for defining sound is v, tBA、tBCRespectively microphone B and microphone A receives the time difference of voice signal, microphone B and microphone C and receives voice signalTime difference;According to plane geometry: vtBA=s2-s1、vtBC=s2-s3, according between above-mentioned each microphone and sound source away fromFrom geometrical relationship Shi Ke get:Wherein v, tBA, tBC, rFor known quantity, it is possible to solve sound source Q and sound control component center O distance s;It is asked by the way that geometrical issues are switched to algebraTopic, so that question simplification, obtains the specific value of sound source Q with sound control component center O distance s by algebraic operation,So that positional relationship becomes intuitively, while sound control component is enabled to identify above-mentioned numerical value, and realize volume adjustment extremelyIt is most suitable for the volume of the earshot of user, promotes user experience.
In an embodiment of the present invention, above-mentioned basis presets volume indicator, will export the volume adjustment of audio to sound source and instituteAfter the step S2 for stating corresponding first volume of the distance between sound control component, comprising:
S3 detects ambient noise, obtains the noise figure in environment;
The second volume is calculated according to preset rules according to noise figure in S4;
S5 will export the volume adjustment of audio to the second volume.
In above-mentioned steps S3, above-mentioned ambient noise is the ambient noise of user's current environment;Ambient noise is to volume meetingAffect, especially on daytime, indoors when, the ambient noise on daytime is generally floated in 45dB, the environment in eveningNoise generally floats in 20dB;In some embodiments, ambient noise can be detected by microphone array, and by analog-to-digital conversionThe analog signal that device (ADC) will test ambient noise is converted to digital signal, to obtain noise figure.
In above-mentioned steps S4 and step S5, for the obtained noise figure of measurement, the volume adjustment of audio will be exported to theTwo volumes;Above-mentioned preset rules are to increase certain sound according to noise figure on the basis of the first volume of current output audioMagnitude, above-mentioned certain volume value can be noise figure, be also possible to convert to obtain via noise figure.By in the first volumeOn the basis of increase certain volume value to offset the influence of ambient noise so that sound control component output audio volume be work asIt is most suitable for the volume of hearing user range under preceding environment, intelligent control, the size of adjusting volume in a variety of contexts are realized, into oneStep promotes user experience.In an embodiment of the present invention, above-mentioned according to noise figure, the second sound is calculated according to preset rulesAmount, and the volume adjustment of audio will be exported to the step S4 of the second volume, comprising:
S41 obtains the corresponding weighting coefficient of noise figure according to preset weighting coefficient table;Wherein, preset weighting coefficientTable includes the corresponding relationship of noise figure and weighting coefficient;
S42 calculates weighting volume according to noise figure and weighting coefficient;Wherein, volume=noise figure * weighting coefficient is weighted;
The second volume is calculated according to weighting volume in S43;Wherein, the second volume=first volume+weighting volume.
In above-mentioned steps S41, above-mentioned preset weighting coefficient table is that developer is measured by experiment, and measurement rules canTo be to measure multiple noise floor values of varying environment according to statistical analysis method, utilize the original of normal distribution in mathematical statisticsReason, obtains under different noise circumstances, should increase the volume with how many weight on the basis of current volume and be most suitable for normal personHearing (influence of noise is effectively reduced), to determine weighting coefficient.
In above-mentioned steps S42, above-mentioned weighting volume is the product of noise figure and weighting coefficient.
In above-mentioned steps S43, increase on the basis of the first volume certain weight volume (i.e. current noise with plusThe product of weight coefficient), to improve volume to reach the influence for reducing noise to output audio.Ambient noise is to output audio soundIt is fuzzy problem that the specific influence of amount, which has much, and the present embodiment is measured by experiment and is most suitable for normal person under different noise circumstancesThe volume of earshot, reasonably embodies fuzzy problem, and provides the specific solution of fuzzy problem, i.e., in the first soundIncrease the volume of certain weight on the basis of amount, to offset influence of the ambient noise to output audio volume, makes an uproar for differenceSound value and the volume for increasing the product of different weights coefficient and noise figure, to avoid excessive sound is increased under low noise environmentAmount, or avoid increasing very few volume under high-noise environment, so that the volume after adjusting is more in line with the earshot of user.
In an embodiment of the present invention, above-mentioned basis presets volume indicator, will export the volume adjustment of audio to sound source and instituteAfter the step S2 for stating corresponding first volume of the distance between sound control component, further includes:
S6 acquires the audio signal of output audio by analog-digital converter and obtains the volume of audio signal;
Whether within a preset range S7 judges the volume of audio signal;
S8, if not within a preset range, the sound of output audio is adjusted by adjusting the amplification factor of power amplifierIn amount to preset range.
Referring to Fig. 3, in above-mentioned steps S6, the audio signal of above-mentioned output audio is amplified to currently by power amplifierSound control component needs the volume adjusted, exports audio by loudspeaker, while being converted to number by ADC and by ADC acquisitionSignal, by digital data transmission to processor.
In above-mentioned steps S7, ADC converts audio signals into digital signal and is transferred to processor, and processor judges numberWhether the volume of word signal meets preset range;Above-mentioned preset range be current sound control assembly need the volume that adjusts according toPreset error range obtains, i.e., currently needs to adjust volume ± error amount, such as intelligent terminal is needed volume adjustment toOne volume, output volume are the audio of the first volume, are lost when due to line power, and the volume and the first sound of reality output are causedAmount is different, and when except admissible error range, the volume to allowable error is readjusted to the volume of audio.
In above-mentioned steps S8, since line power is lost, the corresponding volume of the audio signal of reality output is caused not existThe default volume range for needing to adjust, thus by adjusting the amplification factor of power amplifier with adjust output audio volume toPreset range, so that the volume of output audio is to be most suitable for the volume of hearing user range.
In an embodiment of the present invention, if it is above-mentioned not within a preset range, by adjusting the times magnification of power amplifierStep S8 in volume to preset range of the number to adjust output audio, comprising:
S81, if the volume of output audio is greater than preset range, by reducing the amplification factor of power amplifier to reduceExport the volume of audio;
S82, if the volume of output audio is less than preset range, by improving the amplification factor of power amplifier to improveExport the volume of audio.
In above-mentioned steps S81, it is too big so the volume of output is caused to be greater than preset range to export the power of audio, soThe amplification factor of the power of output audio is reduced when exporting audio and passing through power amplifier, to reduce the volume of output audioTo preset range.
In above-mentioned steps S82, the power for exporting audio is too small so the volume of output is caused to be less than preset range, soThe amplification factor of the power of output audio is improved when exporting audio and passing through power amplifier, to improve the volume of output audioTo preset range.
Referring to Fig. 4, one embodiment of sound volume regulating system of the present invention, comprising:
Module 1 being obtained, when for receiving specific voice signal, obtaining the corresponding sound source of specific voice signal to soundThe distance of sound control assembly;
First adjustment module 2, for according to volume indicator is preset, will export the volume adjustment of audio to the sound source and instituteState corresponding first volume of the distance between sound control component;Wherein, it presets volume indicator and includes at least sound source to sound controlThe corresponding relationship of the distance of component and the first volume.
In above-mentioned acquisition module 1, above sound control assembly can be integrated in above-mentioned terminal, above-mentioned terminal include mobile phone,Tablet computer, laptop, PDA (Personal Digital Assistant, personal digital assistant), POS (Point ofSales, point-of-sale terminal), vehicle-mounted computer, intelligent sound box, any terminal device such as multi-feature telephone;Above-mentioned specific sound letterIt number can be the instruction that is issued by user, above-metioned instruction may include keyword, such as " small fertile ", " Hi, Alexa ", " too loudly", " volume raising point " etc.;Above-mentioned keyword can also be according to the variation of scene, using the keyword for being suitble to the scene, exampleSuch as, user works as user when intelligent sound box determines talkthrough by mobile terminal connection intelligent sound box progress mobile callIt says and " feeds, you are good!" etc. keywords, intelligent sound box also can automatic regulating volume;Above sound signal is above-mentioned by sound control componentMicrophone array receive, microphone array include at least two microphones;It is received in each microphone of microphone arrayWhen voice signal, the received time is recorded;Above-mentioned sound source is to issue the place of specific voice signal;Above-mentioned distance is sound hairDistance of the place out to sound control component center, it is preferred that above sound control assembly center and microphone array centerIt is identical;The time difference that each microphone receives voice signal is calculated, determines that specific sound is believed using time delay auditory localization technologyNumber position of the corresponding sound source apart from sound control component.
In above-mentioned first adjustment module 2, the distance between sound source and sound control component in above-mentioned default volume indicatorIt can be distance range, the first volume in default volume indicator can be the volume of suitable normal person's earshot, above-mentioned defaultVolume indicator is to export table comprising the volume of distance range and the first volume corresponding relationship;Sound source and sound control group is being calculatedAfter the distance between part, the first adjustment module 2 by tabling look-up to obtain above-mentioned the first volume corresponding to the distance range of place,And then sound control component exports audio with the first volume.
Referring to Fig. 5, in an embodiment of the present invention, above-mentioned acquisition module 1, comprising:
Recording unit 11, when for receiving specific voice signal by the microphone array on sound control component,Each microphone receives the time point of specific voice signal in record microphone array;
First computing unit 12, for calculating in microphone array and being received between each microphone according to various time pointsThe time difference of specific voice signal;
First acquisition unit 13, for obtaining the corresponding sound source of specific voice signal and sound control according to the time differenceThe distance between component.
In above-mentioned recording unit 11, because position of the microphone in microphone array apart from sound source is different, connectThe time point for receiving specific voice signal is also different.
In above-mentioned first computing unit 12, the above-mentioned time difference be microphone array each microphone in receive between any twoTo the time difference of voice signal, by taking wheat, barley and highland barley array as an example, the first microphone, second microphone and third microphone receive soundThe time point of sound signal is respectively a, b, c, then the time difference of voice signal is received between the first microphone and second microphoneFor the absolute value of a-b, i.e. positive number, the calculation of the time difference between other microphones is identical.
In above-mentioned first acquisition unit 13, the spread speed of sound can be corresponding not according to tabling look-up to obtain different propagation mediumsThe range difference that sound source reaches different microphones can be obtained under conditions of known speed and time difference in same spread speed;It is above-mentionedThe distance at each microphone to sound control component center can be obtained when installing microphone array;Further according to each microphone and sound sourceBetween the geometrical relationship that is formed, range difference can be calculated sound source to sound control component distance.
Referring to Fig. 6, in an embodiment of the present invention, above-mentioned first acquisition unit 13, comprising:
Reading subunit 131, for reading preset each microphone, the sound source and the sound control componentBetween position geometrical relationship formula;
Subelement 132 is obtained, for sound source and sound to be calculated according to preset formula according to geometrical relationship formula and time differenceThe distance between sound control assembly.
In above-mentioned reading subunit 131, above-mentioned microphone array by taking four wheat circular array as an example (it is understood thatIt is also possible to the microphone array of other shapes, quantity), microphone A, B, C, D are defined on circle, and center of circle O is sound control groupThe center of part, and plane right-angle coordinate is established by origin of center of circle O, round radius is r, and the distance of sound source Q to the center of circle is s,The straight line of center of circle O and sound source Q and the angle of reference axis X-axis are θ, the distance of sound source Q to microphone A, B, C be respectively s1, s2,S3, wherein r is distance of each microphone to sound control component center, is the radius preset when producing sound control component,As known quantity, in non-circular microphone array, the distance at each microphone to sound control component center can be unequal, butThe known quantity just preset when being the manufacturing;It can be obtained according to the cosine law in trigonometric function:
Further obtain geometrical relationship formula of the microphone A at a distance from sound source Q:
Geometrical relationship formula of the microphone B at a distance from sound source Q:
And geometrical relationship formula of the microphone B at a distance from sound source Q:
Above-mentioned geometrical relationship formula is pre-stored in sound control component, reading subunit 131 reads above-mentioned geometry when needingRelational expression is calculated using geometric algorithm.
In above-mentioned computation subunit 132, by taking above-mentioned four wheats circular array as an example, the spread speed for defining sound is v,tBA、tBCRespectively microphone B and microphone A receives the time difference of voice signal, microphone B and microphone C and receives soundThe time difference of signal;According to plane geometry: vtBA=s2-s1、vtBC=s2-s3, according to above-mentioned each microphone and sound source itBetween distance geometrical relationship Shi Ke get:Wherein v, tBA、tBC、rFor known quantity, it is possible to solve sound source Q and sound control component center O distance s.
Referring to Fig. 7, in an embodiment of the present invention, above system further include:
Detection module 3 obtains the noise figure in environment for detecting ambient noise;
Computing module 4, for the second volume to be calculated according to preset rules according to noise figure;
Second adjustment module 5, for the volume adjustment of audio will to be exported to the second volume.
In above-mentioned detection module 3, above-mentioned ambient noise is the ambient noise of user's current environment;Ambient noise is to volumeWill cause certain influence, especially on daytime, indoors when, the ambient noise on daytime is generally floated in 45dB, the ring in eveningBorder noise generally floats in 20dB;In some embodiments, detection module 3 can be microphone, be detected by microphone arrayAmbient noise, and digital signal is converted to by the analog signal that analog-digital converter (ADC) will test ambient noise, to obtainNoise figure.
In above-mentioned computing module 4 and the second adjustment module 5, computing module 4 measures obtained noise for detection module 3Value is calculated the second volume, and the second adjustment module 5 will export the volume adjustment of audio to the second volume again;Above-mentioned preset rulesTo increase certain volume value according to noise figure on the basis of the first volume of current output audio, certain volume value canTo be noise figure, it is also possible to convert to obtain via noise figure.
Referring to Fig. 8, in an embodiment of the present invention, above-mentioned computing module 4, comprising:
Second acquisition unit 41, for obtaining the corresponding weighting coefficient of noise figure according to preset weighting coefficient table;ItsIn, preset weighting coefficient table includes the corresponding relationship of noise figure and weighting coefficient;
Second computing unit 42, for calculating weighting volume according to noise figure and weighting coefficient;Wherein, weight volume=Noise figure * weighting coefficient;
Unit 43 is adjusted, for the volume adjustment of audio will to be exported to the second volume according to weighting volume;Wherein, secondVolume=the first volume+weighting volume.
In above-mentioned second acquisition unit 41, above-mentioned preset weighting coefficient table is that developer is measured by experiment, is surveyedGauge then can be according to statistical analysis method, that is, measures multiple noise floor values of varying environment, utilize normal state in mathematical statisticsThe principle of distribution obtains under different noise circumstances, and it is most suitable should to increase the volume with how many weight on the basis of current volumeThe hearing (influence of noise is effectively reduced) of normal person is closed, to determine weighting coefficient.
In above-mentioned second computing unit 42, above-mentioned weighting volume is the product of noise figure and weighting coefficient.
In above-mentioned adjusting unit 43, adjusts unit 43 and increase the volume of certain weight on the basis of the first volume (i.e.The product of current noise and weighting coefficient), to improve volume to reach the influence for reducing noise to output audio.
Referring to Fig. 9, in an embodiment of the present invention, above system further include:
Acquisition module 6, for acquiring the audio signal of output audio by analog-digital converter and obtaining the sound of audio signalAmount;
Judgment module 7, for whether within a preset range to judge the volume of audio signal;
Module 8 is adjusted, if for not within a preset range, it is defeated to adjust by adjusting the amplification factor of power amplifierOut in the volume to preset range of audio.
In above-mentioned acquisition module 6, the audio signal of above-mentioned output audio is amplified to current sound by power amplifierControl assembly needs the volume adjusted, exports audio by loudspeaker, while being converted to digital signal by ADC and by ADC acquisition,By digital data transmission to processor.
In above-mentioned judgment module 7, acquisition module 6 is converted audio signals into digital signal and be transferred to by ADC to be sentencedDisconnected module 7, judgment module 7 judge whether the volume of digital signal meets preset range;Above-mentioned preset range is current sound controlComponent processed needs the volume adjusted to be obtained according to preset error range, i.e., currently needs to adjust volume ± error amount, such as intelligenceEnergy terminal is needed volume adjustment to the first volume, and output volume is the audio of the first volume, is lost, is made when due to line powerIt is different from the first volume at the volume of reality output, and when except admissible error range, the volume of audio is adjusted againIt saves to the volume within the scope of allowable error.
In above-mentioned adjustment module 8, since line power is lost, lead to the corresponding volume of the audio signal of reality output notIn the default volume range that needs are adjusted, therefore by adjusting the amplification factor of power amplifier to adjust the volume for exporting audioTo preset range.
Referring to Fig.1 0, in an embodiment of the present invention, above-mentioned adjustment module 8, comprising:
Unit 81 is reduced, if the volume for exporting audio is greater than preset range, by reducing putting for power amplifierIn volume to preset range of the big multiple to reduce output audio;
Unit 82 is improved, if the volume of output audio is less than preset range, by the times magnification for improving power amplifierIn volume to preset range of the number to improve output audio.
In above-mentioned reduction unit 81, it is too big so the volume of output is caused to be greater than preset range to export the power of audio,So the amplification factor of the power of output audio is reduced when exporting audio and passing through power amplifier, to reduce output audioIn volume to preset range.
In above-mentioned raising unit 82, the power for exporting audio is too small so the volume of output is caused to be less than preset range,So the amplification factor of the power of output audio is improved when exporting audio and passing through power amplifier, to improve output audioIn volume to preset range.
One embodiment of intelligent terminal of the present invention, including memory and processor 8;
Memory is stored with computer program, and processor executes computer program to realize the step of above-mentioned volume adjusting methodSuddenly.
In an embodiment of the present invention, above-mentioned intelligent terminal further includes the sound control component coupled with processor, above-mentionedSound control component includes microphone array, power amplifier and analog-digital converter;
Microphone array is for receiving voice signal and detection ambient noise;
Power amplifier is used to adjust the volume of output audio;
Analog-digital converter is used to acquire the volume of output audio.
In an embodiment of the present invention, above-mentioned intelligent terminal further includes the WiFi module coupled with processor, is used for and shiftingDynamic terminal communication connection.
One embodiment of computer readable storage medium of the present invention, is stored thereon with computer program, and computer program is locatedReason device realizes volume adjusting method when executing, comprising: when processor receives specific voice signal, obtains specific sound letterThe distance between number corresponding sound source and sound control component;According to default volume indicator, will export the volume adjustment of audio toCorresponding first volume of the distance between the sound source and the sound control component;Wherein, it presets volume indicator and includes at least soundThe corresponding relationship in the distance between source and sound control component and the first volume.
Above-mentioned volume adjusting method, by receiving specific voice signal to execute volume adjustment operation, to avoid due toOther sound source factors cause incorrect volume adjustment, so that volume adjustment is more targeted;By obtaining sound source and soundThe distance of control assembly simultaneously combines default volume indicator, obtains the volume for being suitble to hearing user, and then realizes volume adjustment to suitableClose the volume of hearing user;Whole process is more in line with the need of intelligent life by sound intelligent control, the size of adjusting volumeIt asks.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be withRelevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computerIn read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,Any reference used in provided herein and embodiment to memory, storage, database or other media,Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may includeRandom access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double speed are according to rate SDRAM (SSRSDRAM), enhancingType SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-rowHis property includes, so that the process, device, article or the method that include a series of elements not only include those elements, andAnd further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsicElement.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to doThere is also other identical elements in the process, device of element, article or method.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizationsEquivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlationsTechnical field, be included within the scope of the present invention.