CN112954115A - Volume adjusting method and device, electronic equipment and storage medium - Google Patents

Volume adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112954115A
CN112954115A CN202110289721.9A CN202110289721A CN112954115A CN 112954115 A CN112954115 A CN 112954115A CN 202110289721 A CN202110289721 A CN 202110289721A CN 112954115 A CN112954115 A CN 112954115A
Authority
CN
China
Prior art keywords
frequency
sound
sound intensity
target audio
target
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
Application number
CN202110289721.9A
Other languages
Chinese (zh)
Other versions
CN112954115B (en
Inventor
闫震海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN202210509734.7A priority Critical patent/CN114979363A/en
Priority to CN202110289721.9A priority patent/CN112954115B/en
Publication of CN112954115A publication Critical patent/CN112954115A/en
Application granted granted Critical
Publication of CN112954115B publication Critical patent/CN112954115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The application discloses a volume adjusting method, a volume adjusting device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value; selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information; carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio; and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter. Therefore, the volume adjusting method can reasonably adjust the volume and reduce the influence of the environmental noise on the audio listening effect.

Description

Volume adjusting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of audio processing technologies, and in particular, to a volume adjustment method and apparatus, an electronic device, and a storage medium.
Background
Volume adjustment is a common user operation when using an electronic device to listen to music, watch movies, and talk over voice. The audio listening effect is often influenced by the environmental noise, and the user often adjusts the volume by modifying the amplitude of the time domain signal in order to hear the content played by the audio.
However, the applicant has found that the related art has at least the following problems in the process of volume adjustment: in practical applications, a user cannot hear only some details in the audio, and when the user increases the volume until the details are heard, the volume of the content that can be heard originally is too large, which affects the listening effect of the user.
Disclosure of Invention
The application aims to provide a volume adjusting method, a volume adjusting device, electronic equipment and a storage medium, which can reasonably adjust the volume and reduce the influence of environmental noise on the audio listening effect.
To achieve the above object, a first aspect of the present application provides a volume adjustment method, including:
acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value;
selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information;
carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio;
and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
In order to achieve the above object, a second aspect of the present application provides a volume adjustment method, including:
collecting auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
if a volume adjusting instruction is received, determining a volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
To achieve the above object, a third aspect of the present application provides a volume adjustment device comprising:
the noise energy distribution determining module is used for acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value;
a reference energy value determining module, configured to select, according to the noise energy distribution information, a noise energy value corresponding to the N target frequencies as a reference energy value;
the equalization preprocessing module is used for carrying out equalization preprocessing on the target audio frequency according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio;
and the amplitude adjusting module is used for adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
To achieve the above object, a fourth aspect of the present application provides a volume adjustment device, comprising:
the auditory characteristic acquisition module is used for acquiring auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
the adjusting parameter determining module is used for determining the volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears if the volume adjusting instruction is received; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and the volume adjusting module is used for adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
To achieve the above object, a fifth aspect of the present application provides an electronic device comprising a memory and a processor;
wherein the processor is configured to execute a program stored in the memory;
the memory is to store a program to at least:
acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value; selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information; carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio; adjusting the frequency domain signal amplitude of the target audio according to the signal adjustment parameter;
and/or, collecting human ear auditory characteristic information; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies; if a volume adjusting instruction is received, determining a volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency; and adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
In order to achieve the above object, a sixth aspect of the present application provides a storage medium having stored therein computer-executable instructions, which when loaded and executed by a processor, implement the steps of the volume adjustment method as described above.
According to the scheme, the volume adjusting method comprises the following steps: acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value; selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information; carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio; and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
The noise energy distribution information of the environmental noise is determined after the environmental noise is obtained, and the noise energy distribution information comprises noise energy values of each frequency in the environmental noise. According to the method and the device, the noise energy values corresponding to the N target frequencies are selected as reference energy values according to the noise energy distribution information, and then the target audio is subjected to equalization preprocessing according to the reference energy values to obtain signal adjusting parameters. Because the signal adjustment parameter includes the target frequency amplitude variation corresponding to each frequency in the target audio, when the frequency domain signal amplitude of the target audio is adjusted by using the signal adjustment parameter, the frequency amplitude variation corresponding to each frequency in the target audio can be related to the noise energy value of the same frequency. By the adjusting method, the target audio frequency can be adjusted to have a larger energy value in a frequency domain with a larger noise energy value, and can be adjusted to have a smaller energy value in a frequency domain with a smaller noise energy value, so that the energy of the target audio frequency compared with the energy of the environmental noise is increased in each frequency band. Therefore, the volume adjusting method provided by the application adjusts the frequency domain signal amplitude of each frequency of the target audio according to the environmental noise, so that the volume can be adjusted reasonably, and the influence of the environmental noise on the audio listening effect is reduced.
The application also discloses a volume adjusting device, an electronic device and a storage medium, and the technical effects can be achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is an architecture diagram of a volume adjustment system according to an embodiment of the present application;
fig. 2 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for adjusting the amplitude of a frequency domain signal according to an embodiment of the present application;
fig. 4 is a flowchart of a volume detection method according to an embodiment of the present disclosure;
fig. 5 is another volume adjustment method provided in the embodiments of the present application;
fig. 6 is a flowchart of a method for collecting auditory characteristic information of a human ear according to an embodiment of the present application;
fig. 7 is a flowchart of a method for determining sound sensitivity information according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of sound intensity adjustment provided by an embodiment of the present application;
fig. 9 is a schematic structural diagram of a volume adjustment device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of another volume adjustment device according to an embodiment of the present disclosure;
fig. 11 is a structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to facilitate understanding of the volume adjustment method provided in the present application, a system for use thereof will be described below. Referring to fig. 1, an architecture diagram of a volume adjustment system provided by an embodiment of the present application is shown, as shown in fig. 1, including a sound pickup device 101, a terminal 102, and an audio playing device 103. The sound pickup device 101 may be used to pick up audio sound when the audio playing device 103 plays audio, and may also be used to pick up environmental noise when the audio playing device 103 does not play audio. The sound pickup device 101 transmits the picked audio content to the terminal 102, and the terminal 102 may determine whether the volume of the currently played audio is appropriate according to the environmental noise, and increase or decrease the volume of the currently played audio if the volume is not appropriate. The audio playing device 103 can receive and play the audio signal of the terminal 102.
The embodiment of the application discloses a volume adjusting method, which can reasonably adjust the volume and reduce the influence of environmental noise on the audio listening effect.
Referring to fig. 2, a flowchart of a volume adjustment method provided in an embodiment of the present application is shown in fig. 2, and includes:
s201: and acquiring the environmental noise.
The present embodiment may be applied to an electronic device with an audio function, where the electronic device may have a sound pickup device (such as a microphone) to pick up an ambient noise by using the sound pickup device, and the ambient noise acquired in the embodiment may also be transmitted to the electronic device by an ambient noise detection device. The environmental noise obtained in this step may be environmental noise at a position where the electronic device that performs volume adjustment electronically is located. Specifically, in this embodiment, the audio playing device for playing the target audio may be turned off first, and then the sound picked up by the sound pickup device is used as the environmental noise.
In this step, as a feasible implementation manner, the environmental noise obtained in this step may be the environmental noise at the current time, and in this step, the environmental noise may be obtained according to a preset period, so as to adjust the playing volume of the audio according to the latest environmental noise.
S202: noise energy distribution information of the ambient noise is determined.
On the basis of obtaining the environmental noise, noise energy distribution information can be obtained by analyzing the noise energy values of all frequencies in the environmental noise, and the noise energy distribution information comprises the corresponding relation between the frequencies of the environmental noise and the noise energy values. Specifically, the present embodiment may obtain the environmental noise energy distribution information by a Welch spectrum estimation method.
S203: selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information;
since the corresponding noise energy values of each frequency in the environmental noise are not completely the same, the embodiment may select the corresponding noise energy values of the N target frequencies as the reference energy values, so as to determine the energy level of the environmental noise in each frequency band by using the reference energy values.
S204: carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter;
in order to reduce the influence of the environmental noise on the listening effect of the target audio, in this embodiment, the volume is adjusted by adjusting the frequency domain signal amplitude of the target audio according to the noise energy distribution information, so that the signal amplitude of the adjusted target audio in each frequency band is raised to a certain extent relative to the environmental noise, thereby improving the listening effect of the target audio. Specifically, the signal conditioning parameter includes a target frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation corresponding to each frequency in the signal conditioning parameter is positively correlated with the noise energy value of the same frequency.
S205: and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
Because the frequency amplitude variation amount corresponding to each frequency in the signal adjustment parameter is positively correlated with the noise energy value of the same frequency, after the frequency domain signal amplitude of the target audio frequency is adjusted according to the signal adjustment parameter, the signal amplitude of the adjusted target audio frequency in each frequency band is raised to a certain extent relative to the environmental noise, so that a user can more easily identify the target audio frequency, the interference of the environmental noise is reduced, and the listening effect of the target audio frequency is improved. For example, when the environmental noise has higher energy at low frequency but the energy at the intermediate frequency and the high frequency is 0, the volume adjustment scheme of this embodiment can increase the frequency domain signal amplitude of the target audio at low frequency, and does not change the frequency domain signal amplitude of the target audio at the intermediate frequency and the high frequency, and the adjusted target audio has a certain rise with respect to the energy of the environmental noise, thereby improving the listening effect. Compared with the scheme of increasing the amplitude of the time domain signal in the related art, the embodiment adjusts the amplitude of the frequency domain signal according to the noise energy distribution information of the environmental noise, so that the sound volume is reasonably adjusted, and the influence of the environmental noise on the audio listening effect is reduced.
Furthermore, because the environmental noise changes in real time, the noise energy distribution information of the environmental noise also changes with time, so that the embodiment can generate new noise energy distribution information after acquiring new environmental noise, and further generate new signal adjustment parameters according to the new noise energy distribution information, so as to automatically adjust the volume of the target audio in real time according to the environmental noise, avoid repeated manual adjustment by a user, and improve the timeliness and accuracy of volume adjustment.
The present embodiment determines noise energy distribution information of the environmental noise after acquiring the environmental noise, where the noise energy distribution information includes a noise energy value of each frequency in the environmental noise. In this embodiment, the noise energy value corresponding to the N target frequencies is selected as the reference energy value according to the noise energy distribution information, and then the target audio is subjected to equalization preprocessing according to the reference energy value to obtain the signal adjustment parameter. Because the signal adjustment parameter includes the target frequency amplitude variation corresponding to each frequency in the target audio, when the frequency domain signal amplitude of the target audio is adjusted by using the signal adjustment parameter, the frequency amplitude variation corresponding to each frequency in the target audio can be related to the noise energy value of the same frequency. By the adjusting method, the target audio frequency can be adjusted to have a larger energy value in a frequency domain with a larger noise energy value, and can be adjusted to have a smaller energy value in a frequency domain with a smaller noise energy value, so that the energy of the target audio frequency compared with the energy of the environmental noise is increased in each frequency band. Therefore, the volume adjustment method provided by this embodiment adjusts the frequency domain signal amplitude of each frequency of the target audio according to the environmental noise, so as to adjust the volume reasonably and reduce the influence of the environmental noise on the audio listening effect.
As a further description of the embodiment corresponding to fig. 2, in the above embodiment, normalization mapping may be performed first, and then a reference energy value is selected, where the specific process may include: normalizing and mapping the noise energy value in the noise energy distribution information to a target interval; and selecting the noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information after the normalized mapping. According to the embodiment, the noise energy value is mapped to the target interval in a normalized mode, and overflow of subsequently set gains can be effectively prevented.
As a further description of the corresponding embodiment of fig. 2, the present embodiment may determine the noise energy distribution information of the environmental noise by the following way: calculating the noise spectrum energy of the environmental noise; and performing A-weighted inverse numerical weighting operation on the noise spectrum energy to obtain noise energy distribution information of the environmental noise.
The above process is illustrated by way of example: and calculating energy values HNoise (w) of all frequency components of the current noise environment by using a Welch spectrum estimation method. Weighting the noise energy distribution information HNoise (w) according to the inverse value of the A weight to obtain the noise energy distribution information HNoise weight (w), namely:
HNoiseWeight(w)=10*log10(HNoise(w)*(max(AWeight)+min(AWeight)-AWeight(w)))。
where the function min () represents the minimum value of the vector and max () represents the maximum value of the vector.
To prevent overflow of subsequently set gains, HNoiseWeight (w) can be globally normalized and mapped to between 0-6 dB. Namely: hnoseweight norm (w) 6 × (hnoseweight (w))/(max (hnoseweight (w)))/(hnoseweight (w)) -min (hnoseweight (w))).
Referring to fig. 3, fig. 3 is a flowchart of a method for adjusting frequency domain signal amplitude provided in an embodiment of the present application, where the embodiment is a further description of a process for adjusting frequency domain signal amplitude of a target audio according to noise energy distribution information in S103 in an embodiment corresponding to fig. 2, and a further implementation may be obtained by combining the embodiment with the embodiment corresponding to fig. 1, where the embodiment may include the following steps:
s301: and generating a fitting curve corresponding to the noise energy distribution information.
The noise energy distribution information includes a correspondence between the frequency and the noise energy value, and the embodiment may generate a fitting curve corresponding to the noise energy distribution information based on the correspondence. The horizontal axis of the fitting curve obtained in this embodiment is a frequency value, and the vertical axis is a noise energy value, and a noise energy value of the environmental noise at any frequency can be determined according to the fitting curve.
S302: and selecting the noise energy values corresponding to the N target frequencies on the fitting curve as reference energy values.
As a possible implementation manner, the present embodiment may select the center frequency of the N-segment equalizer as the target frequency, for example, 31.5Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz may be selected as the target frequency. As another possible implementation, the present embodiment may divide the human auditory frequency range (20HZ to 20KHZ) into N frequency intervals with the same span, and take the center frequency of each frequency interval as the target frequency.
S303: and carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter.
Specifically, the process of performing equalization preprocessing on the target audio in this embodiment may include: and determining the frequency amplitude variation of the target audio at the target frequency according to the reference energy value, and fitting according to the adjusted frequency amplitude variation of the target frequency to obtain the frequency amplitude variations of all frequencies in the target audio. In this embodiment, the signal adjustment parameter may be determined according to the frequency amplitude variation of each frequency in the target audio, where the signal adjustment parameter includes a target frequency amplitude variation corresponding to each frequency in the target audio.
S304: and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
The frequency domain signal amplitude may be adjusted for the frequency amplitude variation according to each frequency after determining the signal adjustment parameter. In the embodiment, the noise energy values corresponding to the N target frequencies are selected as the reference energy values, and the target frequency domain signal amplitudes of all frequencies are obtained by performing equalization pretreatment on all frequencies of the target audio based on the reference energy values, so that the adjustment efficiency of the frequency domain signal amplitudes is improved, and the real-time performance of volume adjustment is further improved, so that the volume of the target audio is rapidly adjusted when environmental noise changes.
As a further description of the embodiment corresponding to fig. 3, this embodiment may adjust the frequency domain signal amplitude of the target audio in a slow update manner, so as to ensure that the signal energy fluctuation in the auditory sensation is smooth.
The slow update process may include: determining the target frequency amplitude variation of the target audio played at the current moment according to the signal adjusting parameter; determining the actual frequency amplitude variation of the target audio played at the last moment; determining the actual frequency amplitude variation of the target audio played at the current moment, and adjusting the frequency domain signal amplitude of the target audio according to the actual frequency amplitude variation of the target audio played at the current moment; the actual frequency amplitude variation of the target audio played at the current moment is within an amplitude variation interval; the amplitude variation interval is an open interval, and the endpoint value of the amplitude variation interval is the actual frequency amplitude variation of the target audio played at the last moment and the target frequency amplitude variation of the target audio played at the current moment.
Further, on the premise that the environmental noise is not changed, the frequency domain signal amplitude of the target audio frequency can be adjusted at the next moment directly according to the target frequency amplitude variation without adjusting the frequency domain signal amplitude of the target audio frequency according to a slow updating mode.
As a possible implementation, the slow update process may adjust the frequency amplitude variation of the target audio by using a preset formula; wherein the preset formula is En=α·En-1+(1-α)En′;EnThe actual frequency amplitude variation of the target audio is played for the current moment, alpha is a preset parameter, En-1Actual frequency amplitude variation of the target audio for the last moment, En' is a target frequency amplitude variation corresponding to the signal conditioning parameter.
Referring to fig. 4, fig. 4 is a flowchart of a volume detection method provided in an embodiment of the present application, where this embodiment is further described after adjusting the frequency domain signal amplitude of the target audio according to the embodiment corresponding to fig. 1, and a further implementation may be obtained by combining this embodiment with the embodiment corresponding to fig. 1, where this embodiment may include the following steps:
s401: picking up total sound data when the target audio is played by using a sound pickup device;
wherein the total sound data includes a sound of the target audio and an ambient noise.
S402: judging whether the sound intensity of the total sound data is greater than a rated decibel value or not; if yes, entering S403; if not, judging that the current playing volume is normal.
The rated decibel value mentioned in this embodiment is the maximum decibel value that does not affect the hearing ability of the human ear, and the rated decibel value can be flexibly set, for example, the rated decibel value can be 90 decibels. If the sum of the sound intensity of the audio sound and the environmental noise is greater than the rated decibel value, the first preset operation in S403 is performed, the second preset operation may also be performed, and the first preset operation and the second preset operation may also be performed.
S403: executing a first preset operation and/or a second preset operation;
the first preset operation is to generate prompt information with overlarge volume, and the prompt information with overlarge volume can be vibration information, voice information and the like. The second preset operation is to reduce the frequency domain signal amplitude of the target audio to avoid over-loud hearing impairment.
As a further supplement to the corresponding embodiment of fig. 4, the process of performing the second preset operation may include: and taking the frequency point of which the sound intensity is greater than the rated decibel value in the total sound data as a frequency point to be adjusted, and reducing the frequency domain signal amplitude of the target audio frequency at the frequency point to be adjusted. By the method, the frequency domain signal amplitude of the frequency point with the overlarge sound intensity after the target audio frequency is superposed with the environmental noise is reduced, and hearing damage caused by the overlarge sound intensity of a certain frequency after the target audio frequency is superposed with the environmental noise is avoided.
As a possible implementation manner, the present embodiment may determine the sound intensity of the total sound data after S401 and before S402, specifically as follows: and performing A weighting processing on the audio frequency spectrum energy of the total sound data to obtain weighted frequency spectrum energy, and determining the sound intensity of the audio sound according to the mapping relation between the weighted frequency spectrum energy and the sound intensity.
The following process of determining the sound intensity of the audio sound and the environmental noise is described by taking a mobile phone as an example:
a microphone of the mobile phone is adopted to pick up a sound signal of a scene. When the handset speaker plays audio, the microphone picks up total sound data including audio data and ambient noise (data length of each frame is set to N). And calculating the spectral energy H (w) of the total sound data of the frame by using a Welch spectral estimation method. W is frequency, and w can take a frequency value of 0-fs/2 because the frequency domain signal has conjugate symmetry property, and fs represents the sampling rate of the audio signal.
In order to meet the loudness perception characteristics of human ears on different frequencies, A weighting processing is carried out on the spectrum energy, namely: hweight (w) ═ h (w) aweight (w)2(ii) a Wherein the function AWeight () represents providing different weight values for different frequencies. Since h (w) is the spectral energy value, not the amplitude value, the weighting value is the square of the amplitude weight.
The energy value E of one frame of total sound data per unit time can be expressed as:
E=mean(HWeight(w))/(N/fs);
wherein the function mean represents the averaging of the vectors.
Converting the energy value of the total sound data of one frame into the sound intensity Eon, namely:
Eon=10*log10(E)+C;
where the function log10() represents the base 10 logarithm and the constant C represents the correction value.
After obtaining the sound intensity Eon of the total sound data, the mobile phone loudspeaker can pause playing the audio, and pick up the ambient noise at the same position. The operations of Welch spectrum estimation, a weighting process, energy value calculation and energy value conversion into sound intensity, which are the same as those of the sound signal, can be performed on the environmental noise, and finally, the sound intensity Eoff of the environmental noise is obtained. Generally, a decibel value of Eon greater than Eoff exceeds 20dB makes it easy to hear the sound played by the speaker. The sound intensity Eon energy of the total sound data should not exceed 90 dB. Furthermore, when the mobile phone uses the earphone to play audio, the sound outlet hole of the earphone playing audio can be aligned to the sound pick-up hole of the microphone of the mobile phone, so that the intensity of the sound signal emitted by the earphone can be measured. The embodiment provides a simple and feasible scheme for testing the sound intensity of the listening environment of the user, and the embodiment can provide the digital calibration values of the total sound intensity and the relative intensity of the audio frequency of the current environment for the user without a professional acoustic microphone, so that the user can more scientifically and intuitively sense the listening intensity, and can also be used for judging whether the current listening intensity exceeds the warning range.
Referring to fig. 5, fig. 5 is another volume adjustment method provided in this embodiment of the present application, where the volume adjustment method provided in this embodiment may be applied to a process of passively adjusting volume of a device, and this embodiment may specifically include the following operations:
s501: collecting auditory characteristic information of human ears;
wherein, the sensitivity of human ears to sounds of different frequencies is different, and the human ear auditory characteristic information is used for describing the sensitivity of human ears to sounds of multiple frequencies. The more sensitive a human ear is to a sound of a certain frequency, the easier it is to recognize the sound at that frequency when the sound volume is low. For example, the xiaoming is more sensitive to 125Hz audio than to 700Hz audio, and can hear the 125Hz audio only when the sound intensity of the 125Hz audio is 25 db, cannot hear the 700Hz audio when the sound intensity of the 700Hz audio is 25 db, and can hear the 700Hz audio only when the sound intensity of the 700Hz audio is increased by 60 db.
S502: if a volume adjusting instruction is received, determining a volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears;
the volume adjustment instruction may be an instruction sent by a user or other equipment, and the volume adjustment instruction may include an instruction for increasing the volume and may also include an instruction for decreasing the volume. In the related art, when a device is instructed to adjust the volume, the amplitude of a time domain signal of an audio frequency is often directly increased, and the energy of each frequency domain of the audio frequency is increased in the same proportion. For example, for partial audio, the volume setting is already large, but some details cannot be heard at this time because the human ear is sensitive to sounds of different frequencies to a different extent, and if the volume is increased further, although details can be heard, the user may feel uncomfortable because the volume of the partial frequencies is significantly too large. In order to solve the problem, the volume adjustment parameter corresponding to the target audio is determined according to the auditory characteristic information of the human ear, the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity of the same frequency.
S503: and adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
In this embodiment, the frequency-domain signal amplitude of the target audio is adjusted according to the frequency amplitude variation corresponding to each frequency in the volume adjustment parameter, so that the energy variation of the frequency with higher sound sensitivity is smaller, and the energy variation of the frequency with lower sound sensitivity is larger. By the frequency domain signal amplitude adjusting mode of the embodiment, the sound intensity of the frequency band which is not sensitive to the user can be amplified emphatically, so that the user can hear all details of the target audio clearly.
When a user wants to adjust the volume to a large value, the loudness of the current sound cannot guarantee that the user can clearly listen to the played content. It is conventional practice to increase the time domain signal amplitude values from the point of view of the time domain signal. From the angle of the frequency domain, the related technical method is equivalent to performing equal amplitude lifting on the energy of each frequency point of the signal. The reality may be that the user simply cannot hear the content in some frequency bands. The energy of the frequency points is raised with equal amplitude, so that users feel too loud and uncomfortable to the frequency bands which are heard clearly. For such a situation, in this embodiment, the sound sensitivity levels of the human ear at multiple frequencies are determined by obtaining the auditory characteristic information of the human ear, and after receiving the volume adjustment instruction, the frequency domain signal amplitudes of each frequency in the target audio are adjusted to different degrees according to the auditory characteristic of the human ear, so as to increase the sound intensity variation of the non-sensitive frequency band of the human ear and reduce the sound intensity variation of the sensitive frequency band of the human ear. The volume can be adjusted according to the individual adjustment of the hearing characteristics of the human ears by the volume adjusting scheme of the embodiment, the condition that the sound intensity of other frequencies is too large due to amplification of the details of the inaudible partial frequencies in the volume adjusting process can be effectively avoided, the volume can be adjusted reasonably, and hearing damage caused by too large volume is avoided. The human ear auditory characteristic information acquisition process of the embodiment is simple and efficient, a user only needs to feed back whether the test signal is heard or not without manually adjusting the gain of the test signal, the sound measurement intensity is determined by the user auditory characteristic through the inflection point increasing the attenuation, the test speed is accelerated, and the user ear is protected from being damaged to the maximum extent.
As a further description of fig. 5, the present embodiment may determine the volume adjustment parameter corresponding to the target audio by: determining a frequency weight value according to the human ear auditory feature information, determining frequency amplitude variation of all frequencies in the target audio according to the frequency weight values corresponding to all frequencies, and generating a volume adjustment parameter according to the frequency amplitude variation of all frequencies; the frequency weight value is the ratio of the sensitive sound intensity of the human ear at a target frequency to the sensitive sound intensity difference, the sensitive sound intensity difference is the difference between a first sensitive sound intensity and a second sensitive sound intensity, the first sensitive sound intensity is the sensitive sound intensity of the frequency which is the least sensitive to the human ear, and the second sensitive sound intensity is the sensitive sound intensity of the frequency which is the most sensitive to the human ear; the frequency weight value is positively correlated with the frequency amplitude variation.
Specifically, the embodiment may determine the sensitive sound intensity H of the most sensitive frequency of the human ear according to the auditory feature information of the human earminAnd the sensitive sound intensity H of the frequency most insensitive to the human earmaxThen, determining a volume adjustment parameter corresponding to the target audio by using a volume adjustment formula; the volume adjustment parameter includes an actual frequency amplitude variation Δ F corresponding to each frequency.
Wherein the volume adjustment formula is
Figure BDA0002978841580000131
Δ F' is the target frequency amplitude variation, H, corresponding to the volume adjustment commandxThe intensity of the sensitive sound of the human ear at the x-th frequency point. By the method, the frequency point which is least sensitive to the user can be increased by the sound intensity variation xdB corresponding to the volume adjustment instruction, the most sensitive frequency point is not increased, and the gain values of the rest frequency points are between (0, x) dB. The volume adjustment scheme provided by the embodiment and combined with the auditory feature amplifies the energy amplitude of the overall time domain signal, but amplifies the detail frequency band which is not clearly heard by the user. The sound adjusting method not only ensures that the user can clearly listen to the contents of all frequency bands, but also avoids the condition that the ears of the user are damaged due to the fact that the loudness of individual sensitive frequency points is overlarge because the time domain amplifying method does not do any frequency division.
Referring to fig. 6, fig. 6 is a flowchart of a method for collecting auditory characteristic information of a human ear according to an embodiment of the present application, where this embodiment is a further description of collecting auditory characteristic information of a human ear according to the embodiment of fig. 5, and a further implementation may be obtained by combining the embodiments of fig. 5 according to this embodiment, and this embodiment may include the following steps:
s601: sequentially playing single-frequency sound signals, and determining sound sensitivity information according to user feedback information;
the single-frequency sound signal may be a signal in an auditory test audio library, a plurality of single-frequency sound signals may exist in the auditory test audio library, and a single-frequency sound signal refers to a sound signal including only a certain frequency. When playing the single-frequency sound signal, the user can feed back whether to hear the feedback information of the single-frequency sound signal, so as to determine the sensitivity of the user to the frequency of the frequency band sound signal according to the feedback information of the user. The user feedback information may include a sensitive sound intensity of the human ear to all of the mono-frequency sound signals, the sensitive sound intensity being a sound intensity of the mono-frequency sound signal when the mono-frequency sound signal is just audible or just inaudible to the user, the sensitive sound intensity being inversely related to the degree of sound sensitivity.
S602: taking the sound intensity of all single-frequency sound signals at the equal loudness curve as standard sound intensity;
s603: and comparing the sound intensity of the standard sound intensity and the sensitive sound intensity corresponding to the same frequency, and determining the auditory characteristic information of the human ears according to the comparison result of the sound intensity.
In the embodiment, the sensitive sound intensity is compared with the standard sound intensity to obtain the auditory characteristic information of human ears.
The following describes the process of comparing the sensitive sound intensity with the standard sound intensity to obtain the auditory feature information of human ears by way of example in practical application: the sensitivity sound intensities of the testee at 31.5Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz and 16kHz are determined, and a vector earH formed by the sensitivity sound intensities corresponding to the 10 frequencies is used as the sound sensitivity information. On the equal loudness curve of 40phon, the loudness values (i.e., standard sound intensity) of the above 10 bins are sequentially taken and recorded as a vector phonH. And calculating the difference between the test result and the trend of the equal loudness curve according to an auditory characteristic calculation formula of the human ear, so as to obtain auditory characteristic information of the human ear of the user. The human ear auditory characteristic calculation formula is as follows:
hearH=phonH–(earH+mean(phonH-earH));
wherein the function mean represents the averaging of the vectors.
Referring to fig. 7, fig. 7 is a flowchart of a method for determining sound sensitivity information according to an embodiment of the present application, where the embodiment is further described with reference to S601 in the embodiment corresponding to fig. 6, and a further implementation manner can be obtained by combining the embodiment with the embodiment corresponding to fig. 6, where the embodiment may include the following steps:
s701: and selecting and playing a target single-frequency sound signal from the single-frequency sound signals of the hearing test audio library.
In this embodiment, after the target tone sound signal is selected, the selected target tone sound signal may be marked, so that the unmarked tone sound signal is selected as the target tone sound signal for playing when S701 is executed next time.
S702: adjusting the sound intensity of the target single-frequency sound signal according to the sequence from small to large; and if first user feedback information is received, taking the sound intensity of the target single-frequency sound signal corresponding to the receiving time of the first confirmation information as a first reference sound intensity.
S703: and adjusting the sound intensity of the target single-frequency sound signal according to the sequence from large to small, and if second user feedback information is received, taking the sound intensity of the target single-frequency sound signal corresponding to the receiving time of the second confirmation information as a second reference sound intensity.
The present embodiment does not limit the execution sequence of S702 and S703. The first confirmation information is: in performing S702 of adjusting the sound intensity of the target mono-frequency sound signal in order from small to large, information generated when the user clicks the button that has been heard just when hearing the sound. The second confirmation information is: in the process of performing S703 of adjusting the sound intensity of the target mono-frequency sound signal in order from large to small, the user clicks the information generated when the button that is not heard when the user just does not hear the sound.
S704: and determining the sensitive sound intensity of the human ear to the target single-frequency sound signal according to the first reference sound intensity and the second reference sound intensity.
The first reference sound intensity is the sound intensity at which the user just hears the target single-frequency sound signal, and the second reference sound intensity is the sound intensity at which the user just cannot hear the target single-frequency sound signal, so that the sensitive sound intensity of the human ear to the target single-frequency sound signal can be determined according to the first reference sound intensity and the second reference sound intensity.
The process of determining the intensity of the sensitive sound in S701-S704 is illustrated as follows: the left and right sound channels play single-frequency sound signals of 31.5Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz and 16kHz in sequence as test audio. The amplitude (i.e. energy) of the single-frequency sound signal shows a trend of changing from weak to strong and then from strong to weak, and the unit of the trend is dB. Specifically, the sound intensity of the target single-frequency sound signal may be adjusted in the order from small to large, and then the sound intensity of the target single-frequency sound signal may be adjusted in the order from large to small, in the first half of the test, the speed of changing the amplitude value from weak to strong is fast, and the test subject may experience a sound process from non-existent. When just beginning to hear the sound, the "i hear" button is pressed; in the latter half, the speed at which the amplitude value becomes weaker from strong to weak is slower, and the subject may experience a process from the presence to the absence of sound. When the sound is just not heard, the button "i can't hear" is pressed. The law of the sound intensity change of the target single-frequency sound signal is not limited to linear change, and other patterns such as exponential change can be adopted.
As a possible implementation manner, this step may directly use an average value of the first reference sound intensity and the second reference sound intensity as the sensitive sound intensity of the human ear to the target single-frequency sound signal.
As another possible implementation, the step may first determine whether the sound intensity difference between the first reference sound intensity and the second reference sound intensity is within an expected error range; if so, taking the average value of the first reference sound intensity and the second reference sound intensity as the sensitive sound intensity of the human ear to the target single-frequency sound signal; if not, the target single-frequency sound signal is played again, and the sound intensity of the target single-frequency sound signal is adjusted, so that a new first reference sound intensity and a new second reference sound intensity are determined according to the user feedback information. By the method, when the difference between the first reference sound intensity and the second reference sound intensity is too large, the target single-frequency sound signal can be played again, and the correlation operations of S702 and S703 are executed to re-determine the new first reference sound intensity and the new second reference sound intensity, so that the error in the measurement process is reduced, and the accuracy of the sound sensitivity information is improved.
S705: judging whether the sensitive sound intensity of human ears to all single-frequency sound signals is obtained; if yes, entering S706; if not, the process proceeds to S701.
S706: and generating the sound sensitivity information according to the sensitive sound intensity of human ears to all single-frequency sound signals.
In the embodiment, the sound intensity of the target single-frequency sound signal is adjusted from small to large or from large to small, and the sound intensity of the single-frequency sound signal when the user just can hear or just cannot hear the single-frequency sound signal is determined, so that the sensitive sound intensity of the user to each single-frequency sound signal is obtained. In the process, the sound sensitivity information can be obtained by testing the single-frequency sound signal, so that the acquisition efficiency of the sound sensitivity information is improved.
As a further description of the corresponding embodiment of fig. 7, in this embodiment, in S701, a target single-frequency sound signal with a sound intensity of 0db may be played, and then the operations of S702 and S703 are performed in sequence, where the execution logic of S702 and S703 is as follows:
step 1: and playing the target single-frequency sound signal with the sound intensity of 0 dB.
Step 2: the sound intensity of the target single-frequency sound signal is adjusted from small to large.
And step 3: and if the current sound intensity of the target single-frequency sound signal is equal to the maximum test sound intensity, executing the operation of adjusting the sound intensity of the target single-frequency sound signal in the descending order.
And 4, step 4: and if the residual sound intensity increase value is smaller than a preset sound intensity increase value, after the sound intensity of the target single-frequency sound signal is adjusted to the test sound intensity maximum value, executing the operation of adjusting the sound intensity of the target single-frequency sound signal according to the sequence from large to small.
Wherein the remaining sound intensity increase value is a difference between the maximum test sound intensity value and the sound intensity of the target single-frequency sound signal when the first user feedback information is received.
And 5: if the remaining sound intensity increase value is greater than a preset sound intensity increase value, performing the operation of adjusting the sound intensity of the target single-frequency sound signal in order from large to small after increasing the sound intensity of the target single-frequency sound signal by the preset sound intensity increase value.
The process of the above steps 3, 4 and 5 regarding how to adjust the sound intensity of the target mono-frequency sound signal according to the remaining sound intensity increase value and the preset sound intensity increase value is exemplified:
please refer to fig. 8, fig. 8 is a schematic diagram of sound intensity adjustment according to an embodiment of the present application, in which m in fig. 8 is a maximum value of a test sound intensity, a is a point where a user just hears a target single-frequency sound signal, b is a point where the user just cannot hear the target single-frequency sound signal, an abscissa in fig. 8 is time, and an ordinate is sound intensity. If the sound intensity that the user hears and cannot hear for the target single-frequency sound signal is at the value of n1(n1< m), the sound intensity starts to decrease after increasing by the minimum value of the preset sound intensity increase value and the remaining sound intensity increase value (i.e., m-n1) when the user presses the "i'm hear" button at point a throughout the change. Therefore, the time for searching the point b can be shortened, and the situation that the loudness of the sound exceeds the bearing range of the user because the loudness of the sound is continuously increased to the preset value m after the user hears the sound is avoided. If the sound intensity heard and not heard by the user for the target single-frequency sound signal is at the value of n2(n2> m), the signal amplitude value is still unable to be heard even if it is increased to the preset maximum value m. The user is therefore considered to be less sensitive to sound at this frequency when the user has not pressed any button at all times and the signal amplitude value has fallen back around the preset minimum value. And finally, the test result at the frequency point is m, namely the preset maximum value is the critical value which can not be heard or heard.
Specifically, if the maximum sound intensity is 50 db, the preset sound intensity increase value is 10 db; in the process of adjusting the sound intensity in the order from small to large, if the user clicks the audible button to generate the first user feedback information at 30 db, the present embodiment may perform the operation of adjusting the sound intensity of the target single-frequency sound signal in the order from large to small after increasing the sound intensity to 40 db; if the user clicks the audible button to generate the first user feedback information at 45 db, the present embodiment may perform the operation of adjusting the sound intensity of the target single-frequency sound signal in the order from large to small after increasing the sound intensity to 50 db; and if the sound intensity of the target single-frequency sound signal is detected to reach 50 decibels, whether the first user feedback information is received or not is carried out, the operation of adjusting the sound intensity of the target single-frequency sound signal according to the sequence from large to small is carried out.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a volume adjustment device according to an embodiment of the present application, where the volume adjustment device includes:
a noise energy distribution determining module 901, configured to acquire environmental noise and determine noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value;
a reference energy value determining module 902, configured to select, according to the noise energy distribution information, a noise energy value corresponding to the N target frequencies as a reference energy value;
an adjusting parameter determining module 903, configured to perform equalization preprocessing on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio;
an amplitude adjusting module 904, configured to adjust the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
The present embodiment determines noise energy distribution information of the environmental noise after acquiring the environmental noise, where the noise energy distribution information includes a noise energy value of each frequency in the environmental noise. In this embodiment, the noise energy value corresponding to the N target frequencies is selected as the reference energy value according to the noise energy distribution information, and then the target audio is subjected to equalization preprocessing according to the reference energy value to obtain the signal adjustment parameter. Because the signal adjustment parameter includes the target frequency amplitude variation corresponding to each frequency in the target audio, when the frequency domain signal amplitude of the target audio is adjusted by using the signal adjustment parameter, the frequency amplitude variation corresponding to each frequency in the target audio can be related to the noise energy value of the same frequency. By the adjusting method, the target audio frequency can be adjusted to have a larger energy value in a frequency domain with a larger noise energy value, and can be adjusted to have a smaller energy value in a frequency domain with a smaller noise energy value, so that the energy of the target audio frequency compared with the energy of the environmental noise is increased in each frequency band. Therefore, the volume adjustment method provided by this embodiment adjusts the frequency domain signal amplitude of each frequency of the target audio according to the environmental noise, so as to adjust the volume reasonably and reduce the influence of the environmental noise on the audio listening effect.
Further, the amplitude adjustment module 904 comprises:
the amplitude variation determining unit is used for determining the target frequency amplitude variation of the target audio played at the current moment according to the signal adjusting parameter;
the slow adjusting unit is used for determining the actual frequency amplitude variation of the target audio played at the current moment and adjusting the frequency domain signal amplitude of the target audio according to the actual frequency amplitude variation of the target audio played at the current moment; the actual frequency amplitude variation of the target audio played at the current moment is within an amplitude variation interval; the amplitude variation interval is an open interval, and the endpoint value of the amplitude variation interval is the actual frequency amplitude variation of the target audio played at the last moment and the target frequency amplitude variation of the target audio played at the current moment.
Further, the reference energy value determining module 902 includes:
the normalization unit is used for normalizing and mapping the noise energy value in the noise energy distribution information to a target interval;
and the energy value selecting unit is used for selecting the noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information after the normalized mapping.
Further, the method also comprises the following steps:
the sound pickup module is used for picking up total sound data when the target audio is played by using a sound pickup device after the frequency domain signal amplitude of the target audio is adjusted according to the noise energy distribution information; wherein the total sound data includes sound of the target audio and ambient noise;
the volume adjusting module is used for judging whether the sound intensity of the total sound data is greater than a rated decibel value or not; if so, executing a first preset operation and/or a second preset operation; the first preset operation is prompt information with overlarge generated volume; the second preset operation is to reduce the frequency domain signal amplitude of the target audio.
Further, the noise energy distribution determining module 901 is configured to calculate a noise spectrum energy of the environmental noise; and the system is also used for performing A-weighted inverse numerical weighting operation on the noise spectrum energy to obtain noise energy distribution information of the environmental noise.
Further, the method also comprises the following steps:
the auditory characteristic acquisition module is used for acquiring auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
the adjusting parameter determining module is used for determining the volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears if a volume adjusting instruction is received; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and the volume adjusting module is used for adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
Further, the auditory feature acquisition module comprises:
the sensitivity information determining unit is used for sequentially playing the single-frequency sound signals and determining the sound sensitivity information according to the user feedback information; wherein the sound sensitivity information comprises a sensitive sound intensity of human ears to all the single-frequency sound signals, and the sensitive sound intensity is inversely related to the sound sensitivity degree;
the standard sound intensity determining unit is used for taking the sound intensity of the frequencies of all the single-frequency sound signals in the equal loudness curve as standard sound intensity;
and the comparison unit is used for comparing the sound intensity of the standard sound intensity and the sensitive sound intensity corresponding to the same frequency, and determining the human ear auditory characteristic information according to the sound intensity comparison result.
Further, the sensitivity information determining unit is configured to use an average value of the first reference sound intensity and the second reference sound intensity as the sensitive sound intensity of the human ear to the target single-frequency sound signal if the difference between the sound intensities of the first reference sound intensity and the second reference sound intensity is within an expected error range; the first reference sound intensity is a sound intensity corresponding to the user feedback information received in a first process, the second reference sound intensity is a sound intensity corresponding to the user feedback information received in a second process, the first process is a process of adjusting the sound intensity of the single-frequency sound signals in a descending order, and the second process is a process of adjusting the sound intensity of the single-frequency sound signals in a descending order; and the controller is further configured to replay the single-frequency sound signal and adjust the sound intensity of the single-frequency sound signal if the difference between the sound intensities of the first reference sound intensity and the second reference sound intensity is not within an expected error range, so as to determine a new first reference sound intensity and a new second reference sound intensity according to user feedback information.
Further, the adjusting parameter determining module is used for determining a frequency weight value according to the human ear auditory characteristic information; the frequency weight value is the ratio of the sensitive sound intensity of the human ear at a target frequency to the sensitive sound intensity difference, the sensitive sound intensity difference is the difference between a first sensitive sound intensity and a second sensitive sound intensity, the first sensitive sound intensity is the sensitive sound intensity of the frequency which is the least sensitive to the human ear, and the second sensitive sound intensity is the sensitive sound intensity of the frequency which is the most sensitive to the human ear; the audio processing device is further used for determining frequency amplitude variation of all frequencies in the target audio according to the frequency weight values corresponding to all frequencies, and generating volume adjustment parameters according to the frequency amplitude variation of all frequencies; wherein the frequency weight value is positively correlated with the frequency amplitude variation.
Referring to fig. 10, fig. 10 is a schematic structural diagram of another volume adjusting device provided in the embodiment of the present application, where the volume adjusting device includes:
an auditory characteristic collection module 1001 for collecting auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
an adjusting parameter determining module 1002, configured to determine, if a volume adjusting instruction is received, a volume adjusting parameter corresponding to a target audio according to the auditory characteristic information of a human ear; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and the volume adjusting module 1003 is configured to adjust the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
In this embodiment, the frequency-domain signal amplitude of the target audio is adjusted according to the frequency amplitude variation corresponding to each frequency in the volume adjustment parameter, so that the energy variation of the frequency with higher sound sensitivity is smaller, and the energy variation of the frequency with lower sound sensitivity is larger. By the frequency domain signal amplitude adjusting mode of the embodiment, the sound intensity of the frequency band which is not sensitive to the user can be amplified emphatically, so that the user can hear all details of the target audio clearly.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present application further provides an electronic device, and referring to fig. 11, a structure diagram of an electronic device provided in an embodiment of the present application may include a processor 1110 and a memory 1120, as shown in fig. 11.
The processor 1110 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1110 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1110 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1110 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 1110 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory 1120 may include one or more computer-readable storage media, which may be non-transitory. The memory 1120 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 1120 is at least used for storing a computer program 1121, wherein after being loaded and executed by the processor 1110, the computer program can implement relevant steps in the volume adjustment method executed by the electronic device side disclosed in any of the foregoing embodiments. In addition, the resources stored by the memory 1120 may include, among other things, an operating system 1122 and data 1123, which may be stored in a transitory or persistent manner. Operating systems 1122 may include Windows, IOS, android, and the like, among others.
In some embodiments, the electronic device may also include a display screen 1130, input/output interface 1140, communication interface 1150, sensors 1160, power supply 1170, and communication bus 1180.
Of course, the structure of the electronic device shown in fig. 11 does not constitute a limitation of the electronic device in the embodiment of the present application, and the electronic device may include more or less components than those shown in fig. 11 or some components in combination in practical applications.
In another exemplary embodiment, a computer readable storage medium including program instructions is further provided, and the program instructions when executed by a processor implement the steps of the volume adjustment method performed by the electronic device according to any of the above embodiments.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (14)

1. A method of adjusting volume, comprising:
acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value;
selecting noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information;
carrying out equalization pretreatment on the target audio according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio;
and adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
2. The volume adjustment method of claim 1, wherein adjusting the frequency domain signal amplitude of the target audio according to the signal adjustment parameter comprises:
determining the target frequency amplitude variation of the target audio played at the current moment according to the signal adjusting parameter;
determining the actual frequency amplitude variation of the target audio played at the current moment, and adjusting the frequency domain signal amplitude of the target audio according to the actual frequency amplitude variation of the target audio played at the current moment; the actual frequency amplitude variation of the target audio played at the current moment is within an amplitude variation interval; the amplitude variation interval is an open interval, and the endpoint value of the amplitude variation interval is the actual frequency amplitude variation of the target audio played at the last moment and the target frequency amplitude variation of the target audio played at the current moment.
3. The volume adjustment method according to claim 1, wherein selecting a noise energy value corresponding to N target frequencies as a reference energy value according to the noise energy distribution information comprises:
normalizing and mapping the noise energy value in the noise energy distribution information to a target interval;
and selecting the noise energy values corresponding to the N target frequencies as reference energy values according to the noise energy distribution information after the normalized mapping.
4. The volume adjustment method according to claim 1, further comprising, after adjusting the frequency domain signal amplitude of the target audio according to the noise energy distribution information:
picking up total sound data when the target audio is played by using a sound pickup device; wherein the total sound data includes sound of the target audio and ambient noise;
judging whether the sound intensity of the total sound data is greater than a rated decibel value or not;
if so, executing a first preset operation and/or a second preset operation; the first preset operation is prompt information with overlarge generated volume; the second preset operation is to reduce the frequency domain signal amplitude of the target audio.
5. The volume adjustment method of claim 1, wherein determining noise energy distribution information of the ambient noise comprises:
calculating the noise spectrum energy of the environmental noise;
and performing A-weighted inverse numerical weighting operation on the noise spectrum energy to obtain noise energy distribution information of the environmental noise.
6. The volume adjustment method according to any one of claims 1 to 5, further comprising:
collecting auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
if a volume adjusting instruction is received, determining a volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
7. The volume adjustment method according to claim 6, wherein the collecting of the auditory characteristic information of the human ear comprises:
sequentially playing single-frequency sound signals, and determining sound sensitivity information according to user feedback information; wherein the sound sensitivity information comprises a sensitive sound intensity of human ears to all the single-frequency sound signals, and the sensitive sound intensity is inversely related to the sound sensitivity degree;
taking the sound intensity of the frequencies of all the single-frequency sound signals on the equal loudness curve as standard sound intensity;
and comparing the sound intensity of the standard sound intensity and the sensitive sound intensity corresponding to the same frequency, and determining the auditory characteristic information of the human ears according to the comparison result of the sound intensity.
8. The volume adjustment method of claim 7, wherein the determining the sound sensitivity information according to the user feedback information comprises:
if the difference between the sound intensity of the first reference sound intensity and the sound intensity of the second reference sound intensity is within an expected error range, taking the average value of the first reference sound intensity and the second reference sound intensity as the sensitive sound intensity of the human ear to the target single-frequency sound signal; the first reference sound intensity is a sound intensity corresponding to the user feedback information received in a first process, the second reference sound intensity is a sound intensity corresponding to the user feedback information received in a second process, the first process is a process of adjusting the sound intensity of the single-frequency sound signals in a descending order, and the second process is a process of adjusting the sound intensity of the single-frequency sound signals in a descending order;
if the difference between the first reference sound intensity and the second reference sound intensity is not within the expected error range, the single-frequency sound signal is replayed, and the sound intensity of the single-frequency sound signal is adjusted, so that the new first reference sound intensity and the new second reference sound intensity are determined according to user feedback information.
9. The volume adjustment method according to claim 6, wherein the determining the volume adjustment parameter corresponding to the target audio according to the auditory characteristic information of human ears comprises:
determining a frequency weight value according to the human ear auditory characteristic information; the frequency weight value is the ratio of the sensitive sound intensity of the human ear at a target frequency to the sensitive sound intensity difference, the sensitive sound intensity difference is the difference between a first sensitive sound intensity and a second sensitive sound intensity, the first sensitive sound intensity is the sensitive sound intensity of the frequency which is the least sensitive to the human ear, and the second sensitive sound intensity is the sensitive sound intensity of the frequency which is the most sensitive to the human ear;
determining frequency amplitude variation of all frequencies in the target audio according to the frequency weight values corresponding to all frequencies, and generating volume adjustment parameters according to the frequency amplitude variation of all frequencies; wherein the frequency weight value is positively correlated with the frequency amplitude variation.
10. A method of adjusting volume, comprising:
collecting auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
if a volume adjusting instruction is received, determining a volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
11. A volume adjustment device, comprising:
the noise energy distribution determining module is used for acquiring environmental noise and determining noise energy distribution information of the environmental noise; wherein, the noise energy distribution information comprises the corresponding relation between the frequency and the noise energy value;
a reference energy value determining module, configured to select, according to the noise energy distribution information, a noise energy value corresponding to the N target frequencies as a reference energy value;
the equalization preprocessing module is used for carrying out equalization preprocessing on the target audio frequency according to the reference energy value to obtain a signal adjusting parameter; wherein the signal conditioning parameter comprises a target frequency amplitude variation corresponding to each frequency in the target audio;
and the amplitude adjusting module is used for adjusting the frequency domain signal amplitude of the target audio according to the signal adjusting parameter.
12. A volume adjustment device, comprising:
the auditory characteristic acquisition module is used for acquiring auditory characteristic information of human ears; wherein the human auditory characteristic information is used for describing the sound sensitivity degree of human ears at a plurality of frequencies;
the adjusting parameter determining module is used for determining the volume adjusting parameter corresponding to the target audio according to the auditory characteristic information of human ears if the volume adjusting instruction is received; the volume adjustment parameter comprises a frequency amplitude variation corresponding to each frequency in the target audio, and the frequency amplitude variation is inversely related to the sound sensitivity degree of the same frequency;
and the volume adjusting module is used for adjusting the frequency domain signal amplitude of the target audio according to the volume adjusting parameter.
13. An electronic device comprising a memory in which a computer program is stored and a processor which, when called into the memory, implements the steps of the volume adjustment method according to any one of claims 1 to 10.
14. A storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out the steps of a method of volume adjustment as claimed in any one of claims 1 to 10.
CN202110289721.9A 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium Active CN112954115B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210509734.7A CN114979363A (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium
CN202110289721.9A CN112954115B (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110289721.9A CN112954115B (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210509734.7A Division CN114979363A (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112954115A true CN112954115A (en) 2021-06-11
CN112954115B CN112954115B (en) 2022-07-01

Family

ID=76228921

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110289721.9A Active CN112954115B (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium
CN202210509734.7A Pending CN114979363A (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210509734.7A Pending CN114979363A (en) 2021-03-16 2021-03-16 Volume adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (2) CN112954115B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613145A (en) * 2021-08-09 2021-11-05 深圳分贝声学科技有限公司 Noise reduction processing method and related device
CN115148221A (en) * 2022-06-23 2022-10-04 中国第一汽车股份有限公司 Sound control method and control device for pulse heating of power battery
CN116092458A (en) * 2023-02-10 2023-05-09 牡丹江师范学院 Vocal music adjusting system and method based on big data
CN116208700A (en) * 2023-04-25 2023-06-02 深圳市华卓智能科技有限公司 Control method and system for communication between mobile phone and audio equipment
WO2023220918A1 (en) * 2022-05-17 2023-11-23 华为技术有限公司 Audio signal processing method and apparatus, storage medium and vehicle

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110038490A1 (en) * 2009-08-11 2011-02-17 Srs Labs, Inc. System for increasing perceived loudness of speakers
US20110251704A1 (en) * 2010-04-09 2011-10-13 Martin Walsh Adaptive environmental noise compensation for audio playback
CN102270454A (en) * 2010-06-07 2011-12-07 宇达电脑(上海)有限公司 method and device for improving audio output
CN107124149A (en) * 2017-05-05 2017-09-01 北京小鱼在家科技有限公司 A kind of method for regulation of sound volume, device and equipment
WO2019033439A1 (en) * 2017-08-18 2019-02-21 广东欧珀移动通信有限公司 Volume adjustment method, apparatus, storage medium, and mobile terminal
WO2019178809A1 (en) * 2018-03-22 2019-09-26 华为技术有限公司 Method for adjusting volume, and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110038490A1 (en) * 2009-08-11 2011-02-17 Srs Labs, Inc. System for increasing perceived loudness of speakers
US20110251704A1 (en) * 2010-04-09 2011-10-13 Martin Walsh Adaptive environmental noise compensation for audio playback
CN102270454A (en) * 2010-06-07 2011-12-07 宇达电脑(上海)有限公司 method and device for improving audio output
CN107124149A (en) * 2017-05-05 2017-09-01 北京小鱼在家科技有限公司 A kind of method for regulation of sound volume, device and equipment
WO2019033439A1 (en) * 2017-08-18 2019-02-21 广东欧珀移动通信有限公司 Volume adjustment method, apparatus, storage medium, and mobile terminal
WO2019178809A1 (en) * 2018-03-22 2019-09-26 华为技术有限公司 Method for adjusting volume, and electronic device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613145A (en) * 2021-08-09 2021-11-05 深圳分贝声学科技有限公司 Noise reduction processing method and related device
CN113613145B (en) * 2021-08-09 2023-03-03 深圳分贝声学科技有限公司 Noise reduction processing method and related device
WO2023220918A1 (en) * 2022-05-17 2023-11-23 华为技术有限公司 Audio signal processing method and apparatus, storage medium and vehicle
CN115148221A (en) * 2022-06-23 2022-10-04 中国第一汽车股份有限公司 Sound control method and control device for pulse heating of power battery
CN116092458A (en) * 2023-02-10 2023-05-09 牡丹江师范学院 Vocal music adjusting system and method based on big data
CN116208700A (en) * 2023-04-25 2023-06-02 深圳市华卓智能科技有限公司 Control method and system for communication between mobile phone and audio equipment

Also Published As

Publication number Publication date
CN114979363A (en) 2022-08-30
CN112954115B (en) 2022-07-01

Similar Documents

Publication Publication Date Title
CN112954115B (en) Volume adjusting method and device, electronic equipment and storage medium
US10880647B2 (en) Active acoustic filter with location-based filter characteristics
CN107124149B (en) Volume adjustment method, device and equipment
US20200133627A1 (en) Active Acoustic Filter with Automatic Selection of Filter Parameters Based on Ambient Sound
EP2395659B1 (en) Adaptive audio output
US8315400B2 (en) Method and device for acoustic management control of multiple microphones
EP3123613B1 (en) Collaboratively processing audio between headset and source to mask distracting noise
US20080069365A1 (en) Ambient noise sound level compensation
CN103259898B (en) The method of Automatic adjusument frequency response and terminal
US8363854B2 (en) Device and method for automatically adjusting gain
CN104798301A (en) Audio loudness control system
EP3777114B1 (en) Dynamically adjustable sidetone generation
CN111294719B (en) Method and device for detecting in-ear state of ear-wearing type device and mobile terminal
CN110113694B (en) Method and apparatus for controlling audio playback in an electronic device
US11579840B2 (en) Method for adjusting sound playback and portable device thereof
CN105872182A (en) Method for increasing sending loudness of microphone, and electronic terminal
US20200186923A1 (en) Methods, systems and apparatus for improved feedback control
CN116419111A (en) Earphone control method, parameter generation method, device, storage medium and earphone
CN115202605A (en) Audio processing method and device, terminal equipment and storage medium
CN114071307A (en) Earphone volume adjusting method, device, equipment and medium
CN114422893A (en) Noise reduction processing method and device, earphone and storage medium
WO2024061436A1 (en) Adaptive audio enhancement system
CN115914971A (en) Wind noise detection method and device, earphone and storage medium
CN116264658A (en) Audio adjusting system and audio adjusting method
CN116778949A (en) Personalized loudness compensation method, device, computer equipment and storage medium

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