Audio adjusting method, apparatus, device, and storage medium
By acquiring and adjusting the actual sound effect characteristic curve of the audio signal, abnormal frequency points are identified and compensated, solving the problem of poor sound effects in high-end display terminals and realizing automatic sound effect optimization and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BOE TECHNOLOGY GROUP CO LTD
- Filing Date
- 2021-09-22
- Publication Date
- 2026-05-01
AI Technical Summary
Due to the limited size of speakers, high-end display terminals suffer from incomplete sound effects and poor performance in some musical pieces. Existing methods of manually adjusting sound parameters are inefficient and cannot quickly achieve the best results.
By acquiring the actual sound effect characteristic curve of the audio signal to be adjusted, the set of abnormal frequency points is determined, and the audio compensation value is used to adjust it to generate the adjusted sound effect characteristic curve, and finally the optimized audio signal is output.
It improves audio output quality, reduces the steps of manually modifying sound effect parameters, increases parameter adjustment efficiency, eliminates popping and distortion in audio devices, and provides a better user experience.
Smart Images

Figure CN116157860B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of control, specifically to an audio adjustment method, apparatus, device, and storage medium. Background Technology
[0002] In addition to the outstanding advantage of high resolution in display effect, high-end display terminals also need to reflect the quality of sound effects. However, due to the limited size of the aforementioned display terminals, the volume of the speakers used is limited, resulting in incomplete sound effects and poor performance in some music.
[0003] If the sound effects can be optimized through the display terminal's own compensation methods during use, it will bring a better user experience. Summary of the Invention
[0004] This disclosure provides an audio adjustment method, an audio adjustment device, an audio adjustment equipment, and a computer-readable storage medium for adjusting audio signals and improving sound output effects.
[0005] To achieve the above objectives, this disclosure provides an audio adjustment method, comprising:
[0006] Acquire the audio signal to be adjusted;
[0007] Obtain the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include level values used to characterize the frequency response characteristics of the audio signal;
[0008] At least based on the actual sound effect characteristic curve, determine the set of abnormal frequency points in the actual sound effect characteristic curve;
[0009] Obtain the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjust the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve;
[0010] The adjusted audio signal is output based on the adjusted sound effect characteristic curve.
[0011] Optionally, the method further includes:
[0012] Obtain the audio attributes of the audio signal to be adjusted, and determine the audio type of the audio signal to be adjusted based on the audio attributes;
[0013] Obtain the target sound effect feature curve corresponding to the target audio type, wherein the target sound effect feature curve is the relationship curve between the target value of the sound effect parameter and each frequency point;
[0014] The step of determining the set of abnormal frequency points in the actual sound effect characteristic curve based at least on the actual sound effect characteristic curve includes:
[0015] For each frequency point corresponding to the actual sound effect characteristic curve, the following steps are performed:
[0016] Based on the target sound effect feature curve and the actual sound effect feature curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point;
[0017] When the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than a preset difference threshold, the frequency point is determined as an abnormal frequency point in the abnormal frequency point set.
[0018] Optionally, the step of obtaining the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjusting the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve, includes:
[0019] Using a pre-set reference audio compensation value, sound effect parameter compensation is performed on each abnormal frequency point in the abnormal frequency point set to obtain the updated value of the sound effect parameter corresponding to each abnormal frequency point;
[0020] For each abnormal frequency point after compensation, calculate the first difference between the updated value of the sound effect parameter and the target value;
[0021] When the first difference is not greater than the preset difference threshold, the actual value of the sound effect parameter is updated to the updated value, and the abnormal frequency point is removed from the abnormal frequency point set.
[0022] Update the set of abnormal frequency points based on the remaining abnormal frequency points;
[0023] The sound effect parameters of each abnormal frequency point in the abnormal frequency point set are compensated with a preset reference audio compensation value until the first difference between the updated value of the sound effect parameter and the target value of each frequency point in the abnormal frequency point set is within the preset difference threshold.
[0024] Optionally, determining the audio type of the audio signal to be adjusted based on the audio attributes includes:
[0025] The duration of human voice in the audio signal to be adjusted is determined based on the audio attributes.
[0026] The difference between the playback duration of the audio signal to be adjusted and the duration of the human voice is determined as the music duration;
[0027] Based on the relationship between the first ratio, the second ratio, and the first preset ratio, the audio type of the audio signal is determined to be either the first type or the second type; wherein, the first ratio is the ratio of the duration of the human voice to the playback duration, and the second ratio is the ratio of the duration of the music to the playback duration.
[0028] Optionally, the first type includes at least a first subtype, a second subtype, and a third subtype.
[0029] After determining whether the audio type of the audio signal is a first type or a second type based on the relationship between the first ratio, the second ratio, and the first preset ratio, the method further includes:
[0030] If the type of the audio signal is determined to be the first type, the third proportion of the high-frequency signal, the fourth proportion of the mid-frequency signal, and the fifth proportion of the low-frequency signal in the audio signal are determined respectively.
[0031] Based on the relationship between the third ratio, the fourth ratio, the fifth ratio, and the second preset ratio, the audio type is determined to be one of the first subtype, the second subtype, and the third subtype.
[0032] Optionally, determining the set of abnormal frequency points in the actual sound effect characteristic curve based at least on the actual sound effect characteristic curve includes:
[0033] Determine whether there are abnormal bands in the actual sound effect characteristic curve, wherein the abnormal bands include peaks or troughs;
[0034] When the abnormal band exists, each frequency point corresponding to the abnormal band is determined as an abnormal frequency point.
[0035] Optionally, the method further includes storing the adjusted sound effect characteristic curve.
[0036] This disclosure also provides an audio adjustment device, wherein the device includes:
[0037] The first acquisition module is configured to acquire the audio signal to be adjusted;
[0038] The second acquisition module is configured to acquire the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include level values used to characterize the frequency response characteristics of the audio signal;
[0039] The determination module is configured to determine, at least based on the actual sound effect characteristic curve, the set of abnormal frequency points in the actual sound effect characteristic curve;
[0040] The adjustment module is configured to obtain the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjust the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve.
[0041] The output module is configured to output the adjusted audio signal based on the adjusted sound effect characteristic curve.
[0042] This disclosure also provides an audio adjustment device, wherein the device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the audio adjustment method provided in the embodiments of this disclosure.
[0043] This disclosure also provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the audio adjustment method provided in the embodiments of this disclosure. Attached Figure Description
[0044] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0045] Figure 1 A flowchart illustrating an audio adjustment method provided in an embodiment of this disclosure;
[0046] Figure 2 A flowchart illustrating another audio adjustment method provided in this embodiment of the present disclosure;
[0047] Figure 3 This is a schematic diagram of the structure of an audio adjustment device provided in an embodiment of the present disclosure;
[0048] Figure 4 This is a schematic diagram of the structure of an audio adjustment device provided in an embodiment of this disclosure. Detailed Implementation
[0049] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0050] Unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0051] High-end display terminals often suffer from limited speaker size, resulting in incomplete sound effects and subpar performance with certain musical pieces. Optimal sound quality achieved through sound compensation would significantly enhance the user experience for high-end display terminals.
[0052] In existing technologies, users typically adjust sound effect parameters manually to achieve sound effect compensation. However, this manual adjustment method cannot quickly adjust the sound effect to the optimal mode and requires repeated adjustments to output a more perfect sound effect. At the same time, manually adjusting sound effect parameters may expose the flaws of the terminal audio device.
[0053] In view of the above problems, this disclosure provides an audio adjustment method, including:
[0054] S101, acquire the audio signal to be adjusted.
[0055] In some embodiments, audio signals can be acquired by a multi-channel audio acquisition device, and the acquisition duration can be preset before acquisition; or an audio signal can be acquired at preset intervals, and the acquired audio signal includes the audio signal within the preset time interval. This disclosure does not limit either of these methods.
[0056] S102, Obtain the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include the level values used to characterize the frequency response characteristics of the audio signal.
[0057] It should be noted that, in general, the sound effect characteristic curve can be a frequency response curve. In one example, during the acquisition of audio signals, the output signal frequency of the signal generator is continuously varied while the amplitude remains constant. At the output end, the amplifier's corresponding output level for this continuous variation is recorded using an oscilloscope. This allows a curve of level versus frequency to be plotted on a coordinate system, where the horizontal axis represents frequency (Hz or kHz) and the vertical axis represents level (dB).
[0058] S103, at least based on the actual sound effect characteristic curve, determine the set of abnormal frequency points in the actual sound effect characteristic curve.
[0059] The set of abnormal frequencies may include one or more abnormal frequencies. An abnormal frequency is defined as a frequency whose sound effect parameters differ significantly from those of other frequencies. For example, if a distinct peak appears at a certain position on the actual sound effect characteristic curve, then the frequency corresponding to that position is an abnormal frequency. The specific method for determining the set of abnormal frequencies will be described in detail in the following embodiments, and will not be repeated here.
[0060] S104, obtain the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjust the actual sound effect feature curve based on at least one audio compensation value to obtain the adjusted sound effect feature curve.
[0061] S105, the adjusted sound effect characteristic curve outputs the adjusted audio signal.
[0062] The audio adjustment method provided in this disclosure first obtains the audio signal to be adjusted and its actual sound effect characteristic curve. Then, it determines at least a set of abnormal frequency points based on the curve. Finally, it adjusts each abnormal frequency point in the abnormal frequency point set based on an audio compensation value to obtain the adjusted sound effect characteristic curve. This audio adjustment method reduces the steps of manually modifying audio parameters, improves the efficiency of parameter adjustment, and enhances the audio output quality, especially in scenarios where the sound effect output from the display terminal is poor.
[0063] Optionally, the audio adjustment method provided in this disclosure embodiment further includes:
[0064] Obtain the audio attributes of the audio signal to be adjusted, and determine the audio type of the audio signal to be adjusted based on the audio attributes; obtain the target sound effect feature curve corresponding to the target audio type, which is the relationship curve between the target value of the sound effect parameter and each frequency point.
[0065] In S103 above, at least based on the actual sound effect characteristic curve, the set of abnormal frequency points in the actual sound effect characteristic curve is determined, including: for each frequency point corresponding to the actual sound effect characteristic curve, the following steps A1 and A2 are performed respectively:
[0066] Step A1: Based on the target sound effect characteristic curve and the actual sound effect characteristic curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point.
[0067] Step A2: When the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than the preset difference threshold, the frequency point is identified as an abnormal frequency point in the abnormal frequency point set.
[0068] In some embodiments, the target audio effect characteristic curve is determined based on optimal audio effect parameters pre-generated based on a laboratory environment. These optimal audio effect parameters refer to the parameters used when adjusting to the optimal playback state. Furthermore, different audio types each have their own corresponding target audio effect characteristic curve. The target audio effect characteristic curve for each audio type can be pre-stored in a cache module.
[0069] It should be noted that the aforementioned preset difference threshold can be set to 3dB, or other values set by those skilled in the art based on experience. This disclosure does not limit this value.
[0070] In one example, using the target sound effect characteristic curve as a benchmark, frequency points in the actual sound effect characteristic curve with an error greater than [-3dB, +3dB] are all regarded as abnormal frequency points. These abnormal frequency points are recorded to form an abnormal frequency point set.
[0071] In S104 above, the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set is obtained, and the actual sound effect characteristic curve is adjusted based on at least one audio compensation value to obtain the adjusted sound effect characteristic curve, including the following steps B1-B5:
[0072] Step B1: Using a pre-set reference audio compensation value, perform sound effect parameter compensation on each abnormal frequency point in the abnormal frequency point set to obtain the updated value of the sound effect parameter corresponding to each abnormal frequency point.
[0073] Step B2: For each abnormal frequency point after audio compensation, calculate the first difference between the updated value of the sound effect parameter and the target value.
[0074] Step B3: When the first difference is not greater than the preset difference threshold, update the actual value of the sound effect parameter to the updated value, and remove the abnormal frequency points from the abnormal frequency point set.
[0075] Step B4: Update the abnormal frequency set based on the remaining abnormal frequency points.
[0076] Step B5: Return to the pre-set reference audio compensation value and perform sound effect parameter compensation on each abnormal frequency point in the abnormal frequency point set until the first difference between the updated value of the sound effect parameter on each frequency point in the abnormal frequency point set and the target value is not greater than the preset difference threshold.
[0077] In the process of compensating for abnormal frequency points in the actual sound effect characteristic curve, since the actual values of multiple abnormal frequency points may differ from the target values, a step compensation unit is pre-set. The sound effect parameters of each abnormal frequency point in the abnormal frequency point set are compensated separately with reference to the audio compensation value. The sound effect parameters at that frequency point are modified so that the abnormal frequency points with smaller differences are compensated first. In the process of multiple loop compensations, the audio parameter compensation of all frequency points in the abnormal frequency point set is gradually completed.
[0078] It should be noted that the above-mentioned reference audio compensation value may be the minimum step compensation unit preset by those skilled in the art based on experience, such as 0.1dB, or other experience values. This disclosure does not limit this.
[0079] The audio adjustment method provided in this disclosure, by gradually compensating for sound effect parameters at all abnormal frequency points using step-by-step compensation units, can effectively eliminate popping sounds, distortion, and other phenomena that occur when the terminal plays audio. It promptly corrects sound effects when the audio device's performance is poor, providing users with a better audio experience.
[0080] In some embodiments, determining the audio type of the audio signal to be adjusted based on audio attributes includes:
[0081] The duration of human voice in the audio signal to be adjusted is determined based on the audio attributes; the difference between the playback duration of the audio signal to be adjusted and the duration of human voice is determined as the music duration; the audio type of the audio signal is determined to be either the first type or the second type based on the relationship between the first ratio, the second ratio and the first preset ratio; wherein, the first ratio is the ratio of human voice duration to playback duration, and the second ratio is the ratio of music duration to playback duration.
[0082] Among these, audio attributes can include frequency distribution, amplitude variation, etc.
[0083] In one example, the duration of the human voice T1 in the audio signal to be adjusted is determined according to the audio attributes, and the difference between the playback duration T0 of the audio signal to be adjusted and the duration of the human voice T1 is determined as the music duration T2; the ratio of the human voice duration to the playback duration is calculated, i.e., the first ratio K1 = T1 / T0, and the ratio of the music duration to the playback duration is calculated, i.e., the second ratio K2 = T2 / T0, and the first preset ratio K0 is set.
[0084] As shown in Table 1 below, when both the proportion of the vocal duration and the proportion of the music duration are higher than the first preset proportion, that is, in the case of K1 > K0 and K2 > K0, if the vocal duration T1 < the music duration T2 (or the proportion of the vocal duration K1 < the proportion of the music duration K2), it indicates that the currently played audio is mainly music, and the audio type of the audio signal is determined to be the first type, such as music (pop, classical, dance, etc.); if the vocal duration T1 > the music duration T2 (or the proportion of the vocal duration K1 > the proportion of the music duration K2), it indicates that the currently played audio is mainly vocal, and the audio type of the audio signal is determined to be the second type, such as movie, speech, performance, etc.
[0085] When the proportion of the vocal duration is higher than the first preset proportion, that is, K1 > K0, and the proportion of the music duration is lower than the first preset proportion, that is, K2 < K0, the audio type of the audio signal is determined to be the second type, such as movie (speech, performance, etc.).
[0086] When the proportion of the music duration is higher than the first preset proportion, that is, K2 > K0, and the proportion of the vocal duration is lower than the first preset proportion, that is, K1 < K0, the audio type of the audio signal is determined to be the first type, such as music (pop, classical, dance, etc.).
[0087] When the proportion of the music duration is higher than the first preset proportion, that is, K2 < K0, and the proportion of the vocal duration is lower than the first preset proportion, that is, K1 < K0, the current audio is considered invalid.
[0088] Table 1 Audio Type Judgment Rules
[0089] Voice ratio Music Ratio Vocals / Music Judgment result <![CDATA[K1>K0]]> <![CDATA[K2>K0]]> <![CDATA[K1>K2]]> Human voice <![CDATA[K1>K0]]> <![CDATA[K2>K0]]> <![CDATA[K1<K2]]> music <![CDATA[K1>K0]]> <![CDATA[K2<K0]]> / Human voice <![CDATA[K1<K0]]> <![CDATA[K2>K0]]> / music <![CDATA[K1<K0]]> <![CDATA[K2<K0]]> / invalid
[0090] In some embodiments, the first type at least includes the first subtype, the second subtype, and the third subtype. After determining that the audio type of the audio signal is the first type or the second type according to the relationship between the first ratio, the second ratio, and the first preset ratio, the method further includes:
[0091] In the case of determining that the audio type of the audio signal is the first type, respectively determine the third ratio of the high-frequency signals, the fourth ratio of the intermediate-frequency signals, and the fifth ratio of the low-frequency signals in the audio signal; according to the relationship between the third ratio, the fourth ratio, the fifth ratio, and the second preset ratio, determine one of the first subtype, the second subtype, and the third subtype of the audio type.
[0092] In one embodiment, in the case of determining that the audio type is the first type, it is also necessary to further subdivide the audio type to which the audio signal to be adjusted belongs by calculating the frequency band where the audio is mainly concentrated.
[0093] In one example, the distribution ratio f1 of high-frequency signals, the distribution ratio f2 of medium-frequency signals, and the distribution ratio f3 of low-frequency signals are calculated, and a second preset ratio f0 is preset.
[0094] As shown in Table 2, if the high, medium, and low-frequency signals are relatively rich and each frequency band is relatively balanced, that is, 30% < f1 < 40%, 30% < f2 < 40%, 30% < f3 < 40%, it is determined that the audio signal to be adjusted described above is pop music.
[0095] If the distribution ratio of the medium-frequency signal is greater than the second preset ratio, that is, f2 > f0, and the low-frequency and high-frequency signals are less, that is, f2 > (f0 + f1), indicating that the spectrum is mainly concentrated in the medium-frequency band, it is determined that the audio signal to be adjusted described above is classical music.
[0096] If the low-frequency and high-frequency signals are relatively many, that is, f1 > 40% and f3 > 40%, it is determined that the audio signal to be adjusted described above is dance music.
[0097] Table 2 Music sub-type judgment rules
[0098]
[0099] In the process of judging the audio type of the audio signal to be adjusted described above, the first preset ratio, the second preset ratio, and the judgment rules are all set by those skilled in the art according to empirical parameters, and the present disclosure does not limit this.
[0100] In the above embodiment, the abnormal frequency point set is determined by comparing the actual sound effect characteristic curve and the target sound effect characteristic curve. Of course, in other embodiments, the abnormal frequency point set can also be determined by other means. For example, in some embodiments, at least based on the actual sound effect characteristic curve, the abnormal frequency point set in the actual sound effect characteristic curve is determined, including:
[0101] Judge whether there is an abnormal wave band in the actual sound effect characteristic curve. The abnormal wave band includes a wave peak or a wave valley; when there is an abnormal wave band, each frequency point corresponding to the abnormal wave band is determined as an abnormal frequency point.
[0102] In one example, the mean difference of the actual values of the sound effect parameters between every two adjacent first frequency bands in the actual sound effect characteristic curve is detected. The first frequency band includes a preset number of frequency points; when the mean difference of the actual values of the sound effect parameters is greater than the preset mean difference, each frequency point in the latter frequency band of the two adjacent first frequency bands is determined as at least one frequency point in the abnormal frequency point set.
[0103] For example, set every three frequency points as a frequency band, determine the average value of the actual sound effect parameters of multiple frequency points in each frequency band, detect the difference between the average values of adjacent frequency bands, and if the difference between the above average values is greater than the preset average difference value, determine the three frequency points in the next frequency band as abnormal frequency points.
[0104] In some embodiments, the audio adjustment method provided in this disclosure further includes: storing the adjusted sound effect characteristic curve.
[0105] The audio adjustment method provided in this embodiment allows for the storage of the adjusted audio effect feature curve to a preset storage address after the adjustment is completed, so that its corresponding audio parameters can be directly called next time.
[0106] It should be noted that the preset storage address used to store the adjusted sound effect characteristic curve can be the same storage address or a different storage address as the target sound effect characteristic curve for different audio types. This disclosure does not limit this.
[0107] The audio adjustment method provided in this disclosure will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0108] like Figure 2 As shown, in step S201, the audio signal to be adjusted is acquired, and the actual sound effect characteristic curve is determined based on the audio signal to be adjusted.
[0109] S202, Based on the audio signal to be adjusted, determine its corresponding audio type.
[0110] In some embodiments, determining the audio type of the audio signal to be adjusted based on audio attributes includes the following steps C1-C3:
[0111] Step C1: Determine the duration of human voice in the audio signal to be adjusted based on the audio attributes.
[0112] Step C2: Determine the music duration as the difference between the playback duration of the audio signal to be adjusted and the duration of the human voice.
[0113] Step C3: Based on the relationship between the first ratio, the second ratio, and the first preset ratio, determine whether the audio type of the audio signal is the first type or the second type; wherein, the first ratio is the ratio of the duration of human voice to the playback duration, and the second ratio is the ratio of the duration of music to the playback duration.
[0114] Among these, audio attributes can include frequency distribution, amplitude variation, etc.
[0115] In one example, the duration T1 of the human voice in the audio signal to be adjusted is determined according to the audio attribute, and the difference between the playback duration T0 of the audio signal to be adjusted and the duration T1 of the human voice is determined as the music duration T2; the ratio of the duration of the human voice to the playback duration is calculated, that is, the first ratio K1 = T1 / T0, the ratio of the music duration to the playback duration is calculated, that is, the second ratio K2 = T2 / T0, and the first preset ratio K0 is set.
[0116] As shown in Table 1 below, when both the ratio of the human voice duration and the ratio of the music duration are higher than the first preset ratio, that is, K1 > K0 and K2 > K0, if the human voice duration T1 < the music duration T2, it means that the currently played audio is mainly music, then the audio type of the audio signal is determined as the first type, such as music (pop, classical, dance, etc.); if the human voice duration T1 > the music duration T2, it means that the currently played audio is mainly human voice, then the audio type of the audio signal is determined as the second type, such as movie (speech, performance, etc.).
[0117] When the ratio of the human voice duration is higher than the first preset ratio, that is, K1 > K0, and the ratio of the music duration is lower than the first preset ratio, that is, K2 < K0, then the audio type of the audio signal is determined as the second type, such as movie (speech, performance, etc.).
[0118] When the ratio of the music duration is higher than the first preset ratio, that is, K2 > K0, and the ratio of the human voice duration is lower than the first preset ratio, that is, K1 < K0, then the audio type of the audio signal is determined as the first type, such as music (pop, classical, dance, etc.).
[0119] When the ratio of the music duration is higher than the first preset ratio, that is, K2 < K0, and the ratio of the human voice duration is lower than the first preset ratio, that is, K1 < K0, then the current audio is considered invalid.
[0120] Table 1 Audio Type Judgment Rules
[0121] Voice ratio Music Ratio Vocals / Music Judgment result <![CDATA[K1>K0]]> <![CDATA[K2>K0]]> <![CDATA[K1>K2]]> Human voice <![CDATA[K1>K0]]> <![CDATA[K2>K0]]> <![CDATA[K1<K2]]> music <![CDATA[K1>K0]]> <![CDATA[K2<K0]]> / Human voice <![CDATA[K1<K0]]> <![CDATA[K2>K0]]> / music <![CDATA[K1<K0]]> <![CDATA[K2<K0]]> / invalid
[0122] In some embodiments, the first type at least includes the first subtype, the second subtype and the third subtype. After determining that the audio type of the audio signal is the first type or the second type according to the relationship between the first ratio, the second ratio and the first preset ratio, the method further includes:
[0123] In the case where the type of the audio signal is determined to be the first type, the third ratio of the high-frequency signal, the fourth ratio of the intermediate-frequency signal and the fifth ratio of the low-frequency signal in the audio signal are respectively determined; according to the relationship between the third ratio, the fourth ratio, the fifth ratio and the second preset ratio, one of the first subtype, the second subtype and the third subtype is determined as the audio type.
[0124] In one embodiment, when it is determined that the audio type is the first type, it is further necessary to further subdivide the audio type to which the audio signal to be adjusted belongs by calculating the frequency band in which the audio is mainly concentrated.
[0125] In one example, calculate the distribution ratio f1 of high-frequency signals, the distribution ratio f2 of medium-frequency signals, and the distribution ratio f3 of low-frequency signals, and preset a second preset ratio f0.
[0126] As shown in Table 2, if the high, medium, and low-frequency signals are relatively rich and each frequency band is relatively balanced, that is, 30% < f1 < 40%, 30% < f2 < 40%, 30% < f3 < 40%, it is determined that the above-mentioned audio signal to be adjusted is pop music. If the distribution ratio of the medium-frequency signal is greater than the second preset ratio, that is, f2 > f0, and the low-frequency and high-frequency signals are less, that is, f2 > (f0 + f1), indicating that the spectrum is mainly concentrated in the medium-frequency band, it is determined that the above-mentioned audio signal to be adjusted is classical music. If the low-frequency and high-frequency signals are more, that is, f1 > 40% and f3 > 40%, it is determined that the above-mentioned audio signal to be adjusted is dance music.
[0127] Table 2 Music Subtype Judgment Rules
[0128]
[0129] In the process of judging the audio type of the above-mentioned audio signal to be adjusted, the first preset ratio, the second preset ratio, and the judgment rules are all set by those skilled in the art based on empirical parameters, and the present disclosure does not limit them.
[0130] S203, obtain the target sound effect characteristic curve corresponding to the above audio type.
[0131] In some embodiments, the target sound effect characteristic curve is determined according to the optimal sound effect parameters pre-generated based on the laboratory environment. The above optimal sound effect parameters refer to the parameters used when adjusted to the optimal playback state. At the same time, under different music types, there is a corresponding target sound effect characteristic curve for each type.
[0132] S204, determine the abnormal frequency point set according to the actual sound effect characteristic curve and the target sound effect characteristic curve.
[0133] In some embodiments, determining the abnormal frequency point set may include: for each frequency point corresponding to the actual sound effect characteristic curve, respectively perform the following steps:
[0134] According to the target sound effect characteristic curve and the actual sound effect characteristic curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point; when the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than the preset difference threshold, determine the frequency point as an abnormal frequency point in the abnormal frequency point set.
[0135] In some embodiments, determining the set of abnormal frequency points may further include:
[0136] Determine whether there are abnormal bands in the actual sound effect characteristic curve. Abnormal bands include peaks or troughs. When abnormal bands exist, determine the frequency points corresponding to the abnormal bands as abnormal frequency points.
[0137] In one example, the mean difference of the actual values of the sound effect parameters between each adjacent first frequency band in the actual sound effect feature curve is detected. The first frequency band includes a preset number of frequency points. If the mean difference of the actual values of the sound effect parameters is greater than the preset mean difference, the next frequency band in the adjacent first frequency band is determined as at least one frequency point in the abnormal frequency point set.
[0138] S205, for each frequency point in the abnormal frequency point set, determine its sound effect compensation value, and set the sound effect compensation value into the sound effect parameters of the actual sound effect characteristic curve.
[0139] In some embodiments, at the same frequency point, the difference between the level value in the target sound effect characteristic curve and the level value in the actual sound effect characteristic curve is used as the sound effect compensation value.
[0140] S206, determine whether the actual sound effect characteristic curve has been adjusted to the preset requirements, that is, determine whether the difference between the actual values of the sound effect parameters of all frequencies in the abnormal frequency point set and the target values is not greater than the preset difference threshold. If yes, execute S212; otherwise, execute S207.
[0141] S207, use the pre-set reference audio compensation value to compensate the sound effect parameters of each abnormal frequency point in the abnormal frequency point set, and obtain the updated value of the sound effect parameters corresponding to each abnormal frequency point.
[0142] S208, for each abnormal frequency point after audio compensation, calculate the first difference between the updated value of the sound effect parameter and the target value.
[0143] S209, for at least one abnormal frequency point whose first difference is not greater than a preset difference threshold, update the actual value of its sound effect parameter to the above-mentioned updated value.
[0144] S210, remove at least one abnormal frequency point whose first difference is not greater than a preset difference threshold from the abnormal frequency point set, and update the abnormal frequency point set according to the remaining abnormal frequency points.
[0145] S211, determine whether there are still abnormal frequencies in the updated abnormal frequency set. If yes, return to S207; otherwise, execute S212.
[0146] S212, the actual sound effect characteristic curve whose difference between the updated value and the target value of the sound effect parameter at each frequency point is not greater than the preset difference threshold is determined as the adjusted sound effect characteristic curve.
[0147] like Figure 3 As shown in the embodiments of this disclosure, an audio adjustment device is also provided, including: a first acquisition module 301, a second acquisition module 302, a determination module 303, an adjustment module 304, and an output module 305.
[0148] The first acquisition module 301 is configured to acquire the audio signal to be adjusted. The second acquisition module 302 is configured to acquire the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include the level values used to characterize the frequency response characteristics of the audio signal. The determination module 303 is configured to determine the set of abnormal frequency points in the actual sound effect characteristic curve, at least based on the actual sound effect characteristic curve. The adjustment module 304 is configured to acquire the audio compensation value corresponding to each abnormal frequency point in the set of abnormal frequency points, and adjust the actual sound effect characteristic curve based on at least one audio compensation value to obtain the adjusted sound effect characteristic curve. The output module 305 is configured to output the adjusted audio signal based on the adjusted sound effect characteristic curve.
[0149] It should be noted that the first acquisition module may include a sound acquisition unit, which can acquire the sound output by the terminal through a high-sensitivity sound pickup device, such as a multi-channel audio acquisition device; the second acquisition module may include a buffer unit, configured to store the target sound effect characteristic curve obtained under laboratory conditions. The determination module and adjustment module can be integrated into the DSP processor and combined with the SOC chip. Based on the audio data acquired by the sound acquisition module, the actual sound effect currently output by the terminal is determined. Based on the actual sound effect and the ideal sound effect, sound effect compensation parameters are calculated and transmitted to the sound output module.
[0150] In some embodiments, the audio adjustment device further includes a third acquisition module and a fourth acquisition module. The third acquisition module is configured to acquire the audio attributes of the audio signal to be adjusted, and determine the audio type of the audio signal to be adjusted based on the audio attributes. The fourth acquisition module is configured to acquire the target sound effect feature curve corresponding to the target audio type, wherein the target sound effect feature curve is a curve showing the relationship between the target value of the sound effect parameter and each frequency point.
[0151] In some embodiments, the determining module is specifically configured to perform the following steps for each frequency point corresponding to the actual sound effect characteristic curve:
[0152] Based on the target sound effect characteristic curve and the actual sound effect characteristic curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point; when the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than the preset difference threshold, the frequency point is determined as an abnormal frequency point in the abnormal frequency point set.
[0153] In some embodiments, the adjustment module is specifically configured to: compensate the sound effect parameters of each abnormal frequency point in the abnormal frequency point set with a preset reference audio compensation value to obtain the updated value of the sound effect parameter corresponding to each abnormal frequency point; calculate the first difference between the updated value of the sound effect parameter and the target value for each abnormal frequency point after audio compensation; when the first difference is not greater than a preset difference threshold, update the actual value of the sound effect parameter to the updated value and remove the abnormal frequency point from the abnormal frequency point set; update the abnormal frequency point set according to the remaining abnormal frequency points; return to compensate the sound effect parameters of each abnormal frequency point in the abnormal frequency point set with the preset reference audio compensation value until the first difference between the updated value of the sound effect parameter and the target value of each frequency point in the abnormal frequency point set is not greater than the preset difference threshold.
[0154] In some embodiments, the third acquisition module is specifically configured to: determine the duration of human voice in the audio signal to be adjusted based on audio attributes; determine the music duration as the difference between the playback duration and the duration of human voice in the audio signal to be adjusted; and determine the audio type of the audio signal as a first type or a second type based on the relationship between a first ratio, a second ratio, and a first preset ratio; wherein the first ratio is the ratio of human voice duration to playback duration, and the second ratio is the ratio of music duration to playback duration.
[0155] In some embodiments, the first type includes at least a first subtype, a second subtype, and a third subtype.
[0156] The third acquisition module is specifically configured as follows:
[0157] If the audio signal type is determined to be the first type, the third proportion of high frequency signal, the fourth proportion of mid frequency signal, and the fifth proportion of low frequency signal in the audio signal are determined respectively; based on the relationship between the third proportion, the fourth proportion, the fifth proportion and the second preset proportion, the audio type is determined to be one of the first subtype, the second subtype and the third subtype.
[0158] In some embodiments, the module is specifically configured as follows:
[0159] Determine whether there are abnormal bands in the actual sound effect characteristic curve. Abnormal bands include peaks or troughs. When abnormal bands exist, determine the frequency points corresponding to the abnormal bands as abnormal frequency points.
[0160] In some embodiments, the audio adjustment device further includes a storage module configured to store the adjusted sound effect characteristic curve.
[0161] Figure 4 A schematic diagram of the hardware structure of the audio adjustment device provided in an embodiment of this disclosure is shown.
[0162] Combination Figures 1-3 The audio adjustment method and apparatus described in the embodiments of this disclosure can be implemented by an audio adjustment device. Figure 4 This is a schematic diagram illustrating the hardware structure 400 of an audio adjustment device according to an embodiment of the invention.
[0163] The audio adjustment device may include a processor 401 and a memory 402 storing computer program instructions.
[0164] Specifically, the processor 401 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this disclosure.
[0165] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 402 may include removable or non-removable (or fixed) media, or memory 402 may be non-volatile solid-state memory. Memory 402 may be internal or external to the integrated gateway disaster recovery device.
[0166] In one instance, memory 402 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0167] The processor 401 reads and executes computer program instructions stored in the memory 402 to achieve... Figure 1 The method / steps S101 to S105 in the illustrated embodiment achieve the following: Figure 1The technical effects achieved by executing the methods / steps shown in the examples are not elaborated here for the sake of brevity.
[0168] In one example, the audio adjustment device may also include a communication interface 403 and a bus 410. For example, Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.
[0169] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this disclosure.
[0170] Bus 410 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this disclosure, this disclosure contemplates any suitable bus or interconnect.
[0171] The audio adjustment device provided in this embodiment first acquires the audio signal to be adjusted and obtains its actual sound effect characteristic curve. Then, it determines at least a set of abnormal frequency points based on the curve. Finally, it adjusts each abnormal frequency point in the abnormal frequency point set based on the audio compensation value to obtain the adjusted sound effect characteristic curve. This audio adjustment device optimizes the method of manually modifying audio parameters, improves the efficiency of audio parameter adjustment, effectively eliminates popping sounds and distortion when the terminal plays audio, and improves the audio output quality.
[0172] Furthermore, in conjunction with the audio adjustment methods in the above embodiments, this disclosure can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the audio adjustment methods in the above embodiments.
[0173] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.
Claims
1. An audio adjustment method, wherein, The method includes: Acquire the audio signal to be adjusted; Obtain the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include level values used to characterize the frequency response characteristics of the audio signal; At least based on the actual sound effect characteristic curve, determine the set of abnormal frequency points in the actual sound effect characteristic curve; Obtain the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjust the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve; The adjusted audio signal is output based on the adjusted sound effect characteristic curve; The step of determining the set of abnormal frequency points in the actual sound effect characteristic curve based at least on the actual sound effect characteristic curve includes: Obtain the audio attributes of the audio signal to be adjusted, and determine the audio type of the audio signal to be adjusted based on the audio attributes; Obtain the target sound effect feature curve corresponding to the target audio type, wherein the target sound effect feature curve is the relationship curve between the target value of the sound effect parameter and each frequency point; Based on the target sound effect feature curve and the actual sound effect feature curve, determine the set of abnormal frequency points in the actual sound effect feature curve.
2. The method according to claim 1, wherein, The step of determining the set of abnormal frequency points in the actual sound effect feature curve based on the target sound effect feature curve and the actual sound effect feature curve includes: For each frequency point corresponding to the actual sound effect characteristic curve, the following steps are performed: Based on the target sound effect feature curve and the actual sound effect feature curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point; When the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than a preset difference threshold, the frequency point is determined as an abnormal frequency point in the abnormal frequency point set.
3. The method according to claim 2, wherein, The step of obtaining the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjusting the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve includes: Using a pre-set reference audio compensation value, sound effect parameter compensation is performed on each abnormal frequency point in the abnormal frequency point set to obtain the updated value of the sound effect parameter corresponding to each abnormal frequency point; For each abnormal frequency point after compensation, calculate the first difference between the updated value of the sound effect parameter and the target value; When the first difference is not greater than the preset difference threshold, the actual value of the sound effect parameter is updated to the updated value, and the abnormal frequency point is removed from the abnormal frequency point set. Update the set of abnormal frequency points based on the remaining abnormal frequency points; The sound effect parameters of each abnormal frequency point in the abnormal frequency point set are compensated with a preset reference audio compensation value until the first difference between the updated value of the sound effect parameter and the target value of each frequency point in the abnormal frequency point set is not greater than the preset difference threshold.
4. The method according to claim 2, wherein, Determining the audio type of the audio signal to be adjusted based on the audio attributes includes: The duration of human voice in the audio signal to be adjusted is determined based on the audio attributes. The difference between the playback duration of the audio signal to be adjusted and the duration of the human voice is determined as the music duration; Based on the relationship between the first ratio, the second ratio, and the first preset ratio, the audio type of the audio signal is determined to be either the first type or the second type; wherein, the first ratio is the ratio of the duration of the human voice to the playback duration, and the second ratio is the ratio of the duration of the music to the playback duration.
5. The method according to claim 4, wherein, The first type includes at least a first subtype, a second subtype, and a third subtype. After determining whether the audio type of the audio signal is a first type or a second type based on the relationship between the first ratio, the second ratio, and the first preset ratio, the method further includes: If the type of the audio signal is determined to be the first type, the third proportion of the high-frequency signal, the fourth proportion of the mid-frequency signal, and the fifth proportion of the low-frequency signal in the audio signal are determined respectively. Based on the relationship between the third ratio, the fourth ratio, the fifth ratio, and the second preset ratio, the audio type is determined to be one of the first subtype, the second subtype, and the third subtype.
6. The method according to any one of claims 1 to 5, wherein, The step of determining the set of abnormal frequency points in the actual sound effect characteristic curve based at least on the actual sound effect characteristic curve includes: Determine whether there are abnormal bands in the actual sound effect characteristic curve, wherein the abnormal bands include peaks or troughs; When the abnormal band exists, each frequency point corresponding to the abnormal band is determined as an abnormal frequency point.
7. The method according to any one of claims 1 to 5, wherein, The method further includes: Store the adjusted sound effect characteristic curve.
8. An audio adjustment device, wherein, The device includes: The first acquisition module is configured to acquire the audio signal to be adjusted; The second acquisition module is configured to acquire the actual sound effect characteristic curve of the audio signal to be adjusted, wherein the actual sound effect characteristic curve is the relationship curve between the actual values of the sound effect parameters of the audio signal to be adjusted and each frequency point, and the sound effect parameters include level values used to characterize the frequency response characteristics of the audio signal; The third acquisition module is configured to acquire the audio attributes of the audio signal to be adjusted, and determine the audio type of the audio signal to be adjusted based on the audio attributes. The fourth acquisition module is configured to acquire the target sound effect feature curve corresponding to the target audio type, wherein the target sound effect feature curve is the relationship curve between the target value of the sound effect parameter and each frequency point; The determination module is configured to determine the set of abnormal frequency points in the actual sound effect feature curve based on the target sound effect feature curve and the actual sound effect feature curve; The adjustment module is configured to obtain the audio compensation value corresponding to each abnormal frequency point in the abnormal frequency point set, and adjust the actual sound effect feature curve based on at least one of the audio compensation values to obtain the adjusted sound effect feature curve.
9. The apparatus according to claim 8, wherein, The specific configuration of the determining module is as follows: For each frequency point corresponding to the actual sound effect characteristic curve, the following steps are performed: Based on the target sound effect feature curve and the actual sound effect feature curve, determine the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point; When the difference between the actual value and the target value of the sound effect parameter corresponding to the frequency point is greater than a preset difference threshold, the frequency point is determined as an abnormal frequency point in the abnormal frequency point set.
10. The apparatus according to claim 9, wherein, The adjustment module is specifically configured as follows: Using a pre-set reference audio compensation value, sound effect parameter compensation is performed on each abnormal frequency point in the abnormal frequency point set to obtain the updated value of the sound effect parameter corresponding to each abnormal frequency point; For each abnormal frequency point after compensation, calculate the first difference between the updated value of the sound effect parameter and the target value; When the first difference is not greater than the preset difference threshold, the actual value of the sound effect parameter is updated to the updated value, and the abnormal frequency point is removed from the abnormal frequency point set. Update the set of abnormal frequency points based on the remaining abnormal frequency points; The sound effect parameters of each abnormal frequency point in the abnormal frequency point set are compensated with a preset reference audio compensation value until the first difference between the updated value of the sound effect parameter and the target value of each frequency point in the abnormal frequency point set is not greater than the preset difference threshold.
11. The apparatus according to claim 8, wherein, The specific configuration of the determining module is as follows: Determine whether there are abnormal bands in the actual sound effect characteristic curve, wherein the abnormal bands include peaks or troughs; When the abnormal band exists, each frequency point corresponding to the abnormal band is determined as an abnormal frequency point.
12. An audio adjustment device, wherein, The device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the audio adjustment method as described in any one of claims 1-7.
13. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the audio adjustment method as described in any one of claims 1-7.
Citation Information
Patent Citations
Sound effect processing method and apparatus
CN105405448A
Automatic tuning method, related equipment and readable storage medium
CN110913325A