Audio playing method and device, electronic equipment, storage medium and program product
By detecting the differences in environmental parameters in electronic devices and adjusting the audio response, the problem of insufficient sound in the non -ideal state of the speaker is solved, and the best audio playback effect is achieved in a poor environment.
Patent Information
- Application Number
- CN202411503602.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
AI Technical Summary
The speakers in electronic devices may respond poorly to sound signals in non-ideal states, resulting in sound distortion and blurring, which will reduce the audio playback effect.
By obtaining the audio to be played, the matching of the current environmental parameters and the target environmental parameters, if not match, determine the first curve according to the current environmental parameters, compare the difference between the second curve under the target environment parameters, adjust the audio response to the audio response To compensate the differences, the audio after the adjustment is finally played.
Even in a poor working environment, the audio played by the electronic device can achieve the playback effect in the best working environment through the speaker, which improves the audio playback effect.
Smart Images

Figure CN119383523A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and specifically relates to an audio playback method, device, electronic device, storage medium and program product. Background Art
[0002] The speaker in an electronic device has a built-in diaphragm that can respond to sound signals (i.e., signals in the electronic form of sound) and generate corresponding vibrations, allowing the speaker to produce sound. The diaphragm's ability to respond to sound signals of different frequencies can be expressed by the diaphragm's frequency response. Ideally, the diaphragm should be able to accurately respond to sound signals in the full frequency range so that the speaker can produce corresponding sounds, with no significant distortion from low to high frequencies.
[0003] However, in actual applications, the diaphragm is usually not in an ideal state. In a non-ideal state, the diaphragm may respond poorly to the signal, resulting in sound distortion, blurred sound, etc., resulting in poor audio playback effect of the electronic device. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an audio playback method, device, electronic device, storage medium and program product, which can improve the audio playback effect of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides an audio playback method, the method comprising: when a first audio to be played is acquired and the current environmental parameters do not match the target environmental parameters, determining a first curve according to the current environmental parameters, the first curve being used to describe the relationship between the current environmental parameters, the audio frequency and the audio response; adjusting the audio response of the first audio according to the difference between the first curve and the second curve, the second curve being used to describe the relationship between the target environmental parameters, the audio frequency and the audio response; and playing the adjusted first audio.
[0006] In a second aspect, an embodiment of the present application provides an audio playback device, which includes: a determination module, an execution module and a playback module. The above-mentioned determination module is used to determine a first curve according to the current environmental parameters when a first audio to be played is obtained and the current environmental parameters do not match the target environmental parameters. The first curve is used to describe the relationship between the current environmental parameters, the audio frequency and the audio response. The above-mentioned execution module is used to adjust the audio response of the first audio according to the difference between the first curve determined by the determination module and the second curve. The second curve is used to describe the relationship between the target environmental parameters, the audio frequency and the audio response. The above-mentioned playback module is used to play the first audio adjusted by the execution module.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In an embodiment of the present application, when the first audio to be played is obtained and the current environment parameters do not match the target environment parameters, a first curve can be determined according to the current environment parameters, and the first curve is used to describe the relationship between the current environment parameters, the audio frequency and the audio response. Then, the audio response of the first audio can be adjusted according to the difference between the first curve and the second curve, and the second curve is used to describe the relationship between the target environment parameters, the audio frequency and the audio response. Finally, the adjusted first audio can be played. In this solution, when the current environment parameters do not match the target environment parameters, it is considered that the working environment of the electronic device is far from the optimal working environment. Therefore, the curve under the current working environment can be determined, and the curve under the current working environment can be compared with the curve under the optimal working environment to obtain the difference between the audio response of the first audio in the current environment and the audio response in the optimal working environment. Therefore, the audio response of the first audio can be compensated according to the difference, so that even in a poor working environment, the playing effect in the optimal working environment can be achieved, thereby improving the audio playing effect of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is one of the flow charts of the audio playback method provided in the embodiment of the present application;
[0013] Figure 2 It is one of the schematic diagrams of the frequency response curve provided in the embodiment of the present application;
[0014] Figure 3 This is the second flowchart of the audio playback method provided in the embodiment of the present application;
[0015] Figure 4 This is the second schematic diagram of the frequency response curve provided in the embodiment of the present application;
[0016] Figure 5 This is the third flowchart of the audio playback method provided in the embodiment of the present application;
[0017] Figure 6 This is the fourth flowchart of the audio playback method provided in the embodiment of the present application;
[0018] Figure 7 This is the fifth flowchart of the audio playback method provided in the embodiment of the present application;
[0019] Figure 8 This is the sixth flowchart of the audio playback method provided in the embodiment of the present application;
[0020] Fig. 9 is a schematic diagram of the execution process of the audio playback method provided in an embodiment of the present application in combination with multiple environmental parameters;
[0021] Fig.10 is a schematic diagram of the execution process of the audio playback method provided in an embodiment of the present application through multiple speakers;
[0022] Fig.11 is a schematic diagram of the execution process of the audio playback method provided in the embodiment of the present application;
[0023] Fig.12 is a schematic diagram of an audio playback device provided in an embodiment of the present application;
[0024] Fig.13 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0025] Fig.14 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] The terms "at least one (item)", "at least one of" and the like in this application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" refers to two or more, and its meaning is similar to that of "at least one (item)".
[0029] The audio playback method, device, electronic device, storage medium and program product provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0030] The embodiments of the present application can be applied to scenarios where an electronic device plays audio through a speaker, such as home entertainment, public broadcasting, educational lectures, music performances, fitness guidance, and auxiliary communication in special environments.
[0031] For example, taking home entertainment as an example, the embodiments of the present application can be applied to home theaters, gaming experiences, or holiday parties to create an immersive sound atmosphere through high-quality speaker equipment.
[0032] As another example, taking public broadcasting as an example, the embodiments of the present application are applicable to announcement broadcasts in airports, stations or large venues, where important messages are conveyed to every listener to maintain good public order.
[0033] As another example, taking educational lectures as an example, the embodiments of the present application can be applied to classrooms, conference rooms, or online course environments, using speakers to amplify the lecturer's voice to ensure that students in the back row can clearly hear the teaching content.
[0034] As another example, taking a music performance as an example, the embodiments of the present application can be applied to a stage sound system, such as an indoor concert or an outdoor music festival.
[0035] As another example, taking fitness guidance as an example, the embodiments of the present application can be used in gyms or outdoor sports venues, where coaches use speakers to guide students' movements in real time to enhance training effectiveness and safety.
[0036] As another example, taking assisted communication in special environments as an example, the embodiments of the present application can be used in operations inside noisy factories or in the daily lives of hearing-impaired people to assist in information exchange between people to promote barrier-free communication.
[0037] The speaker in an electronic device has a built-in diaphragm that can respond to sound signals (i.e., signals in the electronic form of sound) and generate corresponding vibrations, allowing the speaker to produce sound. The diaphragm's ability to respond to sound signals of different frequencies can be expressed by the diaphragm's frequency response. Ideally, the diaphragm should be able to accurately respond to sound signals in the full frequency range so that the speaker can produce corresponding sounds, with no significant distortion from low to high frequencies.
[0038] However, in actual applications, the diaphragm is usually not in an ideal state. In a non-ideal state, the diaphragm may respond poorly to the signal, resulting in sound distortion, blurred sound, etc., so that the audio effect played by the electronic device through the speaker is poor.
[0039] The embodiments of the present application provide an audio playback method, device, electronic device, storage medium and program product. When the current environment parameters do not match the target environment parameters, the electronic device believes that the working environment of the electronic device is significantly different from the optimal working environment. Therefore, the electronic device can determine the curve under the current working environment, and compare the curve under the current working environment with the curve under the optimal working environment to obtain the difference between the audio response of the first audio in the current environment and the audio response in the optimal working environment. The electronic device can compensate for the audio response of the first audio according to the difference, so that even in a poor working environment, the audio played by the electronic device through the speaker can achieve the playback effect in the optimal working environment, thereby improving the audio effect of the audio played by the speaker.
[0040] The execution subject of the audio playback method provided in the embodiment of the present application may be an audio playback device, which may be an electronic device, or a functional module or functional entity in an electronic device. The technical solution provided in the embodiment of the present application is described below using an electronic device as an example.
[0041] Figure 1 A flowchart of an audio playback method provided by an embodiment of the present application is shown. Figure 1 As shown, the audio playback method provided in the embodiment of the present application may include the following steps 201 to 203.
[0042] Step 201: When a first audio to be played is acquired and the current environment parameter does not match the target environment parameter, the electronic device determines a first curve according to the current environment parameter.
[0043] In the embodiment of the present application, the first curve is used to describe the relationship between the current environmental parameters, the audio frequency and the audio response.
[0044] In the embodiment of the present application, when the first audio to be played is obtained, the electronic device can obtain the current environment parameters.
[0045] Optionally, in an embodiment of the present application, the above-mentioned first audio may include but is not limited to at least one of the following: media files, audio of voice messages received from social applications, reminder audio of triggered timers or alarms, system prompt audio, in-game sound effects or audio in voice chat scenarios.
[0046] For example, when a user chooses to play media content such as music or video, the electronic device can identify the file type of the first audio through a built-in or external audio decoder and prepare to play it.
[0047] When the electronic device receives a voice message from a social software, it can monitor the new message arrival event through the message queue, and then identify the existence of the first audio.
[0048] When the set timer or alarm is activated, the electronic device can automatically trigger corresponding sound feedback at the predetermined time and play the preset first audio.
[0049] The electronic device may use various prompt sounds generated during system use or system update as the first audio.
[0050] When a game is running or multiple people are having online voice chat, the electronic device can capture the first audio in a timely manner by monitoring the status changes of the game engine or communication software.
[0051] Optionally, in an embodiment of the present application, the above-mentioned environmental parameters may include but are not limited to at least one of the following: temperature, humidity, air pressure, etc.
[0052] It should be noted that, in the process of playing audio by an electronic device, the amplification or transmission capability of the diaphragm in the speaker of the electronic device for sound signals at different frequencies can be represented by a frequency response curve. The frequency response curve uses frequency as the horizontal axis and sound pressure level (decibel, dB) as the vertical axis, showing the response characteristics of the diaphragm to sounds of different frequencies from low frequency to high frequency. The diaphragm material is one of the key factors affecting the frequency response curve. Currently, the commonly used diaphragms include biological diaphragms (made of plant fibers), silicone diaphragms, polymer composite diaphragms (composite of biological diaphragms, metal diaphragms, carbon nanotube diaphragms, etc.). Although these materials have their own advantages in performance, their common disadvantage is that they are significantly affected by environmental parameters, such as temperature, humidity, air pressure, etc. Taking temperature as an example, when the temperature rises, the hardness of the diaphragm material will decrease, resulting in a weakened response to low-frequency signals and a relatively enhanced response to high-frequency signals, causing low-frequency sound distortion, unfull sound, and sharp sound. When the temperature decreases, the hardness of the diaphragm material increases, the response to high-frequency signals decreases, and the response to low-frequency signals increases, resulting in high-frequency sound distortion, blurred sound, poor sound spatial sense, etc. In the embodiment of the present application, the electronic device can obtain the above-mentioned environmental parameters that may affect the frequency response curve of the diaphragm, and compensate the first audio according to the environmental parameters.
[0053] In the embodiment of the present application, the above-mentioned environmental parameters may include but are not limited to at least one of the following: temperature, humidity, air pressure, etc.
[0054] In the embodiment of the present application, the above-mentioned target environmental parameters are the optimal working environment conditions of the electronic device, that is, under the target environmental parameter conditions, the frequency response curve of the diaphragm in the electronic device can accurately respond to the sound signal within the full frequency band so that the speaker emits the corresponding sound without significant distortion from low frequency to high frequency.
[0055] It should be noted that the best working environment conditions for electronic devices (such as mobile phones) are 25 degrees Celsius (℃), 1 standard atmospheric pressure (about 101.3 kPa) and about 50% relative humidity (RH). These environmental parameters are close to standard laboratory conditions and are also the benchmark conditions for the design and verification of many electronic products and their components. In such an environment, various components in electronic devices, such as the diaphragm of a speaker, can work in an optimal state. This is because:
[0056] 1. At 25 degrees Celsius, the diaphragm material can maintain good elasticity and stability, and is not easily softened or hardened due to temperature changes, ensuring good sound wave transmission efficiency.
[0057] 2. Under 1 standard atmospheric pressure, the air density is moderate, which is conducive to the propagation of sound waves, making the vibration of the diaphragm more natural and smoother and reducing nonlinear distortion.
[0058] 3. At 50% relative humidity, the diaphragm material can avoid excessive drying or moisture absorption and expansion, maintain its shape and vibration characteristics, and ensure the consistency and clarity of sound quality.
[0059] These ideal environmental parameters help the diaphragm in the speaker to give full play to its design performance and reduce the impact of the external environment on the accuracy of sound restoration and the purity of sound quality. Of course, modern electronic equipment is also designed with certain environmental adaptability in mind, and can maintain a high level under a wide range of temperature, humidity and air pressure conditions, that is, the optimal working environment parameter range. Taking temperature as an example, the optimal working environment parameter range can be centered at 25°C, and the upper and lower fluctuations can be within a threshold, for example, the upper and lower fluctuations can be within 5°C, that is, the optimal working environment parameter range can be greater than 20°C and less than 30°C.
[0060] In the embodiment of the present application, the electronic device can compare the current environmental parameters with the target environmental parameters, and determine whether the current environmental parameters match the target environmental parameters, that is, whether the electronic device is in the optimal working environmental parameter range. When the electronic device is in the optimal working environmental parameter range, the electronic device can determine that the electronic device is in a good working state. When the current environmental parameters are outside the optimal working environmental parameter range, the electronic device can determine that the electronic device is not in the optimal working environmental parameter range, that is, it is not in a good working state, and when the current environmental parameters are within the optimal working environmental parameter range, the electronic device can determine that the electronic device is in the optimal working environmental parameter range, that is, it is in a good working state.
[0061] In the embodiment of the present application, when the current environmental parameters are outside the optimal working environmental parameter range of the electronic device, the electronic device can determine that the diaphragm in the current speaker cannot maintain a high performance level, and the effect of playing the first audio is poor, so it is necessary to compensate for the first audio played by the speaker in a targeted manner to improve the effect of playing the first audio. When the current environmental parameters are within the optimal working environmental parameter range of the electronic device, the electronic device can determine that the diaphragm in the current speaker can maintain a high performance level, and the effect of playing the first audio is good, so the first audio can be played directly.
[0062] Optionally, in an embodiment of the present application, the above-mentioned "optimal working environment parameter range of the electronic device" may include but is not limited to at least one of the following: temperature greater than or equal to a first threshold and less than or equal to a second threshold, humidity greater than or equal to a third threshold and less than or equal to a fourth threshold, air pressure greater than or equal to a fifth threshold and less than or equal to a sixth threshold, etc., that is, the above-mentioned "environmental parameters are outside the optimal working environment parameter range of the electronic device" can be understood as: temperature less than the first threshold or greater than the second threshold, humidity less than the third threshold or greater than the fourth threshold, air pressure less than the fifth threshold or greater than the sixth threshold, etc.
[0063] Optionally, in the embodiment of the present application, the optimal working environment parameter interval of the electronic device can be the default of the electronic device, or pre-set by the user. For example, the first threshold value can be 20 degrees Celsius, 22 degrees Celsius, etc., the second threshold value can be 30 degrees Celsius, 28 degrees Celsius, etc.; the third threshold value can be 101.3 kilopascals (kPa), the fourth threshold value can be 89.6 kPa, 79.6 kPa, etc.; the fifth threshold value can be 40% relative humidity, 45% relative humidity, etc., the sixth threshold value can be 60% relative humidity, 55% relative humidity, etc. The specific value can be determined according to the actual use requirements, and the embodiment of the present application is not limited.
[0064] For example, taking the environmental parameter as temperature as an example, the electronic device can obtain the current environmental temperature t based on the temperature sensor built into the electronic device. n If t n ∈[t min , t max ], it means that the electronic equipment is in the optimal operating temperature range. This means that the electronic equipment is not at the optimal operating temperature. n Substituting into the frequency response model Q t =f(R t ), we can get t n Frequency response curve under temperature like Figure 2 As shown in the figure, there are two frequency response curves of the same electronic device at different temperatures. With Q 25 By comparison, we can get the difference between the two frequency response curves:
[0065]
[0066] Finally, the software equalizer (EQ) can be used to increase the high-frequency part of the music source and weaken the low-frequency part of the music source with an adjustment amplitude of ΔQ.
[0067] In an embodiment of the present application, when it is detected that the current environmental parameters are outside the optimal working environmental parameter range, the electronic device can determine a first curve based on the current environmental parameters, that is, determine the relationship between the audio frequency and the audio response of the diaphragm in the electronic device under the current environmental parameters.
[0068] In this way, the electronic device can determine whether the current environmental parameters are within the optimal working environmental parameter range of the electronic device by detecting the environmental parameters to judge the working state of the electronic device. Thus, when the environmental parameters are not within the optimal working environmental parameter range of the electronic device, it can be determined that compensation for the first audio is required. Thus, compensation is not required when the environmental parameters are within the optimal working environmental parameter range of the electronic device, thereby avoiding waste of resources.
[0069] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 3 As shown, the above step 201 can be specifically implemented through the following step 201a.
[0070] Step 201a: when a first audio to be played is obtained and the current environment parameter does not match the target environment parameter, a first curve is determined from pre-stored curves according to the current environment parameter.
[0071] In the embodiment of the present application, each of the above-mentioned pre-stored curves is used to describe the relationship between the environmental parameters, the audio frequency and the audio response.
[0072] Optionally, in an embodiment of the present application, the electronic device may obtain a curve associated with the current environmental parameter through a preset curve set (i.e., the above-mentioned pre-stored curve) based on the current environmental parameter, and determine it as the first curve. The curve set may include curves of the speaker in the electronic device under different environmental parameters.
[0073] Exemplarily, take the case where a curve set includes frequency response curves of a speaker in an electronic device at different temperatures. Assume that the curve set includes the frequency response curves of the speaker at -20 degrees Celsius to 65 degrees Celsius, and the temperature interval length corresponding to each frequency response curve is 1 degree Celsius, for example, greater than or equal to 0 degrees Celsius and less than 1 degree Celsius. Assuming that the current temperature is 24.3 degrees Celsius, the electronic device can determine that 24.3 degrees Celsius is greater than or equal to 24 degrees Celsius and less than 25 degrees Celsius, that is, it is within the temperature range of 24 degrees Celsius to 25 degrees Celsius, and the electronic device can determine the frequency response curve Q=f(R) corresponding to the temperature range as the curve of the speaker.
[0074] Optionally, in an embodiment of the present application, the above curve set can be obtained through experimental measurement.
[0075] 1. Taking temperature as an example, the frequency response characteristics of the speaker at different temperatures (for example, from -20 to 65°C, with each 1°C as an interval) can be systematically measured and recorded in a controlled laboratory or in an actual external environment using high-precision temperature control equipment and an audio analyzer. The temperature is repeatedly adjusted and the corresponding frequency response curve is captured, and then the obtained data is integrated to correspond the temperature intervals to the curves one by one to form a curve set.
[0076] 2. Taking humidity as an environmental parameter, the relative humidity of the environment can be gradually adjusted in a controlled laboratory using a humidity control device (for example, the range is set from 20% relative humidity to 90% relative humidity, with each 5% as a subdivision interval). For the standard audio signals emitted by a single speaker at each humidity level, professional audio analysis equipment is used to conduct in-depth testing, and the frequency response characteristics corresponding to each level of humidity are recorded in detail. By comprehensively analyzing all the collected data, a series of humidity frequency response curves are finally established, and humidity is matched to the curves one by one to form a curve set.
[0077] 3. Taking air pressure as an example, we can use hyperbaric and decompression chamber technologies to create a multi-level air pressure environment from standard air pressure at sea level to low pressure at the top of a mountain. In this process, the fixed speaker continuously plays the audio signal, and with the help of advanced measurement tools, the speaker frequency response curves under different air pressure conditions are recorded step by step. As the air pressure intervals are covered one by one, the air pressure and the curves are matched one by one to form a curve set.
[0078] For example, the frequency response characteristics of the speaker of an electronic device at different temperatures are measured. The electronic device can be placed in a temperature box and a fixed temperature t1 is set, and then the electronic device is made to play the same audio multiple times, such as Figure 4 As shown, obtain its frequency response curve at temperature t1:
[0079] Where R represents the response and F represents the frequency.
[0080] Then, the temperature of the incubator can be adjusted, and the frequency response curves at different temperatures can be repeatedly obtained to obtain the frequency response model of the electronic device at different temperatures:
[0081] Q t =f(R t )
[0082] Where Q represents the quality factor or equivalent performance index of the speaker of the electronic device at temperature t, which reflects the change of the frequency response characteristics or performance quality of the speaker under different temperature conditions.
[0083] Based on the frequency response at different temperatures, the optimal operating temperature range of the electronic device can be obtained:
[0084] t∈[t min , t max ]
[0085] where t min is the lower limit of the optimal operating temperature, t max The upper limit of the optimal operating temperature.
[0086] At 25 degrees Celsius, the frequency response curve of the electronic equipment is the optimal frequency response curve, that is:
[0087] Q 25 =f(R 25 )
[0088] In this way, the electronic device can accurately and quickly determine the frequency response curve corresponding to the current environmental parameters through a preset curve set, thereby improving the efficiency of the electronic device in determining the frequency response curve of the diaphragm in the speaker in the current environment.
[0089] Step 202: The electronic device adjusts the audio response of the first audio according to the difference between the first curve and the second curve.
[0090] In the embodiment of the present application, the second curve is used to describe the relationship between the target environment parameter, the audio frequency and the audio response.
[0091] It can be understood that the second curve is the frequency response curve of the speaker in the electronic device under standard laboratory conditions, that is, the frequency response curve of the speaker under environmental parameters such as a temperature of 25 degrees Celsius, an air pressure of 101.3 kPa, and a relative humidity of 50%, that is, the frequency response curve of the speaker under ideal conditions. In the embodiment of the present application, the frequency response curve of the speaker under ideal conditions can be obtained by measuring in a laboratory.
[0092] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 5 As shown, the above step 202 can be specifically implemented through the following step 202a.
[0093] Step 202a: The electronic device adjusts the audio response of the first audio frequency according to the response difference between the audio responses of the first curve and the second curve at the same audio frequency.
[0094] It should be noted that the frequency response curve shows the response characteristics of the speaker diaphragm to sounds of different frequencies from low frequency to high frequency, that is, the response value of the sound at each frequency.
[0095] In an embodiment of the present application, the electronic device can obtain the difference between the actual response value and the ideal response value of the speaker at each frequency through the response difference, that is, the response value that needs to be compensated at each frequency, so that when playing the first audio, the response value of the first audio can be compensated in a targeted manner, thereby improving the playback effect of the first audio.
[0096] In the embodiment of the present application, the electronic device can model the frequency response curve under different environmental parameters, and quantitatively adjust the high-frequency and low-frequency responses of the music according to the difference between the actual environmental parameters of the electronic device and the optimal working environmental parameters, thereby offsetting the influence of the environmental parameters on the diaphragm. The electronic device can play the music sound quality under the level of the optimal working environmental parameters (i.e., 25°C, 1kPa, 50%RH) under all environmental parameters.
[0097] In the embodiment of the present application, the electronic device may subtract the audio response of the second curve from the audio response of the first curve at the same audio frequency to obtain a response difference, and adjust the audio response of the first audio according to the response difference.
[0098] In this way, the electronic device can calculate the response difference between the audio responses of the first curve and the second curve of the speaker at each frequency, so that the response value of each frequency of the first audio played by the speaker can be specifically compensated according to the response difference corresponding to each frequency, thereby improving the audio effect of the playback.
[0099] Optionally, in the embodiment of the present application, combined with Figure 5 ,like Figure 6 As shown, the above step 202a can be specifically implemented through the following steps 202a1 and 202a2.
[0100] Step 202a1: For each audio frequency, the electronic device adjusts a first parameter of an equalizer of the electronic device according to a response difference between the audio response of the first curve and the audio response of the second curve at the audio frequency.
[0101] In the embodiment of the present application, the first parameter corresponds to the audio frequency.
[0102] It should be noted that the above-mentioned equalizer is an audio signal processing component used to adjust the levels of different frequency components, thereby improving or beautifying the timbre of the audio signal. For frequencies that need to reduce the response value, the electronic device can reduce the output level of the corresponding frequency band (ie, negative gain); and for frequencies that need to increase the response value, the level of the frequency band must be increased (ie, positive gain). For example, if the sound of a certain frequency band is too sharp or turbid, the equalizer can specifically lower the gain of the frequency band; conversely, if the volume of a certain frequency band is weak, it can be compensated by increasing the gain. In an embodiment of the present application, the equalizer can change the frequency response in the audio by adjusting the levels of different frequency components.
[0103] Optionally, in the embodiment of the present application, the parameters of the above-mentioned equalizer may include but are not limited to at least one of the following: gain (Gain), center frequency (Center Frequency), bandwidth (Bandwidth) or Q factor (Q Factor), slope (Slope), etc.
[0104] In the embodiment of the present application, the first parameter is the gain value of the equalizer at the frequency.
[0105] In the embodiment of the present application, for each audio frequency, the electronic device can use the response difference at the audio frequency as the response value that the speaker needs to compensate at the audio frequency. Then, the electronic device can adjust the parameters of the equalizer corresponding to the speaker. Specifically, for each audio frequency, the electronic device can adjust the first parameter to the above-mentioned response difference.
[0106] For example, assuming that the response difference is +2db when the audio frequency is 62hz, the response value is -3db at 1khz, and the response value is -6db at 8khz, the electronic device can set the corresponding gain value at 62hz in the equalizer to +2db, set the gain value at 1khz in the equalizer to -3db, and set the gain value at 8khz in the equalizer to -6db.
[0107] Optionally, in an embodiment of the present application, the electronic device can set the correct center frequency for each frequency range that needs to be compensated, and adjust the Q factor to limit the frequency range of compensation to ensure that the compensation only acts on the frequency range that needs to be compensated and does not spread to adjacent frequency ranges.
[0108] Step 202a2: The electronic device adjusts the audio response corresponding to the audio frequency in the first audio through the adjusted equalizer.
[0109] In the embodiment of the present application, when the electronic device plays the first audio, the first audio can be converted into a digital audio signal, and the digital audio signal can be divided into multiple frequencies, each frequency corresponding to a frequency in the equalizer. Then the electronic device can adjust the signal of each frequency according to the preset parameters in the equalizer, and recombine after adjustment, and convert it into the adjusted first audio, thereby completing the adjustment process of the first audio.
[0110] In this way, the electronic device can adjust the first parameter at each frequency in the equalizer according to the response difference at the frequency, so that the equalizer can use the first parameter to compensate for the first audio and improve the effect of playing the first audio.
[0111] Optionally, in the embodiment of the present application, combined with Figure 6 ,like Figure 7 As shown, the above step 202a2 can be specifically implemented through the following step 301.
[0112] Step 301: For each audio frequency, the electronic device adjusts the audio response corresponding to the audio frequency in the first audio to a first response value through the adjusted equalizer.
[0113] In the embodiment of the present application, the first response value is the sum of the audio response corresponding to the audio frequency and the response difference.
[0114] In the embodiment of the present application, when the electronic device plays the first audio, the electronic device can convert the first audio into a digital audio signal, and divide the digital audio signal into a plurality of frequencies, each frequency corresponding to a frequency in the equalizer. Then the electronic device can adjust the signal of each frequency according to the first parameter preset in the equalizer, that is, add the audio response corresponding to each frequency to the first parameter of the corresponding frequency in the equalizer, and recombine after adjustment, and convert it into the compensated first audio, thereby completing the compensation processing of the first audio.
[0115] Exemplarily, taking the gain value (i.e., parameter) at 62 Hz in the equalizer as +2 dB, the gain value at 1 khz as -3 dB, and the gain value at 8 khz as -6 dB, the electronic device can convert the first audio into a digital audio signal and divide the digital audio signal into multiple frequencies, and then the electronic device can add 2 dB to the 62 Hz response value of the digital audio signal corresponding to 62 Hz in the equalizer, subtract 3 dB from the 1 khz response value of the digital audio signal corresponding to 1 khz in the equalizer, and subtract 6 dB from the 8 khz response value of the digital audio signal corresponding to 8 khz in the equalizer. Assuming that the original response value of the digital audio signal at 62 Hz is 15 dB, the response value at 1 khz is 18 dB, and the response value at 8 khz is 29 dB, then after compensation, the response value of the digital audio signal at 62 Hz becomes 17 dB, the response value at 1 khz becomes 15 dB, and the response value at 8 khz becomes 23 dB. The electronic device can then reassemble the compensated digital audio signals and convert them into compensated first audio signals, thereby completing the compensation process for the first audio signals.
[0116] Step 203: The electronic device plays the adjusted first audio.
[0117] An embodiment of the present application provides an audio playback method. When the current environment parameters do not match the target environment parameters, the electronic device believes that the working environment of the electronic device is significantly different from the optimal working environment. Therefore, the electronic device can determine the curve under the current working environment, and compare the curve under the current working environment with the curve under the optimal working environment to obtain the difference between the audio response of the first audio in the current environment and the audio response in the optimal working environment. The electronic device can compensate for the audio response of the first audio according to the difference, so that even in a poor working environment, the audio played by the electronic device through the speaker can achieve the playback effect in the optimal working environment, thereby improving the audio effect of the audio played by the speaker.
[0118] Optionally, in the embodiment of the present application, the equalizer has a corresponding speaker. Figure 1 ,like Figure 8 As shown, the above step 203 can be specifically implemented through the following step 203a.
[0119] Step 203a: The electronic device plays the first audio adjusted by the equalizer through a speaker corresponding to the equalizer.
[0120] In an embodiment of the present application, after an equalizer adjusts and processes the first audio, the electronic device can play the adjusted first audio through the speaker corresponding to the equalizer, that is, when the electronic device has multiple speakers, the electronic device can play the first audio after the corresponding equalizer adjustment response value through each speaker.
[0121] It is understandable that when an electronic device has multiple speakers, the diaphragm materials and physical structures of the multiple speakers may be different, so that the frequency response curve of each speaker may be different, and the degree to which each speaker is affected by environmental parameters is also different. Therefore, in the embodiment of the present application, the first curve and the second curve can be determined for each speaker respectively, so that the first audio played by each speaker can be compensated specifically.
[0122] In this way, the electronic device can compensate the first audio through the equalizer corresponding to each speaker, and obtain the first audio after the equalizer corresponding to each speaker adjusts the response value using the corresponding response difference of each frequency, and use each speaker to play the first audio after the response value is adjusted by the corresponding equalizer. In this way, when the electronic device has multiple speakers, compensation can be performed for each speaker, thereby ensuring the audio effect played by each speaker.
[0123] It should be noted that when the humidity is too high or the air pressure is too low, the hardness of the diaphragm material will weaken; when the temperature is too low or the air pressure is too high, the hardness of the diaphragm material will increase.
[0124] In the embodiment of the present application, a multi-dimensional model of the temperature-humidity-air pressure-frequency response curve can be established to more accurately identify and adjust the audio, thereby more accurately optimizing the sound quality.
[0125] For example, Fig. 9 As shown, an example is given of the influence of temperature, humidity, and air pressure on the diaphragm of an electronic device. In the preparation stage, the ambient humidity, air pressure, and temperature data can be adjusted in advance to obtain the frequency response model of the electronic device in different environments:
[0126] Q h,p,t =f(R h,p,t )
[0127] In the specific implementation stage, the electronic device sensor can be used to detect whether the electronic device is in the best working state. Assuming that the electronic device is not in the best working state, the audio frequency response curve is adjusted. The adjustment range of the audio curve is:
[0128]
[0129] Among them, the above p n Indicates air pressure, h n Indicates humidity, Q std It represents the frequency response curve under the laboratory standard humidity, air pressure and temperature. In addition, this formula is only to show that the algorithm model can be applied to the multi-parameter model. The specific parameters to be used can be determined according to the actual use requirements, and the embodiments of this application are not limited.
[0130] Optionally, in an embodiment of the present application, the electronic device may include multiple speakers, such as an earpiece speaker and an external speaker in the electronic device.
[0131] For example, Fig.10 As shown, the earpiece and speaker in the electronic device are used as an example. In the preparation stage, the ambient temperature data can be adjusted to obtain the frequency response model of different speakers of the electronic device in various environments:
[0132]
[0133] in, is the frequency response curve of the earpiece, This is the frequency response curve of the speaker.
[0134] In the implementation stage, the electronic device can detect whether the electronic device is in the best working state through the electronic device sensor. Assuming that the electronic device is not in the best working state, the audio frequency response curve is adjusted. The adjustment range of the audio curve is:
[0135]
[0136] The above formula only shows the adjustment method of different speakers in electronic equipment. In other terminal devices, similar methods can also be used for adjustment, which can be determined according to actual use requirements and are not limited in the embodiments of the present application.
[0137] Fig.11 A schematic diagram of the execution process of the audio playback method provided in the embodiment of the present application. Take a speaker in an electronic device as an example for explanation. Fig.11 As shown, the audio playback method provided in the embodiment of the present application may include the following steps 10 to 16.
[0138] Step 10: Obtain the frequency response curve model of the speaker under different environmental parameters through testing.
[0139] Step 11: Determine the optimal environmental parameter range [Tmin, Tmax] through experiments.
[0140] Step 12: When the first audio to be played is detected, the electronic device obtains the environmental parameter Tn through the sensor.
[0141] Step 13: The electronic device determines whether Tn is within the optimal environmental parameter range.
[0142] If the electronic device determines that Tn is not within the optimal environmental parameter range, the following step 14 is executed; if the electronic device determines that Tn is within the optimal environmental parameter range, the following step 16 is executed;
[0143] Step 14: The electronic device calculates a difference ΔQ between a frequency response curve of the speaker under current environmental parameters and a frequency response curve of the speaker under optimal environmental parameters.
[0144] Step 15: The electronic device adjusts the frequency response of the first audio according to ΔQ, and the adjustment amplitude is ΔQ.
[0145] Step 16: The electronic device uses a speaker to play the first audio.
[0146] Each of the above-mentioned method embodiments, or various possible implementation methods in each method embodiment can be executed separately, or any two or more of them can be executed in combination with each other. The specific implementation method can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.
[0147] The audio playback method provided in the embodiment of the present application can be executed by an audio playback device. In the embodiment of the present application, an audio playback device executing the audio playback method is taken as an example to illustrate the audio playback device provided in the embodiment of the present application.
[0148] Fig.12 A possible structural diagram of an audio playback device involved in some embodiments of the present application is shown. Fig.12 As shown, the audio playback device 70 may include: a determination module 71 , an execution module 72 and a playback module 73 .
[0149] The determination module 71 is used to determine a first curve according to the current environment parameters when the first audio to be played is acquired and the current environment parameters do not match the target environment parameters, and the first curve is used to describe the relationship between the current environment parameters, the audio frequency and the audio response;
[0150] The execution module 72 is used to adjust the audio response of the first audio according to the difference between the first curve and the second curve determined by the determination module 71, wherein the second curve is used to describe the relationship between the target environment parameter, the audio frequency and the audio response;
[0151] The playing module 73 is used to play the first audio adjusted by the executing module 72 .
[0152] In a possible implementation, the above-mentioned determination module 71 is specifically used to determine a first curve from pre-stored curves according to the current environmental parameters when the first audio to be played is obtained and the current environmental parameters do not match the target environmental parameters, and each pre-stored curve is used to describe the relationship between the environmental parameters, the audio frequency and the audio response.
[0153] In a possible implementation, the execution module 72 is specifically configured to adjust the audio response of the first audio according to the response difference between the audio responses of the first curve and the second curve at the same audio frequency determined by the determination module 71 .
[0154] In a possible implementation, the execution module 72 is specifically used to: for each audio frequency, adjust a first parameter of an equalizer of the electronic device according to a response difference between the audio responses of the first curve and the second curve at the audio frequency, where the first parameter corresponds to the audio frequency; and adjust the audio response corresponding to the audio frequency in the first audio through the adjusted equalizer.
[0155] In a possible implementation, the execution module 72 is specifically used to adjust, for each audio frequency, the audio response corresponding to the audio frequency in the first audio to a first response value through the adjusted equalizer, where the first response value is the sum of the audio response corresponding to the audio frequency and the response difference.
[0156] In a possible implementation, the equalizer has a corresponding speaker. The playing module 73 is specifically configured to play the first audio adjusted by the equalizer through the speaker corresponding to the equalizer.
[0157] An audio playback device is provided in an embodiment of the present application. When the current environment parameters do not match the target environment parameters, the audio playback device believes that the working environment of the audio playback device is significantly different from the optimal working environment. Therefore, the audio playback device can determine the curve under the current working environment, and compare the curve under the current working environment with the curve under the optimal working environment to obtain the difference between the audio response of the first audio in the current environment and the audio response in the optimal working environment. The audio playback device can compensate for the audio response of the first audio according to the difference, so that even in a poor working environment, the audio played by the audio playback device through the speaker can achieve the playback effect in the optimal working environment, thereby improving the audio effect of the audio played by the speaker.
[0158] The audio playback device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0159] The audio playback device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0160] The audio playback device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0161] Alternatively, if Fig.13As shown, an embodiment of the present application also provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores programs or instructions that can be executed on the processor 1001, and when the program or instructions are executed by the processor 1001, the various steps of the above-mentioned audio playback method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0162] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0163] Fig.14 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0164] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0165] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.14 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0166] The processor 110 is used to determine a first curve according to the current environment parameters when the first audio to be played is acquired and the current environment parameters do not match the target environment parameters, and the first curve is used to describe the relationship between the current environment parameters, the audio frequency and the audio response;
[0167] The processor 110 is configured to adjust the audio response of the first audio according to a difference between a first curve and a second curve, wherein the second curve is used to describe a relationship between a target environment parameter, an audio frequency, and the audio response;
[0168] The audio output unit 103 is used to play the adjusted first audio.
[0169] Optionally, the processor 110 is specifically used to determine a first curve from pre-stored curves according to the current environmental parameters when a first audio to be played is acquired and the current environmental parameters do not match the target environmental parameters, each pre-stored curve being used to describe the relationship between the environmental parameters, the audio frequency and the audio response.
[0170] Optionally, the processor 110 is specifically configured to adjust the audio response of the first audio according to a response difference between the audio responses of the first curve and the second curve at the same audio frequency.
[0171] Optionally, the processor 110 is specifically used to: for each audio frequency, adjust a first parameter of an equalizer of the electronic device according to a response difference between the audio responses of the first curve and the second curve at the audio frequency, where the first parameter corresponds to the audio frequency; and adjust the audio response corresponding to the audio frequency in the first audio through the adjusted equalizer.
[0172] Optionally, the processor 110 is specifically configured to adjust, for each audio frequency, an audio response corresponding to the audio frequency in the first audio to a first response value through an adjusted equalizer, wherein the first response value is the sum of the audio response corresponding to the audio frequency and a response difference.
[0173] Optionally, the equalizer has a corresponding speaker. The audio output unit 103 is specifically configured to play the first audio adjusted by the equalizer through the speaker corresponding to the equalizer.
[0174] An embodiment of the present application provides an electronic device. When the current environmental parameters do not match the target environmental parameters, the electronic device believes that the working environment of the electronic device is significantly different from the optimal working environment. Therefore, the electronic device can determine the curve under the current working environment, and compare the curve under the current working environment with the curve under the optimal working environment to obtain the difference between the audio response of the first audio in the current environment and the audio response in the optimal working environment. The electronic device can compensate for the audio response of the first audio according to the difference, so that even in a poor working environment, the audio played by the electronic device through the speaker can achieve the playback effect in the optimal working environment, thereby improving the audio effect of the audio played by the speaker.
[0175] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it is not repeated here. The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, it is not repeated here.
[0176] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0177] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0178] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0179] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned audio playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0180] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0181] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned audio playback method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0182] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0183] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned audio playback method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0184] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0185] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0186] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An audio playback method, characterized in that: include: When a first audio to be played is acquired and the current environment parameter does not match the target environment parameter, determining a first curve according to the current environment parameter, wherein the first curve is used to describe the relationship between the current environment parameter, the audio frequency, and the audio response; adjusting the audio response of the first audio according to a difference between the first curve and a second curve, the second curve being used to describe the relationship between the target environment parameter, the audio frequency, and the audio response; The adjusted first audio is played.
2. The method according to claim 1, characterized in that: The method of obtaining the first audio to be played and determining the first curve according to the current environment parameter when the current environment parameter does not match the target environment parameter includes: When the first audio to be played is obtained and the current environment parameter does not match the target environment parameter, the first curve is determined from pre-stored curves according to the current environment parameter, and each pre-stored curve is used to describe the relationship between the environment parameter, the audio frequency and the audio response.
3. The method according to claim 1, characterized in that The step of adjusting the audio response of the first audio according to the difference between the first curve and the second curve comprises: The audio response of the first audio is adjusted according to a response difference between the audio responses of the first curve and the second curve at the same audio frequency.
4. The method according to claim 3, characterized in that: The step of adjusting the audio response of the first audio according to the response difference between the audio responses of the first curve and the second curve at the same audio frequency includes: For each audio frequency, adjusting a first parameter of an equalizer of the electronic device according to a response difference between the audio response of the first curve and the second curve at the audio frequency, the first parameter corresponding to the audio frequency; The audio response corresponding to the audio frequency in the first audio is adjusted by the adjusted equalizer.
5. The method according to claim 4, characterized in that The adjusting the audio response corresponding to the audio frequency in the first audio by the adjusted equalizer includes: For each audio frequency, the audio response corresponding to the audio frequency in the first audio is adjusted to a first response value through the adjusted equalizer, where the first response value is the sum of the audio response corresponding to the audio frequency and the response difference.
6. The method according to claim 4, characterized in that The equalizer has a corresponding speaker; The playing of the adjusted first audio includes: The first audio adjusted by the equalizer is played through a speaker corresponding to the equalizer.
7. An audio playback device, characterized in that: include: Determine module, execute module and play module; The determination module is used to determine a first curve according to the current environment parameter when the first audio to be played is acquired and the current environment parameter does not match the target environment parameter, wherein the first curve is used to describe the relationship between the current environment parameter, the audio frequency and the audio response; The execution module is used to adjust the audio response of the first audio according to the difference between the first curve and the second curve determined by the determination module, the second curve being used to describe the relationship between the target environment parameter, the audio frequency and the audio response; The playing module is used to play the first audio adjusted by the execution module.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the audio playback method as described in any one of claims 1 to 6 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the audio playback method according to any one of claims 1 to 6 are implemented.
10. A computer program product, wherein the computer program product is stored in a storage medium and is executed by at least one processor to implement the steps of the audio playback method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Audio signal adjustment method and device, terminal and storage medium
CN113076075A
Environmentally controlled frequency response modification for long range hailing system
US20080013753A1
Device and Method of Equalizing Low Frequency Roll Off for Wearable Sound Device
US20240174508A1
System for transducer compensation based on ambient conditions
US7092536B1