Audio playing method, audio playing device, storage medium and electronic equipment
By detecting the ear canal transmission distance and resonance frequency, combining headphone volume and audio information, calculating hearing damage values and adjusting volume, the problem of preventing the ear protection in the existing technology is solved, and more accurate hearing protection and headphone use safety is achieved.
Patent Information
- Application Number
- CN202510286595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-12
AI Technical Summary
The prior art has shortcomings in protecting the hearing of the human ear, and it is impossible to accurately perceive and adjust the volume of the earphones, resulting in irreversible damage to hearing when wearing the earphones for a long time.
By detecting the transmission distance in the user's ear canal, the resonance frequency of the ear canal is determined, and the sound pressure level gain set is obtained based on the resonance frequency, combined with the current volume and audio information of the earphones, the actual sound pressure level and hearing damage value are calculated, and the volume is adjusted to protect hearing.
It realizes more accurate volume perception and adjustment of the user's ears, effectively reducing the potential damage to hearing by wearing earphones for a long time, and provides more accurate hearing protection.
Smart Images

Figure CN119815238A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to an audio playback method, an audio playback device, a storage medium and an electronic device. Background Art
[0002] With the rapid promotion of true wireless TWS earphones, more and more consumers choose to wear Bluetooth earphones for voice calls and music playback. Many users wear earphones for a long time and have a strong dependence on them. Medical research shows that long-term wearing of earphones and poor volume control can cause irreversible damage to human hearing.
[0003] At present, the solution for volume control and hearing protection is mainly to detect the decibel intensity of the headphone playback volume: when the intensity is too high and exceeds the threshold, an alarm message is generated or the volume is forced to be lowered. However, different people have different perceptions of the same volume intensity, and lowering the headphone volume is not necessarily safe, and the volume is not adjusted in a timely manner, and the adjustment method is not accurate. Summary of the invention
[0004] The present application provides an audio playback method, an audio playback device, a storage medium and an electronic device, which can more accurately quantify the user's perception of sound volume for different users, thereby providing more accurate hearing protection.
[0005] In a first aspect, the present application provides an audio playback method, comprising: Detecting the transmission distance in the ear canal of the user, determining the resonance frequency of the ear canal of the user, and obtaining a sound pressure level gain set in the ear canal of the corresponding user according to the resonance frequency; Acquire the current volume of the earphone and the audio information of the currently played music, and determine the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set; The duration of the music played at the current volume of the headphones is obtained, and the hearing damage value of the duration of the music played is calculated according to the actual sound pressure level set corresponding to the audio information of the currently playing music, and the hearing damage value is compared with the hearing damage threshold to adjust the volume of the music played.
[0006] According to the audio playback method in this embodiment, when the user wears headphones, the transmission distance of the sound in the user's ear canal can be detected, the resonance frequency of the ear canal can be determined based on the transmission distance, and the sound pressure level gain set of the sound in the user's ear can be determined under the resonance frequency. Based on the current volume of the headphones and the audio information, the impact of the volume on the user's ears when the song is playing can be more accurately determined, thereby more accurately adjusting the volume and providing more effective hearing protection.
[0007] In an exemplary embodiment, obtaining a set of sound pressure level gains in an ear canal of a corresponding user according to the resonance frequency includes: Based on the resonant frequency, different frequency ranges are divided to obtain a sound pressure level gain set corresponding to the user, wherein the sound pressure level gain set is used to indicate a plurality of sound pressure level gains in the ear canal of the corresponding user in different frequency ranges, wherein the sound pressure level gain is the largest when the frequency is the resonant frequency; A corresponding gain amplitude comparison table is generated according to the sound pressure level gain set and stored in a database.
[0008] In an exemplary implementation, the audio information is the audio frequency in the currently played music and the total time of the currently played music, and the obtaining of the current volume of the earphone and the audio information of the currently played music, and determining the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set specifically includes: Dividing the currently playing music into a plurality of audio segments according to different audio frequencies; According to the audio frequency of each audio segment, query the sound pressure level gain corresponding to each audio segment from the gain amplitude comparison table; The corresponding sound pressure level played by the headphone speaker is obtained based on the current volume of the headphone, and the actual sound pressure level of each audio segment is obtained according to the sound pressure level gain corresponding to each audio segment, wherein the actual sound pressure level set represents multiple actual sound pressure levels corresponding to different audio segments.
[0009] In an exemplary embodiment, the average sound pressure level of the currently played music is calculated based on the actual sound pressure level of each audio segment. , the calculation formula is:
[0010] Among them, N is the total time of the current music playing, is the actual sound pressure level of each audio band; Obtaining the duration of the playback at the current volume of the earphone, and calculating the hearing damage value of the duration of the playback according to the actual sound pressure level set corresponding to the audio information of the currently played music includes: Calculate the hearing damage value of the currently played song according to the average sound pressure level L and the total time of the currently played music; The hearing damage value of the played music and the corresponding playing time are accumulated to obtain the hearing damage value of the playing duration period at the current volume.
[0011] In an exemplary embodiment, adjusting the volume of the music played in comparison with the hearing impairment threshold specifically includes: If the hearing loss value reaches 60%-80% of the hearing loss threshold, a volume attenuation curve is obtained, and the current volume is reduced according to the volume attenuation curve.
[0012] In an exemplary embodiment, the step of adjusting the volume of the music played by comparing with the hearing impairment threshold specifically includes: When the hearing loss value reaches the hearing loss threshold, the current volume is reduced and a prompt is issued.
[0013] In an exemplary embodiment, it further includes: Obtain a music playlist and determine the hearing loss value of each piece of music in the playlist; Adjusting the order of the music to be played in the playlist according to the hearing loss value of the current play duration period; A learning model is generated based on the user's playing habits, and the music sequence model of the user's playlist is stored in the learning model.
[0014] In a second aspect, the present application provides an audio playback device, comprising: A sound pressure level gain acquisition module, used to detect the transmission distance in the ear canal of the user, determine the resonance frequency of the ear canal of the user, and acquire a sound pressure level gain set in the ear canal of the corresponding user according to the resonance frequency; A sound pressure level determination module, used to obtain the current volume of the earphone and the audio information of the currently played music, and determine the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set; The calculation and adjustment module obtains the playback duration at the current volume of the earphone, calculates the hearing damage value of the playback duration period according to the actual sound pressure level set corresponding to the audio information of the currently playing music, compares it with the hearing damage threshold, and adjusts the volume of the playing music.
[0015] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and one or more processors. The memory stores one or more computer programs, the computer programs comprising instructions, and when the instructions are executed by the processor, the electronic device can execute the audio playback method in the first aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the audio playback method in the first aspect.
[0017] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the audio playback method as described in the first aspect.
[0018] It can be understood that the beneficial effects that can be achieved by the audio playback device, electronic device, computer-readable storage medium, and computer program product provided above can refer to the beneficial effects in the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flowchart of an audio playback method provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a human ear in the audio playback method provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an audio playback device provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the difference. It should be noted that in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more.
[0021] It should be noted that the “at…” in the embodiments of the present application may be the instant when a certain situation occurs, or may be a period of time after the occurrence of a certain situation, and the embodiments of the present application do not specifically limit this.
[0022] The implementation of this embodiment will be described in detail below with reference to the accompanying drawings.
[0023] This embodiment provides an audio playback method, which can provide more accurate hearing protection for users.
[0024] Figure 1 A flow chart of an audio playback method provided in an embodiment of the present application is shown.
[0025] like Figure 1As shown, the audio playing method may include the following steps: Step 101: Detect the transmission distance in the ear canal of the user, determine the resonance frequency of the ear canal of the user, and obtain a sound pressure level gain set corresponding to the ear canal of the user according to the resonance frequency.
[0026] The transmission distance refers to the distance between the sound outlet of the earphone and the eardrum. In this embodiment, the earphone sound outlet is provided with a microphone and a speaker. After the user puts on the earphone, the speaker of the earphone sound outlet sends a low-frequency signal through the ear canal to the eardrum and is reflected back. The microphone of the earphone sound outlet receives the reflected signal of the low-frequency signal and then calculates the transmission distance of the sound in the ear canal through the internal processor of the earphone. Alternatively, the transmission distance of the ear canal is measured by a distance sensor, such as a light sensor or an ultrasonic sensor.
[0027] Sound pressure level gain refers to the degree to which the intensity (loudness) of sound in the ear increases. Different resonance frequencies correspond to different sound pressure level gains. In the case of resonance, the amplitude of the object's vibration will increase, thereby enhancing the sound intensity. Figure 2 As shown in the figure, when the earphone is worn, the earphone audio is transmitted to the eardrum through the ear canal. Due to the cavity formed by the ear canal and the eardrum, the external auditory canal has a resonance boosting effect. The audio passes through the ear canal from the earphone to the eardrum at the bottom. The actual sound pressure at the eardrum is greater than the audio sound pressure broadcast by the ear canal and the earphone. For example, if the length of the ear canal of an adult is 2.5 cm, the resonant frequency of the external auditory canal for sound waves can be calculated as follows: resonant frequency = speed of sound / wavelength of sound. The length of the external auditory canal is about 2.5 cm, the length of the sound wave wavelength is 4 times that of the external auditory canal, and the speed of sound is 340 m / s. Therefore, the resonant frequency of the external auditory canal = (1000x340) / (4x25) = 3400 Hz, that is, the resonant frequency of the external auditory canal is about 3400 Hz. Under this resonant frequency, the sound pressure of the external auditory canal can be boosted by about 10-15 dB when it reaches the eardrum. Experimental data show that the external auditory canal has the most obvious benefit in gaining the sound pressure level at a frequency of 2000-7000 Hz. The sound pressure level gain set is a set of different amplitudes of the sound pressure in the external auditory canal reaching the eardrum at different frequencies after the resonance frequency is determined.
[0028] It should be noted that different users have different ear canal structures and ear canal distances. Users of different age groups, such as adults, teenagers and children, have different distances in the ear canals. In addition, different ways of wearing earphones will also affect the transmission distance of sound in the ear canal, such as the depth of the earphones in the ears and the tightness of wearing. Therefore, the user can re-obtain the transmission distance every time he wears the earphones; or, the transmission distance can be re-obtained at certain time intervals. If the transmission distance fluctuates beyond the preset range, the transmission distance value is reset; if the fluctuation does not exceed the range, it remains unchanged.
[0029] Step 102: obtaining the current volume of the earphone and the audio information of the currently played music, and determining the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set.
[0030] The current volume of the headset is the current volume set by the playback device source. For example, when a headset is connected to a mobile phone, the volume is set to 60%, and the sound pressure level output by the headset speaker is 50dB. Music, such as songs, includes pop songs and instrumental songs. Pop songs include rock and soothing songs, and their frequency bands are different. The closer the frequency is to the resonant frequency of the audio frequency, the stronger the amplification gain effect reaching the eardrum. Any audio played from the headset speaker will be amplified in the ear canal and reach the eardrum. Therefore, the actual sound pressure level set corresponding to the audio information of the currently playing music can be determined through the sound pressure level gain set, that is, the actual sound pressure level reaching the user's eardrum.
[0031] Step 103: Obtain the playing duration at the current volume of the earphone, calculate the hearing damage value of the playing duration period according to the actual sound pressure level set corresponding to the audio information of the currently playing music, compare it with the hearing damage threshold, and adjust the volume of the playing music.
[0032] Hearing damage is determined by the sound pressure level of the currently playing music and the duration of the headphones' playback. Once the actual sound pressure level reaching the eardrum is known, combined with the continuous playback time, the hearing damage value caused to the eardrum by the entire song can be obtained. This is compared with the hearing damage threshold set in advance by the user. If the threshold is reached, it means that the user's cumulative use of headphones to listen to music has reached the hearing damage threshold. Continuing to listen at the current volume will cause hearing damage. In this case, reducing the volume to protect hearing can more accurately control hearing damage and achieve hearing protection.
[0033] This solution uses personalized ear canal detection, dynamic sound pressure level calculation, hearing damage risk assessment and intelligent volume adjustment to calculate the actual sound pressure level set acting on the eardrum in real time, accurately calculate the hearing damage value of playing music, ensure the accuracy and scientificity of volume adjustment, and avoid the risk of hearing damage caused by individual differences. By continuously monitoring and adjusting the volume, the potential damage to hearing caused by long-term wearing of headphones is reduced, and the volume can be adjusted in time when the user uses the headphones for a long time, achieving accurate protection of the user's hearing, while improving the intelligence level and user experience of the headphones.
[0034] Specifically, the resonance frequency of the user's ear canal is determined. When the audio frequency is the resonance frequency, the gain amplified by the ear canal is the largest. Based on the resonance frequency, different frequency ranges are divided to obtain a sound pressure level gain set corresponding to the user. The sound pressure level gain set is used to indicate a plurality of sound pressure level gains in different frequency ranges in the ear canal of the corresponding user, wherein the sound pressure level gain is the largest when the frequency is the resonance frequency.
[0035] In this embodiment, different frequency levels can be obtained by dividing the frequency range intervals according to the preset frequency range from the resonance frequency. Each frequency level corresponds to a frequency range, and the corresponding gain is determined for each frequency level in turn; for example, the resonance frequency of the user's ear canal is 3400Hz, and the frequency audio gain of 3400Hz in music is the largest. The sound pressure can reach the eardrum and increase by 15dB. As the frequency decreases or increases, the effect of sound pressure level amplification gradually weakens. By analogy, according to the relationship of one level corresponding to the sound pressure level gain per 1000Hz, the sound pressure level gain corresponding to each audio frequency level can be obtained, which indicates the gain degree of the user's ear canal for different audio frequencies. Since the receptor that causes hearing damage to the human ear is closest to the eardrum, it is more realistic to judge the size of the sound pressure level acting on the eardrum in this way, and it is more scientific and accurate when calculating the hearing damage value.
[0036] After obtaining the correspondence between each audio frequency and the sound pressure level gain, the sound pressure level gain set is obtained, and a corresponding gain amplitude comparison table can be generated according to the sound pressure level gain set and stored in the database; the gain amplitude comparison table corresponding to the user is saved, and the corresponding sound pressure level gain can be directly called from the database in subsequent use. There can be multiple gain amplitude comparison tables, all of which are distinguished by the resonance frequency calculated by detecting the distance from the user's ear canal, that is, each different resonance frequency corresponds to a different gain amplitude comparison table.
[0037] For example, the gain amplitude comparison table is shown in Table 1: Table 1
[0038] The frequency range of a complete song depends on the type of song, instruments, vocals, and production method. Generally speaking, the frequency range of a song can range from 20 Hz to 20,000 Hz (20 kHz), which is the full frequency range that the human ear can perceive. However, different types of music and audio content cover different frequency ranges.
[0039] Furthermore, the currently playing music is divided into several audio segments according to different audio frequencies; usually, a complete song contains a total of audio segments, such as low frequency segment (20-200Hz), medium frequency segment (200-5kHz), and high frequency segment (5kHz-20kHz). In this embodiment, the song is segmented according to a preset frequency range, that is, the audio of the song is divided into corresponding audio segments according to the range of the gain amplitude comparison table, referring to Table 1, according to the frequency segments of <1000, 1000-2000, 2000-3000, 3000-3400, 3400, 3400-4000, 4000-5000, 5000-8000, and >8000.
[0040] Furthermore, the sound pressure level gain corresponding to each audio segment is queried from the gain amplitude comparison table according to the audio frequency of each audio segment; the corresponding sound pressure level played by the headphone speaker is obtained based on the current volume of the headphone, and the actual sound pressure level of each audio segment is obtained according to the sound pressure level gain corresponding to each audio segment, wherein the actual sound pressure level set represents multiple actual sound pressure levels corresponding to different audio segments.
[0041] Then, according to the frequency of each audio segment, the corresponding sound pressure level gain is queried from the gain amplitude comparison table to obtain the sound pressure level gain information in different frequency segments of the song. In one embodiment, if the headphone volume is set to 60%, the sound pressure level output by the headphone speaker is 50dB. Since the sound pressure level gain in the 3400Hz frequency band is 15dB, the actual sound pressure level reaching the eardrum is 65dB. The sound pressure level gain in other frequency segments can also be obtained from the gain amplitude comparison table, and the sound pressure level gain corresponding to each frequency segment in a complete song can be obtained. Based on 50dB, the actual sound pressure level set of each audio segment is obtained, that is, the amplified sound pressure level reaching the eardrum. Similarly, if the headphone volume is set to 70% or 80%, the actual sound pressure level also changes accordingly. The amplitude amplified by the gain in a song can be accurately obtained, and the sound pressure level gain reaching the eardrum in each frequency segment of the played song can be better judged.
[0042] More specifically, the average sound pressure level of the currently playing music is calculated based on the actual sound pressure level of each audio segment. , the calculation formula is:
[0043] Among them, N is the total time of the current music playing, is the actual sound pressure level of each audio segment, and i represents the i-th audio segment.
[0044] In a complete song, there are different and discontinuous sound pressure levels. The scattered sound pressure levels are integrated and the average sound pressure level is used to represent the continuous equivalent sound level, that is, the sound pressure level that actually produces effective energy in a song, which is represented by L.
[0045] In one embodiment, according to the corresponding gain amplitude comparison table, if the duration of a song is 135 seconds, after frequency division, gain compensation and amplification, the actual sound pressure levels obtained are 60db for a 10-second time period, 70db for a 45-second time period, 75db for a 35-second time period, and 65db for a 45-second time period. Combining the above formula, it can be obtained that:
[0046]
[0047] Therefore, the average sound pressure level of the whole song is 71dB. Since each song is generally not long, and the sound pressure level changes discontinuously and is scattered, the average sound pressure level is used to determine the energy acting on the eardrum after listening to a song, that is, the actual average sound pressure level of each song, which is more scientific and accurate.
[0048] The hearing damage value is determined by the sound pressure level and duration. The hearing damage value of the current song can be calculated by the average sound pressure level of the current song and the total playback time of the current song. Similarly, the hearing damage value of each song can be obtained through the above method, and then the hearing damage value caused by the user's continuous listening to the song at the current volume can be obtained by accumulating them. In this way, the hearing damage value can be determined more accurately for each song or even the playback progress of each song, which can be closer to the hearing damage caused by the user's continuous listening to music.
[0049] After obtaining the user's cumulative hearing loss value for a continuous period of time, it is compared with the hearing loss threshold and the volume of the music played is adjusted.
[0050] In one embodiment, if the hearing damage value reaches 60%-80% of the hearing damage threshold, a volume attenuation curve is obtained, and the current volume is reduced according to the volume attenuation curve. Usually, when the hearing damage threshold is reached, it means that continuing to listen at this volume will cause hearing damage. Even if the volume is reduced, as long as you continue to listen, the hearing damage value will continue to accumulate, and there will be hidden dangers of hearing damage. Usually, the user will be reminded to stop using the headphones and take a rest after listening for a short time. Such interruption will affect the user experience. Therefore, an advance threshold is set. When the hearing damage reaches 60%-80%, you can start to adjust and reduce the current volume according to the preset volume attenuation curve.
[0051] In this embodiment, according to the threshold setting of the advance amount, after the hearing damage is sustained for a period of time, the volume adjustment function is started more accurately and scientifically to achieve the effect of hearing protection and extend the user's listening time; and, by reducing the current volume through the volume attenuation curve, the volume can be gradually reduced and reduced smoothly, reducing the impact on the user experience. The advance amount threshold can be set according to user needs, such as 50%, 60%, 70%, 80%, etc.
[0052] The volume attenuation curve can be determined based on the actual volume and the hearing damage threshold. For example, the attenuation curve can be: x=t / T(S-S0); where x is the volume attenuation, t is the duration of the song clip, T is the maximum safe duration, S is the actual volume, and S0 is the hearing damage threshold. The maximum safe duration refers to the safe duration for listening to songs within a certain frequency range. Different frequency levels may correspond to different safe durations, for example, low frequency corresponds to 8 hours, medium frequency corresponds to 6 hours, high frequency corresponds to 2 hours, etc.
[0053] In one embodiment, when the hearing damage value reaches the hearing damage threshold, the current volume is reduced and a prompt is issued. For example, when the accumulated hearing damage value reaches the hearing damage threshold, the current volume is immediately reduced and a prompt is issued to the user, reminding the user to pay attention to the usage time of the headphones and take a rest in time to protect hearing.
[0054] In an exemplary embodiment, the method further includes: adjusting the order of the music to be played in the playlist according to the hearing loss value of the current playing duration; generating a learning model based on the user's playing habits, and storing the music sequence model of the user's playlist in the learning model.
[0055] The earphones can obtain the song playlist in the user's player, and determine the sound pressure level gain corresponding to different audio segments of each song to be played according to the gain amplitude comparison table corresponding to the user's resonance frequency. According to the frequency and corresponding duration of the audio obtained in segments, the resonance frequency calculated by the user's ear canal is compared, and then the actual volume actually played by the earphones is obtained, and the set of volume and duration that actually reaches the eardrum is estimated through the preset gain amplitude comparison table. The closer the audio frequency is to the resonance frequency, the stronger the amplification gain effect reaching the eardrum. Therefore, the set of sound pressure level and time that a song continuously acts on the eardrum can be obtained, and then the average sound pressure level of a song and the hearing damage value caused can be calculated through a calculation formula.
[0056] According to the set, hearing loss can be quantified, and a learning model can be generated by training according to the hearing loss value of each song to be played. The hearing loss value of the candidate song is determined by the learning model; and the volume when playing the candidate song is adjusted according to the hearing loss value.
[0057] Candidate songs may include songs currently played by the user, or any song in the playlists of other users. After calculating the hearing loss value of each song to be played, these songs to be played can be used as training samples to build a learning model. The song information of the songs to be played, such as audio information, song type, etc., is used as the input of the learning model, and the hearing loss value is used as the output to train the learning model. The trained learning model can predict the hearing loss value of the output candidate song based on the song information of the subsequent songs input.
[0058] After calculating the hearing loss value of each song to be played, the order of the songs to be played can be adjusted. For example, the songs in the user list can be played crosswise according to the hearing loss value, or songs with small loss values can be played after songs with large loss values for a period of time, or a playlist for a certain period of time can be generated according to the user's listening habits. If the user loops a single song or concentrates on listening to songs with high loss values, the volume can be dynamically adjusted according to the volume attenuation curve within the set playback time and gradually reduced.
[0059] This embodiment quantifies the hearing damage relationship according to the actual volume at the eardrum, the frequency and duration of the song, and then dynamically adjusts the volume of the output audio of the earphone, which can reduce the user's hearing damage.
[0060] Furthermore, this embodiment also provides an audio playback device, which can be used to execute the above audio playback method. Figure 3 As shown, the audio playback device 300 includes: a sound pressure level gain acquisition module 301, which is used to detect the transmission distance in the user's ear canal, determine the resonance frequency of the user's ear canal, and obtain the sound pressure level gain set corresponding to the user's ear canal according to the resonance frequency; a sound pressure level determination module 302, which is used to obtain the current volume of the earphone and the audio information of the currently played music, and determine the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set; a calculation and adjustment module 303, which obtains the playback duration at the current volume of the earphone, calculates the hearing damage value of the playback duration period according to the actual sound pressure level set corresponding to the audio information of the currently played music, compares it with the hearing damage threshold, and adjusts the volume of the played music.
[0061] In an exemplary embodiment, the sound pressure level gain acquisition module 301 is specifically used to divide different frequency ranges based on the resonant frequency to obtain a sound pressure level gain set corresponding to the user, wherein the sound pressure level gain set is used to indicate a plurality of sound pressure level gains in the ear canal of the corresponding user at different frequency ranges, wherein the sound pressure level gain is the largest when the frequency is the resonant frequency; a corresponding gain amplitude comparison table is generated according to the sound pressure level gain set and stored in a database.
[0062] In an exemplary embodiment, the audio information is the audio frequency in the currently playing music and the total time of the currently playing music, and the sound pressure level determination module 302 is specifically used to divide the currently playing music into several audio segments according to different audio frequencies; query the sound pressure level gain corresponding to each audio segment from the gain amplitude comparison table according to the audio frequency of each audio segment; obtain the corresponding sound pressure level played by the headphone speaker based on the current volume of the headphone, and obtain the actual sound pressure level of each audio segment according to the sound pressure level gain corresponding to each audio segment, wherein the actual sound pressure level set represents multiple actual sound pressure levels corresponding to different audio segments.
[0063] In an exemplary embodiment, the average sound pressure level of the currently played music is calculated based on the actual sound pressure level of each audio segment. , the calculation formula is:
[0064] Among them, N is the total time of the current music playing, It is the actual sound pressure level of each audio segment; based on this, the calculation and adjustment module is specifically used to: calculate the hearing damage value of the currently playing song according to the average sound pressure level L and the total time of the currently playing music; accumulate the hearing damage value of the played music and the corresponding playing time to obtain the hearing damage value of the duration of the playback at the current volume.
[0065] In an exemplary embodiment, the calculation and adjustment module is further used to: if the hearing impairment value reaches 60%-80% of the hearing impairment threshold, obtain a volume attenuation curve, and reduce the current volume according to the volume attenuation curve.
[0066] In an exemplary embodiment, the calculation and adjustment module is further used to: when the hearing impairment value reaches the hearing impairment threshold, reduce the current volume and issue a prompt.
[0067] In an exemplary embodiment, the device also includes a model generation module, which is specifically used to obtain a music playlist and determine the hearing damage value of each music in the playlist; adjust the order of the music to be played in the playlist according to the hearing damage value of the current playback duration period; generate a learning model based on the user's playback habits, and store the music sequence model of the user's playlist in the learning model.
[0068] The specific details of each module or unit in the above audio playback device have been described in detail in the corresponding audio playback method, so they will not be repeated here.
[0069] The embodiment of the present application also provides an electronic device, Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. Figure 4The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0070] like Figure 4 As shown, the electronic device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0071] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0072] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the embodiments of the present application are executed.
[0073] For example, when the computer program is executed by the central processing unit (CPU) 601, it can be executed as follows: detecting the transmission distance in the user's ear canal, determining the resonance frequency of the user's ear canal, and obtaining the sound pressure level gain set corresponding to the user's ear canal based on the resonance frequency; obtaining the current volume of the earphone and the audio information of the currently played music, and determining the actual sound pressure level set corresponding to the audio information of the currently played music based on the sound pressure level gain set; obtaining the playback duration at the current volume of the earphone, calculating the hearing damage value of the playback duration period based on the actual sound pressure level set corresponding to the audio information of the currently played music, comparing it with the hearing damage threshold, and adjusting the volume of the played music.
[0074] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0075] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0077] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and the one or more programs include instructions, and when the instructions are executed by the electronic device, the electronic device implements the method described in the above embodiment.
[0078] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0079] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An audio playback method, characterized in that: Applicable to headphones, including: Detecting the transmission distance in the ear canal of the user, determining the resonance frequency of the ear canal of the user, and obtaining a sound pressure level gain set in the ear canal of the corresponding user according to the resonance frequency; Acquire the current volume of the earphone and the audio information of the currently played music, and determine the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set; The duration of the music played at the current volume of the headphones is obtained, and the hearing damage value of the duration of the music played is calculated according to the actual sound pressure level set corresponding to the audio information of the currently playing music, and the hearing damage value is compared with the hearing damage threshold to adjust the volume of the music played.
2. The audio playback method according to claim 1, characterized in that: The step of obtaining a sound pressure level gain set in the ear canal of a corresponding user according to the resonance frequency includes: Based on the resonant frequency, different frequency ranges are divided to obtain a sound pressure level gain set corresponding to the user, wherein the sound pressure level gain set is used to indicate a plurality of sound pressure level gains in the ear canal of the corresponding user in different frequency ranges, wherein the sound pressure level gain is the largest when the frequency is the resonant frequency; A corresponding gain amplitude comparison table is generated according to the sound pressure level gain set and stored in a database.
3. The audio playback method according to claim 2, characterized in that: The audio information is the audio frequency in the currently played music and the total time of the currently played music, and the obtaining of the current volume of the earphone and the audio information of the currently played music, and determining the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set specifically includes: Dividing the currently playing music into a plurality of audio segments according to different audio frequencies; According to the audio frequency of each audio segment, query the sound pressure level gain corresponding to each audio segment from the gain amplitude comparison table; The corresponding sound pressure level played by the headphone speaker is obtained based on the current volume of the headphone, and the actual sound pressure level of each audio segment is obtained according to the sound pressure level gain corresponding to each audio segment, wherein the actual sound pressure level set represents multiple actual sound pressure levels corresponding to different audio segments.
4. The audio playback method according to claim 3, characterized in that: Calculate the average sound pressure level of the currently playing music based on the actual sound pressure level of each audio segment , the calculation formula is: Among them, N is the total time of the current music playing, is the actual sound pressure level of each audio band; Obtaining the duration of the playback at the current volume of the earphone, and calculating the hearing damage value of the duration of the playback according to the actual sound pressure level set corresponding to the audio information of the currently played music includes: Calculate the hearing damage value of the currently played song according to the average sound pressure level L and the total time of the currently played music; The hearing damage value of the played music and the corresponding playing time are accumulated to obtain the hearing damage value of the playing duration period at the current volume.
5. The audio playback method according to claim 4, characterized in that: Compared with the hearing loss threshold, adjust the volume of the music played, including: If the hearing loss value reaches 60%-80% of the hearing loss threshold, a volume attenuation curve is obtained, and the current volume is reduced according to the volume attenuation curve.
6. The audio playback method according to claim 4, characterized in that: Compared with the hearing loss threshold, adjust the volume of the music played, including: When the hearing loss value reaches the hearing loss threshold, the current volume is reduced and a prompt is issued.
7. The audio playback method according to claim 4, characterized in that: Also includes: Obtain a music playlist and determine the hearing loss value of each piece of music in the playlist; Adjusting the order of the music to be played in the playlist according to the hearing loss value of the current play duration period; A learning model is generated based on the user's playing habits, and the music sequence model of the user's playlist is stored in the learning model.
8. An audio playback device, characterized in that: include: A sound pressure level gain acquisition module, used to detect the transmission distance in the ear canal of the user, determine the resonance frequency of the ear canal of the user, and acquire a sound pressure level gain set in the ear canal of the corresponding user according to the resonance frequency; A sound pressure level determination module, used to obtain the current volume of the earphone and the audio information of the currently played music, and determine the actual sound pressure level set corresponding to the audio information of the currently played music according to the sound pressure level gain set; The calculation and adjustment module obtains the playback duration at the current volume of the earphone, calculates the hearing damage value of the playback duration period according to the actual sound pressure level set corresponding to the audio information of the currently playing music, compares it with the hearing damage threshold, and adjusts the volume of the playing music.
9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the audio playback method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It comprises a processor and a memory, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the audio playback method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Headphone control method, headphone and computer readable storage medium
CN109765784A
Volume adjustment method and device, and computer readable storage medium
CN113709613A
Out-of-head localization filter generation device, out-of-head localization filter generation method, out-of-head localization processing device, out-of head localization processing method
JP2017017636A
Acoustic correction apparatus and acoustic correction method
US20100329481A1
Hearing aid
US20120281863A1