Audio playing method and device, electronic equipment and storage medium
By acquiring the auditory curve of the audio signal and dynamically adjusting the energy suppression processing in conjunction with the audio signal characteristics and playback information, the problem of increased power consumption during audio playback in electronic devices was solved, thereby improving the audio playback effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2026-03-10
AI Technical Summary
Electronic devices consume more power when playing audio, and existing technologies suppress sound energy through fixed auditory curve strategies, which affects the audio playback effect.
By acquiring the auditory curve of the audio signal to be played, and combining the audio signal characteristics and playback information, the energy suppression processing is dynamically adjusted to generate a second audio signal to reduce power consumption while ensuring audio playback quality and stability.
While reducing audio playback power consumption, it also ensures audio playback quality and stability, thus improving the audio playback effect.
Smart Images

Figure CN121644728A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and more particularly, to an audio playing method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the rapid progress of science and technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the commonly used electronic products in people's lives. Currently, electronic devices are often used to play audio, and the playing performance of electronic devices is constantly improving. However, with the improvement of the playing performance of electronic devices, the power consumption of electronic devices when playing audio is also increasing. SUMMARY
[0003] The present application provides an audio playing method, device, electronic device, and storage medium, which can reduce the power consumption caused by audio playing while ensuring the playing effect of audio playing.
[0004] In a first aspect, an embodiment of the present application provides an audio playing method, which includes: obtaining an auditory curve corresponding to a first audio signal to be played; performing energy suppression processing on at least part of sub-audio signals in the first audio signal based on the auditory curve and at least one of an audio signal feature of the first audio signal and playing information, to obtain a second audio signal; and playing the second audio signal.
[0005] In a second aspect, an embodiment of the present application provides an audio playing device, which includes: a curve obtaining module, an energy reducing module, and a playing executing module. The curve obtaining module is configured to obtain an auditory curve corresponding to a first audio signal to be played. The energy reducing module is configured to perform energy suppression processing on at least part of sub-audio signals in the first audio signal based on the auditory curve and at least one of an audio signal feature of the first audio signal and playing information, to obtain a second audio signal. The playing executing module is configured to play the second audio signal.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes: one or more processors; a memory; and one or more application programs stored in the memory and configured to be executed by the one or more processors. The one or more application programs are configured to execute the audio playing method provided in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program codes. The program codes can be invoked by a processor to execute the audio playing method provided in the first aspect.
[0008] The scheme provided in the present application obtains an auditory curve corresponding to a first audio signal to be played, performs energy suppression processing on at least part of sub-audio signals in the first audio signal based on the obtained auditory curve and according to at least one of an audio signal feature of the first audio signal and playback information, obtains a second audio signal, and then plays the second audio signal. Thus, the power consumption of audio playback based on the auditory curve can be reduced, and the audio signal feature and the playback information are also considered, so that the power consumption caused by audio playback can be reduced, the quality and stability of audio playback can be considered, and the playback effect of audio playback is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0010] Figure 1 A flowchart of an audio playback method according to an embodiment of the present application is shown.
[0011] Figure 2 A flowchart of an audio playback method according to another embodiment of the present application is shown.
[0012] Figure 3 A flowchart of an audio playback method according to another embodiment of the present application is shown.
[0013] Figure 4 A flowchart of an audio playback method according to another embodiment of the present application is shown.
[0014] Figure 5 A flowchart of an audio playback method according to another embodiment of the present application is shown.
[0015] Figure 6 A block diagram of an audio playback device according to an embodiment of the present application is shown.
[0016] Figure 7 A block diagram of an electronic device for executing an audio playback method according to an embodiment of the present application is shown.
[0017] Figure 8 A storage unit for storing or carrying program code for implementing an audio playback method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0019] Currently, electronic devices are frequently used for external playback, which refers to the process where electronic devices diffuse sound into the air through their built-in speakers, where it is then received by the human ear. With the continuous improvement of the playback performance of electronic devices, the power consumption during audio playback has increased exponentially. Therefore, reducing power consumption while maintaining audio signal playback quality has become a pressing problem. Currently, the most common power reduction method in the audio technology field is to use psychoacoustics to eliminate sound energy that is inaudible to the human ear. Psychoacoustics studies the relationship between sound and the auditory perception it evokes. Specifically, it uses auditory curves to suppress sound energy that is inaudible to the human ear, thereby achieving the goal of reducing power consumption while ensuring that the user can hear the sound.
[0020] However, in related technologies, when suppressing sound energy that is inaudible to the human ear based on the auditory curve, a fixed strategy is usually used to suppress sound energy that is inaudible to the human ear, which can affect the audio playback effect in some cases.
[0021] To address the aforementioned problems, the inventors have proposed an audio playback method, apparatus, electronic device, and storage medium as described in the embodiments of this application. These methods not only reduce power consumption during audio playback based on auditory curves but also consider the audio signal characteristics and playback information. This allows for a reduction in power consumption while maintaining audio playback quality and stability, thereby ensuring optimal playback performance. The specific audio playback method will be described in detail in the subsequent embodiments.
[0022] The audio playback method provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0023] Please see Figure 1 , Figure 1 A flowchart illustrating an embodiment of the audio playback method provided in this application is shown. In a specific embodiment, the audio playback method is applied to, for example... Figure 6 The audio playback device 700 shown and the electronic device 100 configured with the audio playback device 700 are also shown. Figure 7 The following will use an electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understood that the electronic device used in this embodiment can be a smartphone, tablet computer, smartwatch, e-reader, etc., and is not limited thereto. The following will focus on... Figure 1 The process shown will be described in detail. The audio playback method may specifically include the following steps:
[0024] Step S110: Obtain the auditory curve corresponding to the first audio signal to be played.
[0025] In this embodiment of the application, the electronic device can acquire the audio signal to be played and use the acquired audio signal to be played as the first audio signal.
[0026] In some implementations, there can be multiple ways for an electronic device to acquire the audio signal to be played. For example, the electronic device can acquire the audio signal to be played locally, or it can acquire the audio signal to be played from an external device via a network. The specific method by which the electronic device acquires the audio signal to be played is not limited.
[0027] In one possible implementation, the electronic device can perform frame-segmentation processing on the audio signal stream to be played. Based on each frame of audio signal after frame-segmentation processing, each frame of audio signal is used as a first audio signal in sequence according to the timing of each frame of audio signal. For each frame of first audio signal, the audio processing method provided in the embodiments of this application is executed.
[0028] In some embodiments, after acquiring the first audio signal, the electronic device can preprocess the first audio signal. Preprocessing includes at least converting the audio signal from the time domain to the frequency domain using a fast Fourier transform (FFT), that is, converting the original time-domain first audio signal into a frequency-domain signal. Of course, preprocessing of the first audio signal may also include other processing, such as noise reduction.
[0029] In this embodiment, the electronic device can acquire the auditory curve corresponding to the first audio signal to be played, so as to reduce the energy of at least a portion of the signal in the first audio signal according to the auditory curve. The auditory curve can be a human ear masking threshold curve, which is a graphical representation of the minimum intensity (usually in decibels) required for a masked sound (i.e., the perceived sound) to be perceived by the human ear in the presence of a masking sound. It reflects the influence of the masking effect on sound perception, that is, one sound (masking sound) can increase the perception threshold of another sound (masked sound).
[0030] In some implementations, electronic devices can determine the auditory curve of a first audio signal in the frequency domain based on a psychoacoustic model. A psychoacoustic model is a mathematical representation of the statistical properties of human hearing, used to characterize the relationship between objective sound and subjective hearing. Psychoacoustic models can simulate the complex mechanisms of the human auditory system, including the nonlinear response of the cochlea, the binaural effect, and the masking effect, to more accurately describe and predict human perception of sound.
[0031] In one possible implementation, the electronic device can convert the first audio signal from the time domain to the frequency domain; then, based on a psychoacoustic model, identify the tonal and non-tonal components (components close to noise) in the frequency domain signal and calculate the auditory curve of the frequency domain signal in the Bark critical band.
[0032] In some implementations, considering that energy suppression processing of audio signals based on auditory curves may affect the playback effect of electronic devices, the electronic device may acquire the auditory curve corresponding to the first audio signal to be played when the target playback function is on; when the target playback function is off, the auditory curve corresponding to the first audio signal to be played is not acquired, and the first audio signal is played directly.
[0033] In one possible implementation, the electronic device may display a settings interface for the target playback function, which may include a setting switch control for the target playback function; the electronic device may control the target playback function to be on or off in response to a control operation on the setting switch control.
[0034] In one possible implementation, the electronic device can detect touch operations on the display interface. If a sliding operation of a target sliding trajectory is detected in the target touch area, the electronic device can respond to the sliding operation by controlling the target playback function to be turned on or off.
[0035] Step S120: Based on the auditory curve and according to at least one of the audio signal characteristics of the first audio signal and the playback information, perform energy suppression processing on at least a portion of the sub-audio signals in the first audio signal to obtain the second audio signal.
[0036] In this embodiment, after acquiring the above auditory curve, the electronic device can reduce the energy of the first audio signal based on the auditory curve. Specifically, the electronic device can perform energy suppression processing on at least a portion of the sub-audio signals of the first audio signal based on the auditory curve and at least one of the audio signal characteristics of the first audio signal and playback information, and use the suppressed first audio signal as the second audio signal, i.e., the audio signal that will be played subsequently. Performing energy suppression processing on the above sub-audio signals can also be called attenuation processing, used to reduce the signal energy.
[0037] In some implementations, the above audio signal characteristics may include the dynamic range (DR) of the first audio signal. The dynamic range refers to the difference between the maximum undistorted level and the noise level in the audio signal, usually expressed in decibels (dB). The size of the dynamic range can reflect the user's sensitivity to the playback effect. Therefore, based on the dynamic range, the audio signal that needs to be energy suppressed can be subjected to energy suppression processing to ensure the audio playback effect.
[0038] In one possible implementation, the dynamic range can be calculated using envelope detection, utilizing the first N milliseconds of the audio signal. This calculated dynamic range can be considered the initial dynamic range. Furthermore, as playback progresses, the dynamic range is recalculated and updated in units of M milliseconds; that is, the dynamic range is recalculated every M milliseconds. Here, M is less than N; for example, M can be 5 milliseconds and N can be 200 milliseconds.
[0039] In the above embodiments, there are multiple ways to perform envelope detection. One method is to perform envelope detection by performing Hilbert transform on the audio signal. Another method is to perform envelope detection on the audio signal by combining local peak detection with spline fitting.
[0040] In some implementations, playback information may include at least the audio playback scenario and playback volume. The audio playback scenario can be a scenario categorized based on the required audio playback quality. For example, audio playback scenarios may include music playback scenarios, short video playback scenarios, movie playback scenarios, audiobook playback scenarios, map navigation broadcast scenarios, etc. Understandably, the playback effect, requirements, and sensitivity to playback effect differ in different audio playback scenarios. Therefore, energy suppression processing can be performed on audio signals requiring energy suppression based on the audio playback scenario to ensure the audio playback effect. Playback volume can refer to the volume used by the electronic device to play the first audio signal. With different playback volumes, the user's requirements and sensitivity to playback effect also differ. For example, with a higher playback volume, the masking effect is more pronounced, and the user is more inclined to hear the sound clearly. Therefore, energy suppression processing can be performed on audio signals requiring energy suppression based on the playback volume to ensure the audio playback effect.
[0041] In some embodiments, based on the above-mentioned auditory curve and according to at least one of the audio signal characteristics of the first audio signal and playback information, energy suppression processing is performed on at least a portion of the sub-audio signals in the first audio signal. This can be achieved by determining the sub-audio signals in the first audio signal that require energy suppression processing based on the auditory curve, and then performing energy suppression processing according to at least one of the above-mentioned audio signal characteristics and playback information. The degree of energy suppression is matched with the information used (i.e., at least one of the audio signal characteristics and playback information). It is understood that the required audio playback quality and effect differ depending on the audio signal characteristics and playback information. Therefore, matching the degree of energy suppression with the above-mentioned audio signal characteristics and playback information ensures that the audio playback quality and effect meet the user's needs, thereby guaranteeing the audio playback effect.
[0042] Of course, the above audio signal characteristics can also include other information related to the audio signal's playback quality and effect requirements, such as sampling frequency, signal-to-noise ratio, bit depth, etc. Similarly, playback information can also include other information, such as the number of channels, audio format, audio source, sound field effects, etc.
[0043] In this embodiment of the application, after energy suppression processing is performed on at least a portion of the sub-audio signals in the first audio signal, the obtained audio signal can be subjected to inverse fast fourier transform (IFFT) to obtain a time-domain signal, which serves as the second audio signal to be played.
[0044] Step S130: Play the second audio signal.
[0045] In this embodiment of the application, after performing energy suppression processing on at least a portion of the first audio signal, a second audio signal is obtained. The obtained second audio signal is used to replace the first audio signal that needs to be played. The electronic device can play the second audio signal, thereby reducing the power consumption during audio playback. Furthermore, since the audio signal characteristics and playback information of the audio signal are considered when performing energy suppression processing on the audio signal, the playback effect of the audio playback can be guaranteed.
[0046] The audio playback method provided in this application can reduce the power consumption of audio playback based on the auditory curve, while also considering the audio signal characteristics and playback information of the audio signal. This can reduce the power consumption of audio playback while taking into account the quality and stability of audio playback, thereby ensuring the playback effect of audio playback.
[0047] Please see Figure 2 ,Figure 2 A flowchart illustrating another embodiment of the audio playback method provided in this application is shown. This audio playback method is applied to the aforementioned electronic device, and will be discussed below. Figure 2 The process shown will be described in detail. The audio playback method may specifically include the following steps:
[0048] Step S210: Obtain the auditory curve corresponding to the first audio signal to be played.
[0049] In this embodiment, step S210 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0050] Step S220: Based on the auditory curve, determine the frequency point to be adjusted in the first audio signal, wherein the energy corresponding to the frequency point to be adjusted is lower than the auditory masking threshold corresponding to the frequency point to be adjusted.
[0051] In this embodiment of the application, when the electronic device performs energy suppression processing on at least a portion of the sub-audio signals in the first audio signal based on the auditory curve corresponding to the first audio signal and according to at least one of the audio signal characteristics and playback information of the first audio signal, it can first determine the at least a portion of the sub-audio signals in the first audio signal that need to be energy suppressed based on the above auditory curve.
[0052] The electronic device can determine the frequency points whose energy is lower than the auditory masking threshold in the auditory curve based on the above auditory curve, thus obtaining the frequency points to be adjusted. In other words, the energy of the determined frequency points to be adjusted is lower than the auditory masking threshold corresponding to that frequency point in the auditory curve. It should be noted that the frequency points to be adjusted are the frequency points in the first audio signal that require energy suppression processing. There may be one or more frequency points to be adjusted, and there is no limitation on this.
[0053] In some implementations, the electronic device can iterate through all frequency points for the first audio signal and compare the energy corresponding to each frequency point with the auditory masking threshold corresponding to that frequency point in the auditory curve. Based on the comparison result, if the energy corresponding to the frequency point is lower than the auditory masking threshold corresponding to that frequency point in the auditory curve, then the frequency point can be determined as a frequency point to be adjusted. If the energy corresponding to the frequency point is higher than or equal to the auditory masking threshold corresponding to that frequency point in the auditory curve, then the frequency point is not determined as a frequency point to be adjusted, that is, the sub-audio signal of that frequency point does not need to be subjected to energy suppression processing.
[0054] Step S230: Determine the gain value corresponding to the frequency point to be adjusted based on at least one of the audio signal characteristics of the first audio signal and the playback information.
[0055] In this embodiment of the application, after the electronic device determines the frequency point to be adjusted that needs to be energy suppressed, it can determine the gain value corresponding to the frequency point to be adjusted based on at least one of the above audio signal characteristics and playback information. The determined gain value is used for subsequent energy suppression processing of the sub-audio signal corresponding to the frequency point to be adjusted. The gain value can be understood as a gain factor, which can be a value between 0 and 1. The gain factor is a value between 0 and 1, used to reduce the amplitude of the audio signal (when the gain value is less than 1) without amplifying the signal (because the gain value does not exceed 1).
[0056] In some implementations, the gain value determined above can be matched with at least one of the audio signal characteristics and playback information. This allows subsequent energy suppression processing of the audio signal based on the determined gain value to ensure that the audio playback quality and effect meet the user's needs, thereby guaranteeing the audio playback effect.
[0057] In some implementations, the electronic device can simultaneously perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the audio signal characteristics and playback information. That is, the electronic device can simultaneously determine the gain value based on the audio signal characteristics and playback information. When determining the gain value corresponding to the frequency point to be adjusted based on the audio signal characteristics and playback information of the first audio signal, the gain value corresponding to the audio signal characteristics and playback information of the first audio signal can be determined based on the mapping relationship between the audio signal characteristics and playback information and the gain value, and the determined gain value is used as the gain value corresponding to the frequency point to be adjusted. The electronic device can pre-store the above mapping relationship, and when energy suppression processing is required for the sub-audio signal in the first audio signal, the above gain value can be determined based on the stored mapping relationship.
[0058] In one possible implementation, the above mapping relationship can be pre-tuned for different combinations of audio signal characteristics and playback information to obtain a gain value that can guarantee the required playback quality and effect under each combination. That is, for any combination, after energy suppression processing of the audio signal under the combination using the tunable gain value, the required playback quality and effect of the combination can be met.
[0059] Step S240: Based on the gain value corresponding to the frequency point to be adjusted, perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal to obtain the second audio signal.
[0060] In this embodiment of the application, after determining the gain value corresponding to the frequency point to be adjusted, energy suppression processing can be performed on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the gain value corresponding to the frequency point to be adjusted, and the first audio signal after the suppression processing can be used as the second audio signal, that is, the audio signal that needs to be played later.
[0061] In some implementations, energy suppression processing is performed on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the gain value corresponding to the frequency point to be adjusted. This can be achieved by performing gain processing on the sub-audio signal based on the gain value corresponding to the frequency point to be adjusted, i.e., adjusting the amplitude of the sub-audio signal, thereby reducing the energy of the sub-audio signal. Specifically, the amplitude of the sub-audio signal can be multiplied by the gain value. Since the gain value is between 0 and 1, it can reduce the amplitude of the sub-audio signal, thus achieving the effect of reducing the energy of the sub-audio signal.
[0062] Step S250: Play the second audio signal.
[0063] In this embodiment, step S250 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0064] The audio playback method provided in this application embodiment can reduce the power consumption of audio playback based on the auditory curve. It determines the gain value for energy suppression processing based on the audio signal characteristics and playback information of the audio signal, and then performs energy suppression processing on the sub-audio signal that needs energy suppression processing based on the gain value. This can reduce the power consumption caused by audio playback while taking into account the quality and stability of audio playback, thereby ensuring the playback effect of audio playback.
[0065] Please see Figure 3 , Figure 3 A flowchart illustrating another embodiment of the audio playback method provided in this application is shown. This audio playback method is applied to the aforementioned electronic device, and will be discussed below. Figure 3 The process shown will be described in detail. The audio playback method may specifically include the following steps:
[0066] Step S310: Obtain the auditory curve corresponding to the first audio signal to be played.
[0067] Step S320: Based on the auditory curve, determine the frequency point to be adjusted in the first audio signal, wherein the energy corresponding to the frequency point to be adjusted is lower than the auditory masking threshold corresponding to the frequency point to be adjusted.
[0068] In the embodiments of this application, steps S310 and S320 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0069] Step S330: Determine the gain value corresponding to the frequency point to be adjusted based on at least one of the audio signal characteristics of the first audio signal and the playback information, as well as the sub-frequency band to which the frequency point to be adjusted belongs.
[0070] In this embodiment, when the electronic device performs energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal, it can determine the gain value used for energy suppression processing of the frequency point to be adjusted based on at least one of the audio signal characteristics and playback information of the first audio signal, as well as the sub-frequency band to which the frequency point to be adjusted belongs. That is, in the process of energy suppression processing the first audio signal, when determining the gain value used for energy suppression processing, not only its audio signal characteristics and playback information are considered, but also the frequency band to which the frequency point to be adjusted belongs. Furthermore, since the playback quality and effect requirements of audio signals in different frequency bands vary depending on the audio signal characteristics and playback information, the above method can better guarantee the audio playback effect.
[0071] In some implementations, the audible frequency band can be pre-divided into multiple sub-bands based on the expected playback quality and effect requirements of different frequency bands. For example, the audible frequency band is 20Hz (Hz) to 20kHz (kHz), which can be divided into five sub-bands with sub-frequency points set at 100Hz, 750Hz, 1.5kHz, and 6kHz, respectively.
[0072] In some implementations, the gain value determined above can be matched with the audio signal characteristics, playback information, and the sub-band to which the frequency to be adjusted belongs. This allows subsequent energy suppression processing of the audio signal based on the determined gain value to ensure that the audio playback quality and effect meet the user's needs, thereby guaranteeing the audio playback effect.
[0073] In some embodiments, when an electronic device determines the gain value corresponding to a frequency point to be adjusted based on at least one of the audio signal characteristics of the first audio signal and playback information, and the sub-frequency band to which the frequency point to be adjusted belongs, the gain value can be determined based on the audio signal characteristics of the first audio signal, the playback information, and the sub-frequency band. That is, the energy suppression processing of the sub-audio signal corresponding to the frequency point to be adjusted is performed simultaneously by combining the sub-frequency band, audio signal characteristics, and playback information. Specifically, the electronic device can determine the gain value corresponding to the sub-frequency band to which the frequency point to be adjusted belongs, the audio signal characteristics of the first audio signal, and the playback information, based on different mapping relationships between sub-frequency bands, audio signal characteristics, playback information, and gain values, and use the determined gain value as the gain value corresponding to the frequency point to be adjusted. The electronic device can pre-store the above mapping relationships, and when energy suppression processing of the sub-audio signal in the first audio signal is required, the above gain value can be determined based on the stored mapping relationships.
[0074] In some implementations, the above mapping relationship can be pre-tuned for different combinations of sub-bands, audio signal characteristics, and playback information to obtain a gain value that can guarantee the required playback quality and effect under each combination. That is, for any combination, after energy suppression processing of the audio signal under that combination using the tunable gain value, the required playback quality and effect of that combination can be met.
[0075] The audio playback method provided in this application effectively adjusts the low-frequency signal portion, which contributes significantly to power consumption, while ensuring that the sound quality of the high-frequency portion is not compromised. The processing method, which divides the signal into multiple sub-bands, can better adapt to the spectral characteristics of audio streams in different media audio scenarios. For example, a pure music scenario may include low-frequency components such as bass and bass drum to enhance the "power" and rhythm, while an audiobook scenario mainly involves the mid-frequency components where vocals are located, containing fewer low-frequency components, thus better meeting the specific needs of various audio streams.
[0076] For example, in audio playback scenarios such as audiobooks, navigation broadcasts, and online courses, the audio stream content is mainly composed of human voices. However, due to performance limitations of audio acquisition equipment and recording environments, a large amount of low-frequency noise is often introduced during audio source generation. This low-frequency noise not only affects sound quality but also reduces the user experience. Similarly, the above problems also exist in short video playback and live streaming scenarios. Many low-quality audio sources introduce low-frequency environmental noise or sampling distortion noise after multiple encoding / decoding or format conversions, further affecting sound quality. Based on the audio playback method provided in this application embodiment, the low-frequency noise portion of the audio source can be effectively filtered out, highlighting the mid-frequency portion where human voices are located, improving voice clarity, and enhancing overall sound quality.
[0077] Step S340: Based on the gain value corresponding to the frequency point to be adjusted, perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal to obtain the second audio signal.
[0078] In this embodiment of the application, after determining the gain value corresponding to the frequency point to be adjusted, energy suppression processing can be performed on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the gain value corresponding to the frequency point to be adjusted, and the first audio signal after the suppression processing can be used as the second audio signal, that is, the audio signal that needs to be played later.
[0079] In some implementations, energy suppression processing is performed on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the gain value corresponding to the frequency point to be adjusted. This can be achieved by performing gain processing on the sub-audio signal based on the gain value corresponding to the frequency point to be adjusted, i.e., adjusting the amplitude of the sub-audio signal, thereby reducing the energy of the sub-audio signal. Specifically, the amplitude of the sub-audio signal can be multiplied by the gain value. Since the gain value is between 0 and 1, it can reduce the amplitude of the sub-audio signal, thus achieving the effect of reducing the energy of the sub-audio signal.
[0080] Step S350: Play the second audio signal.
[0081] In this embodiment, step S350 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0082] The audio playback method provided in this application can reduce the power consumption of audio playback based on the auditory curve, while also considering the audio signal characteristics and playback information of the audio signal. This allows for a reduction in power consumption while maintaining audio playback quality and stability, thus ensuring the playback effect. Furthermore, it considers the user's needs for playback effects of audio signals in different sub-bands. When suppressing the sub-audio signal of the frequency point to be adjusted in the audio signal to be played, it also combines the sub-band to which the frequency point to be adjusted belongs to determine the corresponding gain value, and then suppresses the sub-audio signal of the frequency point to be adjusted according to the gain value, thereby better ensuring the audio playback quality.
[0083] Please see Figure 4 , Figure 4 A flowchart illustrating an audio playback method provided in another embodiment of this application is shown. This audio playback method is applied to the aforementioned electronic device, and will be discussed below. Figure 4 The process shown will be described in detail. The audio playback method may specifically include the following steps:
[0084] Step S410: Obtain the auditory curve corresponding to the first audio signal to be played.
[0085] Step S420: Based on the auditory curve, determine the frequency point to be adjusted in the first audio signal, wherein the energy corresponding to the frequency point to be adjusted is lower than the auditory masking threshold corresponding to the frequency point to be adjusted.
[0086] In the embodiments of this application, steps S510 and S520 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0087] Step S430: Obtain the first gain value corresponding to the sub-band to which the frequency point to be adjusted belongs, the second gain value corresponding to the audio signal characteristics of the first audio signal, and the third gain value corresponding to the playback information of the first audio signal.
[0088] In this embodiment of the application, when determining the gain value corresponding to the frequency point to be adjusted based on the sub-band to which the frequency point to be adjusted belongs, the audio signal characteristics of the first audio signal, and the playback information of the first audio signal, the gain value can be determined firstly based on the sub-band, the audio signal characteristics, and the playback information to obtain the first gain value corresponding to the sub-band, the second gain value corresponding to the audio signal characteristics, and the third gain value corresponding to the playback information.
[0089] In some implementations, the electronic device may store a first mapping relationship between different sub-bands and gain values, a second mapping relationship between different audio signal characteristics and gain values, and a third mapping relationship between different playback information and gain values. The electronic device may determine the gain value (as the first gain value) corresponding to the sub-band to which the frequency point to be adjusted belongs, based on the stored first mapping relationship; it may determine the gain value (as the second gain value) corresponding to the audio signal characteristics of the first audio signal, based on the stored second mapping relationship; and it may determine the gain value (as the third gain value) corresponding to the playback information of the first audio signal, based on the stored third mapping relationship. The first, second, and third mapping relationships may be obtained through prior testing.
[0090] Step S440: Based on the first gain value, the second gain value, and the third gain value, determine the gain value corresponding to the frequency point to be adjusted.
[0091] In this embodiment, after determining the first gain value, the second gain value, and the third gain value, the gain value corresponding to the frequency point to be adjusted can be determined by combining the determined first gain value, the second gain value, and the third gain value. That is, the gain value is determined for three different dimensions: sub-frequency band, audio signal characteristics, and playback information. Then, the gain value determined for the three dimensions is combined to determine the final gain value to be used. This also ensures that when determining the gain value for energy suppression processing, the requirements of frequency range, audio signal characteristics, and playback information on playback quality and effect are considered, balancing the quality and stability of audio playback, thereby guaranteeing the audio playback effect.
[0092] In some implementations, when determining the gain value corresponding to the frequency point to be adjusted based on the first gain value, the second gain value, and the third gain value, a weighted calculation can be performed on the first gain value, the second gain value, the second gain value, and the third gain value based on the first weight corresponding to the sub-frequency band, the second weight corresponding to the audio signal characteristics, and the third weight corresponding to the playback information to obtain the gain value corresponding to the frequency point to be adjusted. The first weight, the second weight, and the third weight can be predetermined; for example, they can be determined based on the relative importance of the sub-frequency band, the audio signal characteristics, and the playback information.
[0093] In one possible implementation, the sum of the first weight, the second weight, and the third weight can be 1, and the values of the first weight, the second weight, and the third weight are between 0 and 1. The sum of the first gain value and the first weight can be obtained to obtain the first sum; the sum of the second gain value and the second weight can be obtained to obtain the second sum; the sum of the third gain value and the third weight can be obtained to obtain the third sum; then the sum of the first sum, the second sum, and the third sum can be obtained, and the obtained sum can be used as the gain value corresponding to the frequency point to be adjusted.
[0094] It should be noted that if energy suppression processing of the sub-audio signal is performed based on a sub-frequency band and only according to one of the audio signal characteristics and playback information, the method for determining the gain value in the embodiments of this application can also be used. For example, if energy suppression processing is performed on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the sub-frequency band to which the frequency point to be adjusted belongs and according to the audio signal characteristics, then the gain value corresponding to the sub-frequency band and the gain value corresponding to the audio signal characteristics can be determined. Then, based on the gain value corresponding to the sub-frequency band and the gain value corresponding to the audio signal characteristics, the gain value corresponding to the frequency point to be adjusted can be determined.
[0095] Step S450: Based on the gain value corresponding to the frequency point to be adjusted, perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal to obtain the second audio signal.
[0096] Step S460: Play the second audio signal.
[0097] In this embodiment, steps S450 and S460 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0098] The audio playback method provided in this application can reduce the power consumption of audio playback based on the auditory curve, while also considering the audio signal characteristics and playback information of the audio signal. This reduces the power consumption of audio playback while maintaining the quality and stability of audio playback, thus ensuring the playback effect. In addition, it also considers the user's needs for the playback effect of audio signals in different sub-bands. When suppressing the sub-audio signal of the frequency point to be adjusted in the audio signal to be played, it combines the sub-band to which the frequency point to be adjusted belongs, the audio signal characteristics of the audio signal, and the playback information to determine the corresponding gain value. Then, it suppresses the sub-audio signal of the frequency point to be adjusted according to the gain value, thereby better ensuring the audio playback quality.
[0099] Please see Figure 5 , Figure 5 A flowchart illustrating another embodiment of the audio playback method provided in this application is shown. This audio playback method is applied to the aforementioned electronic device, and will be discussed below. Figure 5 The process shown will be described in detail. The audio playback method may specifically include the following steps:
[0100] Step S510: If the playback scenario of the first audio signal to be played is the target scenario, and the remaining power of the electronic device is lower than the power threshold, then based on the psychoacoustic model, the auditory curve corresponding to the first audio signal to be played is obtained, and the power consumption rate of the electronic device in the target scenario is greater than the speed threshold.
[0101] In this embodiment of the application, considering that energy suppression processing of audio signals based on auditory curves may affect the playback effect of electronic devices, the electronic devices may execute the audio playback method provided in this embodiment of the application only when the corresponding conditions are met.
[0102] The electronic device can determine the playback scenario of the first audio signal, such as a music playback scenario, a short video playback scenario, a movie scenario, an audiobook scenario, a map navigation broadcast scenario, etc.; and the electronic device can also determine the current remaining battery power; the electronic device can match the current playback scenario with a target scenario, where the power consumption rate in the target scenario is greater than a speed threshold, for example, the target scenario may include a video playback scenario or a live broadcast scenario; in addition, it determines whether the remaining battery power of the electronic device is lower than a battery threshold, for example, the battery threshold is 40% of the maximum battery power; if the playback scenario is the target scenario and the remaining battery power of the electronic device is lower than the battery threshold, it means that the current power consumption rate of the electronic device is relatively fast and the remaining battery power is low. Therefore, in order to improve the battery life of the electronic device, the audio playback method provided in this application embodiment can be executed, that is, for the first audio signal to be played, the auditory curve corresponding to the first audio signal is obtained and subsequent steps are executed; if the playback scenario is not the target scenario, and / or the remaining battery power of the electronic device is not lower than the battery threshold, the auditory curve corresponding to the first audio signal is not obtained, but the first audio signal is played directly.
[0103] Step S520: Based on the auditory curve and according to at least one of the audio signal characteristics of the first audio signal and the playback information, perform energy suppression processing on at least a portion of the sub-audio signals in the first audio signal to obtain the second audio signal.
[0104] Step S530: Play the second audio signal.
[0105] In the embodiments of this application, steps S520 and S530 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0106] The audio playback method provided in this application can reduce the power consumption of audio playback based on the auditory curve, while also considering the audio signal characteristics and playback information of the audio signal. This can reduce the power consumption caused by audio playback while maintaining the quality and stability of audio playback, thereby ensuring the playback effect. Furthermore, the power reduction processing is only performed when the electronic device is in a playback scenario with a high power consumption rate and the remaining power is below the power threshold, thereby further ensuring the playback effect of audio playback and better meeting the needs of users.
[0107] Please see Figure 6This diagram illustrates a structural block diagram of an audio playback device 700 provided in an embodiment of this application. The audio playback device 700 utilizes the aforementioned electronic device and includes: a curve acquisition module 710, an energy reduction module 720, and a playback execution module 730. Specifically, the curve acquisition module 710 acquires the auditory curve corresponding to a first audio signal to be played; the energy reduction module 720, based on the auditory curve and according to at least one of the audio signal characteristics of the first audio signal and playback information, performs energy suppression processing on at least a portion of the sub-audio signals in the first audio signal to obtain a second audio signal; and the playback execution module 730 plays the second audio signal.
[0108] In some embodiments, the energy reduction module 720 may be specifically used to: determine the frequency point to be adjusted in the first audio signal based on the auditory curve, wherein the energy corresponding to the frequency point to be adjusted is lower than the auditory masking threshold corresponding to the frequency point to be adjusted; and perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal according to at least one of the audio signal characteristics of the first audio signal and playback information to obtain a second audio signal.
[0109] In one possible implementation, the energy reduction module 720 can also be used to perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the sub-frequency band to which the frequency point to be adjusted belongs, and according to at least one of the audio signal characteristics of the first audio signal and playback information, to obtain a second audio signal.
[0110] Optionally, the energy reduction module 720 can also be used to determine the gain value corresponding to the frequency point to be adjusted based on the sub-frequency band to which the frequency point to be adjusted belongs, and based on at least one of the audio signal characteristics of the first audio signal and playback information; and to perform energy suppression processing on the sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal based on the gain value corresponding to the frequency point to be adjusted, so as to obtain the second audio signal.
[0111] Optionally, the energy reduction module 720 can also be used to determine the gain value corresponding to the sub-band to which the frequency point to be adjusted belongs, the audio signal characteristics of the first audio signal, and the playback information based on different sub-bands, audio signal characteristics, and the mapping relationship between playback information and gain value, and use it as the gain value corresponding to the frequency point to be adjusted.
[0112] Optionally, the energy reduction module 720 can also be used to obtain a first gain value corresponding to the sub-band to which the frequency point to be adjusted belongs, a second gain value corresponding to the audio signal characteristics of the first audio signal, and a third gain value corresponding to the playback information of the first audio signal; and determine the gain value corresponding to the frequency point to be adjusted based on the first gain value, the second gain value, and the third gain value.
[0113] Optionally, the energy reduction module 720 can also be used to perform weighted calculations on the first gain value, the second gain value, and the third gain value based on the first weight corresponding to the sub-frequency band, the second weight corresponding to the audio signal characteristics, and the third weight corresponding to the playback information, so as to obtain the gain value corresponding to the frequency point to be adjusted.
[0114] In some implementations, the audio signal features include at least dynamic range, and the playback information includes at least the audio playback scene and playback volume.
[0115] In some implementations, the curve acquisition module 710 can be specifically used to execute the step of acquiring the auditory curve corresponding to the first audio signal to be played based on the psychoacoustic model if the playback scenario of the first audio signal is the target scenario and the remaining power of the electronic device is lower than the power threshold, wherein the power consumption rate of the electronic device in the target scenario is greater than the speed threshold.
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0117] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0118] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0119] In summary, the solution provided in this application obtains the auditory curve corresponding to the first audio signal to be played, and based on the obtained auditory curve, performs energy suppression processing on at least a portion of the sub-audio signals in the first audio signal according to at least one of the audio signal characteristics and playback information to obtain a second audio signal, which is then played. Therefore, while reducing the power consumption of audio playback based on the auditory curve, it also considers the audio signal characteristics and playback information, thereby reducing the power consumption of audio playback while maintaining the quality and stability of audio playback, thus ensuring the playback effect.
[0120] Please refer to Figure 7 This document illustrates a structural block diagram of an electronic device according to an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, smartwatch, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications can be stored in the memory 120 and configured to be executed by the one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0121] Processor 110 may include one or more processing cores. Processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.
[0122] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0123] Please refer to Figure 8 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0124] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An audio playback method, characterized by, The method comprises: acquiring an auditory curve corresponding to a first audio signal to be played; based on the auditory curve and at least one of an audio signal feature and playing information of the first audio signal, performing energy suppression processing on at least part of sub-audio signals in the first audio signal to obtain a second audio signal; playing the second audio signal.
2. The method of claim 1, wherein, The method comprises: based on the auditory curve, determining a frequency point to be adjusted in the first audio signal, the energy corresponding to the frequency point to be adjusted being lower than an auditory masking threshold corresponding to the frequency point to be adjusted; determining a gain value corresponding to the frequency point to be adjusted according to at least one of an audio signal feature and playing information of the first audio signal; based on the gain value corresponding to the frequency point to be adjusted, performing energy suppression processing on a sub-audio signal corresponding to the frequency point to be adjusted in the first audio signal to obtain a second audio signal.
3. The method of claim 2, wherein, The method comprises: determining the gain value corresponding to the frequency point to be adjusted according to at least one of an audio signal feature and playing information of the first audio signal, and a sub-band to which the frequency point to be adjusted belongs.
4. The method of claim 3, wherein, The method comprises: based on a mapping relationship between different sub-bands, audio signal features, playing information and gain values, determining a gain value corresponding to the sub-band to which the frequency point to be adjusted belongs, the audio signal feature of the first audio signal and the playing information as the gain value corresponding to the frequency point to be adjusted.
5. The method of claim 3, wherein, The method comprises: acquiring a first gain value corresponding to the sub-band to which the frequency point to be adjusted belongs, a second gain value corresponding to the audio signal feature of the first audio signal, and a third gain value corresponding to the playing information of the first audio signal; based on the first gain value, the second gain value and the third gain value, determining the gain value corresponding to the frequency point to be adjusted.
6. The method of claim 5, wherein, The method comprises: based on a first weight corresponding to the sub-band, a second weight corresponding to the audio signal feature and a third weight corresponding to the playing information, performing weighted calculation on the first gain value, the second gain value and the third gain value to obtain the gain value corresponding to the frequency point to be adjusted.
7. The method according to any one of claims 1 to 6, characterized in that, The audio signal feature at least comprises a dynamic range, and the playing information at least comprises an audio playing scene and a playing volume.
8. The method according to any one of claims 1 to 6, characterized in that, The acquiring of the hearing curve corresponding to the first audio signal to be played comprises: The acquiring of the hearing curve corresponding to the first audio signal to be played based on a psychoacoustic model.
9. The method of claim 8, wherein, The acquiring of the hearing curve corresponding to the first audio signal to be played based on a psychoacoustic model comprises: If the playing scene of the first audio signal is a target scene, and the remaining power of the electronic device is lower than a power threshold, the step of acquiring the hearing curve corresponding to the first audio signal to be played based on a psychoacoustic model is executed, and the power consumption speed of the electronic device in the target scene is greater than a speed threshold.
10. An audio playback device, characterized by The device comprises a curve acquiring module, an energy reducing module and a playing executing module, wherein, The curve acquiring module is configured to acquire the hearing curve corresponding to the first audio signal to be played; The energy reducing module is configured to perform energy suppression processing on at least part of the sub-audio signals in the first audio signal based on the hearing curve and at least one of the audio signal characteristics and the playing information of the first audio signal, to obtain a second audio signal; The playing executing module is configured to play the second audio signal.
11. An electronic device, comprising: Comprise: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs are configured to execute the method as claimed in any one of claims 1-9.