Detailed Description
Referring to fig. 1, fig. 1 is a flowchart illustrating an output audio adjusting method according to a first embodiment of the present invention.
The output audio adjusting method comprises the following steps:
s101, acquiring the frequency of current environmental sound and the frequency of current output audio;
s102, judging whether the difference value of the frequency of the output audio and the frequency of the environmental sound is smaller than a preset threshold value or not;
s103, if the frequency is smaller than the preset threshold value, the frequency of the output audio is increased.
Wherein, for step S101, the frequency and volume of the environmental sound can be measured in real time by the sound sensor. The frequency and the volume of the output audio can be measured in real time through a sound sensor, and can also be obtained through reading related parameters of the output audio in audio and video data.
In particular, since the ambient sound may include noise of a plurality of different frequencies, the frequency of the ambient sound may be determined in any one of the following manners, but is not limited to the following manners:
the first mode is as follows: acquiring the frequency of the environmental sound with the highest frequency as the frequency of the current environmental sound; in this aspect, the highest-frequency ambient sound component is used as the frequency of the current ambient sound, so that the listening interference of the highest-frequency ambient sound on the output audio can be prevented, the frequency difference between the output audio and the ambient sound can be increased to the maximum extent, and the output audio can be made more prominent.
The second way is: acquiring the average frequency value of all the environmental sounds as the frequency of the current environmental sound; the frequency average value of the environmental sound is the frequency average value of all components with different frequencies contained in the environmental sound.
The third mode is as follows: respectively obtaining the frequency and the volume of all sub-environment sounds with different frequencies contained in the environment sound, and calculating the frequency of the current environment sound according to the following formula: f ═ F1 × a1/(a1+ a2 +; + Am) + F2 × a2/(a1+ a2 +; + Am) +. + Fm × Am/(a1+ a2 +; + Am))/m; wherein f is the calculated frequency of the current environment sound, and m is the number of the sub-environment sounds with different frequencies; fm is the frequency of the mth sub-environment sound, and Am volume is the volume of the mth sub-environment sound.
In the third method, the influence of the volume and the frequency of each component of all different frequencies contained in the environmental sound is considered, and the influence of the component with the large volume on the operation result f is also large, so that the influence of the frequency of the current environmental sound obtained by calculation in this way on the listening of the output audio can be reflected most truly.
In step S102, the frequency of the output audio is compared with the frequency of the acquired environmental sound, a difference between the frequencies is calculated, and whether the difference is smaller than a preset threshold is determined. The preset threshold value should be the minimum value allowed between the frequency of the output audio and the frequency of the environmental sound, and may be set to a positive number or a negative number as needed.
If the difference is smaller than the preset threshold value, it indicates that the frequency of the output audio is too low, step S103 needs to be executed to automatically adjust the frequency of the output audio; otherwise, the frequency of the output audio is high enough, and the step S103 is not executed, and the steps S101 and S102 are returned to, and the ambient sound and the frequency of the output audio are obtained again for comparison.
In step S103, the frequency of the output audio is adjusted. The frequency of the output audio may be increased in various ways, for example, by setting a frequency modulator on an output channel of the output audio to increase the output frequency. During frequency adjustment, the frequency of the output audio frequency can be increased by a preset value or several times.
In a preferred embodiment, the frequency of the output audio is adjusted according to the frequency of the environmental sound and a preset optimal frequency difference value, wherein the preset optimal frequency difference value can be specifically set according to different needs, preferably the sound frequency difference which enables the human ear hearing effect to be optimal, and can be set by referring to known physiological knowledge or determined according to an optimal hearing effect experience knowledge base table. While, when adjusting the frequency of the output audio, one of the following methods may be adopted, but not limited to:
the first method is to directly adjust the frequency of the output audio to be equal to the sum of the frequency of the environmental sound and a preset optimal frequency difference value;
judging whether the sum of the difference value of the frequency of the environmental sound and a preset optimal frequency is greater than a preset maximum frequency value or not; adjusting the frequency of the output audio to equal the frequency maximum if greater than the frequency maximum; otherwise, adjusting the frequency of the output audio to be equal to the sum of the frequency of the environmental sound and a preset optimal frequency difference value.
The two modes can keep the sound frequency difference with the best human ear auditory effect between the frequency of the output audio and the frequency of the environmental sound, so that the user can better listen to the content of the output audio. The second method sets the maximum frequency value, when the frequency of the environment audio is ultrahigh, the frequency of the output audio is not increased without limit, the phenomenon that the frequency of the output audio is overhigh and becomes harsh is prevented, and the listening requirement of a general user is met.
In particular, when the above method is adopted to adjust the frequency of the output audio, one of the sub-audio components in the plurality of sub-audios included in the output audio may be selected as a reference, so as to adjust the frequencies of all the sub-audios included in the output audio. The following methods can be specifically adopted:
adjusting the frequency of the sub audio frequency with the highest frequency contained in the output audio frequency to be equal to the sum of the frequency of the environmental sound and a preset optimal frequency difference value when the frequency of the output audio frequency is adjusted to be equal to the sum of the frequency of the environmental sound and the preset optimal frequency difference value; acquiring the frequency adjustment amplitude of the sub audio frequency with the highest frequency; adjusting the frequencies of all sub-audios contained in the output audio according to the frequency adjustment amplitude;
adjusting a frequency of a sub audio having a highest frequency included in the output audio to be equal to the frequency maximum value when adjusting the frequency of the output audio to be equal to the frequency maximum value; acquiring the frequency adjustment amplitude of the sub audio frequency with the highest frequency; and adjusting the frequencies of all sub-audios contained in the output audio according to the frequency adjustment amplitude.
The output audio adjusting method can determine and automatically adjust the sound frequency of the output audio according to the sound frequency of the environmental sound of the audience, so that a user does not need to manually adjust the sound of the audio and the video, and a better auditory effect is obtained.
Referring to fig. 2, fig. 2 is a flowchart illustrating an output audio adjusting method according to a second embodiment of the present invention.
The output audio adjusting method of the second embodiment is different from the first embodiment mainly in that it further includes the steps of:
s104, acquiring the volume value of the current environmental sound and the volume value of the current output audio;
s105, judging whether the difference value of the volume values of the output audio and the environment sound is smaller than a preset threshold value or not;
and S106, if the output audio volume is smaller than the preset threshold value, increasing the volume of the output audio.
For step S104, the volume of the environmental sound may be determined in any one of the following manners, but is not limited to the following manners:
the first mode is as follows: and acquiring the volume value of the environmental sound with the highest frequency as the volume value of the current environmental sound. The environment sound component with the highest volume is used as the volume of the current environment sound, so that the listening interference of the environment sound with the highest volume to the output audio can be prevented, the volume difference between the output audio and the environment sound is improved to the maximum extent, and the output audio is more prominent.
The second way is: and acquiring the volume average value of all the environment sounds as the volume value of the current environment sound. The volume average value of the ambient sound is the volume average value of all components with different frequencies included in the ambient sound.
The third mode is as follows: respectively obtaining the frequency and the volume of all sub-environment sounds with different frequencies contained in the environment sound, and calculating the volume value of the current environment sound according to the following formula: a ═ F1 ═ F1/(F1+ F2+. + Fm) + a2 × F2/(F1+ F2+. + Fm) +. Am · Fm/(F1+ F2+. + Fm))/m; wherein, a is the calculated volume value of the current environment sound, and m is the number of the sub-environment sounds with different frequencies; fm is the frequency of the mth sub-environment sound, and Am volume is the volume of the mth sub-environment sound.
In the third method, the influence of the volume and the frequency size of each component of all different frequencies contained in the environmental sound is considered, and the influence of the component with high frequency on the operation result a is also large, so that the volume of the current environmental sound calculated and obtained by the method can most truly reflect the influence of the volume of the environmental sound on the listening of the output audio.
In step S105, the volume of the output audio is compared with the frequency of the acquired environmental sound, a difference between the volume of the output audio and the frequency of the acquired environmental sound is calculated, and whether the difference is smaller than a preset threshold is determined. The preset threshold value should be the minimum value allowed between the volume of the output audio and the volume of the ambient sound, and may be set to a positive number or a negative number as needed.
If the difference is smaller than the preset threshold value, it indicates that the volume of the output audio is too low, step S106 needs to be executed to automatically adjust the volume of the output audio; otherwise, the volume of the output audio is already high enough, and the step S106 is not executed, and the process returns to the steps S104 and S105 to re-acquire the ambient sound and compare the volume of the output audio.
In step S106, the volume of the output audio is adjusted. The output audio volume can be increased in various ways, for example, a power amplifier on an output channel of the output audio is set, and the amplification factor of the output frequency is increased. When the volume is adjusted, the volume of the output audio can be increased by a preset value or several times.
In a preferred embodiment, the volume of the output audio is adjusted according to the volume of the environmental sound and a preset optimal volume difference, wherein the preset optimal volume difference can be specifically set according to different needs, preferably the volume difference which enables the human ear hearing effect to be optimal, and can be set by referring to known physiological knowledge or judged according to an optimal hearing effect experience knowledge base table. Then when adjusting the volume of the output audio, one of the following methods may be taken, but not limited to:
the first method is to directly adjust the volume of the output audio to be equal to the sum of the volume of the environment sound and a preset optimal volume difference;
judging whether the sum of the volume of the environmental sound and a preset optimal volume difference value is larger than a preset maximum volume value or not; if the volume is greater than the volume maximum, adjusting the volume of the output audio to be equal to the volume maximum; otherwise, adjusting the volume of the output audio to be equal to the sum of the volume of the environment sound and a preset optimal volume difference value.
The two modes can ensure that the sound volume difference with the best auditory effect of human ears is kept between the volume of the output audio and the volume of the environmental sound, so that a user can better listen to the content of the output audio. The second method sets the maximum value of the volume, when the volume of the environment sound is ultrahigh, the volume of the output audio is not increased without limit, the phenomenon that the volume of the output audio is overhigh and becomes harsh is prevented, and the listening requirement of a general user is met.
The output audio adjusting method can determine and automatically adjust the sound frequency and the volume of the output audio according to the sound frequency and the volume of the environmental sound of the audience, so that a user does not need to manually adjust the sound frequency and the volume of the audio and the video, and a better auditory effect is obtained.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an output audio conditioning system according to a first embodiment of the present invention.
The output audio conditioning system includes:
a frequency obtaining module 11, configured to obtain a frequency of a current environmental sound and a frequency of a current output audio;
a frequency discrimination module 12, configured to determine whether a difference between the frequencies of the output audio and the environmental sound is smaller than a preset threshold;
and the frequency adjusting module 13 is configured to increase the frequency of the output audio when the determination result is smaller than the preset threshold.
The frequency obtaining module 11 may measure the frequency and the volume of the environmental sound in real time by controlling a sound sensor. The frequency and the volume of the output audio can be measured in real time through a sound sensor, and can also be obtained through reading the relevant parameters of the output audio in audio and video data.
Since the ambient sound may include noise of a plurality of different frequencies, the frequency acquisition module includes any one of the following sub-modules:
the highest frequency acquisition submodule is used for acquiring the frequency of the environment sound with the highest frequency as the frequency of the current environment sound;
the average frequency acquisition submodule is used for acquiring the average frequency of all the environmental sounds as the frequency of the current environmental sound;
the frequency operation obtaining submodule is used for respectively obtaining the frequency and the volume of all sub-environment sounds with different frequencies contained in the environment sounds, and calculating the frequency of the current environment sound according to the following formula: f ═ F1 × a1/(a1+ a2 +; + Am) + F2 × a2/(a1+ a2 +; + Am) +. + Fm × Am/(a1+ a2 +; + Am))/m; wherein f is the calculated frequency of the current environment sound, and m is the number of the sub-environment sounds with different frequencies; fm is the frequency of the mth sub-environment sound, and Am volume is the volume of the mth sub-environment sound.
The highest frequency obtaining submodule takes the environmental sound component with the highest frequency as the frequency of the current environmental sound, so that the listening interference of the environmental sound with the highest frequency on the output audio can be prevented, the frequency difference between the output audio and the environmental sound is improved to the maximum extent, and the output audio is more prominent.
The average frequency obtaining sub-module obtains the frequency average value of the environmental sound, that is, the frequency average value of all components with different frequencies contained in the environmental sound.
The frequency operation obtaining submodule considers the influence of the volume and the frequency of each component of all different frequencies contained in the environment sound, and the influence of the component with the large volume on the operation result f is also large, so that the frequency of the current environment sound obtained by calculation in the mode can reflect the influence of the frequency of the environment sound on the listening of the output audio most really.
The frequency discrimination module 12 compares the frequency of the output audio with the frequency of the acquired environmental sound, calculates a difference value thereof, and determines whether the difference value is smaller than a preset threshold value. The preset threshold value should be the minimum value allowed between the frequency of the output audio and the frequency of the environmental sound, and may be set to a positive number or a negative number as needed.
If the difference is smaller than a preset threshold value, the frequency of the output audio is too low, and the frequency of the output audio needs to be automatically adjusted; otherwise, the frequency of the output audio is itself high enough that no adjustment is necessary.
The frequency adjustment module 13 adjusts the frequency of the output audio. The frequency of the output audio may be increased in various ways, for example, by setting a frequency modulator on an output channel of the output audio to increase the output frequency. During frequency adjustment, the frequency of the output audio frequency can be increased by a preset value or several times.
In a preferred embodiment, the frequency adjusting module 13 adjusts the frequency of the output audio according to the frequency of the environmental sound and a preset optimal frequency difference value, wherein the preset optimal frequency difference value may be specifically set according to different needs, preferably a sound frequency difference that optimizes the auditory effect of human ears, and may be set by referring to known physiological knowledge or determined according to an empirical knowledge base table of optimal auditory effect.
The frequency adjustment module 13 includes any one of the following sub-modules:
a first frequency adjustment submodule for adjusting the frequency of the output audio frequency to be equal to the sum of the frequency of the ambient sound and a preset optimal frequency difference value;
the second frequency adjusting submodule is used for judging whether the sum of the frequency of the environmental sound and the difference value of the preset optimal frequency is greater than the preset maximum frequency value or not; adjusting the frequency of the output audio to equal the frequency maximum if greater than the frequency maximum; otherwise, adjusting the frequency of the output audio to be equal to the sum of the frequency of the environmental sound and a preset optimal frequency difference value.
The first and second frequency adjustment sub-modules can maintain the sound frequency difference with the best human ear auditory effect between the frequency of the output audio and the frequency of the environment sound, so that the user can better listen to the content of the output audio. The second frequency adjusting submodule sets the maximum frequency value, so that the frequency of the output audio is not increased without limit when the frequency of the environment audio is ultrahigh, the phenomenon that the frequency of the output audio is overhigh and becomes harsh is prevented, and the listening requirement of a general user is met.
In particular, when the frequency of the output audio is to be adjusted, one of the sub-audio components in the plurality of sub-audios included in the output audio may be selected as a reference, so as to adjust the frequencies of all the sub-audios included in the output audio. Then:
when the frequency of the output audio is adjusted to be equal to the sum of the frequency of the environmental sound and a preset optimal frequency difference value, the first frequency adjusting submodule and the second frequency adjusting submodule adjust the frequency of the sub audio with the highest frequency contained in the output audio to be equal to the sum of the frequency of the environmental sound and the preset optimal frequency difference value; acquiring the frequency adjustment amplitude of the sub audio frequency with the highest frequency; adjusting the frequencies of all sub-audios contained in the output audio according to the frequency adjustment amplitude;
the second frequency adjustment sub-module adjusts the frequency of the sub-audio with the highest frequency contained in the output audio to be equal to the frequency maximum value when adjusting the frequency of the output audio to be equal to the frequency maximum value; acquiring the frequency adjustment amplitude of the sub audio frequency with the highest frequency; and adjusting the frequencies of all sub-audios contained in the output audio according to the frequency adjustment amplitude.
The output audio frequency adjusting system can determine and automatically adjust the sound frequency of the output audio according to the sound frequency of the environmental sound of the audience, so that a user does not need to manually adjust the sound of the audio and video to obtain better auditory effect.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an output audio conditioning system according to a second embodiment of the present invention.
The output audio conditioning system of the second embodiment differs from the first embodiment mainly in that it further comprises:
a volume obtaining module 14, configured to obtain a volume value of the current environmental sound and a volume value of the current output audio;
a volume judging module 15, configured to judge whether a difference between the volume values of the output audio and the environmental sound is smaller than a preset threshold;
and the volume adjusting module 16 is configured to increase the volume of the output audio when the determination result is smaller than the preset threshold.
The volume obtaining module 14 includes any one of the following sub-modules:
the highest volume obtaining submodule is used for obtaining the volume value of the environment sound with the highest volume as the volume of the current environment sound;
the average volume obtaining submodule is used for obtaining the average volume of all the environment sounds as the volume of the current environment sound;
the volume operation obtaining submodule is used for respectively obtaining the frequency and the volume of all sub-environment sounds with different frequencies contained in the environment sounds, and calculating the volume value of the current environment sound according to the following formula: a ═ F1 ═ F1/(F1+ F2+. + Fm) + a2 × F2/(F1+ F2+. + Fm) +. Am · Fm/(F1+ F2+. + Fm))/m; wherein, a is the calculated volume value of the current environment sound, and m is the number of the sub-environment sounds with different frequencies; fm is the frequency of the mth sub-environment sound, and Am volume is the volume of the mth sub-environment sound.
The highest volume obtaining submodule takes the environment sound component with the highest volume as the volume of the current environment sound, so that the environment sound with the highest volume can be prevented from listening to the output audio, the volume difference between the output audio and the environment sound is improved to the maximum extent, and the output audio is more prominent.
The average volume obtaining sub-module obtains the volume average value of the environment sound, that is, the volume average value of all components with different frequencies contained in the environment sound.
The volume operation obtaining submodule considers the volume and the influence of the frequency of each component of all different frequencies contained in the environment sound, and the influence of the component with the large frequency on the operation result a is large, so that the volume of the current environment sound obtained by calculation in the mode can reflect the influence of the volume of the environment sound on the listening of the output audio most really.
The volume discrimination module 15 compares the volume of the output audio with the volume of the acquired environmental sound, calculates a difference value therebetween, and determines whether the difference value is smaller than a preset threshold value. The preset threshold value should be the minimum value allowed between the frequency of the output audio and the volume of the environmental sound, and may be set to a positive number or a negative number as needed.
If the difference is smaller than a preset threshold value, the volume of the output audio is low, and the volume of the output audio needs to be automatically adjusted; otherwise, the volume of the output audio is itself high enough that no adjustment is necessary.
The volume adjustment module 16 adjusts the volume of the output audio. The volume of the output audio may be increased in various ways, for example, a power amplifier on an output channel of the output audio is set to increase the power amplification factor of the output audio. When the volume is adjusted, the volume of the output audio can be increased by a preset value or several times.
In a preferred embodiment, the volume adjusting module 16 adjusts the volume of the output audio according to the volume of the environmental sound and a preset optimal volume difference, where the preset optimal volume difference may be specifically set according to different needs, preferably, the sound volume difference is a sound volume difference that optimizes the auditory effect of human ears, and may be set by referring to known physiological knowledge or determined according to an empirical knowledge base table of optimal auditory effect.
The volume adjusting module 16 includes any one of the following sub-modules:
the first volume adjusting submodule is used for adjusting the volume of the output audio to be equal to the sum of the volume of the environment sound and a preset optimal volume difference;
the second volume adjusting submodule is used for judging whether the sum of the volume of the environment sound and a preset optimal volume difference value is larger than a preset volume maximum value or not; if the volume is greater than the volume maximum, adjusting the volume of the output audio to be equal to the volume maximum; otherwise, adjusting the volume of the output audio to be equal to the sum of the volume of the environment sound and a preset optimal volume difference value.
The first volume adjusting submodule and the second volume adjusting submodule can keep the volume difference with the best human ear hearing effect between the volume of the output audio and the volume of the environment sound, so that a user can better listen to the content of the output audio. The second volume adjusting submodule does not increase the volume of the output audio without limit by setting the maximum volume value when the volume of the environmental sound is ultrahigh, so that the situation that the volume of the output audio is overhigh and becomes harsh is prevented, and the listening requirement of a general user is better met.
In particular, when the volume of the output audio is to be adjusted, one of the sub-audio components in the plurality of sub-audios included in the output audio may be selected as a reference, so as to adjust the volume of all the sub-audios included in the output audio. Then:
when the volume of the output audio is adjusted to be equal to the sum of the volume of the environment sound and a preset optimal volume difference value, the first volume adjusting submodule and the second volume adjusting submodule adjust the volume of the sub audio with the highest volume contained in the output audio to be equal to the sum of the volume of the environment sound and the preset optimal volume difference value; acquiring the volume adjustment amplitude of the sub audio with the highest volume; adjusting the volume of all sub-audios contained in the output audio according to the volume adjustment amplitude;
the second volume adjusting submodule adjusts the volume of the sub audio with the highest volume contained in the output audio to be equal to the maximum volume value when the volume of the output audio is adjusted to be equal to the maximum volume value; acquiring the volume adjustment amplitude of the sub audio with the highest volume; and adjusting the volume of all sub-audios contained in the output audio according to the volume adjustment amplitude.
The output audio adjusting system can determine and automatically adjust the sound frequency and the volume of the output audio according to the sound frequency and the volume of the environmental sound of the audience, so that a user does not need to manually adjust the sound of the audio and the video, and a better auditory effect is obtained.
It will be understood by those skilled in the art that all or part of the processes and corresponding systems of the above embodiments may be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the above embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-only Memory (ROM), a Random Access Memory (RAM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.