Audio data processing method and device, equipment, storage medium and program product
By filtering and enhancing the mid-frequency band of audio signals, the problems of distortion and high cost in audio loudness enhancement are solved, achieving efficient and low-cost audio quality improvement.
Patent Information
- Application Number
- CN202410804986.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-12-23
AI Technical Summary
Existing technologies may cause an imbalance in sound across different frequency bands when increasing audio loudness, leading to sound distortion and poor audio quality. Furthermore, traditional methods require complex circuits or expensive components, resulting in high costs.
By acquiring the volume and frequency band of the audio signal, the target frequency band of the preset audio range is selected, the mid-frequency signal is enhanced using a gain coefficient, and an adaptive filter is used to adjust the signals of each frequency band, keeping the mid-frequency signal gain increased while the low-frequency and high-frequency signals remain unchanged, thus reducing distortion.
While increasing audio loudness, it reduces distortion, improves audio quality, reduces hardware complexity and cost, extends device battery life, and enhances user experience.
Smart Images

Figure CN121194101A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of audio processing, in particular to an audio data processing method and device, equipment, storage medium and program product. BACKGROUND
[0002] With the development of audio equipment technology, the forms of audio equipment (such as earphones) are also more and more diverse, and people's requirements for the audio effect of audio equipment are also higher and higher.
[0003] In the prior art, when the loudness of audio is improved, the sound of different frequency bands may be unbalanced, such as the high-frequency or low-frequency sound may be amplified too much, which will cause sound distortion and poor audio quality. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide an audio data processing method, device, equipment, storage medium and program product, which can reduce audio distortion and improve audio quality when the loudness of audio is improved.
[0005] In one aspect, the present application provides an audio data processing method, which comprises:
[0006] obtaining a current frame of audio signal to be processed;
[0007] obtaining the volume of the current frame of audio signal and the frequency band signal of at least one frequency band contained in the current frame of audio signal;
[0008] selecting a target frequency band in the preset audio range from the at least one frequency band;
[0009] performing volume enhancement processing on the current frame of audio signal according to the gain coefficient corresponding to the volume and the target frequency band to obtain a processed current frame of audio signal; the gain coefficient is used to enhance the volume of the corresponding frequency band signal.
[0010] In one embodiment, the method further comprises:
[0011] analog conversion of the processed current frame of audio signal to obtain an audio analog signal; the current frame of audio signal is a digital signal;
[0012] audio playback based on the audio analog signal.
[0013] In one embodiment, performing volume enhancement processing on the current frame of audio signal according to the gain coefficient corresponding to the volume and the target frequency band to obtain a processed current frame of audio signal comprises:
[0014] obtaining the gain coefficient corresponding to the volume and the target frequency band;
[0015] obtaining the initial gain corresponding to each frequency band respectively;
[0016] According to the initial gain corresponding to the target frequency band and the gain coefficient, the target frequency band signal of the target frequency band is subjected to volume enhancement processing to obtain a processed target frequency band signal.
[0017] According to the initial gain corresponding to each frequency band, the other frequency band signals except the target frequency band signal are subjected to volume enhancement processing respectively to obtain processed other frequency band signals.
[0018] Based on the processed target frequency band signal and the processed other frequency band signals, a processed current frame audio signal is obtained.
[0019] In an implementation, the gain coefficient corresponding to the volume and the target frequency band is obtained, including:
[0020] The volume level corresponding to the volume is obtained.
[0021] If the volume level is higher than a set level, the gain coefficient corresponding to the volume level and the frequency band is obtained, otherwise, the set coefficient is taken as the gain coefficient.
[0022] In an implementation, according to the initial gain corresponding to the target frequency band and the gain coefficient, the target frequency band signal of the target frequency band is subjected to volume enhancement processing, including:
[0023] The target gain is obtained according to the product or sum of the initial gain corresponding to the target frequency band and the gain coefficient; the target gain is higher than the initial gain corresponding to the target frequency band.
[0024] The target frequency band signal of the target frequency band is subjected to volume enhancement processing according to the target gain.
[0025] In an implementation, different gains are realized by different filters; the preset audio range is higher than a first set frequency and lower than a second set frequency, and is used to screen out the target frequency band in the intermediate frequency range.
[0026] In an aspect, an audio data processing apparatus is provided in the embodiments of the present application, including:
[0027] A receiving unit is configured to obtain a current frame audio signal to be processed.
[0028] An obtaining unit is configured to obtain the volume of the current frame audio signal and the frequency band signal of at least one frequency band contained in the current frame audio signal.
[0029] A screening unit is configured to screen out a target frequency band in a preset audio range from the at least one frequency band.
[0030] The enhancement unit is configured to perform volume enhancement processing on the current frame audio signal according to gain coefficients corresponding to both the volume and the target frequency band, to obtain a processed current frame audio signal; the gain coefficients are used to enhance the volume of the corresponding frequency band signal.
[0031] In an embodiment, the enhancement unit is further configured to:
[0032] perform analog conversion on the processed current frame audio signal to obtain an audio analog signal; the current frame audio signal is a digital signal;
[0033] perform audio playback based on the audio analog signal.
[0034] In an embodiment, the enhancement unit is configured to:
[0035] obtain gain coefficients corresponding to both the volume and the target frequency band;
[0036] obtain initial gains corresponding to each of the frequency bands;
[0037] perform volume enhancement processing on the target frequency band signal of the target frequency band according to the initial gain corresponding to the target frequency band and the gain coefficients, to obtain a processed target frequency band signal;
[0038] perform volume enhancement processing on the signals of other frequency bands except the target frequency band signal according to the initial gains corresponding to each of the frequency bands, respectively, to obtain processed signals of the other frequency bands;
[0039] obtain the processed current frame audio signal based on the processed target frequency band signal and the processed signals of the other frequency bands.
[0040] In an embodiment, the enhancement unit is configured to:
[0041] obtain a volume level corresponding to the volume;
[0042] if the volume level is higher than a set level, obtain gain coefficients corresponding to the volume level and the frequency band, otherwise, use a set coefficient as the gain coefficients.
[0043] In an embodiment, the enhancement unit is configured to:
[0044] obtain a target gain according to a product or a sum of the initial gain corresponding to the target frequency band and the gain coefficients; the target gain is higher than the initial gain corresponding to the target frequency band;
[0045] perform volume enhancement processing on the target frequency band signal of the target frequency band according to the target gain.
[0046] In an embodiment, different gains are realized by different filters; the preset audio range is higher than a first set frequency and lower than a second set frequency, and is used to screen out the target frequency band in the medium frequency range.
[0047] On one hand, this application provides an electronic device, including:
[0048] Processor; and
[0049] The memory stores computer instructions that cause the processor to perform the steps of the methods provided in the various alternative implementations of any of the above-described audio data processing methods.
[0050] On one hand, embodiments of this application provide a computer-readable storage medium storing computer instructions for causing a computer to perform the steps of the methods provided in various alternative implementations of any of the above-described audio data processing methods.
[0051] On one hand, this application provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device performs the steps of the method provided in various optional implementations of any of the above-described audio data processing methods.
[0052] The audio data processing method in this application includes acquiring a current frame audio signal to be processed; acquiring the volume of the current frame audio signal and the frequency band signal of at least one frequency band contained in the current frame audio signal; filtering out a target frequency band within a preset audio range from the at least one frequency band; and performing volume enhancement processing on the current frame audio signal according to the gain coefficients corresponding to both the volume and the target frequency band to obtain the processed current frame audio signal. In this way, when increasing audio loudness, only the mid-frequency sound is boosted, which can reduce audio distortion and improve audio quality. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 This is a flowchart of an audio data processing method according to an embodiment of this application.
[0055] Figure 2 This is a schematic diagram illustrating a volume enhancement effect in an embodiment of this application.
[0056] Figure 3 This is a schematic diagram of an application scenario in an embodiment of this application.
[0057] Figure 4 This is a structural block diagram of an audio data processing apparatus according to an embodiment of this application.
[0058] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0059] The technical solution of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0060] With the development of audio equipment technology, audio devices are becoming increasingly diverse, and people's demands for the audio effects of these devices are also rising. Under traditional techniques, when increasing audio loudness, the sound of different frequency bands may become unbalanced; for example, high-frequency or low-frequency sounds may be over-amplified, leading to sound distortion and poor audio quality. Furthermore, traditional techniques typically require complex circuits or expensive components to increase audio loudness, resulting in higher costs.
[0061] Based on the deficiencies of the aforementioned related technologies, this application provides an audio data processing method, apparatus, device, storage medium, and program product, aiming to improve audio loudness, reduce audio distortion, and enhance audio quality.
[0062] This application provides an audio data processing method that can be applied to electronic devices. This application does not limit the type of electronic device, which can be any suitable type of device. For example, the electronic device can be an audio device such as headphones, which will not be described in detail here.
[0063] See Figure 1 The diagram shown is a flowchart of an audio data processing method according to an embodiment of this application. The following is a description of the method in conjunction with... Figure 1 The method is described below, and the specific implementation process is as follows:
[0064] Step 101: Obtain the audio signal of the current frame to be processed.
[0065] The audio signal of the current frame is a digital signal.
[0066] In one implementation, based on an audio enhancement request, audio data to be processed is obtained, and audio signals of each frame in the audio data are obtained, and each frame of audio signal is sequentially determined as the current frame audio signal to be processed.
[0067] For example, the audio data is a 3-minute audio signal, and each frame of the audio signal is 10 seconds long.
[0068] Step 102: Obtain the volume of the audio signal in the current frame, and the frequency band signal of at least one frequency band contained in the audio signal in the current frame.
[0069] In one embodiment, the current frame audio signal is subjected to spectrum analysis to obtain spectrum analysis results, and based on the spectrum analysis results, the frequency band signal of at least one frequency band contained in the current frame audio signal is determined.
[0070] Optionally, Fourier transform can be used for spectrum analysis. In practical applications, the method of spectrum analysis can be set according to the actual application scenario, and there are no restrictions here.
[0071] Step 103: Select the target frequency band within the preset audio range from at least one frequency band.
[0072] Here, frequency band refers to a frequency range. Dividing the frequency range yields multiple frequency bands. The preset audio range is higher than a first set frequency and lower than a second set frequency, used to filter out target frequency bands within the mid-frequency range.
[0073] Since the human ear has low sensitivity to low and high frequency audio frequencies but a more pronounced perception of mid-frequency audio frequencies, this embodiment of the application selects frequencies in the mid-frequency range. This allows for subsequent steps to increase the initial gain of the mid-frequency band signal (e.g., by a certain percentage) to achieve better audio enhancement without over-amplifying low and high frequencies, thus reducing frequency imbalance and audio distortion.
[0074] In one embodiment, a first set frequency can be determined based on the lowest value of the intermediate frequency range (i.e., the intermediate frequency range), and a second set frequency can be determined based on the highest value of the intermediate frequency range.
[0075] As an example, the first set frequency and the second set frequency are the lowest and highest values of the mid-frequency range, respectively. That is, the frequency in the low-frequency range is not higher than the first set frequency, the frequency in the high-frequency range is not lower than the second set frequency, and the frequency in the mid-frequency range is higher than the first set frequency and lower than the second set frequency.
[0076] As another example, the lowest value is finely adjusted up or down to obtain the first set frequency, and the highest value is finely adjusted up or down to obtain the second set frequency. The intermediate frequency range and the adjustment range of the fine-tuning can be set according to the actual application scenario, and are not limited here.
[0077] In practical applications, the low-frequency range is typically 20Hz-200Hz, the high-frequency range is typically 10kHz, and the mid-frequency range is typically 200Hz-10kHz. Since the human ear's sensitivity to different frequency bands within the mid-frequency range usually varies, it can be further divided into multiple sub-ranges based on the ear's sensitivity to each band. For example, the first sub-range might be 2kHz-5kHz, the second sub-range 200Hz-2kHz, and the third sub-range 5kHz-10kHz. The human ear is generally most sensitive to the frequencies in the first sub-range.
[0078] Therefore, a first set frequency can be set based on 200 Hz, and a second set frequency can be set based on 10 kHz. For example, the first set frequency can be 300 Hz, and the second set frequency can be 10 kHz.
[0079] In this way, the target frequency band in the mid-frequency range that the human ear is more sensitive to can be selected.
[0080] Step 104: Based on the gain coefficients corresponding to both the volume and the target frequency band, perform volume enhancement processing on the current frame audio signal to obtain the processed current frame audio signal.
[0081] The gain coefficient is used to enhance the volume of the signal in the corresponding frequency band.
[0082] In one implementation, step 104 may be performed using the following steps:
[0083] S1041: Obtain the gain coefficients corresponding to both volume and target frequency band.
[0084] In one implementation, the volume level corresponding to the volume is obtained; if the volume level is higher than a set level, the volume level and the gain coefficient corresponding to the frequency band are obtained; otherwise, the set coefficient is used as the gain coefficient.
[0085] The gain coefficient can be a proportional coefficient used to increase the gain, or it can be an incremental gain used to increase the gain. The set coefficient can be 1, and other gain coefficients can be greater than 1.
[0086] Optionally, the audio can be divided into multiple volume levels, such as 15 volume levels. Higher volume levels correspond to higher volumes. The relationship between volume levels, frequency bands, and gain coefficients can also be preset, so that at higher volume levels, the appropriate gain coefficient is selected based on the volume level and frequency band. The gain coefficients for different combinations of volume levels and frequency bands can be the same or different, which will not be elaborated here.
[0087] Furthermore, if the volume level is not higher than the set level, the gain coefficient corresponding to the volume level can be determined to be a proportional coefficient of 1, or an incremental gain of 0. That is to say, the gain is applied only to a portion of the mid-frequency range at high volumes.
[0088] In practical applications, the level can be set according to the actual application scenario, and there are no restrictions here.
[0089] Furthermore, the setting level and gain coefficient can be adjusted according to user instructions.
[0090] Furthermore, the setting level and gain coefficient can be adjusted based on the user profile and the performance of the audio equipment.
[0091] Furthermore, it is also possible to obtain the volume level and the corresponding gain coefficient for each frequency band for all audio levels.
[0092] In this way, the appropriate gain coefficient can be selected according to the volume level and frequency band.
[0093] Furthermore, when the volume level is higher than the set level, the gain coefficient corresponding to the frequency band can be obtained.
[0094] In this way, the correspondence between frequency bands and gain coefficients can be set, and the corresponding gain coefficients can be obtained for different frequency bands.
[0095] S1042: Obtain the initial gain corresponding to each frequency band.
[0096] The initial gain for different frequency bands can be the same or different.
[0097] It should be noted that for any frequency band, the initial gain is determined based on the volume adjustment request, and different audio adjustment magnitudes (such as increasing one or more volume levels) correspond to different initial gains.
[0098] In one implementation, the following steps are performed for each frequency band:
[0099] Obtain the initial gain corresponding to the frequency band to which the frequency band belongs.
[0100] S1043: Based on the initial gain and gain coefficient corresponding to the target frequency band, perform volume enhancement processing on the target frequency band signal to obtain the processed target frequency band signal.
[0101] In one implementation, a target gain is obtained based on the product or sum of the initial gain corresponding to the target frequency band and the gain coefficient; the target gain is higher than the initial gain corresponding to the target frequency band; and volume enhancement processing is performed on the target frequency band signal based on the target gain.
[0102] Different gains are achieved through different filters.
[0103] Furthermore, the following steps can be performed in advance for each frequency band:
[0104] Based on the initial gain of the frequency band, a first filter is generated, which can then be invoked to achieve the initial gain of the frequency band signal.
[0105] The first filter can also be called the low volume filter.
[0106] Furthermore, there can be one or more target frequency bands, and the following steps can be performed separately for each target frequency band in advance:
[0107] Based on the target gain of the target frequency band, a second filter is generated, which can then be invoked to achieve the target gain for the signal in the target frequency band.
[0108] The second filter can also be called a high-volume filter.
[0109] Furthermore, the following steps can be performed in advance for each target frequency band:
[0110] Based on the target gain of the target frequency band, a third filter is generated. This third filter, along with the corresponding first filter, can then be used to achieve the target gain for the signal in the target frequency band. In other words, the gain of the first filter is increased by the third filter.
[0111] The third filter can also be called an enhancement filter.
[0112] In this way, different filters can be set for different volume levels and different frequency bands, thereby enabling different gain processing for audio signals of different volume levels and different frequency bands.
[0113] S1044: Based on the initial gain corresponding to each frequency band, perform volume enhancement processing on the other frequency band signals besides the target frequency band signal to obtain the processed other frequency band signals.
[0114] In one embodiment, the corresponding frequency band signal is subjected to gain processing by the first filter corresponding to each of the other frequency bands to obtain the processed other frequency band signals.
[0115] S1045: Based on the processed target frequency band signal and the processed other frequency band signals, obtain the processed current frame audio signal.
[0116] In one embodiment, the processed signals of each frequency band are superimposed to obtain the processed audio signal of the current frame.
[0117] By designing and applying an adaptive equalizer filter to adjust the gain of signals in different frequency bands, high, mid, and low frequencies can be balanced, distortion can be avoided, and sound quality can be improved.
[0118] Furthermore, audio can also be played. In one embodiment, the processed current frame audio signal is converted from analog to digital to obtain an analog audio signal; the current frame audio signal is a digital signal, and the analog audio signal is output through an audio playback device 9 (e.g., headphones).
[0119] The following is combined Figure 2 The above audio enhancement is illustrated with an example. See [link / reference]. Figure 2 The image shows a schematic diagram of a volume enhancement effect. Figure 2 In the diagram, the horizontal axis represents frequency, and the vertical axis represents decibels (dB). The initial volume of the initial audio signal is higher than a set level; for example, the initial volume can be 0 dB (dB), where 0 dB = 20 uPa. After gain processing of the initial audio signal using the initial gain and gain coefficient described in this embodiment, a first curve is obtained. Clearly, in the mid-frequency range, the second curve is significantly higher than the first curve. In the low-frequency and high-frequency ranges, the difference between the first and second curves is small. Therefore, in this embodiment, gain adjustment can be performed on the mid-frequency band signal.
[0120] In this embodiment, it can be applied to scenarios where loudness and low-frequency listening are important, such as music and film / television scenes. The following is in conjunction with... Figure 3 One application scenario from the embodiments of this application is described below. (See attached document.) Figure 3 The image shown is a schematic diagram of an application scenario. Figure 3 This includes terminal devices (e.g., mobile phones) and audio devices (e.g., headphones). Optionally, the headphones can be semi-in-ear open-back headphones, or open-back headphones, in-ear headphones, and over-ear headphones. The terminal device sends an audio signal to the audio device. The audio device performs audio enhancement processing on the current frame audio signal in the audio signal to obtain the processed current frame audio signal, and plays the audio based on the processed current frame audio signal.
[0121] In another application scenario, mobile phones and other terminal devices can perform audio enhancement processing on the current frame audio signal to obtain a processed current frame audio signal, and then send the processed current frame audio signal to an audio device. The audio device then plays the audio based on the processed current frame audio signal.
[0122] In this embodiment, when increasing audio loudness, precise filter design and optimized volume step design maintain the initial gain of low-frequency and high-frequency signals unchanged, while only increasing the initial gain of the mid-frequency audio signal. This minimizes distortion at high volume levels, ensuring high-fidelity audio output and preventing excessive amplification of low-frequency and high-frequency sounds, as well as sound imbalance and distortion across different frequency bands. It maintains frequency balance while increasing overall audio loudness, improving the naturalness and clarity of the sound quality. Furthermore, the increased gain of the mid-frequency signal allows users to clearly perceive the increased loudness, improving sound fidelity and user experience. Moreover, only increasing the gain of the mid-frequency signal, rather than the entire frequency band, reduces power consumption and extends device battery life. Finally, it achieves efficient loudness enhancement without adding excessive hardware complexity, making it suitable for mass production and reducing manufacturing costs. Furthermore, it eliminates the need for headphone sealing to enhance loudness, ensuring wearing comfort and preventing interference with extended use, thus further improving the user experience. Finally, it allows for adjustment of volume settings and gain coefficients based on user profiles and audio device performance, accommodating loudness and low-frequency effect requirements for different ear shapes, further enhancing the user experience.
[0123] Based on the same inventive concept, this application also provides an audio data processing apparatus. Since the principle of the above-described apparatus and device in solving the problem is similar to that of an audio data processing method, the implementation of the above-described apparatus can refer to the implementation of the method, and repeated details will not be elaborated further. This apparatus can be applied to electronic devices. This application does not limit the type of electronic device; it can be any suitable type of device, such as terminal devices and servers, etc., which will not be elaborated further in this application.
[0124] See Figure 4 The diagram shown is a structural block diagram of an audio data processing apparatus according to an embodiment of this application. In some embodiments, the audio data processing apparatus exemplified in this application includes:
[0125] The receiving unit 401 is used to acquire the current frame audio signal to be processed;
[0126] The acquisition unit 402 is used to acquire the volume of the audio signal of the current frame and the frequency band signal of at least one frequency band contained in the audio signal of the current frame.
[0127] The filtering unit 403 is used to filter out target frequency bands within a preset audio range from at least one frequency band;
[0128] The enhancement unit 404 is used to perform volume enhancement processing on the current frame audio signal according to the gain coefficients corresponding to both the volume and the target frequency band, so as to obtain the processed current frame audio signal; the gain coefficient is used to enhance the volume of the corresponding frequency band signal.
[0129] In one embodiment, the enhancement unit 404 is further configured to:
[0130] The processed audio signal of the current frame is converted from analog to digital to obtain an analog audio signal; the audio signal of the current frame is a digital signal.
[0131] Audio playback is performed based on analog audio signals.
[0132] In one embodiment, the enhancement unit 404 is used to:
[0133] Obtain the gain coefficients corresponding to both the volume and the target frequency band;
[0134] Obtain the initial gain corresponding to each frequency band;
[0135] Based on the initial gain and gain coefficient corresponding to the target frequency band, the target frequency band signal is subjected to volume enhancement processing to obtain the processed target frequency band signal.
[0136] Based on the initial gain corresponding to each frequency band, the other frequency band signals outside the target frequency band signal are subjected to volume enhancement processing to obtain the processed other frequency band signals.
[0137] Based on the processed target frequency band signal and the processed signals of other frequency bands, the processed current frame audio signal is obtained.
[0138] In one embodiment, the enhancement unit 404 is used to:
[0139] Get the volume level corresponding to the volume;
[0140] If the volume level is higher than the set level, obtain the volume level and the gain coefficient corresponding to the frequency band; otherwise, use the set coefficient as the gain coefficient.
[0141] In one embodiment, the enhancement unit 404 is used to:
[0142] The target gain is obtained by multiplying or summing the initial gain corresponding to the target frequency band and the gain coefficients; the target gain is higher than the initial gain corresponding to the target frequency band.
[0143] Based on the target gain, the target frequency band signal is subjected to volume enhancement processing.
[0144] In one embodiment, different gains are achieved through different filters; the preset audio range is higher than a first set frequency and lower than a second set frequency, used to filter out target frequency bands in the mid-frequency range.
[0145] The audio data processing method in this application includes acquiring a current frame audio signal to be processed; acquiring the volume of the current frame audio signal and the frequency band signal of at least one frequency band contained in the current frame audio signal; filtering out a target frequency band within a preset audio range from the at least one frequency band; and performing volume enhancement processing on the current frame audio signal according to the gain coefficients corresponding to both the volume and the target frequency band to obtain the processed current frame audio signal. In this way, when increasing audio loudness, only the mid-frequency sound is boosted, which can reduce audio distortion and improve audio quality.
[0146] In this embodiment of the application, an electronic device is provided, including:
[0147] Processor; and
[0148] The memory stores computer instructions that cause the processor to execute the methods of any of the above-described embodiments.
[0149] In this application embodiment, a computer-readable storage medium is provided, storing computer instructions for causing a computer to perform the methods of any of the above embodiments.
[0150] This application also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in the processor of an electronic device, the processor in the electronic device performs the method of any of the above-described embodiments.
[0151] Figure 5 A schematic diagram of the structure of an electronic device 5000 is shown. (See also...) Figure 5 As shown, the electronic device 5000 includes a processor 5010 and a memory 5020, and optionally may also include a power supply 5030, a display unit 5040, and an input unit 5050.
[0152] The processor 5010 is the control center of the electronic device 5000. It connects various components through various interfaces and lines, and performs various functions of the electronic device 5000 by running or executing software programs and / or data stored in the memory 5020, thereby performing overall monitoring of the electronic device 5000.
[0153] In this embodiment, when the processor 5010 calls the computer program stored in the memory 5020, it executes the steps in the above embodiments.
[0154] Optionally, processor 5010 may include one or more processing units; preferably, processor 5010 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 5010. In some embodiments, the processor and memory may be implemented on a single chip; in some embodiments, they may also be implemented separately on independent chips.
[0155] The memory 5020 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, various applications, etc.; the data storage area may store data created based on the use of the electronic device 5000, etc. In addition, the memory 5020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device, etc.
[0156] Electronic device 5000 also includes a power supply 5030 (such as a battery) that supplies power to various components. The power supply can be logically connected to processor 5010 through a power management system, thereby enabling the management of charging, discharging, and power consumption.
[0157] The display unit 5040 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device 5000. In this embodiment, it is mainly used to display the display interface of various applications in the electronic device 5000, as well as text, images, and other objects displayed on the display interface. The display unit 5040 may include a display panel 5041. The display panel 5041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0158] The input unit 5050 can be used to receive information such as numbers or characters input by the user. The input unit 5050 may include a touch panel 5051 and other input devices 5052. The touch panel 5051, also known as a touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 5051).
[0159] Specifically, the touch panel 5051 can detect user touch operations and the signals generated by these operations, convert them into touch point coordinates, send them to the processor 5010, and receive and execute commands from the processor 5010. Furthermore, the touch panel 5051 can be implemented using various types of sensors, including resistive, capacitive, infrared, and surface acoustic wave sensors. Other input devices 5052 can include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0160] Of course, the touch panel 5051 can cover the display panel 5041. When the touch panel 5051 detects a touch operation on or near it, it transmits the information to the processor 5010 to determine the type of touch event. Subsequently, the processor 5010 provides corresponding visual output on the display panel 5041 according to the type of touch event. Although in Figure 5 In this embodiment, the touch panel 5051 and the display panel 5041 are two separate components to realize the input and output functions of the electronic device 5000. However, in some embodiments, the touch panel 5051 and the display panel 5041 can be integrated to realize the input and output functions of the electronic device 5000.
[0161] The electronic device 5000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity sensor, etc. Of course, depending on the specific application, the electronic device 5000 may also include other components such as a camera. Since these components are not the focus of this application's embodiments, therefore... Figure 5 It is not shown in the text and will not be described in detail here.
[0162] Those skilled in the art will understand that Figure 5 This is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than shown, or a combination of certain components, or different components.
[0163] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.
Claims
1. A method for audio data processing, characterized in that, The method includes: Obtain the audio signal of the current frame to be processed; Obtain the volume of the current frame audio signal, and the frequency band signal of at least one frequency band contained in the current frame audio signal; From the at least one frequency band, select the target frequency band that is within the preset audio range; Based on the gain coefficients corresponding to both the volume and the target frequency band, the current frame audio signal is subjected to volume enhancement processing to obtain the processed current frame audio signal; the gain coefficients are used to enhance the volume of the corresponding frequency band signal.
2. The method according to claim 1, characterized in that, The method further includes: The processed current frame audio signal is converted from analog to obtain an analog audio signal; the current frame audio signal is a digital signal. Audio is played based on the analog audio signal.
3. The method according to claim 1 or 2, characterized in that, The step of performing volume enhancement processing on the current frame audio signal based on the gain coefficients corresponding to both the volume and the target frequency band to obtain the processed current frame audio signal includes: Obtain the gain coefficients corresponding to both the volume and the target frequency band; Obtain the initial gain corresponding to each frequency band; Based on the initial gain and gain coefficient corresponding to the target frequency band, the target frequency band signal is subjected to volume enhancement processing to obtain the processed target frequency band signal. Based on the initial gain corresponding to each frequency band, the other frequency band signals besides the target frequency band signal are subjected to volume enhancement processing to obtain the processed other frequency band signals; Based on the processed target frequency band signal and the processed other frequency band signals, the processed current frame audio signal is obtained.
4. The method according to claim 3, characterized in that, The step of obtaining the gain coefficients corresponding to both the volume and the target frequency band includes: Obtain the volume level corresponding to the volume; If the volume level is higher than the set level, then the volume level and the gain coefficient corresponding to the frequency band are obtained; otherwise, the set coefficient is used as the gain coefficient.
5. The method according to claim 3, characterized in that, The step of performing volume enhancement processing on the target frequency band signal based on the initial gain and gain coefficient corresponding to the target frequency band includes: The target gain is obtained by multiplying or summing the initial gain corresponding to the target frequency band and the gain coefficient; the target gain is higher than the initial gain corresponding to the target frequency band. Based on the target gain, the target frequency band signal of the target frequency band is subjected to volume enhancement processing.
6. The method according to claim 3, characterized in that, Different gains are achieved through different filters; the preset audio range is higher than the first set frequency and lower than the second set frequency, used to filter out the target frequency band in the mid-frequency range.
7. An audio data processing apparatus, characterized in that, The device includes: The receiving unit is used to acquire the current frame audio signal to be processed; The acquisition unit is used to acquire the volume of the current frame audio signal and the frequency band signal of at least one frequency band contained in the current frame audio signal; A filtering unit is used to filter out target frequency bands within a preset audio range from the at least one frequency band; An enhancement unit is used to perform volume enhancement processing on the current frame audio signal according to the gain coefficients corresponding to both the volume and the target frequency band, to obtain the processed current frame audio signal; the gain coefficients are used to enhance the volume of the corresponding frequency band signal.
8. An electronic device, characterized in that, include: processor; as well as A memory storing computer instructions for causing the processor to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer contains computer instructions for causing the computer to perform the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device is the method according to any one of claims 1 to 6.