CN112261532B - Earphone volume control method and device and earphone - Google Patents

Earphone volume control method and device and earphone Download PDF

Info

Publication number
CN112261532B
CN112261532B CN202010959547.XA CN202010959547A CN112261532B CN 112261532 B CN112261532 B CN 112261532B CN 202010959547 A CN202010959547 A CN 202010959547A CN 112261532 B CN112261532 B CN 112261532B
Authority
CN
China
Prior art keywords
volume
audio signal
sound pressure
pressure level
earphone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010959547.XA
Other languages
Chinese (zh)
Other versions
CN112261532A (en
Inventor
李红梅
杨晴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202010959547.XA priority Critical patent/CN112261532B/en
Publication of CN112261532A publication Critical patent/CN112261532A/en
Application granted granted Critical
Publication of CN112261532B publication Critical patent/CN112261532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups
    • H04R2430/01Aspects of volume control, not necessarily automatic, in sound systems

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Headphones And Earphones (AREA)

Abstract

The application discloses an earphone volume control method and device and an earphone. The method comprises the following steps: intercepting the audio signal input into the earphone once every preset time window to obtain the current audio signal segment of the earphone; calculating the signal size of the current audio signal segment; determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level size; and comparing the current sound pressure level with a preset safe volume threshold, and determining whether to utilize a preset volume attenuation curve to perform attenuation adjustment on the volume of the audio signal input into the earphone according to the comparison result, wherein the curve slope of the preset volume attenuation curve is in positive correlation with the sound pressure level. The method and the device can protect the hearing of the user from being damaged, meanwhile, the sound volume can keep natural and smooth transition on the hearing sense in the attenuation process, and the hearing sense experience of the user is guaranteed.

Description

Earphone volume control method and device and earphone
Technical Field
The application relates to the technical field of earphones, in particular to an earphone volume control method and device and an earphone.
Background
With the increase of the number of people who use the earphones for study and entertainment, especially for a small number of people who wear the earphones for a long time in different places for entertainment uninterruptedly, the longer the listening time is, the more obvious the hearing fatigue is, the larger the volume is, the more easily the damage is caused to the auditory nerve of the inner ear. In particular, rock music with various percussion music and impulse sounds accompanied by various gun and explosion sounds are inferior to industrially produced noises, and these sounds are more likely to cause hearing loss. The threshold of a long-term listener decreases significantly, while the longer the listening time, the more significantly the threshold decreases. The earphone needs to be used scientifically, the earphone needs to be good in quality, small in noise and free and flexible in volume control, once the earphone is subjected to conditions such as overlarge sound and the like, the sound intensity of music can be adjusted in time, the sound intensity of the music is preferably controlled to be below 80 decibels, and the time for wearing the earphone to listen should not be too long. Fig. 1 is a diagram showing a simple corresponding relationship between sound level and decibel, which is preferable for comfortable and pleasant feeling, and once the sound exceeds 90 decibel, the sound exceeds the noise protection standard established by the country.
In order to protect the hearing of human ears, the following two approaches are mainly adopted in the prior art:
one is to limit the maximum volume. The disadvantage of this is that the user's requirement for the earphone volume in a high decibel noise environment cannot be met only after the maximum volume is forcibly reduced;
and secondly, when the user adjusts the volume to a large volume, a goodwill prompt is performed. The disadvantage of this is that only the user is prompted, but no corresponding processing is done on the volume, and the user hearing can not be protected effectively in time.
Disclosure of Invention
In view of this, the present invention mainly aims to provide an earphone volume control method, an apparatus and an earphone, which are used to solve the technical problem of how to automatically adjust the earphone volume and ensure the listening experience of a user.
According to a first aspect of the present application, there is provided a headphone volume control method, including:
intercepting the audio signal input into the earphone once every other preset time window to obtain the current audio signal segment of the earphone;
calculating the signal size of the current audio signal segment;
determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level;
and comparing the current sound pressure level with a preset safe volume threshold, and determining whether to utilize a preset volume attenuation curve to perform attenuation adjustment on the volume of the audio signal input into the earphone according to the comparison result, wherein the curve slope of the preset volume attenuation curve is in positive correlation with the sound pressure level.
According to a second aspect of the present application, there is provided a headphone volume control device comprising:
the audio signal intercepting unit is used for intercepting the audio signal input into the earphone once every other preset time window to obtain the current audio signal segment of the earphone;
the audio signal size calculating unit is used for calculating the signal size of the current audio signal segment;
the sound pressure level determining unit is used for determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level size;
and the volume adjusting unit is used for comparing the current sound pressure level with a preset safe volume threshold value, and determining whether to utilize a preset volume attenuation curve to perform attenuation adjustment on the volume of the audio signal of the input earphone according to the comparison result, wherein the curve slope of the preset volume attenuation curve is in positive correlation with the sound pressure level.
According to a third aspect of the present application, there is provided a headset comprising: a processor, a memory storing computer-executable instructions,
the executable instructions, when executed by the processor, implement the aforementioned headset volume control method.
According to a fourth aspect of the present application, there is provided a computer-readable storage medium storing one or more programs which, when executed by a processor, implement the aforementioned earphone volume control method.
The beneficial effect of this application is: according to the earphone volume control method, the audio signal input into the earphone is intercepted once every other preset time window, so that the obtained current audio signal segment of the earphone is updated in time; for the current audio signal section of the earphone obtained each time, the size of the signal is calculated, the corresponding size of the current sound pressure level is determined according to the corresponding relation between the pre-stored size of the audio signal and the size of the sound pressure level, and then whether volume adjustment is carried out on the volume of the audio signal input into the earphone by utilizing a preset volume attenuation curve or not is determined by comparing the size of the current sound pressure level with a preset safe volume threshold value, so that the automatic adjustment of the volume of the earphone is realized. And because the curve slope of the preset volume attenuation curve is in positive correlation with the sound pressure level, the embodiment of the application can adjust the volume to meet the requirements of carrying out attenuation with a larger slope under larger volume and carrying out attenuation with a smaller slope under smaller volume, thereby protecting the hearing of a user from being damaged, simultaneously keeping the transition of the volume on the hearing in the attenuation process to be natural and smooth, and ensuring the hearing experience of the user.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a diagram illustrating a relationship between sound level and decibels in the prior art;
fig. 2 is a flowchart of a method for controlling the volume of a headset according to an embodiment of the present application;
FIG. 3 is a graph illustrating the relationship between sound pressure level and safety exposure duration for one embodiment of the present application;
FIG. 4 is a graph of preset volume attenuation curves for one embodiment of the present application;
FIG. 5 is a logic block diagram of earphone volume control according to an embodiment of the present application;
FIG. 6 is a block diagram of a headset volume control device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an earphone according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. These embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein.
Fig. 2 is a flowchart illustrating a method for controlling the volume of a headphone according to an embodiment of the present application, and referring to fig. 2, the method for controlling the volume of a headphone according to an embodiment of the present application includes steps S210 to S240 as follows:
and step S210, intercepting the audio signal input into the earphone once every other preset time window to obtain the current audio signal segment of the earphone.
This application is trueThe volume control method of the earphone of the embodiment can monitor and adjust the volume of the earphone in real time or can be performed at intervals. When monitoring and adjusting the volume of the earphone, the volume can be monitored and adjusted for a segment of audio signal, for example, according to a time window t of a certain time length 0 Intercepting the audio signal input to the earphone as the current audio signal segment of the earphone, the time window t 0 The size of (b) is set according to practical conditions and is not particularly limited.
Step S220, calculating the signal size of the current audio signal segment.
After the current audio signal segment is obtained, because a plurality of audio signals are intercepted within a period of time, that is, the current audio signal segment is composed of a plurality of audio signals, in order to calculate the signal size of the intercepted current audio signal segment, the signal sizes of the plurality of audio signals in the current audio signal segment can be processed through some statistical methods, and then a numerical value capable of representing the signal size of the current audio signal segment is obtained.
In the embodiment of the present application, the audio signal input to the earphone can be regarded as a voltage signal, and the obtained signal size of the current audio signal segment is regarded as the voltage signal size of the current audio signal segment.
Step S230, determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the pre-stored correspondence between the audio signal size and the sound pressure level.
In the research field of hearing test or noise detection, the Sound Pressure Level SPL (Sound Pressure Level) is an index that is often used, and for convenience of application, according to the characteristic of the human ear responding to the change of Sound intensity, the SPL represents the Sound size by an induced pair number, which is defined as taking the common logarithm of the ratio of the effective value p (e) of the Sound Pressure to be detected to the reference Sound Pressure p (ref), and then multiplying by 20, and can be specifically represented as:
SPL=20LOG(10)[p(e)/p(ref)], (1)
in the embodiment of the present application, in order to determine whether the sound level in the current earphone is within the safe hearing range of the user, a corresponding relationship between the audio signal level and the sound pressure level may be established and stored in advance through testing or the like. Thus, after the signal size of the current audio signal segment is obtained, the size of the current sound pressure level corresponding to the signal size of the current audio signal segment can be determined according to the corresponding relation.
Step S240, comparing the current sound pressure level with a preset safe volume threshold, and determining whether to perform attenuation adjustment on the volume of the audio signal input to the earphone by using a preset volume attenuation curve according to the comparison result, wherein a slope of the preset volume attenuation curve is positively correlated with the sound pressure level.
The volume of the embodiment of the application can be measured by the sound pressure level, and all the sound pressure levels are in decibel dB, the larger the sound pressure level is, the larger the sound volume is, and the smaller the sound pressure level is, the smaller the sound volume is, so that the sound volume and the sound pressure level are comparable. After the current sound pressure level is obtained, the current sound pressure level is compared with a preset safe volume threshold, and if the current sound pressure level does not exceed the safe volume threshold, the current sound pressure level of the earphone is within the safe hearing range of the user, so that the hearing of the user cannot be damaged. And if the current sound pressure level exceeds the safe volume threshold, the volume input by the current earphone is larger, and exceeds the safe hearing range accepted by the user, and the volume needs to be adjusted.
Specifically, the volume of the audio signal input to the earphone can be attenuated and adjusted by using a volume attenuation curve established in advance, and the slope of the preset volume attenuation curve is in positive correlation with the sound pressure level, so that the embodiment of the application can realize the attenuation of a larger slope under a larger volume and the attenuation of a smaller slope under a smaller volume for the adjustment of the volume, thereby ensuring that the hearing of a user is not damaged, and simultaneously ensuring that the volume keeps natural and smooth transition in the hearing in the attenuation process, and ensuring the hearing experience of the user.
In addition, when the current sound pressure level exceeds a preset safe volume threshold, the volume is actively reduced, so that the earphone can work at low voltage as far as possible, the power consumption of the earphone is reduced to a certain extent, and resources are saved.
In one embodiment of the present application, calculating the signal size of the current audio signal segment comprises: detecting the voltage signal size of a plurality of earphone audio signals intercepted in a preset time window; and calculating the average value of the voltage signal sizes as the signal size of the current audio signal segment.
When the signal size of a section of audio signal section that the embodiment of this application was intercepted in a period of time is confirmed, can add and ask average treatment as the signal size of present audio signal section with the voltage signal size of a plurality of earphone audio signal that intercept in this time window. Of course, other statistical methods such as median calculation can be used to calculate the signal size of the current audio signal segment, which is not listed here.
In one embodiment of the present application, the correspondence between the audio signal magnitude and the sound pressure level magnitude is determined as follows: dividing an audio signal for testing into a plurality of gears according to the magnitude of a voltage signal; testing the size of the audio signal of each gear and the corresponding sound pressure level; and storing the audio signal size of each gear and the corresponding sound pressure level size in an associated manner to serve as the corresponding relation between the audio signal size and the sound pressure level size.
The embodiment of the application can establish the corresponding relation between the size of the audio signal and the size of the sound pressure level in a test mode. Specifically, the audio signal for testing is divided into a plurality of steps according to the magnitude of the voltage signal, for example, every 0.05v is used as a step, then the magnitude of the audio signal and the magnitude of the sound pressure level corresponding to the magnitude of the audio signal are tested at each step, and the magnitude of the audio signal at each step and the magnitude of the sound pressure level obtained through the test are stored in a table in an associated manner. It should be noted that, because the frequency of the input audio signal is irregular, the sound pressure level here is only the sound pressure level at 1kHz corresponding to the input voltage signal (regardless of the frequency of the actual input signal).
In an embodiment of the present application, comparing the current sound pressure level with a preset safe volume threshold, and determining whether to perform attenuation adjustment on the volume of the audio signal input to the earphone by using a preset volume attenuation curve according to the comparison result includes: when the current sound pressure level is larger than a preset safe volume threshold, determining a current volume attenuation value corresponding to the current sound pressure level according to a preset volume attenuation curve, and performing play output after performing attenuation adjustment on the volume of an audio signal input into the earphone through the current volume attenuation value; and when the current sound pressure level is not greater than the preset safe volume threshold, directly playing and outputting the audio signal input into the earphone.
As described above, if the current sound pressure level does not exceed the safe volume threshold, it indicates that the current volume level of the earphone is within the safe hearing range of the user, and the hearing of the user will not be damaged. And if the current sound pressure level exceeds the safe volume threshold, the volume input by the current earphone is larger and exceeds the safe hearing range accepted by the user, and the volume needs to be adjusted.
Specifically, the preset volume attenuation curve in the embodiment of the present application may be regarded as a corresponding relationship curve between the sound pressure level and the volume attenuation value, when it is determined that the current sound pressure level is greater than the preset safe volume threshold, the current volume attenuation value corresponding to the current sound pressure level may be determined according to the corresponding relationship curve, the volume of the audio signal input to the earphone is attenuated according to the current volume attenuation value to obtain an attenuated volume, and then the above process is repeated for the current audio signal segment obtained by next interception, so that the volume of the audio signal input to the earphone is continuously automatically adjusted, and it is ensured that the volume played by the earphone is not greater than the preset safe volume threshold all the time, that is, within the preset safe volume threshold.
It should be noted that, in the method for controlling the volume of the earphone according to the embodiment of the present application, the volume is adjusted while the earphone is playing, so that on one hand, normal use of a user is not affected, and on the other hand, hearing of the user is not damaged by continuously adjusting the volume.
In one embodiment of the present application, the preset volume attenuation curve is determined by:
obtaining a correspondence between the sound pressure level and the safety exposure duration, where the correspondence may be expressed as:
Figure BDA0002679978230000081
where D represents the safety exposure duration and SPL represents the sound pressure level.
The NIOSH (National Institute for Occupational Safety and Health) standard is a standard on the aspect of "Occupational Safety and Health", where published relationships between sound pressure levels and Safety exposure durations may help us to use headphones more scientifically and reasonably. The upper NIOSH exposure limit for sound that does not cause permanent hearing damage is calculated as the total duration of exposure for an 8 hour duty cycle, where a sound exposure of 85dB is considered a safety threshold, and the total duration of exposure at different sound pressure levels over an 8 hour duty cycle may be calculated by time weighting. As shown in fig. 3, a graph of sound pressure level magnitude versus safe exposure duration is provided, where safe exposure duration is understood to be the longest time a user has been at a certain sound pressure level magnitude, and it can be seen that as the sound pressure level magnitude increases, the safe exposure duration decreases exponentially.
According to the corresponding relation between the sound pressure level and the safe exposure duration, a preset time window and a preset safe volume threshold, calculating a curve of the volume attenuation value changing along with the sound pressure level, and taking the curve as a preset volume attenuation curve, wherein the formula of the preset volume attenuation curve is as follows:
Figure BDA0002679978230000082
wherein A represents a volume attenuation value, B represents a preset safe volume threshold, t 0 Representing a preset time window.
As shown in FIG. 4, a graph of the sound pressure level versus the volume attenuation is provided, where t 0 It is 9s, from which it can be seen that the magnitude of the volume attenuation value increases exponentially as the magnitude of the sound pressure level increases, and decreases exponentially as the magnitude of the sound pressure level decreases. Since the human ear can sense a minute sound by slightly increasing the sound volume, but the human ear does not have a significant change in the sense of the human ear even if the sound volume is increased to a certain value by a large increase, and this auditory characteristic of the loudness of the sound by the human ear can be referred to as "logarithmic" characteristic. Based on this, the earphone volume control method of the embodiment of the application can just meet the requirement that attenuation with a larger slope is carried out under a larger volume, and attenuation with a smaller slope is carried out under a smaller volume, so that the hearing of a user is protected from being damaged, meanwhile, the sound volume can keep natural and smooth transition in the hearing in the attenuation process, and the hearing experience of the user is ensured.
In an embodiment of the present application, the preset safe volume threshold is selected from a preset volume range interval according to a sensitivity of a user to the volume.
Because different users have different sensitivities to different volumes, the safety volume threshold B preset in the above embodiment is not a fixed value, but a value selected within a certain range according to the sensitivity of the user to the volume, for example, the preset volume range interval may be set to [79,85], so as to facilitate the requirements of different users for the volume.
It should be noted that, in the present application, what is actually adjusted to the volume is a volume adjustment module of the earphone itself, for example, the earphone itself is at the maximum volume, and after the earphone volume control method of the present application is applied, the volume is reduced by 6dB, where the volume of the earphone volume adjustment module is actually reduced by 6dB, and if the user needs to temporarily increase the volume in some situation, the volume can still be controlled by the volume adjustment module.
As shown in fig. 5, a headset volume control logic block diagram is provided. Firstly, inputting an audio signal into an earphone, and intercepting the audio signal input into the earphone once every preset time window to obtain a current audio signal segment of the earphone; calculating the signal size of the current audio signal segment for the current audio signal segment intercepted each time; determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level; and then comparing the current sound pressure level with a preset safe volume threshold, if the current sound pressure level does not exceed the safe volume threshold, indicating that the current volume of the earphone is within the safe hearing range of the user, and continuing to play the audio, and if the current sound pressure level exceeds the safe volume threshold, indicating that the volume input by the current earphone is large and the volume needs to be adjusted. Because in the earphone playing process, new current audio signal segments are continuously captured, the volume of the audio signal input into the earphone can be continuously adjusted, and the audio signal is output while the volume is adjusted, so that on one hand, the normal use of a user is not influenced, on the other hand, the volume played by the earphone can be always in a preset safe volume threshold value by continuously adjusting the volume, and the hearing of the user is ensured not to be damaged.
The earphone volume control method and the earphone volume control device belong to the same technical concept, and the embodiment of the application also provides the earphone volume control device. Fig. 6 shows a block diagram of a headphone volume control device according to an embodiment of the present application, and referring to fig. 6, the headphone volume control device 600 includes: an audio signal intercepting unit 610, an audio signal size calculating unit 620, a sound pressure level size determining unit 630 and a volume adjusting unit 640. Wherein, the first and the second end of the pipe are connected with each other,
the audio signal intercepting unit 610 is configured to intercept an audio signal input to the earphone once every preset time window to obtain a current audio signal segment of the earphone;
an audio signal size calculating unit 620, configured to calculate a signal size of a current audio signal segment;
a sound pressure level determining unit 630, configured to determine, according to a correspondence between a pre-stored size of an audio signal and a sound pressure level, a size of a current sound pressure level corresponding to a signal size of a current audio signal segment;
and the volume adjusting unit 640 is configured to compare the current sound pressure level with a preset safe volume threshold, and determine whether to perform attenuation adjustment on the volume of the audio signal input to the earphone by using a preset volume attenuation curve according to the comparison result, where a curve slope of the preset volume attenuation curve is positively correlated with the sound pressure level.
In an embodiment of the present application, the audio signal size calculating unit 620 is specifically configured to: detecting the voltage signal size of a plurality of earphone audio signals intercepted in a preset time window; and calculating the average value of the voltage signal sizes as the signal size of the current audio signal segment.
In one embodiment of the present application, the correspondence between the audio signal magnitude and the sound pressure level magnitude is determined as follows: dividing an audio signal for testing into a plurality of gears according to the magnitude of a voltage signal; testing the size of the audio signal of each gear and the corresponding sound pressure level; and storing the audio signal size of each gear and the corresponding sound pressure level size in an associated manner to serve as the corresponding relation between the audio signal size and the sound pressure level size.
In an embodiment of the present application, the volume adjusting unit 640 is specifically configured to: when the current sound pressure level is larger than a preset safe volume threshold, determining a current volume attenuation value corresponding to the current sound pressure level according to a preset volume attenuation curve, and performing play output after performing attenuation adjustment on the volume of an audio signal input into the earphone through the current volume attenuation value; and when the current sound pressure level is not greater than the preset safe volume threshold, directly playing and outputting the audio signal input into the earphone.
In one embodiment of the present application, the preset volume attenuation curve is determined by:
obtaining a correspondence between the sound pressure level and the safe exposure duration, wherein the correspondence is expressed as:
Figure BDA0002679978230000111
wherein D represents the safe exposure duration and SPL represents the sound pressure level;
according to the corresponding relation between the sound pressure level and the safe exposure duration, a preset time window and a preset safe volume threshold, calculating a curve of the volume attenuation value changing along with the sound pressure level, and taking the curve as a preset volume attenuation curve, wherein the formula of the preset volume attenuation curve is as follows:
Figure BDA0002679978230000112
where a represents the volume attenuation value, B represents the preset safe volume threshold, and t0 represents the preset time window.
In an embodiment of the application, the preset safe volume threshold is selected from a preset volume range interval according to the sensitivity of the user to the volume.
It should be noted that:
fig. 7 illustrates a schematic configuration of the earphone. Referring to fig. 7, at a hardware level, the headset includes a memory and a processor, and optionally further includes an interface module, a communication module, and the like. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may also include a non-volatile Memory, such as at least one disk Memory. Of course, the headset may also include hardware required for other services.
The processor, the interface module, the communication module, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
A memory for storing computer executable instructions. The memory provides computer executable instructions to the processor through the internal bus.
A processor executing computer executable instructions stored in the memory and specifically configured to perform the following operations:
intercepting the audio signal input into the earphone once every other preset time window to obtain the current audio signal segment of the earphone;
calculating the signal size of the current audio signal segment;
determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level;
and comparing the current sound pressure level with a preset safe volume threshold, and determining whether to utilize a preset volume attenuation curve to perform attenuation adjustment on the volume of the audio signal input into the earphone according to the comparison result, wherein the curve slope of the preset volume attenuation curve is in positive correlation with the sound pressure level.
The functions performed by the earphone volume control device disclosed in the embodiment of fig. 5 of the present application may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The earphone can also execute the steps executed by the earphone volume control method in fig. 1, and implement the functions of the earphone volume control method in the embodiment shown in fig. 1, which are not described herein again in this embodiment of the present application.
An embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs that, when executed by a processor, implement the foregoing earphone volume control method, and is specifically configured to perform:
intercepting the audio signal input into the earphone once every preset time window to obtain the current audio signal segment of the earphone;
calculating the signal size of the current audio signal segment;
determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level;
and comparing the current sound pressure level with a preset safe volume threshold, and determining whether to utilize a preset volume attenuation curve to perform attenuation adjustment on the volume of the audio signal input into the earphone according to the comparison result, wherein the slope of the preset volume attenuation curve is in positive correlation with the sound pressure level.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) characterized by computer-usable program code.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (8)

1. A method for controlling the volume of an earphone, comprising:
intercepting the audio signal input into the earphone once every other preset time window to obtain the current audio signal segment of the earphone;
calculating the signal size of the current audio signal segment;
determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level;
comparing the current sound pressure level with a preset safe volume threshold, and determining whether to perform attenuation adjustment on the volume of the audio signal input to the earphone by using a preset volume attenuation curve according to the comparison result, wherein the slope of the preset volume attenuation curve is in positive correlation with the sound pressure level;
the preset volume attenuation curve is determined as follows:
acquiring a corresponding relation between the sound pressure level and the safe exposure duration, wherein the corresponding relation is expressed as:
Figure FDA0003808890890000011
wherein D represents the safety exposure duration and SPL represents the sound pressure level;
according to the corresponding relation between the sound pressure level and the safe exposure duration, a preset time window and the preset safe volume threshold, calculating a curve of the volume attenuation value changing along with the sound pressure level, wherein the curve is used as a preset volume attenuation curve, and the formula of the preset volume attenuation curve is represented as follows:
Figure FDA0003808890890000012
wherein A represents a volume attenuation value, B represents a preset safe volume threshold, t 0 Representing a preset time window.
2. The method of claim 1, wherein the calculating the signal size of the current audio signal segment comprises:
detecting the voltage signal size of a plurality of earphone audio signals intercepted in the preset time window;
and calculating the average value of the voltage signal sizes as the signal size of the current audio signal segment.
3. The method of claim 1, wherein the correspondence between the audio signal magnitude and the sound pressure level magnitude is determined by:
dividing an audio signal for testing into a plurality of gears according to the size of a voltage signal;
testing the size of the audio signal of each gear and the corresponding sound pressure level;
and storing the audio signal size of each gear and the corresponding sound pressure level size in an associated manner to serve as the corresponding relation between the audio signal size and the sound pressure level size.
4. The method of claim 1, wherein comparing the magnitude of the current sound pressure level with a preset safe volume threshold, and determining whether to perform attenuation adjustment on the volume of the audio signal input to the earphone according to the comparison result comprises:
when the current sound pressure level is larger than the preset safe volume threshold, determining a current volume attenuation value corresponding to the current sound pressure level according to the preset volume attenuation curve, and carrying out playing output after carrying out attenuation adjustment on the volume of an audio signal input into an earphone through the current volume attenuation value;
and when the current sound pressure level is not greater than the preset safe volume threshold, directly playing and outputting the audio signal input into the earphone.
5. The method of claim 1, wherein the predetermined safe volume threshold is selected from a predetermined volume range interval according to a user's sensitivity to volume.
6. An earphone volume control apparatus, comprising:
the audio signal intercepting unit is used for intercepting the audio signal input into the earphone once every preset time window to obtain the current audio signal segment of the earphone;
the audio signal size calculating unit is used for calculating the signal size of the current audio signal segment;
the sound pressure level determining unit is used for determining the size of the current sound pressure level corresponding to the signal size of the current audio signal segment according to the corresponding relation between the pre-stored audio signal size and the sound pressure level size;
the volume adjusting unit is used for comparing the current sound pressure level with a preset safe volume threshold value, and determining whether to perform attenuation adjustment on the volume of the audio signal input to the earphone by using a preset volume attenuation curve according to the comparison result, wherein the curve slope of the preset volume attenuation curve is positively correlated with the sound pressure level;
the preset volume attenuation curve is determined as follows:
acquiring a corresponding relation between the sound pressure level and the safe exposure duration, wherein the corresponding relation is expressed as:
Figure FDA0003808890890000031
wherein D represents the safe exposure duration and SPL represents the sound pressure level;
according to the corresponding relation between the sound pressure level and the safety exposure duration, a preset time window and the preset safety volume threshold, calculating a curve of the volume attenuation value changing along with the sound pressure level, and taking the curve as a preset volume attenuation curve, wherein the formula of the preset volume attenuation curve is represented as follows:
Figure FDA0003808890890000032
wherein A represents a volume attenuation value, B represents a preset safe volume threshold value, t 0 Representing a preset time window.
7. The apparatus according to claim 6, wherein the volume adjustment unit is specifically configured to:
when the current sound pressure level is larger than the preset safe volume threshold, determining a current volume attenuation value corresponding to the current sound pressure level according to the preset volume attenuation curve, and carrying out playing output after carrying out attenuation adjustment on the volume of an audio signal input into an earphone through the current volume attenuation value;
and when the current sound pressure level is not greater than the preset safe volume threshold, directly playing and outputting the audio signal input into the earphone.
8. An earphone, comprising: a processor, a memory storing computer-executable instructions,
the executable instructions, when executed by the processor, implement the headset volume control method of any of claims 1 to 5.
CN202010959547.XA 2020-09-14 2020-09-14 Earphone volume control method and device and earphone Active CN112261532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010959547.XA CN112261532B (en) 2020-09-14 2020-09-14 Earphone volume control method and device and earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010959547.XA CN112261532B (en) 2020-09-14 2020-09-14 Earphone volume control method and device and earphone

Publications (2)

Publication Number Publication Date
CN112261532A CN112261532A (en) 2021-01-22
CN112261532B true CN112261532B (en) 2022-10-18

Family

ID=74232091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010959547.XA Active CN112261532B (en) 2020-09-14 2020-09-14 Earphone volume control method and device and earphone

Country Status (1)

Country Link
CN (1) CN112261532B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113345447B (en) * 2021-08-09 2021-10-29 北京百瑞互联技术有限公司 Audio coding and decoding method, system, transmitter and receiver for preventing advertisement interference
CN113730914A (en) * 2021-09-07 2021-12-03 杭州雾联科技有限公司 Audio adjusting method and device and computer readable storage medium
CN113873387A (en) * 2021-10-25 2021-12-31 深圳千岸科技股份有限公司 Volume adjusting method and system based on earphone terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547525A (en) * 2011-12-31 2012-07-04 广东步步高电子工业有限公司 Method for protecting human ear hearing under earphone mode
CN108966081A (en) * 2018-07-17 2018-12-07 歌尔股份有限公司 A kind of loudspeaker audio signal control method for playing back, device and earphone

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120051555A1 (en) * 2010-08-24 2012-03-01 Qualcomm Incorporated Automatic volume control based on acoustic energy exposure

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547525A (en) * 2011-12-31 2012-07-04 广东步步高电子工业有限公司 Method for protecting human ear hearing under earphone mode
CN108966081A (en) * 2018-07-17 2018-12-07 歌尔股份有限公司 A kind of loudspeaker audio signal control method for playing back, device and earphone

Also Published As

Publication number Publication date
CN112261532A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN112261532B (en) Earphone volume control method and device and earphone
US10880647B2 (en) Active acoustic filter with location-based filter characteristics
US10466957B2 (en) Active acoustic filter with automatic selection of filter parameters based on ambient sound
US10945062B2 (en) Headphone with off-ear and on-ear detection
CN112954115B (en) Volume adjusting method and device, electronic equipment and storage medium
Smith et al. Noise and performance
US9980028B2 (en) Sound exposure limiter
WO2018205366A1 (en) Audio signal adjustment method and system
EP2532176B1 (en) Controller for a headphone arrangement
CN109688498B (en) Volume adjusting method, earphone and storage medium
CN110459212A (en) Method for controlling volume and equipment
JP2018518893A (en) Sports headphones with situational awareness
CN112019975B (en) Ambient and aggregate acoustic dosimetry
US10555069B2 (en) Approach for detecting alert signals in changing environments
KR20200138671A (en) Environmental and aggregate acoustic dosimetry
CN112511963B (en) Earphone edge tone detection method and device and airflow simulation device
US20110116648A1 (en) Prevention of hearing loss from audio devices
US7780609B2 (en) Temporary threshold shift detector
CN113613122B (en) Volume adjusting method, volume adjusting device, earphone and storage medium
Dobrucki et al. Various aspects of auditory fatigue caused by listening to loud music
WO2011048101A1 (en) Acoustic shock processing
US20240196143A1 (en) Systems and methods for assessing hearing health based on perceptual processing
CN115250396A (en) Active noise reduction method and device for earphone and active noise reduction earphone
CN118018904A (en) In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium
CN117354665A (en) State detection method, device, equipment, storage medium and chip of wireless earphone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant