Sound Band Adjustment Method, Device, Equipment and Storage Medium
By dividing the frequency band and adjusting the energy value of the sound signal, the dull problem caused by the overall adjustment of the sound signal is solved, and the sense of hierarchy of the sound signal is enhanced.
Patent Information
- Application Number
- CN202111497019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-12-08
AI Technical Summary
The overall adjustment of sound signals in the prior art leads to a dull playback effect and lacks a sense of layering.
By partitioning the initial sound signal in frequency bands, the initial energy value of the subband is determined, and compared with the preset subband parameters, the subband energy value is adjusted according to the comparison results to output the target sound signal.
Accurate adjustment of sound signals is achieved, enhancing the sense of layering and playback effect of sound signals.
Smart Images

Figure CN114420152B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio processing, and in particular, to a method, device, equipment and storage medium for adjusting a sound frequency band. Background Art
[0002] Music is fluid, and each part elicits different emotions and dynamics. For example, some parts are loud, while others are soft; some notes are legato, while others are staccato, and the rhythm also changes continuously. In addition, there are differences in the timbres of musical instruments. Of course, if vocals are involved, this kind of change is even more complex. A singer will emphasize certain words or even certain syllables during singing, and there will always be notes that are louder than those of musical instruments. In these situations, if a "static" equalization amount is maintained all the time, it is certain that a good processing effect cannot be achieved.
[0003] In order to better perform gain control on a sound signal, in the prior art, automatic gain control attenuates a larger signal and amplifies a small sound signal. By adjusting an appropriate gain, the sound signal is adjusted as a whole to a suitable range to achieve its best control effect. However, the playback effect of the sound signal will be very flat, lacking the sense of hierarchy of the sound signal.
[0004] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main object of the present invention is to provide a sound frequency band adjustment, aiming to solve the technical problem that in the prior art, the sound signal is adjusted as a whole to a suitable level range, resulting in a very flat playback effect of the sound signal and lacking the sense of hierarchy of the sound signal.
[0006] To achieve the above object, the present invention provides a method for adjusting a sound frequency band, and the method includes the following steps:
[0007] When an initial sound signal is received, determine a sub-band initial energy value according to the initial sound signal and a preset sub-band parameter;
[0008] Compare the sub-band initial energy value with a preset sub-band energy threshold in the preset sub-band parameter to obtain a comparison result;
[0009] Adjust the sub-band initial energy value according to the comparison result to obtain a sub-band target energy value, and output a target sound signal.
[0010] Optionally, the adjusting the sub-band initial energy value according to the comparison result to obtain a sub-band target energy value and outputting a target sound signal includes:
[0011] Determine a sub-band energy adjustment strategy according to the comparison result;
[0012] Adjust the initial sub-band energy value based on the sub-band energy adjustment strategy to obtain the target sub-band energy value, and output the target sound signal.
[0013] Optionally, the determining the sub-band energy adjustment strategy according to the comparison result includes:
[0014] When the initial sub-band energy value is greater than the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset first adjustment strategy;
[0015] When the initial sub-band energy value is less than or equal to the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset second adjustment strategy.
[0016] Optionally, the adjusting the initial sub-band energy value based on the sub-band energy adjustment strategy to obtain the target sub-band energy value, and outputting the target sound signal includes:
[0017] When the sub-band energy adjustment strategy is a preset first adjustment strategy, extract the preset start time in the preset sub-band parameters;
[0018] Determine the target sub-band gain amount according to the preset sub-band parameters and the initial sub-band energy value;
[0019] Based on the preset start time, adjust the initial sub-band energy value through the target sub-band gain amount to obtain the target sub-band energy value, and output the target sound signal.
[0020] Optionally, the adjusting the initial sub-band energy value based on the sub-band energy adjustment strategy to obtain the target sub-band energy value, and outputting the target sound signal includes:
[0021] When the sub-band energy adjustment strategy is a preset second adjustment strategy, obtain the initial sub-band state information;
[0022] Based on the initial sub-band state information, determine whether the initial sub-band energy value needs to be adjusted;
[0023] If so, extract the preset release time in the preset sub-band parameters;
[0024] Determine the target sub-band gain amount according to the preset sub-band parameters and the initial sub-band energy value;
[0025] Based on the preset release time, adjust the initial sub-band energy value through the target sub-band gain amount to obtain the target sub-band energy value, and output the target sound signal.
[0026] Optionally, before determining the initial sub-band energy value according to the initial sound signal and the preset sub-band parameters when receiving the initial sound signal, further includes:
[0027] When receiving a parameter setting instruction, perform parameter setting according to the parameter setting instruction to obtain preset general parameters;
[0028] Determine preset sub - band parameters according to the preset general parameter information.
[0029] Optionally, when receiving an initial sound signal, determining a sub - band initial energy value according to the initial sound signal and preset sub - band parameters includes:
[0030] When receiving an initial sound signal, perform frequency - band division on the initial sound signal according to the preset general parameters to obtain a sub - band set;
[0031] Determine the sub - band initial energy value corresponding to the sub - band set according to the sub - band set and the preset sub - band parameters.
[0032] In addition, to achieve the above object, the present invention also proposes a sound frequency - band adjustment device, and the sound frequency - band adjustment device includes:
[0033] An energy determination module, configured to determine a sub - band initial energy value according to the initial sound signal and preset sub - band parameters when receiving an initial sound signal;
[0034] An energy comparison module, configured to compare the sub - band initial energy value with a preset sub - band energy threshold in the preset sub - band parameters to obtain a comparison result;
[0035] An energy adjustment module, configured to adjust the sub - band initial energy value according to the comparison result to obtain a sub - band target energy value and output a target sound signal.
[0036] In addition, to achieve the above object, the present invention also proposes a sound frequency - band adjustment device, and the sound frequency - band adjustment device includes: a memory, a processor, and a sound frequency - band adjustment program stored on the memory and executable on the processor, and the sound frequency - band adjustment program is configured to implement the steps of the sound frequency - band adjustment method as described above.
[0037] In addition, to achieve the above object, the present invention also proposes a storage medium, and a sound frequency - band adjustment program is stored on the storage medium, and when the sound frequency - band adjustment program is executed by a processor, the steps of the sound frequency - band adjustment method as described above are implemented.
[0038] When the present invention receives an initial sound signal, it determines the initial sub-band energy value according to the initial sound signal and preset sub-band parameters, compares the initial sub-band energy value with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result, adjusts the initial sub-band energy value according to the comparison result to obtain the target sub-band energy value, and outputs the target sound signal. Compared with the prior art, by obtaining the initial sub-band energy value of the initial sound signal and comparing the initial sub-band energy value with the preset sub-band energy threshold, the present invention can classify different initial sound signals according to the comparison result, accurately adjust the initial sub-band energy value corresponding to the initial sound signal to obtain the target sub-band energy value, and output the target sound signal to realize the adjustment of the sound frequency band, avoiding the technical problem that the overall sound signal is adjusted to a suitable level range, resulting in a dull playback effect of the sound signal and lacking the sense of hierarchy of the sound signal, and enhancing the output effect of the sound signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 FIG. is a schematic structural diagram of a sound frequency band adjustment device in the hardware operating environment related to the embodiment solution of the present invention;
[0040] Figure 2 FIG. is a schematic flowchart of the first embodiment of the sound frequency band adjustment method of the present invention;
[0041] Figure 3 FIG. is a schematic diagram of signal splitting in an embodiment of the sound frequency band adjustment method of the present invention;
[0042] Figure 4 FIG. is a schematic flowchart of the second embodiment of the sound frequency band adjustment method of the present invention;
[0043] Figure 5 FIG. is a schematic flowchart of the third embodiment of the sound frequency band adjustment method of the present invention;
[0044] Figure 6 FIG. is a schematic block diagram of the first embodiment of the sound frequency band adjustment device of the present invention.
[0045] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] Refer to Figure 1 , Figure 1 FIG. is a schematic structural diagram of a sound frequency band adjustment device in the hardware operating environment related to the embodiment solution of the present invention.
[0048] As Figure 1As shown in the figure, the audio band adjustment device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to implement the connection and communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art can understand that Figure 1 the structure shown in does not constitute a limitation on the audio band adjustment device, and it may include more or fewer components than shown in the figure, or combine some components, or have a different component arrangement.
[0050] As Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and an audio band adjustment program.
[0051] In Figure 1 the audio band adjustment device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the audio band adjustment device of the present invention may be provided in the audio band adjustment device. The audio band adjustment device calls the audio band adjustment program stored in the memory 1005 through the processor 1001 and executes the audio band adjustment method provided by the embodiments of the present invention.
[0052] The embodiments of the present invention provide an audio band adjustment method. Referring to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of an audio band adjustment method of the present invention.
[0053] In this embodiment, the audio band adjustment method includes the following steps:
[0054] Step S10: When receiving an initial sound signal, determine the initial sub-band energy value according to the initial sound signal and preset sub-band parameters.
[0055] It should be noted that the execution subject of this embodiment is a sound band adjustment device. The sound band adjustment device can be a device with data transmission and data processing functions, or electronic devices such as a control computer, a mobile phone, and a tablet computer. This embodiment does not make specific limitations. In this embodiment and the following embodiments, a control computer will be used as an example for illustration.
[0056] It can be understood that the initial sound signal can be a sound signal collected by a sound collection device. The sound collection device can be a microphone or a sound collection card, etc. This embodiment does not make specific limitations. In this embodiment, a high-sensitivity microphone will be used as an example for illustration.
[0057] In addition, the signal transmission method of the initial sound signal, that is, the transmission of the initial sound signal can be through a wired cable or through a wireless communication method such as wireless Bluetooth. This embodiment does not make specific limitations.
[0058] It is worth noting that the preset sub-band parameters can be one or more of a sub-band energy threshold, a basic gain amount, an expected gain amount, a start time, and a release time. This embodiment does not make specific limitations.
[0059] It is easy to understand that the initial sub-band energy value can be the level value carried by the sub-band after the initial sound signal is divided, that is, the sub-band level value. The initial sub-band energy value is used to determine whether the sub-band signal corresponding to the initial sub-band energy value can trigger an equalization control operation.
[0060] In specific implementation, the preset sub-band parameters can be set by the user or can be parameter information automatically generated by the control computer through historical data. This embodiment does not make specific limitations.
[0061] In actual operation, since devices such as microphones pick up sound, for the sound signals emitted by a relatively close sound source, there is too much bass during collection. After being relayed, the sound will sound very muddy. At the same time, when facing the sound signals emitted by a relatively far sound source, when collecting the sound signals, the bass is not collected sufficiently, and the sound may be blurred or empty, affecting the user experience. Therefore, in this embodiment, by splitting the collected sound signals into frequency bands and performing equalized gain adjustment on each sub-band sound signal, a suitable output sound signal is obtained.
[0062] It should be understood that when splitting the initial sound signal into sub-bands, a set filter can be used to split the initial sound signal into multiple sub-band signals. In this embodiment, the filter adopted can be a combination of a low-shelf filter (Low Pass Filters, LPF), a band-pass filter (Band Pass Filters, BPF), and a high-shelf filter (High Pass Filters, HPF). By combining the three filters, the initial sound signal can be split into sub-band signals. Refer to Figure 3 After splitting a sound signal according to the three filters, the obtained sub-band signals are shown in the figure.
[0063] In this embodiment, the specific formula for calculating the sub-band energy is:
[0064]
[0065] where len is the frame length data, and x i is the normalized floating-point value of the sampled filtered signal.
[0066] It should be noted that the frame length data can be the number of sampling points within a preset time period. In actual operation, taking a sampling rate of 48000Hz and 256 points as the frame length as an example, there are 187 frames in 1 second.
[0067] In addition, in order to reduce the influence of data errors, a biquadratic filter needs to be used to calculate the normalized floating-point value after signal filtering to reduce the error in calculating the band energy. The specific formula for obtaining the normalized floating-point value after signal filtering is:
[0068]
[0069] where a0, a1, a2 and b0, b1, b2 are the parameter data of the high-pass filter, low-pass filter, and band-pass filter, and have different values in the high-pass, low-pass, and band-pass filters.
[0070] Step S20: Compare the initial sub-band energy value with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result.
[0071] It should be noted that the comparison result is obtained by comparing the level value carried by the sub-band with the preset sub-band energy threshold. Among them, the comparison result can be that the initial sub-band energy value is greater than the preset sub-band energy threshold, or the initial sub-band energy value is less than or equal to the preset sub-band energy threshold. Adjusting the initial sub-band energy value according to the comparison result enhances the practicability and robustness of this embodiment.
[0072] Step S30: Adjust the initial sub-band energy value according to the comparison result to obtain the target sub-band energy value, and output the target sound signal.
[0073] It can be understood that the target sub-band energy value can be the level value carried by the sub-band after the initial sub-band energy value is adjusted. After obtaining the target sub-band energy value, the target sub-band energy value can also be output to the user terminal. Among them, the user terminal can be a sound playback device, such as: mixing console, radio station, theater auditorium player and other devices. This embodiment does not make specific limitations on this.
[0074] It is easy to understand that the target sound signal can be the sound signal obtained after adjusting the sub-band energy value of the initial sound signal.
[0075] In specific implementation, after obtaining the audio stream corresponding to each target sub-band energy value, it is necessary to cascade all sub-band filters. After cascading, the initial signal can pass through the cascaded filters to achieve filtering processing for each sub-band.
[0076] In this embodiment, when receiving the initial sound signal, the initial sub-band energy value is determined according to the initial sound signal and the preset sub-band parameters, the initial sub-band energy value is compared with the preset sub-band energy threshold in the preset sub-band parameters to obtain the comparison result, the initial sub-band energy value is adjusted according to the comparison result to obtain the target sub-band energy value, and the target sound signal is output. By obtaining the initial sub-band energy value of the initial sound signal and comparing the initial sub-band energy value with the preset sub-band energy threshold in this embodiment, different initial sound signals can be classified according to the comparison result, and the initial sub-band energy value corresponding to the initial sound signal can be accurately adjusted to obtain the target sub-band energy value, and the target sound signal is output to achieve the adjustment of the sound frequency band, avoiding the technical problem that the overall sound signal is adjusted to a suitable level range, making the playback effect of the sound signal very dull and lacking the sense of hierarchy of the sound signal, and enhancing the output effect of the sound signal.
[0077] Reference Figure 4 , Figure 4 is a schematic flowchart of the second embodiment of a method for adjusting a sound frequency band according to the present invention.
[0078] Based on the above first embodiment, in this embodiment, the step S30 includes:
[0079] Step S301: Determine the sub-band energy adjustment strategy according to the comparison result.
[0080] It should be noted that since the comparison result can be that the initial sub-band energy value is greater than the preset sub-band energy threshold, or the initial sub-band energy value is less than or equal to the preset sub-band energy threshold, therefore, in actual operation, there will be different energy adjustment strategies when adjusting the initial sub-band energy according to different comparison results.
[0081] Further, to confirm the sub-band energy adjustment strategy, step S301 includes:
[0082] When the initial sub-band energy value is greater than the preset sub-band energy threshold, the sub-band energy adjustment strategy is the preset first adjustment strategy;
[0083] When the initial sub-band energy value is less than or equal to the preset sub-band energy threshold, the sub-band energy adjustment strategy is the preset second adjustment strategy.
[0084] It can be understood that the preset first adjustment strategy means adjusting the initial sub-band energy by calculating the sub-band gain amount combined with the start time to start the dynamic gain control; the preset second adjustment strategy means judging whether the current sub-band is in the dynamic gain control, and if so, releasing the dynamic gain control in combination with the release time.
[0085] In a specific implementation, by judging whether the initial sub-band energy value is greater than the preset sub-band energy threshold, if it is greater, the dynamic gain control is started, and if it is less than or equal, the sub-band stops the dynamic gain control, so as to realize the dynamic gain control adjustment of a single sub-band and obtain a sub-band with a suitable energy value.
[0086] Step S302: Adjust the initial sub-band energy value based on the sub-band energy adjustment strategy to obtain the target sub-band energy value and output the target sound signal.
[0087] It should be noted that the target sub-band energy value is the energy value obtained by dynamically adjusting the gain control of the initial sub-band energy value through the sub-band energy adjustment strategy.
[0088] Further, because there are different energy adjustment strategies under different comparison results, step S302 includes:
[0089] When the sub-band energy adjustment strategy is the preset first adjustment strategy, extract the preset start time in the preset sub-band parameters;
[0090] Determine the target sub-band gain amount according to the preset sub-band parameters and the initial sub-band energy value;
[0091] Adjust the initial sub-band energy value based on the preset start time through the target sub-band gain amount to obtain the target sub-band energy value and output the target sound signal.
[0092] It should be noted that the preset startup time is used to perform dynamic gain control of the subbands in combination with the subband gain amount, and the preset startup time is generally set when the preset subband parameters are set. After obtaining the preset startup time, the target subband gain amount is determined according to the preset subband parameters and the initial subband energy value. The specific formula for obtaining the target subband gain amount is as follows:
[0093]
[0094] Among them, tar is the target gain amount, exp is the expected gain amount, Lrms is the subband energy level, thre is the subband energy threshold, base is the base gain, and i refers to the i-th subband.
[0095] It is easy to understand that the expected gain amount, the base gain, and the subband energy threshold can all be extracted from the preset subband parameters.
[0096] It can be understood that after obtaining the target subband gain amount through calculation, the subband gain is adjusted through a filter. In the actual operation process, the filter selection can be a combination of three filters: Low Shelving Filters (LSF), Peaking Filters (PF), and High Shelving Filters (HSF). The combination of the three filters can control the gain of the target subband signal.
[0097] In specific implementation, by setting the parameters of each filter and cascading all the subband filters and combining the startup time, the gain of each subband can be controlled.
[0098] Furthermore, the step S302 includes:
[0099] When the subband energy adjustment strategy is the preset second adjustment strategy, obtain the initial subband state information;
[0100] Based on the initial subband state information, determine whether the initial subband energy value needs to be adjusted;
[0101] If so, extract the preset release time in the preset subband parameters;
[0102] Determine the target subband gain amount according to the preset subband parameters and the initial subband energy value;
[0103] Based on the preset release time, adjust the initial subband energy value through the target subband gain amount to obtain the target subband energy value, and output the target sound signal.
[0104] It should be noted that when the target sub-band energy value is less than or equal to the preset sub-band energy threshold, it indicates that the target sub-band meets the requirements at this time. Therefore, it is necessary to detect whether the target sub-band is in the gain control state. If so, the gain control of the sub-band undergoing gain control is released. If not, the target sub-band can be directly output.
[0105] It can be understood that during the actual operation process, if the target sub-band signal is undergoing gain control, the target sub-band signal will be marked. The marking method can be adding an identifier to the target sub-band signal, or other marking methods with a marking function. This embodiment does not make specific limitations on this.
[0106] In addition, if the target sub-band energy value is less than the preset sub-band energy threshold and the target sub-band is still in the process of dynamic gain control, it is necessary to perform dynamic gain release through a filter in combination with the release time to stop the dynamic gain adjustment and save resources.
[0107] In this embodiment, when receiving an initial sound signal, the initial sub-band energy value is determined according to the initial sound signal and the preset sub-band parameters. The initial sub-band energy value is compared with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result. According to the comparison result, a sub-band energy adjustment strategy is determined. Based on the sub-band energy adjustment strategy, the initial sub-band energy value is adjusted to obtain the target sub-band energy value, and the target sound signal is output. By obtaining the initial sub-band energy value of the initial sound signal and comparing the initial sub-band energy value with the preset sub-band energy threshold in this embodiment, different initial sound signals can be classified according to the comparison result, and different sub-band energy adjustment strategies can be selected according to different comparison results to adjust the initial sub-band energy value, which can adapt to different sub-band energy scenarios, so as to accurately adjust the initial sub-band energy value corresponding to the initial sound signal, obtain the target sub-band energy value, and output the target sound signal to realize the adjustment of the sound frequency band, avoiding the technical problem that the overall sound signal is adjusted to a suitable level range, making the playback effect of the sound signal very dull and lacking the sense of hierarchy of the sound signal, and enhancing the output effect of the sound signal.
[0108] Reference Figure 5 , Figure 5 is a schematic flowchart of the third embodiment of a method for adjusting a sound frequency band according to the present invention.
[0109] Based on the above first embodiment, in this embodiment, before the step S10, it further includes:
[0110] Step S1: When receiving a parameter setting instruction, perform parameter setting according to the parameter setting instruction to obtain preset general parameters.
[0111] It should be noted that the parameter setting instruction can be a control instruction input by the user through the user terminal. The parameter setting instruction is used to set the operating parameters of the filter before adjusting the sound quality. Among them, the parameter setting instruction includes information on setting preset general parameters and preset sub-band parameters.
[0112] It can be understood that the preset general parameters can be the segmented frequency, the number of sub-bands, the sub-band on-off state, the sub-band gain loss value, etc. The control computer can divide the initial sound signal according to the segmented frequency and the number of sub-bands to obtain multiple sub-band sound signals. Among them, the segmented frequency is used to determine the center frequency of each sub-band. For example, N segmented frequency points will have N + 1 sub-bands; the number of sub-bands can be determined by the center frequency point. The sub-band on-off state is used to control the working state of each sub-band; the sub-band Q value is used to determine the bandwidth range of the filter when calculating the energy of each sub-band.
[0113] Step S2: Determine the preset sub-band parameters according to the preset general parameter information.
[0114] It is worth noting that the preset sub-band parameters can be one or more of the sub-band energy threshold, the basic gain amount, the desired gain amount, the start time, and the release time. This embodiment does not make specific limitations on this.
[0115] In addition, among the preset sub-band parameters, the sub-band energy threshold is used to trigger the dynamic equalization control of the sub-band; the basic gain amount is used when the sub-band energy does not reach the threshold, and this basic gain amount will also act on the sub-band. This parameter design enables the control of the entire dynamic equalization to be carried out on the basis of this gain amount, and the overall effect is not limited to attenuation gain, and can also increase the gain; the desired gain amount is used to determine the maximum gain amount that the sub-band can obtain; the start time is used when the sub-band level triggers the sub-band energy threshold upward, that is, when the sub-band level is greater than the threshold, the time from starting the dynamic equalization control to the sub-band gain amount reaching the target threshold; the release time is used when the sub-band level triggers the threshold downward, that is, when the sub-band level is less than the threshold, the time from exiting the dynamic equalization control to complete release of the control.
[0116] In this embodiment, when a parameter setting instruction is received, parameter setting is performed according to the parameter setting instruction to obtain preset general parameters. According to the preset general parameter information, preset sub-band parameters are determined. When an initial sound signal is received, the sub-band initial energy value is determined according to the initial sound signal and the preset sub-band parameters. The sub-band initial energy value is compared with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result. According to the comparison result, a sub-band energy adjustment strategy is determined, and based on the sub-band energy adjustment strategy, the sub-band initial energy value is adjusted to obtain the sub-band target energy value, and the target sound signal is output. In this embodiment, by performing parameter setting according to the parameter setting instruction input by the user to obtain the preset sub-band parameters, standardized signal filtering is achieved. Then, the sub-band initial energy value of the initial sound signal is obtained, and the sub-band initial energy value is compared with the preset sub-band energy threshold. Different initial sound signals can be classified according to the comparison result, and different sub-band energy adjustment strategies can be selected according to different comparison results to adjust the sub-band initial energy value, which can adapt to different sub-band energy scenarios, so as to accurately adjust the sub-band initial energy value corresponding to the initial sound signal, obtain the sub-band target energy value, and output the target sound signal, so as to realize the adjustment of the sound frequency band and enhance the output effect of the sound signal.
[0117] In addition, an embodiment of the present invention further provides a storage medium, on which a sound frequency band adjustment program is stored. When the sound frequency band adjustment program is executed by a processor, the steps of the sound frequency band adjustment method as described above are implemented.
[0118] Since this storage medium adopts all the technical solutions of the above-mentioned all embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, and will not be described in detail herein one by one.
[0119] Refer to Figure 6 , Figure 6 which is the structural block diagram of the first embodiment of the sound frequency band adjustment device of the present invention.
[0120] As Figure 6 shown, the sound frequency band adjustment device proposed by the embodiment of the present invention includes:
[0121] An energy determination module 10, configured to determine a sub-band initial energy value according to the initial sound signal and preset sub-band parameters when an initial sound signal is received;
[0122] An energy comparison module 20, configured to compare the sub-band initial energy value with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result;
[0123] An energy adjustment module 30, configured to adjust the sub-band initial energy value according to the comparison result to obtain a sub-band target energy value, and output a target sound signal.
[0124] In this embodiment, when an initial sound signal is received, the initial sub-band energy value is determined according to the initial sound signal and preset sub-band parameters. The initial sub-band energy value is compared with the preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result. The initial sub-band energy value is adjusted according to the comparison result to obtain the target sub-band energy value, and the target sound signal is output. By obtaining the initial sub-band energy value of the initial sound signal and comparing the initial sub-band energy value with the preset sub-band energy threshold in this embodiment, different initial sound signals can be classified according to the comparison result, so as to accurately adjust the initial sub-band energy value corresponding to the initial sound signal, obtain the target sub-band energy value, and output the target sound signal to realize the adjustment of the sound frequency band, avoiding the technical problem that the overall sound signal is adjusted to a suitable level range, resulting in a very flat playback effect of the sound signal and lacking the sense of hierarchy of the sound signal, and enhancing the output effect of the sound signal.
[0125] In one embodiment, the energy adjustment module 30 is further configured to determine a sub-band energy adjustment strategy according to the comparison result; adjust the initial sub-band energy value based on the sub-band energy adjustment strategy to obtain the target sub-band energy value, and output the target sound signal.
[0126] In one embodiment, when the initial sub-band energy value is greater than the preset sub-band energy threshold, the sub-band energy adjustment strategy of the energy adjustment module 30 is a preset first adjustment strategy; when the initial sub-band energy value is less than or equal to the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset second adjustment strategy.
[0127] In one embodiment, when the sub-band energy adjustment strategy is the preset first adjustment strategy, the energy adjustment module 30 is further configured to extract the preset start time in the preset sub-band parameters; determine the target sub-band gain according to the preset sub-band parameters and the initial sub-band energy value; adjust the initial sub-band energy value through the target sub-band gain based on the preset start time to obtain the target sub-band energy value, and output the target sound signal.
[0128] In one embodiment, when the sub-band energy adjustment strategy is the preset second adjustment strategy, the energy adjustment module 30 is further configured to obtain the initial sub-band state information; judge whether the initial sub-band energy value needs to be adjusted based on the initial sub-band state information; if so, extract the preset release time in the preset sub-band parameters; determine the target sub-band gain according to the preset sub-band parameters and the initial sub-band energy value; adjust the initial sub-band energy value through the target sub-band gain based on the preset release time to obtain the target sub-band energy value, and output the target sound signal.
[0129] In one embodiment, the energy determination module 10 is further configured to, when receiving a parameter setting instruction, perform parameter setting according to the parameter setting instruction to obtain preset general parameters; and determine preset sub-band parameters according to the preset general parameter information.
[0130] In one embodiment, the energy determination module 10 is further configured to, when receiving an initial sound signal, perform frequency band division on the initial sound signal according to the preset general parameters to obtain a sub-band set; and determine the initial sub-band energy value corresponding to the sub-band set according to the sub-band set and the preset sub-band parameters.
[0131] It should be understood that the above is only an example for illustration and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can set according to needs, and the present invention does not limit this.
[0132] It should be noted that the above-described work flow is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and there is no limitation here.
[0133] In addition, for technical details not described in detail in this embodiment, reference can be made to the sound frequency band adjustment method provided in any embodiment of the present invention, which will not be elaborated here.
[0134] In addition, it should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0135] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0136] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0137] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall equally be included in the patent protection scope of the present invention.
Claims
1. A method for adjusting a voice frequency band, characterized in that The described audio band adjustment method includes: When receiving an initial sound signal, determining a sub-band initial energy value according to the initial sound signal and preset sub-band parameters; Comparing the sub-band initial energy value with a preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result; Adjusting the sub-band initial energy value according to the comparison result to obtain a sub-band target energy value, and outputting a target sound signal; The adjusting the sub-band initial energy value according to the comparison result to obtain a sub-band target energy value, and outputting a target sound signal includes: Determining a sub-band energy adjustment strategy according to the comparison result; When the sub-band initial energy value is greater than the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset first adjustment strategy; When the sub-band energy adjustment strategy is the preset first adjustment strategy, extracting a preset start time in the preset sub-band parameters; Determining a target sub-band gain amount according to the preset sub-band parameters and the sub-band initial energy value; Based on the preset start time, adjusting the sub-band initial energy value by the target sub-band gain amount to obtain a sub-band target energy value, and outputting a target sound signal.
2. The voice frequency band adjustment method according to claim 1, wherein The determining a sub-band energy adjustment strategy according to the comparison result further includes: When the sub-band initial energy value is less than or equal to the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset second adjustment strategy.
3. The method for adjusting an audio band according to claim 1, characterized in that Adjusting the sub-band initial energy value based on the sub-band energy adjustment strategy to obtain a sub-band target energy value, and outputting a target sound signal includes: When the sub-band energy adjustment strategy is the preset second adjustment strategy, obtaining initial sub-band state information; Judging whether the sub-band initial energy value needs to be adjusted based on the initial sub-band state information; If so, extracting a preset release time in the preset sub-band parameters; Determining a target sub-band gain amount according to the preset sub-band parameters and the sub-band initial energy value; Based on the preset release time, adjusting the sub-band initial energy value by the target sub-band gain amount to obtain a sub-band target energy value, and outputting a target sound signal.
4. The method for adjusting an audio band according to any one of claims 1 to 3, characterized in that Before the determining a sub-band initial energy value according to the initial sound signal and preset sub-band parameters when receiving the initial sound signal, it further includes: When receiving a parameter setting instruction, performing parameter setting according to the parameter setting instruction to obtain preset general parameters; Determining preset sub-band parameters according to the preset general parameter information.
5. The audio band adjustment method according to any one of claims 1 to 3, characterized in that The determining a sub-band initial energy value according to the initial sound signal and preset sub-band parameters when receiving the initial sound signal includes: When receiving an initial sound signal, performing frequency band division on the initial sound signal according to preset general parameters to obtain a sub-band set; Determining the sub-band initial energy value corresponding to the sub-band set according to the sub-band set and preset sub-band parameters.
6. A voice frequency band adjustment device, characterized in that, The audio band adjustment device includes: An energy determination module, configured to determine a sub-band initial energy value according to the initial sound signal and preset sub-band parameters when receiving the initial sound signal; An energy comparison module, configured to compare the sub-band initial energy value with a preset sub-band energy threshold in the preset sub-band parameters to obtain a comparison result; An energy adjustment module, configured to adjust the initial sub-band energy value according to the comparison result, obtain the target sub-band energy value, and output a target sound signal; The energy adjustment module is further configured to determine a sub-band energy adjustment strategy according to the comparison result; When the initial sub-band energy value is greater than the preset sub-band energy threshold, the sub-band energy adjustment strategy is a preset first adjustment strategy; when the sub-band energy adjustment strategy is the preset first adjustment strategy, extract the preset start time in the preset sub-band parameters; determine a target sub-band gain amount according to the preset sub-band parameters and the initial sub-band energy value; adjust the initial sub-band energy value by the target sub-band gain amount based on the preset start time to obtain the target sub-band energy value, and output a target sound signal.
7. A voice frequency band adjustment device, characterized in that, The sound frequency band adjustment device includes: a memory, a processor, and a sound frequency band adjustment program stored on the memory and executable on the processor, the sound frequency band adjustment program being configured to implement the sound frequency band adjustment method according to any one of claims 1 to 5.
8. A storage medium, characterized in that, A sound frequency band adjustment program is stored on the storage medium, and when the sound frequency band adjustment program is executed by a processor, it implements the sound frequency band adjustment method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Bluetooth audio decoding method and device for protecting hearing, medium and equipment
CN113539277A