Audio processing method, device and storage medium

By obtaining the user's hearing test data and adjusting the output of the audio signal according to the loudness gain, the problem of hearing protection in audio playback of terminal equipment is solved, and the hearing in the user's ear is protected without increasing the overall volume.

CN118102175BActive Publication Date: 2025-01-14HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410397174.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2025-01-14
Estimated Expiration
2044-04-03

AI Technical Summary

Technical Problem

During the audio playback of terminal devices, how to effectively protect the user's hearing and prevent hearing damage, especially when the user has hearing damage frequency, avoiding the excessive volume causing further damage to the ears.

Method used

By obtaining the user's hearing test data, determining the loudness gain, and adjusting it when the audio signal is output, so that the human ear with hearing damage can hear the audio signal of the original volume, while avoiding excessive volume damage to the ears and realizing hearing Protect. The method includes obtaining audio data, determining whether the audio signal contains hearing loss frequency points, determining the loudness gain amount based on the hearing test data, increasing the loudness of the audio signal based on the initial value, and performing the output with the increased loudness value after output Play.

Benefits of technology

It realizes protecting the user's ears without the need to increase the output volume of the audio signal as a whole, ensuring that people with hearing damage can hear the audio signal of normal volume, avoiding further damage to the ears by excessive volume, and effectively improving hearing Protection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118102175B_ABST
    Figure CN118102175B_ABST
Patent Text Reader

Abstract

The present application provides an audio processing method, device and storage medium, which can protect the hearing of a user. The method includes: obtaining audio data; when the audio data includes a first audio signal at a first frequency point, obtaining the user's hearing test data, the hearing test data including the user's hearing damage values ​​at multiple test frequency points; determining the loudness gain corresponding to the first frequency point according to the hearing test data, wherein the loudness gain corresponds to the user's hearing damage value at the first frequency point; increasing the loudness of the first audio signal by the loudness gain; and outputting the first audio signal with the increased loudness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio data, and in particular to an audio processing method, device and storage medium. Background Art

[0002] When using terminal devices such as mobile phones, the human ear is an important way to obtain the auditory experience provided by the terminal devices.

[0003] As people pay more and more attention to hearing health, how to protect users' hearing during audio playback on terminal devices has become an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides an audio processing method, device and storage medium, which can protect the hearing of users, achieve the purpose of ear protection, and improve the user's hearing experience.

[0005] In a first aspect, the present application provides an audio processing method. The method includes: obtaining audio data. When the audio data includes a first audio signal at a first frequency point, obtaining hearing test data of a user, the hearing test data including hearing loss values ​​of the user at multiple test frequency points. According to the hearing test data, determining a loudness gain amount corresponding to the first frequency point, wherein the loudness gain amount corresponds to the hearing loss value of the user at the first frequency point. Increasing the loudness of the first audio signal by the loudness gain amount. Outputting the first audio signal with the increased loudness.

[0006] In this way, when the audio data includes the first audio data of the first frequency point, the loudness gain amount of the user at the first frequency point can be determined according to the hearing test data of the user. Since the loudness gain amount corresponds to the hearing loss value of the first frequency point, the loudness gain amount can compensate for the hearing loss value of the user at the first frequency point accordingly, so that after the first audio signal is output according to the increased loudness, it is not necessary to increase the output volume of the audio signal as a whole, so that the first audio signal of the original volume can be heard by the human ear with hearing loss, thereby avoiding hearing loss to the human ear caused by other excessive volumes, and realizing hearing protection for the human ear.

[0007] Exemplarily, the audio processing circuit can obtain audio data in response to the user's audio playback operation. The audio playback operation can be an operation of the user for playing an audio signal. For example, it can be an operation of the user answering a call or broadcasting a call in a call interface. For another example, it can be a trigger operation of the user on a playback control in a video playback interface / music playback interface. For another example, it can be a voice navigation operation of the user. For another example, it can be a playback operation of a voice message in a chat interface.

[0008] In another exemplary embodiment, the audio processing circuit can detect an audio playback trigger condition and obtain audio data. For example, when the terminal device detects an incoming call or incoming text message, the audio data of the phone ring tone or text message reminder ring tone can be obtained.

[0009] Exemplarily, the first frequency point may be a hearing impairment frequency point, that is, a frequency point at which the user's ear has hearing impairment. For example, if the user's hearing impairment value at a certain frequency point is greater than or equal to a preset hearing impairment threshold, then this frequency point is the first frequency point.

[0010] Exemplarily, the hearing test data may include a hearing test data list, a hearing test function, or a hearing test curve.

[0011] Exemplarily, the loudness gain value of the first frequency point may be obtained based on the hearing loss value of the first frequency point, and one hearing loss value corresponds to one loudness gain amount. The loudness gain amount of the first frequency point may be the hearing loss value of the first frequency point. Alternatively, the loudness gain amount may be the sum of the hearing loss value of the first frequency point and other loudness loss amounts. Other loudness loss amounts may be loss amounts that affect the loudness of the audio signal, such as transmission loss and noise loss.

[0012] For example, the hearing loss value of the first frequency point can be determined according to the hearing test data, and then the corresponding loudness gain amount can be determined according to the hearing loss value. Alternatively, the hearing compensation data can be determined according to the hearing test data, and then the loudness gain amount of the first frequency point can be determined according to the hearing compensation data.

[0013] For example, a loudness gain may be added to the initial loudness value to obtain a target loudness value, and then the first audio signal is output at the target loudness value.

[0014] According to a first aspect, an audio processing circuit includes a first processing module, and obtains hearing test data of a user, including: the first processing module determines whether the audio data includes a first audio signal; the first processing module obtains the hearing test data when the audio data includes the first audio signal; determines a loudness gain amount corresponding to a first frequency point according to the hearing test data, including: the first processing module determines a loudness gain amount corresponding to the first frequency point according to the hearing test data; and increases the loudness of the first audio signal by the loudness gain amount, including: the first processing module increases the loudness of the first audio signal by the loudness gain amount on the basis of an initial loudness value to obtain a target loudness value.

[0015] In this way, the loudness of the first audio signal can be amplified by the first processing module, and the loudness of the first audio signal can be adjusted by software processing, which reduces the difficulty of adjustment.

[0016] Exemplarily, when the first audio signal is an analog signal, the voltage of the first audio signal may be adjusted. In another exemplary embodiment, when the first audio signal is a digital signal, the duty cycle or amplitude of the first audio signal may be adjusted.

[0017] According to the first aspect, or any implementation of the first aspect above, the method further includes: when the audio data includes a second audio signal at a second frequency point, the first processing module outputs the second audio signal with an initial loudness value.

[0018] In this way, the second audio signal can be output at the initial response value, thereby preventing the user's hearing from being damaged by an excessively high volume of the second audio signal, and further improving the efficiency of ear protection.

[0019] Exemplarily, the second frequency point may be a frequency point at which the user does not have hearing loss, that is, may be called a normal hearing frequency point. Optionally, the hearing loss of the user at the second frequency point is less than a preset hearing loss threshold.

[0020] According to the first aspect, or any implementation of the first aspect above, the first processing module is included in the terminal device, the terminal device is connected to the audio playback device, and the audio playback device is used to output the first audio signal with increased loudness under the control of the first processing module.

[0021] In this way, the ear protection processing of the audio signal can be completed on the terminal device side, i.e. the source side, without the need to perform ear protection processing on the audio playback device side, i.e. the end. As a result, the purpose of ear protection can be achieved for audio playback devices of various circuit structures and various models, thereby improving the application scope of the ear protection solution of the embodiment of the present application.

[0022] Exemplarily, the first processing module may be a processing module such as SOC, CODEC, etc. The audio playback device may be a headphone device such as a wireless headset, a wired headset, etc. Alternatively, the audio playback device may also be an external playback device such as a Bluetooth speaker, a smart watch, etc.

[0023] According to the first aspect, or any implementation of the first aspect above, the audio processing circuit includes a discriminator, a second processing module and a variable resistor, one end of the discriminator is connected to a power amplifier of the electronic device, the other end of the discriminator is connected to one end of the second processing module, the other end of the second processing module is connected to the control end of the variable resistor, the first connection end of the variable resistor is connected to the power amplifier, and the other end of the variable resistor is connected to the audio playback module, and the loudness of the first audio signal is increased by a loudness gain amount, including: the discriminator detects whether the audio data includes the first audio signal, the audio signal is output by the power amplifier, and the audio signal has a preset loudness value; the discriminator detects an audio data packet In the case of a first audio signal, a first prompt signal is sent to a second processing module; the second processing module obtains hearing test data in response to the first prompt signal; and the loudness of the first audio signal is increased by a loudness gain amount, including: the second processing module determines a loudness attenuation amount of the first audio signal based on the loudness gain amount, the initial loudness value, and the preset loudness value; determines a second impedance of the variable resistor based on the loudness attenuation amount and the first impedance of the audio playback module; and controls the resistance value of the variable resistor to be adjusted to the second impedance, so as to attenuate the loudness of the first audio signal from the preset loudness value to a target loudness value through the variable resistor of the second impedance, and the target loudness value is the sum of the initial loudness value and the loudness gain amount.

[0024] In this way, the loudness of the first audio signal can be adjusted through the variable resistor, thereby improving the adjustment accuracy of the first audio signal and further improving the accuracy of the ear protection.

[0025] Exemplarily, the frequency discriminator may determine whether the frequency value of the current audio signal is consistent with the frequency value of the pre-input first frequency point, so as to detect whether the audio data has the first frequency point.

[0026] Exemplarily, the second processing module may be a processor in the example of the present application. The second processing module may be a module with a control function such as a SOC or a CODEC.

[0027] Exemplarily, the second impedance of the variable resistor may be determined according to formula (1) in the embodiment of the present application.

[0028] According to the first aspect, or any implementation manner of the first aspect above, the method further includes: when the frequency discriminator detects that the audio data includes second audio data of a second frequency point, sending a second prompt signal to the second processing module; the second processing module determines the loudness attenuation of the second audio signal based on the initial loudness value and the preset loudness value; based on the loudness attenuation of the second audio signal and the first impedance of the audio playback module, determining the third impedance of the variable resistor; controlling the resistance value of the variable resistor to be adjusted to the third impedance, so that the loudness of the second audio signal is attenuated from the preset loudness value to the initial loudness value through the variable resistor of the third impedance, and the third impedance is greater than the second impedance.

[0029] In this way, the audio signal can be attenuated at the normal hearing frequency with a certain third resistance, and the volume signal can be attenuated at the hearing impaired frequency with the second impedance. Since the third impedance is greater than the second impedance, the loudness of the attenuated first audio signal is greater than the loudness of the second audio signal, thereby achieving a loudness gain for the first audio signal as a whole and achieving the purpose of ear protection.

[0030] Exemplarily, the first impedance may be the earpiece resistance in the embodiment of the present application, the second impedance may be the first resistance value in the embodiment of the present application, and the third impedance may be the second resistance value in the embodiment of the present application.

[0031] Exemplarily, the third impedance may be determined according to formula (1) in the embodiment of the present application.

[0032] According to the first aspect, or any implementation of the first aspect above, the hearing loss value of the first audio signal is greater than or equal to a preset hearing loss threshold; the hearing loss value of the second audio signal is less than the preset hearing loss threshold.

[0033] In this way, the hearing-impaired frequency points and the normal hearing frequency points can be accurately identified according to the preset hearing-impaired threshold value, so that the hearing-impaired frequency points and the normal hearing frequency points can be output with different loudness values, thereby achieving the purpose of ear protection.

[0034] Exemplarily, the amplified loudness value of the first audio signal is greater than the loudness value of the second audio signal.

[0035] According to the first aspect, or any implementation method of the first aspect above, obtaining hearing test data of a user includes: obtaining an audio playback mode of audio data; when the audio playback mode is an earpiece playback mode, obtaining posture information of the electronic device; determining a target ear for the user to receive the audio data based on the posture information; and obtaining hearing test data of the target ear.

[0036] In this way, when the user uses the earpiece to obtain sound information, the target ear of the user to receive the audio signal can be electronically determined, and then the loudness value of the first audio signal can be accurately adjusted according to the hearing test data of the target ear, thereby further achieving precise hearing protection for the target ear and further improving the user's auditory experience.

[0037] Exemplarily, the audio playback mode of the audio data can be obtained; and the hearing test data corresponding to the audio playback mode can be obtained, so as to perform hearing protection on the target ear corresponding to the audio playback mode according to the hearing test data corresponding to the audio playback mode. For example, if the audio playback mode is the earpiece playback mode, the hearing test data of the target ear is obtained, the loudness gain of the first audio signal is determined according to the hearing test data of the target ear, and the first audio data with increased loudness is output to the target ear. For another example, if the audio playback mode is the speaker playback mode, the hearing test data of both ears (i.e., the hearing test data of the human ear) is obtained, the loudness gain of the first audio signal is determined according to the hearing test data of the human ear, and the first audio data with increased loudness is publicly played. For another example, if the audio playback mode is the headphone playback mode, the hearing test data of the left ear is obtained, the loudness gain of the first audio signal is determined according to the hearing test data of the left ear, and the first audio data with increased loudness is output to the left headphone. And, obtaining hearing test data of the right ear, determining a loudness gain of the first audio signal according to the hearing test data of the right ear, and outputting the first audio data with increased loudness to the right earphone.

[0038] Exemplarily, in the earphone playback mode, the first frequency point is a frequency point at which the user's target ear has hearing loss.

[0039] Exemplarily, whether the target ear is the left ear or the right ear can be determined according to the rotation angle of the terminal device along the y-axis. For example, if the terminal device rotates clockwise, the target ear is determined to be the right ear. If the terminal device rotates counterclockwise, the target ear is determined to be the left ear.

[0040] According to the first aspect, or any implementation of the first aspect above, obtaining hearing test data of a user includes: obtaining an audio playback mode of audio data; when the audio playback mode is a headphone playback mode, determining whether the audio data includes an audio signal of a third frequency point, wherein the third frequency point is a first frequency point of the left ear of the user; when the audio data includes an audio signal of the third frequency point, obtaining first hearing test data, wherein the first hearing test data is test data of the left ear in the hearing test data; determining a loudness gain amount corresponding to the first frequency point according to the hearing test data, including:

[0041] Determine, according to the first hearing test data, a loudness gain amount corresponding to the third frequency point; increase the loudness of the first audio signal by the loudness gain amount, including: based on the loudness gain amount corresponding to the third frequency point, increase the loudness of the audio signal at the third frequency point to a first loudness value; output the first audio signal at the increased loudness, including: control the left earphone to output the audio signal at the third frequency point at the first loudness value.

[0042] Through this embodiment, in the headphone playback mode, the audio signal at the third frequency point can be loudness-gained using the hearing loss data of the left ear to generate an audio signal for the left ear, thereby accurately protecting the hearing of the left ear in the headphone mode, further improving the hearing experience.

[0043] Exemplarily, the third frequency point may be a frequency point at which the user's left ear has hearing loss.

[0044] According to the first aspect, or any implementation manner of the first aspect above, obtaining hearing test data of a user further includes: when the audio playback mode is the headphone playback mode, determining whether the audio data includes audio data of a fourth frequency point, where the fourth frequency point is a first frequency point of the user's right ear; when the audio data includes an audio signal of the fourth frequency point, obtaining second hearing test data, where the second hearing test data is test data of the right ear in the hearing test data; determining a loudness gain amount corresponding to the first frequency point according to the hearing test data, further includes: determining a loudness gain amount corresponding to the fourth frequency point according to the second hearing test data; increasing the loudness of the first audio signal by the loudness gain amount, further includes: increasing the loudness of the audio signal at the fourth frequency point to a second loudness value based on the loudness gain amount corresponding to the fourth frequency point; outputting the first audio signal at the increased loudness, further includes: controlling the right headphone to output the audio signal of the fourth frequency point at the second loudness value.

[0045] Through this embodiment, in the headphone playback mode, the audio signal at the fourth frequency point can be loudness-gained using the hearing loss data of the right ear to generate an audio signal for the right ear, thereby accurately protecting the hearing of the right ear in the headphone mode, further improving the hearing experience.

[0046] Exemplarily, the right frequency point may be a frequency point at which the user's right ear has hearing loss.

[0047] According to the first aspect, or any implementation of the first aspect above, obtaining hearing test data of a user includes: obtaining an audio playback mode of audio data; when the audio playback mode is a speaker playback mode, obtaining the user's first hearing test data and the user's second hearing test data, wherein the first hearing test data includes a first hearing damage value of the user's left ear at multiple frequency points, and the second hearing test data includes a second hearing damage value of the user's right ear at multiple frequency points; based on the first hearing test data and the second hearing test data, determining the hearing test data, wherein the hearing damage value of a single test frequency point in the hearing test data is the smaller value of the first hearing damage value of the single test frequency point and the second hearing damage value of the single test frequency point.

[0048] In this way, in the speaker playback mode, a certain hearing compensation can be made for the hearing damage points that exist in both ears. While increasing the loudness of the frequency point, the loss to the other ear caused by excessive loudness is avoided, taking into account both hearing accuracy and hearing health.

[0049] According to the first aspect, or any implementation of the first aspect above, the audio processing circuit further includes an audio playback module, and outputs the first audio signal with increased loudness, including: controlling the audio playback module to output the first audio signal with increased loudness, wherein the audio playback module is one of a speaker of a terminal device, a receiver of a terminal device, a screen sound device of a terminal device, a speaker of a headset, or a speaker of a playback device, wherein the playback device is an audio playback device other than a headset connected to the terminal device.

[0050] Through this embodiment, the ear protection function can be implemented on various devices or equipment with audio playback function, thereby increasing the application scope of the ear protection function.

[0051] Exemplarily, the playback device may be a smart watch, a smart speaker, a TV, a computer, a projector, or other device for terminal device projection.

[0052] According to the first aspect, or any implementation of the first aspect above, before obtaining the user's hearing test data, the method also includes: for a single test frequency point, playing at least one test audio of the single test frequency point to the user, wherein one test audio corresponds to one loudness value; based on the user's feedback result on the test audio, determining the user's hearing damage value at the single test frequency point; based on the hearing damage values ​​of multiple test frequencies, generating hearing test data.

[0053] In this way, the user's ears can be accurately tested through the terminal device, which improves the convenience and accuracy of the hearing test.

[0054] In a second aspect, an embodiment of the present application provides an audio processing circuit, the circuit comprising: an audio acquisition module, used to acquire audio data; a test data acquisition module, used to acquire hearing test data of a user when the audio data includes a first audio signal at a first frequency point, the hearing test data including hearing damage values ​​of the user at multiple test frequency points; a gain determination module, used to determine a loudness gain corresponding to the first frequency point based on the hearing test data, wherein the loudness gain amount corresponds to the hearing damage value of the user at the first frequency point; a loudness adjustment module, used to increase the loudness of the first audio signal by the loudness gain amount; and an audio output module, used to output the first audio signal at the increased loudness.

[0055] According to a second aspect, the circuit includes: a first processing module, the first processing module including an audio acquisition module, a test data acquisition module, and a loudness adjustment module;

[0056] The first processing module is used to determine whether the audio data includes the first audio signal; and, if the audio data includes the first audio signal, to obtain hearing test data; and, based on the hearing test data, to determine a loudness gain corresponding to the first frequency point; and, based on the initial loudness value, to increase the loudness of the first audio signal by the loudness gain to obtain a target loudness value; and, based on the target loudness value, to control the audio output module to output the first audio signal at the target loudness value.

[0057] According to the second aspect, or any implementation of the second aspect, the first processing module is included in the terminal device.

[0058] According to the second aspect, or any implementation of the second aspect above, the audio processing circuit includes: a frequency discriminator, a second processing module, a variable resistor and an audio playback module;

[0059] The discriminator includes an audio acquisition module, one end of the discriminator is connected to the power amplifier of the terminal device, and the other end of the discriminator is connected to one end of the second processing module. The discriminator is used to acquire an audio signal and is also used to detect whether the audio data includes a first audio signal, the audio signal is output by the power amplifier, and the audio signal has a preset loudness value; and the discriminator is also used to send a first prompt signal to the second processing module when it is detected that the audio data includes the first audio signal;

[0060] The second processing module includes a test data acquisition module, a gain determination module, and a loudness adjustment module. The other end of the second processing module is connected to the control end of the variable resistor. The second processing module is used to obtain hearing test data in response to the first prompt signal; and is also used to determine the loudness gain corresponding to the first frequency point according to the hearing test data, and is also used to determine the loudness attenuation of the first audio signal based on the loudness gain, the initial loudness value, and the preset loudness value; and is also used to determine the second impedance of the variable resistor based on the loudness attenuation and the first impedance of the audio playback module; and is also used to control the resistance value of the variable resistor to be adjusted to the second impedance, so as to attenuate the loudness of the first audio signal from the preset loudness value to the target loudness value through the variable resistor of the second impedance, and the target loudness value is the sum of the initial loudness value and the loudness gain.

[0061] Wherein, a first connection end of the variable resistor is connected to the power amplifier, and the other end of the variable resistor is connected to the audio playback module.

[0062] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0063] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0064] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0065] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0066] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0067] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.

[0068] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 The figure shows a schematic diagram of an exemplary application scenario;

[0070] Figure 2 Shown is a schematic diagram of another application scenario shown exemplarily;

[0071] Figure 3 is a schematic diagram of an exemplary hearing measurement report provided in an embodiment of the present application;

[0072] Figure 4 A schematic diagram exemplarily shows the audio data provided by an embodiment of the present application;

[0073] Figure 5 A schematic diagram of an audio playback scenario is shown;

[0074] Figure 6 A schematic diagram of an audio playback scenario provided by an embodiment of the present application is shown;

[0075] Figure 7 A schematic diagram of an audio playback system provided in an embodiment of the present application is shown;

[0076] Figure 8 A schematic diagram of another audio playback system provided in an embodiment of the present application is shown;

[0077] Fig. 9 A schematic diagram of another audio playback system provided in an embodiment of the present application is shown;

[0078] Fig.10 A schematic diagram showing an audio playback scenario provided by an embodiment of the present application

[0079] Fig.11 A structural example diagram of an exemplary terminal device provided in an embodiment of the present application is shown;

[0080] Fig.12 A schematic diagram of the structure of an electronic device is shown;

[0081] Fig.13 is a software structure block diagram of the electronic device 1200 according to an embodiment of the present application;

[0082] Fig.14 A schematic diagram of an audio circuit of an electronic device provided in an embodiment of the present application is shown;

[0083] Fig.15 A schematic structural diagram of an audio circuit of an exemplary electronic device provided in an embodiment of the present application is shown;

[0084] Fig.16 A schematic structural diagram of an audio circuit of another exemplary electronic device provided in an embodiment of the present application is shown;

[0085] Fig.17 A schematic diagram showing a process of generating hearing test data provided by an embodiment of the present application is shown;

[0086] Fig.18A schematic diagram of an exemplary hearing health test interface provided in an embodiment of the present application is shown;

[0087] Fig.19 A schematic diagram showing an exemplary hearing test interface provided in an embodiment of the present application is shown;

[0088] Fig. 20 A schematic diagram showing a flow chart of an audio playback mode recognition process provided by an embodiment of the present application;

[0089] Fig.21 A schematic diagram of a reference coordinate system of a mobile phone provided in an embodiment of the present application is shown;

[0090] Fig. 22 A schematic diagram of posture changes of a mobile phone provided in an embodiment of the present application is shown;

[0091] Fig.23 A schematic diagram of a usage scenario of a mobile phone provided in an embodiment of the present application is shown;

[0092] Fig.24 A schematic diagram of the structure of an exemplary audio adjustment circuit provided in an embodiment of the present application is shown;

[0093] Fig.25 A schematic diagram of the structure of a frequency discriminator provided in an embodiment of the present application is shown;

[0094] Fig.26 A schematic diagram showing the structure of an equivalent circuit of a variable resistor provided in an embodiment of the present application is shown;

[0095] Fig. 27 A schematic diagram of the structure of a variable resistor provided in an embodiment of the present application is shown;

[0096] Fig.28 A schematic diagram of the structure of another variable resistor provided in an embodiment of the present application is shown;

[0097] Fig.29 A schematic diagram of a flow chart of an audio adjustment process provided in an embodiment of the present application is shown;

[0098] Fig.30 A schematic diagram of a flow chart of an audio adjustment process provided in an embodiment of the present application is shown;

[0099] Fig.31 A schematic diagram of a hearing compensation curve provided by an embodiment of the present application is shown;

[0100] Fig.32 A schematic block diagram showing a device according to an embodiment of the present application DETAILED DESCRIPTION

[0101] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0102] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0103] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0104] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0105] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0106] Terminal devices such as mobile phones can often bring users visual, auditory and other multi-faceted experiences. In terms of hearing, users can experience the auditory experience brought by the terminal device through their left and right ears, and the visual experience brought by the terminal device through their eyes.

[0107] like Figure 1 The figure shows an exemplary application scenario. Figure 1 As shown, in a mobile phone call scenario, when the user's ear is close to the mobile phone 10, the mobile phone 10 generates sound through the speaker and transmits the sound to the user's ear through the air.

[0108] like Figure 2 FIG. 1 is a schematic diagram of another exemplary application scenario. Figure 2 As shown, in daily life, when the user wears the headset 20, the mobile phone 10 ( Figure 2(not shown) can play sound to the user's left and right ears through the earphone 10.

[0109] Before introducing the technical solutions provided by the embodiments of the present application, the relevant technical contents involved in the embodiments of the present application are first described.

[0110] (1) Audiometry report, which is a way to measure the degree of hearing loss of a person's ear. For example, Figure 3 It is a schematic diagram of an exemplary hearing measurement report provided in an embodiment of the present application. Specifically, the hearing measurement report may include an audiometry table 31 for the right ear and an audiometry table 32 for the left ear, the horizontal axis of the audiometry table represents the frequency, in kilohertz (kHZ), and the vertical axis represents the hearing level (dB HL). Among them, the hearing level refers to a person's hearing ability, which is used to describe the degree of hearing loss. It should be noted that a person's normal hearing is in the range of 0~30dB HL, and the better the hearing level, the closer it is to 0 dBHL. Among them, 0dB HL represents the baseline hearing, that is, the weakest sound that a young person with normal hearing can hear at each frequency point. If the test result of the subject at a certain frequency point is 30dB HL, it means that the subject cannot hear the sound below 30dB HL at that frequency point, or the hearing damage value of the subject can be said to be 30dB.

[0111] For example, taking the right ear hearing test as an example, the doctor can test the hearing test results of the subject's right ear at different frequencies, such as Figure 3 Each dot 311 in the diagram represents the hearing loss value of the subject at the frequency point (or frequency) corresponding to the dot 311. For example, the hearing loss value of the subject's right ear is 10dB HL at 1kHz. After collecting the hearing test results of the subject's right ear at multiple frequency points, a hearing test curve 312 of the subject's right ear can be generated. It should be noted that the left ear detection process is similar to the right ear detection process and will not be repeated here.

[0112] (2) Audio data, which in the embodiment of the present application may refer to the data of the sound heard by the user from the mobile phone. Exemplarily, the audio data in the embodiment of the present application may be the audio data corresponding to a song, the audio data corresponding to an audio book, the audio data contained in a video, or the audio data of a call voice, etc., without limitation. Since sounds of different tones may correspond to different frequencies, accordingly, an audio data may include audio signals of different frequencies.

[0113] For example, Figure 4 The schematic diagram of the audio data provided by the embodiment of the present application is exemplarily shown. Figure 4As shown, the audio data may include audio signals of multiple frequencies, such as an audio signal of frequency 1 (125 Hz) (hereinafter referred to as audio signal 1) and an audio signal of frequency 2 (1 kHz) (hereinafter referred to as audio signal 2). Audio signals of different frequencies represent sounds of different tones. And, Figure 4 The amplitude A of the audio signal shown is used to represent the loudness of the audio signal (ie, the volume of the sound), and the unit may be decibel (dB).

[0114] After introducing the above-mentioned related technical contents, the audio playback scheme involved in the embodiment of the present application will be described next.

[0115] In the development process of terminal equipment technology, as people gradually pay more attention to hearing health, accordingly, how to protect users' hearing in the audio playback scenarios of the above-mentioned terminal devices has become an urgent problem to be solved.

[0116] The inventors have found through research that many factors, such as stress and noise environment in work and life, aging, and bad ear habits, can lead to hearing loss. Figure 3 The human ear has different hearing impairments at certain frequencies. For example, taking the subject's left ear as an example, the hearing impairment at 125 Hz is 26 dB, and the hearing impairment at 8 kHz is 5 dB.

[0117] However, the hearing loss may be further aggravated during the use of the terminal device. Figure 5 A schematic diagram of an audio playback scenario is shown. Figure 5 As shown in the figure, as shown in the volume bar 11 of the electronic device, when the audio signal 1 (normal volume) played at volume a1 enters the human ear, the volume of the audio signal 1 heard by the human ear will be low due to the hearing loss of the human ear to frequency 1, resulting in poor listening effect of the audio signal of frequency 1 or even no hearing of the audio signal at all. However, if the overall volume of the mobile phone is increased from volume a1 to volume a2, although the human ear can receive the audio signal 1 of normal volume, the audio signal 2 received by the human ear further aggravates the hearing damage of the human ear due to the excessive volume, further affecting the hearing health of the human ear.

[0118] Since hearing damage to the human ear (also known as hearing loss or hearing loss) is irreversible, how to protect the human ear during audio playback has become a technical problem that needs to be solved urgently.

[0119] Based on this, the present application provides an audio playback solution, in which, when the audio data includes the first audio data of the first frequency point, the loudness gain amount of the user at the first frequency point can be determined according to the hearing test data of the user. Since the loudness gain amount corresponds to the hearing loss value of the first frequency point, the loudness gain amount can compensate for the hearing loss value of the user at the first frequency point accordingly, so that after the first audio signal is output according to the increased loudness, the output volume of the audio signal does not need to be increased as a whole, so that the human ear with hearing loss can hear the first audio signal of the original volume, thereby avoiding hearing damage to the human ear caused by other excessive volumes, and realizing hearing protection for the human ear.

[0120] For example, Figure 6 A schematic diagram of an audio playback scenario provided by an embodiment of the present application is shown. Figure 6 As shown in (1), when the electronic device generates audio signal 1 and audio signal 2 at volume a1 (i.e., normal volume), the volume of audio signal 1 is increased and the volume of audio signal 2 is kept unchanged by the audio processing method provided in the embodiment of the present application, so that after the audio signal of audio signal 1 enters the human ear, the volume of audio signal 1 and the volume of audio signal 2 heard by the human ear are both normal volumes due to the hearing damage of the human ear.

[0121] And, if Figure 6 As shown in (2), when the electronic device generates audio signal 1 and audio signal 2 at volume a2 (i.e., a higher volume), the audio processing method provided in the embodiment of the present application can attenuate the volume of audio signal 2 to volume a1, and keep the volume of audio signal 1 unchanged at volume a2. As a result, after the audio signal a1 is heard by the human ear, the volume of audio signal 1 and the volume of audio signal 2 received by the human ear can be normal due to hearing damage.

[0122] Next, the specific technical solution of the embodiment of the present application will be described in conjunction with the accompanying drawings. In order to facilitate understanding of the technical solution provided by the embodiment of the present application, the audio playback system involved in the embodiment of the present application will be described first.

[0123] In one embodiment, Figure 7 FIG. 1 is a schematic diagram of an audio playback system provided by an embodiment of the present application. Figure 7As shown, the audio playback system may include a terminal device 100 and a wireless headset 210. Among them, the wireless headset 210 may include a true wireless headset 211 or a head-mounted wireless headset 212. Alternatively, the wireless headset 210 may also include a neck-mounted wireless headset (not shown in the figure). It should be noted that in the specific implementation of the embodiment of the present application, the terminal device 100 may be a computer, a smart phone, a telephone, a cable TV set-top box, a digital subscriber line router, and other devices with audio processing functions. And, in actual applications, the number of devices connected to the terminal device can be one or more, and this application does not limit this.

[0124] Continue to see Figure 7 , the true wireless earphone 211 may include a left earphone 211a and a right earphone 211b. When playing audio, the terminal device 100 may transmit the audio signal of the left ear to the left earphone 211a by wireless transmission, and transmit the audio signal of the right ear to the right earphone 211b by wireless transmission.

[0125] And, the head-mounted wireless headset 212 may include a left earplug 212a and a right earplug 212b. It should be noted that the audio playback method of the head-mounted wireless headset 212 is similar to that of the true wireless headset 211, which will not be described in detail. And, for the sake of convenience, in the embodiment of the present application, the left earphone and the left earplug are collectively referred to as the left earphone, and the right earphone and the right earplug are collectively referred to as the right earphone.

[0126] In another embodiment, Figure 8 FIG. 2 is a schematic diagram of another audio playback system provided by an embodiment of the present application. Figure 8 As shown, the audio playback system may include a terminal device 100 and a wired headset 203 .

[0127] The terminal device 100 may include an audio transmission interface 101, which may be a USB interface that complies with the Universal Serial Bus (USB) standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. In the embodiment of the present application, the audio transmission interface 101 is illustrated using USB Type C as an example.

[0128] Furthermore, the wired headset 203 may include a left headset 203a, a right headset 203b, and an audio transmission connector 203c. The audio transmission connector 203c is used to connect to the audio transmission interface 101 of the terminal device 100. For example, the audio transmission connector 203c may be a USB Type C connector.

[0129] During audio playback, the terminal device may transmit the audio signal of the left ear and the audio signal of the right ear to the left earphone 203a and the right earphone 203b respectively in a wired transmission manner.

[0130] In yet another embodiment, Fig. 9 FIG. 2 shows a schematic diagram of another audio playback system provided by an embodiment of the present application. Fig. 9 As shown, the audio playback system may include a terminal device 100 and an external connection device 300. Among them, the external connection device 300 may be a device connected to the terminal device in a wireless or wired manner. Exemplarily, in an embodiment of the present application, the external connection device 300 may be an electronic device with an audio playback function, such as a smart speaker 301 and a smart watch 302. It should be noted that the audio playback process of the external connection device 300 can refer to the relevant description of the above part of the embodiment of the present application, and will not be repeated here.

[0131] As shown in the above embodiments, the terminal device can play audio through an external device. Fig.10 A schematic diagram of an audio playback scenario provided by an embodiment of the present application is shown, such as Fig.10 As shown, the terminal device itself can also play audio. Fig.11 Provide specific instructions.

[0132] In a specific example, Fig.11 FIG. 1 shows an exemplary structure diagram of an exemplary terminal device provided in an embodiment of the present application. Fig.11 As shown, the terminal device 100 may further include a receiver 102 , a screen sound emitting device 103 , a screen sound emitting area 104 , a volume increase key 105 and a volume decrease key 106 .

[0133] The receiver 102 may be located at the upper edge of the screen of the terminal device 100, and the screen sound device 103 may be located below the screen of the terminal device 100 and close to the receiver 102. Specifically, the screen sound device 103 may drive the screen to vibrate under the control of the current signal, thereby outputting the audio signal through the screen sound area 104. Exemplarily, the screen sound device may be a vibration source such as piezoelectric ceramics, a motor vibrator, an exciter, etc., and the embodiments of the present application do not impose specific restrictions on this.

[0134] In addition, it should be noted that in the embodiment of the present application, the volume up key 105 and the volume down key 106 can control the increase and decrease of the loudness of the audio signal, and they can be set on the outer frame or under the screen of the terminal device 100, without specific restrictions.

[0135] After a preliminary introduction to the audio playback system of the embodiment of the present application, the structure of the terminal device will be described next.

[0136] Fig.12 1 shows a schematic diagram of the structure of the electronic device 1200. It should be understood that Fig.12 The electronic device 1200 shown is only an example of an electronic device, and the electronic device 1200 can be implemented as the above-mentioned terminal device 100, and the electronic device 1200 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. Fig.12 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0137] The electronic device 1200 may include: a processor 1210, an external memory interface 1220, an internal memory 1221, a Universal Serial Bus (USB) interface 1230, a charging management module 1240, a power management module 1241, a battery 1242, an antenna 1, an antenna 2, a mobile communication module 1250, a wireless communication module 1260, an audio module 1270, a speaker 1270A, a receiver 1270B, a microphone 1270C, an earphone interface 1270D, a sensor module 1280, a button 1290, a motor 1291, an indicator 1292, a camera 1293, a display screen 1294, and a Subscriber Identification Module (SIM) card interface 1295, etc. The sensor module 1280 may include a pressure sensor 1280A, a gyroscope sensor 1280B, an air pressure sensor 1280C, a magnetic sensor 1280D, an acceleration sensor 1280E, a distance sensor 1280F, a proximity light sensor 1280G, a fingerprint sensor 1280H, a temperature sensor 1280J, a touch sensor 1280K, an ambient light sensor 1280L, a bone conduction sensor 1280M, and the like.

[0138] The processor 1210 may include one or more processing units, for example, the processor 1210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 1200. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0139] A memory may also be provided in the processor 1210 for storing instructions and data. In some embodiments, the memory in the processor 1210 is a high-speed cache memory. The USB interface 1230 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 1230 may be used to connect a charger to charge the electronic device 1200, or may be used to transfer data between the electronic device 1200 and a peripheral device. It may also be used to connect headphones to play audio through the headphones. The interface may also be used to connect other electronic devices, such as AR devices, etc.

[0140] The charging management module 1240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 1240 may receive charging input from a wired charger through the USB interface 1230. In some wireless charging embodiments, the charging management module 1240 may receive wireless charging input through a wireless charging coil of the electronic device 1200. While the charging management module 1240 is charging the battery 1242, it may also power the electronic device through the power management module 1241.

[0141] The power management module 1241 is used to connect the battery 1242, the charging management module 1240 and the processor 1210. The power management module 1241 receives input from the battery 1242 and / or the charging management module 1240, and supplies power to the processor 1210, the internal memory 1221, the external memory, the display screen 1294, the camera 1293, and the wireless communication module 1260. The wireless communication function of the electronic device 1200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 1250, the wireless communication module 1260, the modem processor and the baseband processor.

[0142] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 1200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0143] The mobile communication module 1250 may provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 1200. The mobile communication module 1250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (Low Noise Amplifier, LNA), etc.

[0144] The wireless communication module 1260 can provide wireless communication solutions for application in the electronic device 1200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0145] In some embodiments, antenna 1 of electronic device 1200 is coupled to mobile communication module 1250, and antenna 2 is coupled to wireless communication module 1260, so that electronic device 1200 can communicate with the network and other devices through wireless communication technology.

[0146] The electronic device 1200 implements the display function through a GPU, a display screen 1294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 1294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 1210 may include one or more GPUs that execute program instructions to generate or change display information.

[0147] The display screen 1294 is used to display images, videos, etc. The display screen 1294 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In some embodiments, the electronic device 1200 may include 1 or M display screens 1294, where M is a positive integer greater than 1.

[0148] The electronic device 1200 can realize the shooting function through ISP, camera 1293, video codec, GPU, display screen 1294 and application processor.

[0149] The camera 1293 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 1200 may include 1 or N cameras 1293, where N is a positive integer greater than 1.

[0150] The external memory interface 1220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1200. The external memory card communicates with the processor 1210 through the external memory interface 1220 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0151] The internal memory 1221 can be used to store computer executable program codes, which include instructions. The processor 1210 executes various functional applications and data processing of the electronic device 1200 by running the instructions stored in the internal memory 1221. The internal memory 1221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 1200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 1221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (Universal Flash Storage, UFS), etc.

[0152] The electronic device 1200 can implement audio functions such as music playing and recording through the audio module 1270, the speaker 1270A, the receiver 1270B, the microphone 1270C, the headphone jack 1270D, and the application processor.

[0153] The audio module 1270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 1270 can also be used to encode and decode audio signals. In some embodiments, the audio module 1270 can be set in the processor 1210, or some functional modules of the audio module 1270 can be set in the processor 1210. In the embodiment of the present application, the audio module 1270 can gain the audio signal of the hearing impaired frequency point, so as to ensure that the user can normally hear the sound of the hearing impaired frequency point.

[0154] The speaker 1270A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 1200 can listen to music or listen to a hands-free call through the speaker 1270A.

[0155] The receiver 1270B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 1200 receives a call or voice message, the voice can be received by placing the receiver 1270B close to the human ear.

[0156] The earphone interface 1270D is used to connect a wired earphone and can be a USB interface 1230 or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0157] The gyro sensor 1280B can be used to determine the motion posture of the electronic device 1200. In some embodiments, the angular velocity of the electronic device 1200 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 1280B. The gyro sensor 1280B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 1280B detects the angle of the shaking of the electronic device 1200, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 1200 through reverse movement to achieve anti-shake. The gyro sensor 1280B can also be used for navigation and somatosensory game scenes. In an embodiment of the present application, the gyro sensor 1280B can detect the tilt angle of the electronic device 1200 to determine whether the user listens to the sound signal with the left ear or the right ear.

[0158] The touch sensor 1280K is also called a "touch panel". The touch sensor 1280K can be set on the display screen 1294, and the touch sensor 1280K and the display screen 1294 form a touch screen, also called a "touch screen". The touch sensor 1280K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 1294. In other embodiments, the touch sensor 1280K can also be set on the surface of the electronic device 1200, which is different from the position of the display screen 1294. In an embodiment of the present application, the electronic device 1200 can detect user operations such as clicks and slides on the display screen 1294 through the touch detection capability provided by the touch sensor 1280K, thereby controlling the activation and deactivation of applications and devices, and realizing jump switching between different user interfaces.

[0159] The key 1290 includes a power key, a volume key, etc. The key 1290 may be a mechanical key or a touch key. The electronic device 1200 may receive key input and generate key signal input related to user settings and function control of the electronic device 1200.

[0160] Motor 1291 can generate vibration prompts. Motor 1291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Indicator 1292 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0161] In passing Fig.12 After introducing the hardware structure of electronic equipment, we will continue to combine Fig.13 The software structure of the electronic device is described.

[0162] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0163] Fig.13 It is a software structure block diagram of the electronic device 1200 according to an embodiment of the present application.

[0164] The layered architecture of the electronic device 1200 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the framework layer, the hardware abstraction layer (HAL), and the kernel layer.

[0165] The application layer can include a series of application packages.

[0166] like Fig.13 As shown, the application package may include applications with audio playback functions such as calls, music, and videos.

[0167] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0168] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0169] The hardware abstraction layer is an interface layer located between the application framework layer and the kernel layer, and is used to provide a virtual hardware platform for the operating system. The hardware abstraction layer may include a camera HAL, an audio HAL, a WiFi HAL, etc. In an embodiment of the present application, the audio HAL may include a hearing-impaired frequency determination module, a loudness gain value determination module, an audio signal adjustment module, etc. Specifically, the hearing-impaired frequency determination module may detect whether the audio to be output contains an audio signal of a hearing-impaired frequency, the loudness gain value determination module is used to determine the loudness gain value of the hearing-impaired frequency, and the audio signal adjustment module is used to increase the loudness value of the hearing-impaired frequency from the first loudness value by the loudness gain amount to increase the loudness value of the hearing-impaired frequency to the second loudness value, and then output the audio signal of the hearing-impaired frequency at the second loudness value.

[0170] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0171] Understandably, Fig.13 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 1200. In other embodiments of the present application, the electronic device 1200 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0172] After the hardware structure and software structure of the electronic device 1200 are preliminarily introduced, the audio circuit in the electronic device will be described next.

[0173] Fig.14 FIG. 1 is a schematic diagram of an audio circuit of an electronic device provided in an embodiment of the present application. Fig.14 As shown, the audio circuit 1300 of the electronic device may include a system on chip (SOC) 1311, an audio encoder-decoder (CODer-DECoder, CODEC) 1312, a power amplifier (PA) 1313, a speaker 1314, an earpiece 1315, an audio transmission interface 1316, and a Bluetooth module 1317.

[0174] In an audio playback mode, SOC 1311 can process the audio signal and then send the processed audio signal to CODEC 1312 for decoding and analog-to-digital conversion. CODEC 1312 can send the converted analog audio signal to PA 1313. After power amplification, PA 1313 can drive the speaker 1314 or the earpiece 1315 to vibrate the analog audio signal to generate a sound that can be recognized by the human ear.

[0175] In another audio playback mode, the PA 1313 can be connected to an external playback device such as a wired headset 1410 connected in a wired manner through an audio transmission interface 1316, wherein the wired headset 1410 is wiredly connected to the electronic device through an audio transmission connector 1411, and after receiving the audio signal, the wired headset 1410 can play the audio signal through a speaker 1412. Alternatively, the wired headset 1410 can include its own PA, and accordingly, the audio transmission interface 1316 in the audio circuit 1300 can be directly connected to the CODEC 1312, which is not limited in this application.

[0176] In another audio playback mode, CODEC 1312 can be connected to an external playback device such as a wireless headset 1420 that is wirelessly connected via a Bluetooth module 1317. After the wireless headset 1420 receives the audio signal via the Bluetooth module 1421, it can be amplified via PA 1422 and then played via a speaker 1423.

[0177] Among them, in the embodiment of the present application, when CODEC1312 does not have the analog-to-digital conversion function, CODEC1312 can also be connected to PA1313 through a digital to analog converter (DAC) to convert the audio signal in digital form into an audio signal in analog form through the DAC.

[0178] Furthermore, in the embodiment of the present application, PA1313 may be a common PA or a Smart PA, and there is no limitation on this. Furthermore, PA1313 may amplify audio signals in analog form or digital form, and there is no specific limitation on this.

[0179] And, in the embodiment of the present application, SOC1311 can also have the function of CODEC1312, and accordingly, SOC1311 can be directly connected to PA1313. For example, Fig.15 FIG. 1 is a schematic diagram showing the structure of an exemplary audio circuit of an electronic device provided in an embodiment of the present application. Fig.15 As shown, SOC1311 can be connected to a receiver (or RCV for short) 1315 or an upper speaker (or upper BOX for short) 1314a through a first PA (such as an upper SmartPA) 1313a, and can also be connected to a lower speaker (or lower BOX for short) 131b through a second PA (such as a lower SmartPA) 1313b. Fig.16 , SOC1311 can also be connected to a digital headset 1318. In another embodiment, Fig.16FIG. 1 shows a schematic diagram of the structure of an audio circuit of another exemplary electronic device provided in an embodiment of the present application, such as Fig.16 As shown, the SOC 1311 can be connected to the audio transmission interface (such as Type-C interface) 1316, or the SOC 1311 can be connected to the speaker 1314c through the third PA 1313c. In addition, the CODEC 1312 can also be connected to the audio transmission interface 1315 through the switch 1319.

[0180] After introducing the above audio circuit, the audio playback process provided by the embodiment of the present application is described below. The audio playback process in the embodiment of the present application can be divided into two parts. The first part is the process of generating hearing test data, the second part is the process of identifying the audio playback mode, and the third part is the process of adjusting the audio signal. Figure 17-Figure 19 The first part is explained.

[0181] Fig.17 FIG. 1 is a flow chart showing a process of generating hearing test data provided by an embodiment of the present application. Fig.17 As shown, taking the terminal device as a mobile phone as an example, the process of generating hearing test data may include steps S1701 to S1712.

[0182] S1701, in response to the user's hearing health test operation, the mobile phone starts to perform the hearing health test.

[0183] For example, Fig.18 A schematic diagram of an exemplary hearing health test interface provided in an embodiment of the present application is shown. Fig.18 (1) is a schematic diagram of the main interface of the mobile phone. The mobile phone can respond to the user's triggering operation on the "settings" control on the main interface and display Fig.18 Then, the mobile phone can respond to the user's triggering operation on the "Hearing and Vibration" control in the settings menu and display Fig.18 Then, the mobile phone can respond to the user's trigger operation on the "ear protection sound effect" in the hearing and vibration function interface and display Fig.18 The ear protection sound effect setting interface shown in (4) in the figure. And, the mobile phone can display the ear protection sound effect setting interface in response to the user's triggering operation on the hearing health test control in the ear protection sound effect setting interface. Fig.18 The hearing health test interface shown in (5) in FIG.

[0184] And, if Fig.18As shown in (5) of FIG. 1 , the hearing health test interface may display a prompt pop-up window 1802, which is used to prompt the user whether to start the hearing health test, and the prompt window 1802 also includes two controls, "Yes" and "No". When the user triggers the "Yes" control, the hearing health test begins. Optionally, the mobile phone may be in the user's Fig.18 After the hearing health test control is triggered in the ear protection sound effect setting interface shown in (4), the hearing health test starts automatically. This application does not limit the specific steps of the hearing health test.

[0185] Optionally, the user Fig.18 After clicking the "Yes" control in the hearing health test interface shown in (5) of the figure, the mobile phone can display Fig.18 In the test ear selection interface shown in (6) of FIG. 1 , the user can select to test the left ear or the right ear in the selection pop-up window 1803 of the interface. Optionally, the mobile phone may need to Fig.18 In the tested ear selection interface shown in (6), the left ear or right ear is directly selected by default to start the test, and this application does not impose any restrictions on this.

[0186] It should be noted that in the embodiments of the present application, the hearing health test can also be performed in other ways, without limitation to the specific function interface and triggering method.

[0187] Furthermore, the triggering operations in the embodiments of the present application may include but are not limited to: single-click, double-click, sliding and other operations, which are not limited to this.

[0188] S1702, the mobile phone performs a test on the i-th test frequency point, where i is an integer greater than or equal to 1, and the initial value of i is 1, that is, the test starts from the first test frequency point.

[0189] In S1702, the mobile phone may generate a test audio signal at the i-th test frequency point, wherein the initial loudness value of the test audio signal may be the loudness that can be heard by a human ear having a hearing loss value of 0 dB at the i-th test frequency point.

[0190] The specific audio content of the test audio signal may be set according to the actual test scenario and specific test requirements, and is not limited thereto.

[0191] S1703, the mobile phone sends a test audio signal of the i-th test frequency point to the tested earphone. The tested earphone may be an earphone corresponding to the tested ear. For example, if the tested ear is the left ear, the tested earphone is the left earphone, and if the tested ear is the right ear, the tested earphone is the right earphone.

[0192] For example, Fig.19 FIG. 1 is a schematic diagram showing an exemplary hearing test interface provided by an embodiment of the present application. Fig.19 As shown in (1), the mobile phone can send a test audio signal to the headset under test.

[0193] S1704: The headphone under test plays a test audio signal at the i-th test frequency point.

[0194] For example, see Fig.19 In (1), after receiving the test audio signal, the tested headset can convert it into a corresponding sound signal, determine a current playback volume corresponding to the current loudness value of the test audio signal, and play it according to the current playback volume.

[0195] S1705, the mobile phone receives the feedback result of the hearing test input by the user.

[0196] For example, the user can Fig.19 The feedback result of the hearing test is input on the feedback interface shown in (2). After detecting the input operation, the mobile phone can receive the feedback result input by the user.

[0197] S1706, the mobile phone determines whether the tested ear can hear the test audio signal of the i-th test frequency based on the feedback result. If the tested ear cannot hear the test audio signal, continue to step S1707. If the tested ear can hear the test audio signal, continue to step S1708.

[0198] For example, see Fig.19 In the feedback interface shown in (2), if the user clicks the "No" option on the interface, the mobile phone can determine that the user cannot hear the test audio signal of the current loudness. If the user clicks the "Yes" option, the mobile phone can determine that the user hears the test audio signal of the current loudness.

[0199] It should be noted that Fig.19 (2) in the figure only illustrates the feedback interface by way of example. In actual practice, the feedback interface may also include several hearing content options. For example, the feedback interface may include the content "select the content you hear from the following options" and determine whether the user's tested ear can hear the test audio signal at the i-th test frequency point based on whether the user has selected the correct playback content. The embodiment of the present application does not limit the specific form of the feedback interface.

[0200] S1707, the mobile phone increases the loudness of the test audio signal at the i-th test frequency. For example, the preset loudness value is increased based on the current loudness, and the process returns to step S1703 to test whether the user can hear the test audio signal at the current loudness value. For example, the loudness value x is increased by 10 dB for the first time, and each subsequent loudness value is increased by 10 dB based on the previous loudness value. The loudness value of the j-th test is x+10*(j-1), where j is an integer greater than or equal to 1.

[0201] S1708, the mobile phone determines whether the hearing test of the tested ear is completed. If the determination result is no, the process continues to step S1709, and if the determination result is yes, the process continues to step S1710.

[0202] In 1708, it can be determined whether the i-th test frequency point is the last test frequency point, and if it is the last test frequency point, it is determined that the hearing test of the tested ear is completed. For example, if 8 kHz is the last test frequency point, then when the i-th test frequency point is 8000 Hz, it is determined that the hearing test of the tested ear is completed.

[0203] S1709, the mobile phone sets i=i+1, and returns to step S1702, so that the mobile phone continues the hearing test at the next test frequency point.

[0204] And, in S1709, the mobile phone can also record the hearing test result of the i-th test frequency. For example, if the user hears the test audio data in the j-th hearing test for the i-th frequency, the hearing test result of the i-th test frequency can be recorded as 10*(j-1)dB, that is, the hearing loss value of the user's tested ear at the i-th test frequency is 10*(j-1)dB, where 10 is the preset loudness value increased in S1707. In one example, if the test audio data is heard for the first time, the hearing loss value is 0dB, if the test audio data is heard for the second time, the hearing loss value is 10dB, and so on.

[0205] S1710, the mobile phone determines whether both ears of the subject have completed the hearing test. If the determination result is no, then continue to execute S1711, and if the determination result is no, then continue to execute S1712.

[0206] Optionally, if the user only needs to perform a hearing test on a single ear, there is no need to perform steps S1710 and S1711, and a hearing test report can be generated directly based on the hearing test data of a single ear.

[0207] S1711, the mobile phone uses the other ear as a new tested ear and sets i = 1. That is, the mobile phone performs a hearing test on the other ear of the tested person again from the first test frequency point.

[0208] For example, if the hearing test of the left ear is completed but the hearing test of the right ear is not completed, the mobile phone may use the right ear as a new tested ear in S1711 to continue the hearing test on the right ear.

[0209] S1712, the mobile phone generates a hearing test report based on the hearing test data of both ears.

[0210] In S1712, the mobile phone can generate the following information based on the hearing test data of both ears: Figure 3 Hearing test report shown.

[0211] It should be noted that S1701-S1712 show a way of obtaining hearing test data / hearing test report in an embodiment of the present application. In another way, the mobile phone can obtain the user's hearing test data / hearing test report by taking a photo and scanning the user's hearing test report. It should be noted that in an embodiment of the present application, a terminal device such as a mobile phone can also obtain the user's hearing test data / hearing test report in other ways, such as manual input by the user, and there is no specific limitation on this.

[0212] After introducing the generation process of the first part of the listening test data, let's continue with Figure 20-23 The second part describes the process of identifying the audio playback mode.

[0213] Fig. 20 FIG. 1 is a flow chart showing a process of identifying an audio playback mode provided by an embodiment of the present application. Fig. 20 As shown, taking the terminal device as a mobile phone as an example, the process of generating hearing test data can be implemented by the SOC and sensors in the mobile phone. Specifically, the process of generating hearing test data can include steps S1701 to S2008.

[0214] S2001, the SOC obtains the audio playing mode of the mobile phone, wherein the audio playing mode may include: receiver playing mode, speaker playing mode (or external speaker mode) or earphone playing mode.

[0215] In some embodiments, the SOC may determine the audio playback mode in response to a user's selection operation on the audio playback interface, such as a selection operation of a handset mode, a speaker mode, a headphone mode, etc. For another example, the SOC may determine the audio playback mode based on whether the mobile phone is connected to a headphone.

[0216] In some embodiments, the audio playback mode may also include a screen playback mode, an external playback mode, etc. Among them, the external playback mode may refer to a mode in which audio is played by an external playback device other than headphones, for example, it may refer to a mode in which the audio is played externally by an external playback device (i.e., played through a speaker of an external playback device).

[0217] S2002, the posture sensor of the mobile phone sends the posture information of the mobile phone. The posture sensor may refer to a sensor such as a gravity sensor, a gyroscope, etc. that can collect the posture data of the mobile phone.

[0218] In some implementations, the posture information of the mobile phone may be the rotation angle of the mobile phone around the x-axis, y-axis, and z-axis of the reference coordinate system.

[0219] For example, Fig.21 FIG. 1 is a schematic diagram showing a reference coordinate system of a mobile phone provided in an embodiment of the present application. Fig.21 As shown, the reference coordinate system of the mobile phone may include an x-axis, a y-axis, and a z-axis, wherein the x-axis is parallel to the width direction of the terminal device (such as the short side of the mobile phone), the y-axis is parallel to the length direction of the terminal device (such as the long side of the mobile phone), and the z-axis is parallel to the height direction of the terminal device (such as the thickness direction of the mobile phone).

[0220] Fig. 22 FIG. 1 shows a schematic diagram of a posture change of a mobile phone provided in an embodiment of the present application. When the rotation angle of the mobile phone along the y-axis is 0°, the mobile phone is in Fig. 22 In the posture shown in (1) in the figure, if the user rotates the phone clockwise along the y-axis, the phone is in Fig. 22 In the posture shown in (2), the rotation angle of the phone around the y-axis is positive. And if the user rotates the phone counterclockwise along the y-axis, the phone is in Fig. 22 In the posture (3), the rotation angle of the mobile phone around the y-axis is a negative value.

[0221] It should be noted that, in the embodiment of the present application, the posture information of the mobile phone can also be determined by the position information of the mobile phone in different directions of other coordinate systems, and there is no specific limitation on this.

[0222] S2003, if the audio playback mode of the mobile phone is the handset playback mode, obtain the posture information of the mobile phone. The posture information may be as described in S2002. Optionally, the posture information may include the tilt angles of the mobile phone around the x-axis, y-axis, and z-axis. Alternatively, the posture information may only include the tilt angle of the mobile phone around the y-axis.

[0223] S2004, judging whether the audio receiving ear is the left ear or the right ear according to the position information of the mobile phone. If the judgment result is the left ear, continue to execute S2005, if the judgment result is the right ear, continue to execute S2006.

[0224] For example, Fig.23 A schematic diagram of a usage scenario of a mobile phone provided in an embodiment of the present application is shown. Fig.23 As shown, if the mobile phone is directly in front of the user, the rotation angle of the mobile phone around the y-axis is 0° (it should be noted that when the mobile phone is directly in front of the user, the angle around the y-axis can be defined as other values ​​according to actual conditions and specific needs, and there is no specific restriction on this).

[0225] Furthermore, when the mobile phone is at the right side of the user and the user uses the right ear to receive audio signals, the mobile phone rotates 90° clockwise around the y-axis, and the rotation angle of the mobile phone around the y-axis is +90°. Accordingly, in S2004, the SOC can determine that the audio receiving ear is the right ear when the rotation angle of the mobile phone around the y-axis is a positive value (or the difference from +90° is within a certain range).

[0226] Also, when the mobile phone is to the left of the user, that is, the user uses the left ear to receive audio signals, the mobile phone rotates 90° counterclockwise around the y-axis, and the rotation angle of the mobile phone around the y-axis is -90°. Accordingly, the SOC can determine that the audio receiving ear is the left ear when the rotation angle of the mobile phone around the y-axis is a negative value (or the difference from -90° is within a certain range).

[0227] It should be noted that in the embodiment of the present application, the SOC can also determine the audio receiving ear as the left ear and the right ear in other ways. For example, when the user uses the left ear or the right ear, the light is blocked differently, or the pressure on different positions of the screen is different. Accordingly, the SOC can determine the audio receiving ear through the sensor signals of the light sensor, the pressure sensor, etc. Alternatively, the mobile phone can also determine the audio receiving ear according to the user's usage habits, etc., and there is no limitation to this.

[0228] S2005: If the audio receiving ear is the left ear, play the audio according to the hearing test data of the left ear.

[0229] S2006: If the audio receiving ear is the right ear, play the audio according to the hearing test data of the right ear.

[0230] S2007, if the audio playback mode of the mobile phone is the speaker playback mode, the audio is played according to the hearing test data of both ears. Optionally, in the speaker playback mode, the volume of the audio signal may not be adjusted.

[0231] S2008, if the audio playback mode of the mobile phone is the headphone playback mode, the audio of the left headphone is played according to the hearing test data of the left ear, and the audio of the right headphone is played according to the hearing test data of the right ear.

[0232] It should be noted that the specific contents of the above S2005-S2008 will be explained in the third part.

[0233] In some embodiments, if the audio playback mode of the mobile phone is the screen playback mode, it can be processed according to the earpiece playback mode.

[0234] In some embodiments, if the audio playback mode of the mobile phone is an external playback mode, it can be processed according to the speaker playback mode, which will not be described in detail.

[0235] Through S2001 to S2008, different audio processing can be performed for different audio playback modes, and hearing protection can be performed for the left ear and the right ear respectively, which can further improve the accuracy of hearing protection. In addition, in the embodiment of the present application, it is also possible not to distinguish the audio playback mode, and directly play the audio with the hearing test data of both ears, and there is no specific limitation on this.

[0236] After introducing the audio playback mode recognition process in the second part, we will continue to combine Figure 24-Figure 31 The adjustment process of the audio signal in the third part is explained.

[0237] The present application embodiment provides an audio processing solution. Figure 24-Figure 29 Provide explanation.

[0238] Fig.24 FIG. 1 shows a schematic diagram of the structure of an exemplary audio adjustment circuit provided in an embodiment of the present application. Fig.24 As shown, the audio adjustment circuit may include a frequency discriminator 1321 , a processor 1322 and a variable resistor 1323 .

[0239] One end of the frequency discriminator 1321 is connected to one end of the PA 1313, and the other end of the frequency discriminator 1321 is connected to the processor 1322. The frequency discriminator 1321 can be used to obtain the audio data output by the PA 1313 and detect the frequency of the audio signal in the audio data. In one embodiment, Fig.25 FIG. 1 shows a schematic diagram of the structure of the frequency discriminator provided in an embodiment of the present application. Fig.25As shown, the frequency discriminator may include a first input terminal, a second input terminal and an output terminal, wherein the first input terminal is used to obtain a reference audio signal Fref of a hearing-impaired frequency point, and the second input terminal is used to obtain an audio signal Fin of audio data. When the frequency value of the reference audio signal Fref of the hearing-impaired frequency point is equal to the frequency value of the current audio signal Fin of the audio data, the frequency discriminator outputs a first indication signal INT1, and the first indication signal is used to indicate that the frequency point corresponding to the current audio signal is a hearing-impaired frequency point. In another embodiment, the frequency discriminator may also detect the frequency value of the current audio signal, and send the detected frequency value to the processor 1322.

[0240] The processor 1322 has one end connected to the frequency detector 1321 and the other end connected to the variable resistor 1323. The processor 1322 can be a processor with data processing function such as SOC or CPU, and there is no specific limitation on this. In the embodiment of the present application, the processor 1322 can control the resistance change of the variable resistor 1323.

[0241] The variable resistor 1323 has one end connected to the PA 1313 and the other end connected to the receiver 1315. It can be implemented as a circuit. In one embodiment, Fig.26 FIG. 1 shows a schematic diagram of an equivalent circuit of a variable resistor provided in an embodiment of the present application. Fig.26 As shown, when the earpiece 1315 has an earpiece impedance R0, one end of the variable resistor Rx is connected to the PA1313, and the other end of the variable resistor Rx is connected to the earpiece impedance R0 to form a voltage divider structure consisting of the variable resistor Rx and the earpiece impedance R0. Exemplarily, the earpiece impedance can be a fixed value, such as 32 ohms.

[0242] In one example, Fig. 27 FIG. 1 shows a schematic diagram of the structure of a variable resistor provided in an embodiment of the present application. Fig. 27 As shown, the variable resistor 1323 may include first MOS transistors MOS1 to MOS3, first resistors R1 to R4, a first capacitor C1 and a second capacitor C2.

[0243] The first connection end of the first MOS transistor MOS1 is connected to one end of the PA1313, the second connection end of the first MOS transistor MOS1 is connected to the second connection end of the second MOS transistor MOS2, and the first connection end of the second MOS transistor MOS2 is connected to the receiver 1315. The control end of the first MOS transistor MOS1 and the control end of the second MOS transistor MOS2 are both connected to the first connection end of the third MOS transistor.

[0244] One end of the first resistor R1 is connected to the first connection end of the first MOS transistor MOS1 , and the other end of the first resistor R1 is connected to the first connection end of the second MOS transistor MOS2 .

[0245] One end of the second resistor R2 is connected to the second connection end of the first MOS transistor MOS1 and the second connection end of the second MOS transistor MOS2 respectively, and the other end of the second resistor R2 is connected to the first connection end of the third MOS transistor MOS3.

[0246] One end of the third resistor R3 is connected to the control end of the third MOS transistor MOS3, and the other end of the third resistor R3 is grounded GND.

[0247] One end of the fourth resistor R4 is connected to the control end of the third MOS tube MOS3, and the other end of the fourth resistor R4 is used to receive the variable resistor control signal PWM. The variable resistor control signal PWM can be generated by the processor. Optionally, the variable resistor control signal PWM can be directly generated by the processor 1322, or generated by the processor 1322 through a gate driver, which is not specifically limited.

[0248] One end of the first capacitor C1 is connected to the first connection end of the third MOS transistor MOS3, and the other end of the first capacitor C1 is grounded GND.

[0249] One end of the second capacitor C2 is connected to the control end of the third MOS transistor MOS3, and the other end of the second capacitor C2 is grounded GND.

[0250] Through the above circuit, the first MOS transistor MOS1 and the second MOS transistor MOS2 can be driven on or off by the variable resistance control signal PWM to control the change of resistance between PA1313 and the earpiece 1315. Specifically, different duty ratios of the variable resistance control signal PWM can achieve outputs of different resistance values, so that the change of resistance value of the variable resistor can be controlled by adjusting the duty ratio of the variable resistance control signal PWM, so that different gains can be performed on different audio signals output by PA1313.

[0251] In another example, Fig.28 FIG. 2 shows a schematic diagram of the structure of another variable resistor provided in an embodiment of the present application. Fig.28 As shown, the variable resistor 1323 may include p branches, each branch includes a control switch and an optional resistor, where p is an integer greater than or equal to 2. For example, the first branch includes a first optional resistor R51 and a first control switch S1, the second branch includes a second optional resistor R52 and a second control switch S2, ..., and the p-th branch includes a p-th optional resistor R5p and a p-th control switch Sp. Different on-off schemes of the first control switch S1-p-th control switch Sp can adjust the variable resistor to different resistance values.

[0252] It should be noted that the variable resistor may also be implemented as other circuit structures capable of generating variable resistance values, and there is no specific limitation on this.

[0253] In yet another example, the variable resistor may also be implemented as a variable resistor chip, such as an impedance IC.

[0254] After introducing the above audio adjustment circuit, the audio adjustment process will be described next. Fig.29 FIG. 1 is a flow chart of an audio adjustment process provided by an embodiment of the present application. Fig.29 As shown, the audio adjustment process may include S2901-S2910.

[0255] S2901, PA sends audio data to the frequency discriminator.

[0256] The audio data may include multiple audio signals, and the multiple audio signals may correspond to different moments. Accordingly, the PA may send different audio signals to the discriminator at different moments, and the frequencies of the different audio signals may be the same or different. Exemplarily, the audio data may send an audio signal B1 to the discriminator at a first moment t1, and send an audio signal B2 to the discriminator at a second moment t2.

[0257] S2902, the frequency discriminator determines whether the current audio signal is an audio signal of a hearing-damage frequency point, and if the determination result is yes, execute S2903. If the determination result is no, execute S2907.

[0258] S2903: When the frequency discriminator determines that the current audio signal is an audio signal at a hearing-impaired frequency point, the frequency discriminator sends a first indication signal INT1 to the processor.

[0259] Exemplarily, when the user has different hearing-impaired frequency points, the frequency discriminator may send different first indication signals INT1 to the processor to indicate different hearing-impaired frequency points.

[0260] Exemplarily, since the left ear and the right ear may have different hearing loss frequencies, the discriminator may detect the hearing loss frequencies of the left ear and the hearing loss frequencies of the right ear. In another exemplary embodiment, the left ear and the right ear may correspond to different discriminators (hereinafter referred to as the left ear). Accordingly, in the headphone playback mode, the discriminator corresponding to the left ear (hereinafter referred to as the left ear discriminator) and the discriminator corresponding to the right ear (hereinafter referred to as the right ear discriminator) may respectively detect the hearing loss frequencies of the left ear and the hearing loss frequencies of the right ear. In the earpiece playback mode, if the audio receiving ear is the left ear, the hearing loss frequencies are detected by the left ear discriminator, and if the audio receiving ear is the right ear, the hearing loss frequencies are detected by the right ear discriminator. In the speaker playback mode, the hearing loss frequencies of the left ear and the hearing loss frequencies of the right ear may be detected respectively, and then when the processor determines that a certain frequency is the hearing loss frequency of both the left and right ears, it is determined as the target hearing loss frequency.

[0261] S2904: The processor generates a first control signal in response to the first indication signal INT1, wherein the first control signal is used to adjust the resistance value of the variable resistor to a resistance value corresponding to the hearing loss frequency point.

[0262] In one example, the processor may execute the following steps C1 to C5.

[0263] Step C1 : the processor determines the frequency value of the hearing loss frequency point in response to the first indication signal INT1 .

[0264] Step C2: The processor determines the hearing loss value of the hearing loss frequency point according to the hearing test data.

[0265] For example, in the earpiece playback mode, if the audio receiving ear is the left ear, the hearing loss value is determined using the hearing test data of the left ear. If the audio receiving ear is the right ear, the hearing loss value is determined using the hearing test data of the right ear. Figure 3 For example, if the hearing loss frequency is 0.25kHZ, if the audio receiving ear is the left ear, the hearing loss value is 25dB, if the audio receiving ear is the right ear, the hearing loss value is 5dB.

[0266] As another example, in the headphone playback mode, the hearing loss value of the left ear can be determined using the hearing test data of the left ear, and the hearing loss value of the right ear can be determined using the hearing test data of the right ear.

[0267] As another example, in the speaker playback mode, the hearing loss value of the human ear can be determined using the hearing test data of both ears. Specifically, the hearing loss value of the left ear and the hearing loss value of the right ear can be determined, and the smaller value of the two is determined as the hearing loss value of the human ear at this frequency point. For example, continuing to take 0.25kHZ as an example, the hearing loss value of the human ear at this frequency point can be 5dB. It should be noted that, alternatively, the audio signal in the speaker playback mode may not be processed. Accordingly, the audio signal in the speaker playback mode can be directly output to the speaker after being output from the PA.

[0268] And, for the hearing test data, it may include hearing loss values ​​corresponding to multiple frequency points. Alternatively, it may be implemented as a hearing test curve. Alternatively, it may be implemented as a hearing test function corresponding to the hearing test curve. The embodiment of the present application does not limit its form.

[0269] Step C3: The processor determines a loudness gain value corresponding to the hearing loss value according to the hearing loss value.

[0270] Exemplarily, the processor may directly determine the hearing loss value as the loudness gain value. For example, if the hearing loss value is 30 dB, the loudness gain amount is also 30 dB.

[0271] In another exemplary embodiment, the loudness gain value may be determined based on the hearing loss value and other losses (such as transmission loss and noise loss).

[0272] In step C4, the processor determines an increased loudness value (hereinafter referred to as output loudness value) based on the initial loudness value and the loudness gain value.

[0273] The initial loudness value may be a loudness value that the user is expected to hear. For example, the initial loudness value may be a loudness value corresponding to the volume set in the mobile phone. Alternatively, the initial loudness value may be a default value set in the mobile phone. Alternatively, the initial loudness value may be an optimal hearing loudness.

[0274] For example, in step C4, if the initial loudness value is 60 dB and the loudness gain is also 30 dB, it can be determined that the increased target loudness value is 90 dB.

[0275] In step C5, the processor determines the resistance value corresponding to the hearing loss frequency point based on the target loudness value and the loudness value before adjustment.

[0276] The loudness value before adjustment may be a value greater than the loudness value after increase. If there are multiple hearing loss frequency points, the loudness value before adjustment is greater than the maximum value of the output loudness values ​​corresponding to the multiple hearing loss frequency points. For example, if the output loudness value corresponding to the hearing loss frequency point B1 is 90dB, and the loudness value corresponding to the hearing loss frequency point B2 is 75dB, the loudness value before adjustment is greater than or equal to 90dB.

[0277] The loudness value before adjustment may be obtained by adjusting the volume of the mobile phone to 60 dB, and the maximum hearing loss of the left ear at each frequency point is 30 dB, then the PA or SOC unit may adjust the loudness value of each audio signal in the audio data to 90 dB.

[0278] For the resistance value Ra corresponding to the hearing loss frequency point, the loudness attenuation at the hearing loss frequency point can be determined based on the loudness value before adjustment and the output loudness value. The resistance value Ra corresponding to the hearing loss frequency point is determined based on the loudness attenuation and the earpiece impedance R0.

[0279] For example, if the loudness value before adjustment is D1 and the output loudness value is D2, the loudness attenuation D3 is the difference between D1 and D2. According to the following formula (1), the resistance value Ra corresponding to the hearing loss frequency point can be determined.

[0280] D3=20*lg((Ra+R0) / R0)(1)

[0281] Wherein, 20 is the attenuation factor, which can be an empirical value. If the loudness attenuation D3 is 0 dB, that is, the loudness attenuation is 0, then Ra is equal to 0 ohms. If the loudness attenuation D3 is 1.02 dB, then the resistance value Ra corresponding to the hearing loss frequency is 4 ohms.

[0282] S2905: The processor sends a first control signal to the variable resistor.

[0283] S2906, the variable resistor adjusts its resistance to the first resistance, ie, the resistance value Ra corresponding to the hearing impairment frequency point, in response to the first control signal.

[0284] S2907: When the frequency discriminator determines that the current audio signal is not a hearing-impaired frequency point, the frequency discriminator sends a second indication signal INT2 to the processor. The second indication signal is used to indicate that the frequency point of the current audio signal is not a hearing-impaired frequency point (ie, a normal hearing frequency point).

[0285] S2908, the processor generates a second control signal in response to the second indication signal INT2, where the second control signal is used to control the variable resistor to adjust to a second resistance value.

[0286] Exemplarily, the second control signal is generated in a similar manner to the first control signal, and reference may be made to the relevant description in S2904. The second resistance Rb at the normal hearing frequency point may also be calculated by the above formula (1). The loudness attenuation D3 at the normal hearing frequency point may be the difference between the loudness value D1 before adjustment and the initial loudness value. Exemplarily, if the loudness set on the mobile phone is 60dB (or the default output is 60dB), and the loudness value D1 before adjustment is 90dB, the loudness attenuation D3 at the normal hearing frequency point is 30dB.

[0287] S2909, the processor sends a second control signal to the variable resistor.

[0288] S2910, the variable resistor adjusts its resistance to a second resistance, that is, the resistance value Rb corresponding to the normal hearing frequency point, in response to the second control signal.

[0289] Through the above S2901 to S2910, the variable resistor can have a certain impedance Rb at the normal hearing frequency, and when the frequency discriminator identifies the hearing impairment frequency, the impedance of the variable resistor can be reduced to Ra, so that the loudness of the audio signal at the hearing impairment frequency is greater than the loudness of the audio signal at the normal hearing frequency, thereby improving the loudness gain of the hearing impairment frequency, and further achieving hearing protection for the human ear.

[0290] In another embodiment, different from the audio processing flow shown in S2901 to S2910 above, the frequency discriminator can detect the frequency of the audio signal and send the detected frequency value to the processing module. The processing module determines whether the frequency point corresponding to the audio signal is a hearing loss frequency point according to the frequency value.

[0291] And, in some other embodiments, the variable resistor 1323 can be connected to the speaker 1314, and accordingly, the frequency discriminator can detect the hearing loss frequency of the human ear, and the processor can determine the loudness gain value according to the hearing loss value of the hearing loss frequency of the human ear, and determine the resistance value corresponding to the hearing loss frequency according to the loudness gain value. The specific method is similar to the above S2901-S2902, and other contents are not repeated again.

[0292] Optionally, if the speaker is a speaker of an external playback device, the PA, the discriminator, and the variable resistor can be set in the terminal device, and the audio signal output by the variable resistor is sent to the external playback device through the audio transmission connector or the Bluetooth module. Through this setting method, all kinds of external devices can achieve hearing protection, which improves the applicability of the hearing protection solution. It should be noted that the PA, the discriminator, and the variable resistor can also be set in the external playback device according to the specific circuit structure, and there is no specific limitation on this.

[0293] And, in some other embodiments, the variable resistor 1323 can be connected to the earphone. Accordingly, the left earphone can correspond to the variable frequency resistor of the left ear, and the right earphone can correspond to the variable frequency resistor of the right ear. The processor can determine the resistance value of the variable frequency resistor of the left ear at the hearing loss frequency point and the normal hearing frequency point according to the hearing test data of the left ear, so as to output the adjusted left ear audio data to the left earphone. Similarly, the processor can determine the resistance value of the variable frequency resistor of the right ear at the hearing loss frequency point and the normal hearing frequency point according to the hearing test data of the right ear, so as to output the adjusted right ear audio data to the right earphone.

[0294] Optionally, the PA, the discriminator, and the variable resistor can be set in the terminal device, and the audio signal output by the variable resistor is sent to the headset through the audio transmission connector or the Bluetooth module. Through this setting, the terminal device can achieve hearing protection through various types of headphones, which improves the applicability of the hearing protection solution. Alternatively, the PA, the discriminator, and the variable resistor can also be set in the headset, and there is no specific limitation on this.

[0295] The present application embodiment also provides another audio processing solution. Figure 30-Figure 31 Provide explanation.

[0296] Fig.30 FIG. 1 is a flow chart of an audio adjustment process provided by an embodiment of the present application. Fig.30 As shown, the audio adjustment process may include S3001-S3009.

[0297] S3001, the processing module obtains audio data. The audio data can refer to the relevant description in S2901, which will not be repeated here. The loudness of each audio signal in the audio data can be an initial loudness value.

[0298] The processing module may be a device in the terminal device, such as a SOC or a CODEC, which has an audio data processing function.

[0299] S3002, the processing module detects whether the audio data contains a hearing-impaired frequency point. If the detection result is no, then jump to step S3003, and if the detection result is yes, then jump to step S3005.

[0300] In some embodiments, the processing module may determine the frequency point of the audio data as a hearing-impaired frequency point based on the magnitude of the hearing loss value of the frequency point of the audio data in the hearing test data, if the hearing loss value is greater than or equal to a preset hearing loss threshold. Similarly, if the hearing loss value is less than the preset hearing loss threshold, the frequency point of the audio data is determined to be a normal hearing frequency point.

[0301] In other embodiments, a hearing-impaired frequency list may be pre-stored in the processing module, and the processing module may determine whether the frequency of the audio data is in the hearing-impaired frequency list. If the frequency of the audio data is in the hearing-impaired frequency list, the frequency of the audio data is determined to be a hearing-impaired frequency. Similarly, if the frequency of the audio data is not in the hearing-impaired frequency list, the frequency of the audio data is determined to be a normal hearing frequency. The hearing-impaired frequency list may be predetermined based on hearing test data, or may be determined in other ways, and there is no specific limitation on this.

[0302] S3003, the processing module sends an audio signal to the audio playback module. The audio playback module may be a device that can convert the audio signal into a sound signal recognizable by the human ear, such as a receiver, a speaker, a screen sound device, etc. of the terminal device itself. Alternatively, the audio playback module may be a speaker of a headset or a speaker of other external playback devices.

[0303] It should be noted that, for the receiver, speaker, screen sound device and other devices of the terminal device itself, the processing module can send audio signals to them through PA. For the speaker of the headset or the speaker of other external playback devices, the processing module can send audio signals to them through the Bluetooth module or the audio transmission interface. The specific sending method can refer to the relevant description of the above part of the embodiment of the present application, which will not be repeated here.

[0304] S3004: The audio playing module plays the audio signal at the initial loudness value.

[0305] Exemplarily, the audio playback module may convert the audio signal into a sound signal in a vibration manner, wherein the volume of the sound signal corresponds to the initial loudness value.

[0306] S3005, the processing module determines a loudness gain value according to the hearing test data. The loudness gain value is used to compensate for the user's hearing loss at the target frequency point, and can be determined together with the hearing loss value of the target frequency point.

[0307] In some embodiments, S3005 may include step E1 and step E2.

[0308] Step E1: When the hearing test data includes a hearing test curve, the processing module may determine a hearing compensation curve according to the hearing test curve. Fig.31 FIG. 2 shows a schematic diagram of a hearing compensation curve provided by an embodiment of the present application. Fig.31 As shown, the hearing test curve and the hearing compensation curve are symmetrical with the horizontal line corresponding to 0dB. Accordingly, the hearing compensation curve can be determined by the hearing test curve.

[0309] Step E2: The processing module determines the loudness gain corresponding to the target frequency point on the hearing compensation curve.

[0310] It should be noted that, when the hearing test data includes a correspondence list of hearing loss values ​​of multiple test frequencies, a correspondence list of each test frequency and loudness gain can be determined. When the hearing test data includes a hearing test curve, a hearing compensation curve can be determined according to the hearing test curve.

[0311] Optionally, for the same frequency point, the hearing loss value in the hearing test data is the same as the loudness gain in the hearing compensation data. Optionally, in order to further improve the hearing compensation accuracy, the loudness gain can be calculated based on the hearing loss value, transmission loss, environmental noise, etc., and the calculation method can be set according to actual conditions, and there is no specific limitation on this.

[0312] For example, see Fig.31 If the target frequency is 1 kHz, the loudness gain corresponding to 1 kHz can be determined as 30 dB on the target compensation curve.

[0313] In other embodiments, S3005 may include step E3 and step E4.

[0314] Step E3: The processing module determines the hearing loss value of the hearing loss frequency point through the hearing test data.

[0315] Step E4: The processing module determines a loudness gain corresponding to the hearing loss value. One hearing loss value may correspond to one loudness gain. The specific method for determining the loudness gain may refer to the relevant description of the above part of the embodiment of the present application, which will not be described in detail.

[0316] S3006: The processing module increases the loudness gain value based on the initial loudness value to adjust the loudness of the audio signal to a target loudness value.

[0317] In some embodiments, since the audio playback module is driven by current to generate sound, changing the size of the sound (loudness) actually changes the size of the electric drive current. When the audio signal is a digital signal, the audio signal can be a square wave signal. The processing module can adjust the amplitude of the square wave signal to adjust the audio signal voltage, thereby changing the driving current of the audio playback module. Alternatively, the processing module can also adjust the duty cycle of the square wave signal to adjust the effective value of the driving current, thereby changing the size of the driving current.

[0318] In some other embodiments, when the audio signal is an analog signal, the processing module may adjust the voltage of the audio signal in analog form to change the driving current.

[0319] S3007: The processing module sends an audio signal of a target loudness value to the audio playing module. The audio signal sending process can refer to the relevant description of S3003, and no specific limitation is made thereto.

[0320] S3008, the audio playing module plays the audio signal at the target loudness value. The specific playing process can refer to the relevant description of S3004, which will not be repeated here.

[0321] It should be noted that when the audio playback module is a receiver, if the audio receiving ear is the left ear, the processing module can adjust each audio signal in the audio data according to the hearing test data of the left ear, and enable the audio playback module to play the adjusted audio data.

[0322] When the audio playback module is an earphone, the processing module can adjust each audio signal in the audio data according to the hearing test data of the left ear, obtain the left ear audio data, and make the left earphone play the left ear audio data. Also, the processing module can adjust each audio signal in the audio data according to the hearing test data of the right ear, obtain the right ear audio data, and make the right earphone play the right ear audio data.

[0323] When the audio playback module is a speaker, the processing module can adjust each audio signal in the audio data according to the human ear hearing test data (which can refer to the relevant description of the above part of the embodiment of the present application, which will not be repeated here), and let the audio playback module play the adjusted audio data. For example, if a certain frequency point is a hearing loss frequency point for both the left ear and the right ear, the hearing loss frequency point is determined as the hearing loss frequency point of the human ear. Then the smaller value of the left ear hearing loss value determined by the left ear hearing test data and the right ear hearing loss determined by the right ear hearing test data is determined as the human ear hearing loss value, and the human ear hearing loss value is determined as the loudness gain amount. Exemplarily, for a certain hearing loss frequency point, if the left ear hearing loss value is 30dB and the right ear hearing loss value is 5dB, the human ear hearing loss value is determined to be 5dB.

[0324] In some embodiments, in the above embodiments, in the headphone playback mode, the processing module / processor can also detect whether the headphone is worn correctly through the sensor signal detected by the sensor on the headphone. For example, whether the left headphone is worn to the left ear, and whether the right headphone is worn to the right ear. And, when the wearing is wrong, the above audio adjustment process can be stopped. Or, when the wearing is wrong, the left ear audio data can be sent to the right headphone, and the right ear audio data can be sent to the left headphone for playback. It can be understood that in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.

[0325] In one example, Fig.32 A schematic block diagram of a device 3200 according to an embodiment of the present application is shown. The device 3200 may include: a processor 3201 and a transceiver / transceiver pin 3202 , and optionally, a memory 3203 .

[0326] The various components of the device 3200 are coupled together via a bus 3204, wherein the bus 3204 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus 3204 in the figure.

[0327] Optionally, the memory 3203 may be used for the instructions in the aforementioned method embodiment. The processor 3201 may be used to execute the instructions in the memory 3203, and control the receiving pin to receive a signal, and control the sending pin to send a signal.

[0328] The device 3200 may be the electronic device or a chip of the electronic device in the above method embodiment.

[0329] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0330] The steps performed by the terminal device in the audio processing method provided in the above embodiment of the present application may also be performed by a chip system included in the terminal device, wherein the chip system may include a processor and a Bluetooth chip. The chip system may be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above terminal device. The processor in the chip system may be an application processor or a processor other than an application processor.

[0331] Similarly, in the above embodiment, the steps performed by the headset or external playback device may also be performed by a chip system included in the headset or external playback device, wherein the chip system may include a processor and a Bluetooth chip. The chip system may be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above headset or external playback device. The processor in the chip system may be an application processor or a processor other than an application processor.

[0332] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An audio processing method, characterized in that: The method is applied to an audio processing circuit, which includes a frequency discriminator, a second processing module and a variable resistor, wherein one end of the frequency discriminator is connected to a power amplifier of a terminal device, the other end of the frequency discriminator is connected to one end of the second processing module, the other end of the second processing module is connected to a control end of the variable resistor, a first connection end of the variable resistor is connected to the power amplifier, and the other end of the variable resistor is connected to an audio playback module. The method comprises: The frequency discriminator acquires audio data; In a case where the audio data includes a first audio signal at a first frequency point, the frequency discriminator sends a first prompt signal to the second processing module, wherein the first audio signal is output by the power amplifier and has a preset loudness value; The second processing module acquires hearing test data of the user in response to the first prompt signal, wherein the hearing test data includes hearing loss values ​​of the user at multiple test frequency points; The second processing module determines a loudness gain corresponding to the first frequency point according to the hearing test data, wherein the loudness gain corresponds to a hearing loss value of the user at the first frequency point; The second processing module determines a loudness attenuation amount of the first audio signal based on the loudness gain amount, the initial loudness value and the preset loudness value; The second processing module determines the second impedance of the variable resistor based on the loudness attenuation and the first impedance of the audio playback module; The second processing module controls the resistance of the variable resistor to be adjusted to the second impedance, so as to attenuate the loudness of the first audio signal from the preset loudness value to a target loudness value through the variable resistor of the second impedance, wherein the target loudness value is the sum of the initial loudness value and the loudness gain; The audio playing module outputs the first audio signal at the target loudness value.

2. The method according to claim 1, characterized in that The method further comprises: The frequency discriminator sends a second prompt signal to the second processing module when detecting that the audio data includes second audio data of a second frequency point; The second processing module determines a loudness attenuation amount of the second audio signal based on the initial loudness value and the preset loudness value; determining a third impedance of the variable resistor based on the loudness attenuation of the second audio signal and the first impedance of the audio playback module; controlling the resistance of the variable resistor to be adjusted to the third impedance, so as to attenuate the loudness of the second audio signal from the preset loudness value to the initial loudness value through the variable resistor of the third impedance, Wherein, the third impedance is greater than the second impedance.

3. The method according to claim 1, characterized in that The hearing loss value of the first audio signal is greater than or equal to a preset hearing loss threshold; The hearing impairment value of the second audio signal is less than the preset hearing impairment threshold.

4. The method according to claim 1, characterized in that: The obtaining of the hearing test data of the user comprises: Acquire the audio playback mode of the audio data; When the audio playback mode is the handset playback mode, obtaining posture information of the terminal device; Determining, according to the posture information, a target ear of the user for receiving the audio data; Acquire hearing test data of the target ear.

5. The method according to claim 1, characterized in that The obtaining of the hearing test data of the user comprises: Acquire the audio playback mode of the audio data; When the audio playback mode is the headphone playback mode, determining whether the audio data includes an audio signal of a third frequency point, wherein the third frequency point is a first frequency point of the left ear of the user; In a case where the audio data includes the audio signal of the third frequency point, obtaining first hearing test data, where the first hearing test data is the test data of the left ear in the hearing test data; The step of determining the loudness gain corresponding to the first frequency point according to the hearing test data includes: Determining a loudness gain corresponding to the third frequency point according to the first hearing test data; Increasing the loudness of the first audio signal by the loudness gain amount, comprising: Based on the loudness gain corresponding to the third frequency point, increasing the loudness of the audio signal at the third frequency point to a first loudness value; The audio playing module outputs the first audio signal at the target loudness value, including: The left earphone is controlled to output the audio signal of the third frequency point at the first loudness value.

6. The method according to claim 4, characterized in that The obtaining of the hearing test data of the user further includes: When the audio playback mode is the headphone playback mode, determining whether the audio data includes audio data of a fourth frequency point, where the fourth frequency point is a first frequency point of the right ear of the user; In a case where the audio data includes the audio signal of the fourth frequency point, obtaining second hearing test data, where the second hearing test data is the test data of the right ear in the hearing test data; The step of determining the loudness gain corresponding to the first frequency point according to the hearing test data further includes: Determining a loudness gain corresponding to the fourth frequency point according to the second hearing test data; Increasing the loudness of the first audio signal by the loudness gain amount further includes: Based on the loudness gain corresponding to the fourth frequency point, increasing the loudness of the audio signal at the fourth frequency point to a second loudness value; The audio playback module outputs the first audio signal at the target loudness value, and further includes: The right earphone is controlled to output the audio signal of the fourth frequency point at the second loudness value.

7. The method according to claim 1, characterized in that The obtaining of the hearing test data of the user comprises: Acquire the audio playback mode of the audio data; When the audio playback mode is a speaker playback mode, obtaining first hearing test data of the user and second hearing test data of the user, wherein the first hearing test data includes a first hearing loss value of the user's left ear at the multiple test frequency points, and the second hearing test data includes a second hearing loss value of the user's right ear at the multiple test frequency points; The hearing test data is determined based on the first hearing test data and the second hearing test data, wherein the hearing damage value of a single test frequency point in the hearing test data is a smaller value between a first hearing damage value of the single test frequency point and a second hearing damage value of the single test frequency point.

8. The method according to claim 1, characterized in that The audio processing circuit also includes an audio playback module. The audio playback module is one of a speaker of a terminal device, a receiver of a terminal device, a screen sound device of a terminal device, a speaker of a headset, or a speaker of a playback device; The playback device is an audio playback device other than the earphone connected to the terminal device.

9. The method according to claim 1, characterized in that: Before obtaining the hearing test data of the user, the method further includes: For a single test frequency point, play at least one test audio of the single test frequency point to the user, wherein one test audio corresponds to one loudness value; Determining a hearing loss value of the user at the single test frequency based on a feedback result of the user on the test audio; The hearing test data is generated based on the hearing loss values ​​of multiple test frequency points.

10. An audio processing circuit, characterized in that: The circuit comprises: An audio acquisition module, used to acquire audio data; a test data acquisition module, configured to acquire hearing test data of a user when the audio data includes a first audio signal at a first frequency point, wherein the hearing test data includes hearing loss values ​​of the user at multiple test frequency points; a gain determination module, configured to determine a loudness gain corresponding to the first frequency point according to the hearing test data, wherein the loudness gain corresponds to a hearing loss value of the user at the first frequency point; a loudness adjustment module, configured to increase the loudness of the first audio signal by the loudness gain amount; an audio playback module, configured to output the first audio signal at an increased loudness, Wherein, the audio processing circuit further includes: a frequency discriminator, a second processing module and a variable resistor; The discriminator includes the audio acquisition module, one end of the discriminator is connected to the power amplifier of the terminal device, and the other end of the discriminator is connected to one end of the second processing module, the discriminator is used to acquire the audio signal, and is also used to detect whether the audio data includes the first audio signal, the first audio signal is output by the power amplifier, and the first audio signal has a preset loudness value; and the discriminator is also used to send a first prompt signal to the second processing module when it is detected that the audio data includes the first audio signal; The second processing module includes the test data acquisition module, the gain determination module and the loudness adjustment module. The other end of the second processing module is connected to the control end of the variable resistor. The second processing module is used to obtain the hearing test data in response to the first prompt signal; and is also used to determine the loudness gain corresponding to the first frequency point according to the hearing test data, and is also used to determine the loudness attenuation of the first audio signal based on the loudness gain, the initial loudness value and the preset loudness value; and is also used to determine the second impedance of the variable resistor based on the loudness attenuation and the first impedance of the audio playback module; and is also used to control the resistance value of the variable resistor to be adjusted to the second impedance, so as to attenuate the loudness of the first audio signal from the preset loudness value to a target loudness value through the variable resistor of the second impedance, and the target loudness value is the sum of the initial loudness value and the loudness gain. Wherein, a first connection end of the variable resistor is connected to the power amplifier, and the other end of the variable resistor is connected to the audio playback module.

11. An electronic device, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the processors execute the audio processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the audio processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Audio compensation method, smart television and storage medium

    CN110677717A

  • Hearing detection method and device, electronic equipment and storage medium

    CN114903473A