CN108595144B - Volume adjusting method and device - Google Patents

Volume adjusting method and device Download PDF

Info

Publication number
CN108595144B
CN108595144B CN201810374451.XA CN201810374451A CN108595144B CN 108595144 B CN108595144 B CN 108595144B CN 201810374451 A CN201810374451 A CN 201810374451A CN 108595144 B CN108595144 B CN 108595144B
Authority
CN
China
Prior art keywords
voltage
volume
noise
audio signal
reference voltage
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
CN201810374451.XA
Other languages
Chinese (zh)
Other versions
CN108595144A (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.)
Zhongkai University of Agriculture and Engineering
Original Assignee
Zhongkai University of Agriculture and Engineering
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 Zhongkai University of Agriculture and Engineering filed Critical Zhongkai University of Agriculture and Engineering
Priority to CN201810374451.XA priority Critical patent/CN108595144B/en
Publication of CN108595144A publication Critical patent/CN108595144A/en
Application granted granted Critical
Publication of CN108595144B publication Critical patent/CN108595144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The embodiment of the invention provides a volume adjusting method and device. The method is applied to a playing device, and comprises the following steps: acquiring an audio signal played by a playing device, and converting the audio signal into a first voltage signal comprising a reference voltage; acquiring a noise signal in the environment where the playing device is located, and converting the noise signal into a second voltage signal comprising noise voltage; and when the noise voltage is greater than the reference voltage and the first difference between the noise voltage and the reference voltage is greater than the preset difference, adjusting the volume of the audio signal to be minimum. When the noise in the environment where the playing device is located is too large, the volume is directly adjusted to the minimum instead of being adjusted to be large all the time to reduce the influence of the noise, so that the hearing of a user is prevented from being damaged by the large-volume audio signal.

Description

Volume adjusting method and device
Technical Field
The invention relates to the technical field of communication, in particular to a volume adjusting method and device.
Background
When a user plays audio (e.g., music, received voice, etc.) through a playing device, if the noise in the playing environment is too large, the user may be affected, and even the user may not hear the sound being played. Especially when the user uses the headset, the noise has a greater influence on the user. At present, under the condition of overlarge noise, the volume is generally directly turned up, and if the user still cannot hear the sound clearly, the volume is continuously turned up until the volume is adjusted to the maximum. However, when the eardrum is exposed to high-decibel sound for a long time, the eardrum and the auditory nerve are gradually damaged unconsciously, and the hearing is affected.
Disclosure of Invention
In order to overcome the above disadvantages in the prior art, an embodiment of the present invention provides a volume adjusting method and apparatus, which can directly adjust the volume of an audio signal to the minimum when the noise in the environment where a playing device is located is too large, so as to avoid that the hearing of a user is damaged due to the audio signal after only performing the volume up operation.
The embodiment of the invention provides a volume adjusting method, which is applied to playing equipment and comprises the following steps:
acquiring an audio signal played by a playing device, and converting the audio signal into a first voltage signal comprising a reference voltage;
acquiring a noise signal in the environment where the playing device is located, and converting the noise signal into a second voltage signal comprising noise voltage;
and when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value, adjusting the volume of the audio signal to be minimum.
In this embodiment of the present invention, the acquiring the noise signal in the environment where the playing device is located includes:
acquiring a noise signal in the environment where the playing equipment is located according to a preset sampling time period; or
And acquiring a noise signal in the environment where the playing equipment is located through real-time sampling.
In an embodiment of the present invention, the method further comprises:
when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is not greater than a preset difference value, if the first difference value is increased, the volume of the audio signal is increased according to the reference voltage and the first difference value; or
When the noise voltage is greater than the reference voltage and a first difference between the noise voltage and the reference voltage is not greater than a preset difference, if the first difference is reduced, the volume of the audio signal is reduced according to the reference voltage and the first difference.
In an embodiment of the present invention, after the adjusting the volume of the audio signal to the minimum, the method further includes:
and when the noise voltage is reduced, sequentially increasing the volume of the audio signal from the minimum value until the regulated voltage corresponding to the regulated audio signal is equal to the reference voltage.
In this embodiment of the present invention, sequentially increasing the volume of the audio signal from the minimum value until the corresponding adjustment voltage of the adjusted audio signal is equal to the reference voltage includes:
sequentially turning up the volume of the audio signals by one step;
acquiring an audio signal with the volume increased by one step, and converting the audio signal with the volume increased by one step into a third voltage signal comprising regulated voltage;
judging whether the regulated voltage is equal to the reference voltage or not;
stopping the adjustment of the audio signal volume when the adjustment voltage is equal to the reference voltage;
and when the adjusting voltage is smaller than the reference voltage, continuing to increase the volume of the audio signal.
In an embodiment of the present invention, the method further comprises:
and in the process of adjusting the volume from the minimum value to the maximum value, when the changed noise voltage is greater than the reference voltage and the second difference value between the changed noise voltage and the reference voltage is greater than the preset difference value, adjusting the volume to the minimum value.
An embodiment of the present invention further provides a volume adjusting device, which is applied to a playing device, and the device includes:
the device comprises a reference voltage acquisition module, a first voltage conversion module and a second voltage conversion module, wherein the reference voltage acquisition module is used for acquiring an audio signal played by a playing device and converting the audio signal into a first voltage signal comprising reference voltage;
the noise voltage acquisition module is used for acquiring a noise signal in the environment where the playing device is located and converting the noise signal into a second voltage signal comprising noise voltage;
and the adjusting module is used for adjusting the volume of the audio signal to be minimum when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value.
In this embodiment of the present invention, the adjusting module is further configured to sequentially increase the volume of the audio signal from the minimum value to the maximum value when the noise voltage is decreased after the volume of the audio signal is adjusted to the minimum value, until the adjusted voltage corresponding to the adjusted audio signal is equal to the reference voltage.
In this embodiment of the present invention, the adjusting module sequentially increases the volume of the audio signal from the minimum volume until the adjustment voltage corresponding to the adjusted audio signal is equal to the reference voltage, and the method includes:
sequentially turning up the volume of the audio signals by one step;
acquiring the audio signal with the volume increased by one step, and converting the audio signal with the volume increased by one step into a third voltage signal comprising regulated voltage;
judging whether the regulated voltage is equal to the reference voltage or not;
stopping the adjustment of the audio signal volume when the adjustment voltage is equal to the reference voltage;
and when the adjusting voltage is smaller than the reference voltage, continuing to adjust the volume of the audio signal.
In this embodiment of the present invention, the adjusting module is further configured to adjust the volume to the minimum value when the changed noise voltage is greater than the reference voltage and a second difference between the changed noise voltage and the reference voltage is greater than the preset difference in a process of adjusting the volume from the minimum value.
Compared with the prior art, the invention has the following beneficial effects:
the embodiment of the invention provides a volume adjusting method and device. When the playing device plays the audio signal, the audio signal is obtained, and the audio signal is converted to obtain a first voltage signal including a reference voltage. The method comprises the steps of obtaining a noise signal existing in the environment where the playing equipment is located, and converting the noise signal to obtain a second voltage signal comprising noise voltage. And comparing the noise voltage with a reference voltage, and if the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value, adjusting the volume of the audio signal to be minimum. Therefore, when the noise in the environment where the playing device is located is too large, the volume is directly adjusted to the minimum instead of being adjusted to be always large to reduce the influence of the noise, so that the hearing of the user is prevented from being damaged by the large-volume audio signal.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of a playing device according to an embodiment of the present invention.
Fig. 2 is a flowchart of a volume adjustment method according to an embodiment of the present invention.
Fig. 3 is a second flowchart of a volume adjustment method according to an embodiment of the invention.
Fig. 4 is a flowchart illustrating sub-steps included in step S140 in fig. 3.
Fig. 5 is a third schematic flow chart of a volume adjustment method according to an embodiment of the present invention.
Fig. 6 is a block diagram of a volume adjustment device according to an embodiment of the present invention.
Icon: 100-a playback device; 110-a memory; 120-a memory controller; 130-a processor; 200-volume adjustment means; 210-a reference voltage acquisition module; 220-a noise voltage acquisition module; 230-adjustment module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a block diagram of a playing device 100 according to an embodiment of the present invention. The playing device 100 may be, but is not limited to, a smart phone, a tablet computer, an MP3, etc. In this embodiment, the playback device 100 includes: memory 110, memory controller 120, and processor 130.
The elements of the memory 110, the memory controller 120 and the processor 130 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 110 stores a volume adjusting device 200, and the volume adjusting device 200 includes at least one software functional module which can be stored in the memory 110 in the form of software or firmware (firmware). The processor 130 executes various functional applications and data processing, i.e., implements the volume adjusting method in the embodiment of the present invention, by running software programs and modules stored in the memory 110, such as the volume adjusting apparatus 200 in the embodiment of the present invention.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 110 is used for storing a program, and the processor 130 executes the program after receiving the execution instruction. Access to the memory 110 by the processor 130 and possibly other components may be under the control of the memory controller 120.
The processor 130 may be an integrated circuit chip having signal processing capabilities. The Processor 130 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It is to be understood that the structure shown in fig. 1 is merely illustrative, and the playback device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a flow chart of a volume adjusting method according to an embodiment of the present invention. The method is applied to the playback device 100. The following describes a detailed flow of the volume adjustment method.
Step S110 is to obtain an audio signal played by the playing device 100, and convert the audio signal into a first voltage signal including a reference voltage.
In this embodiment, when a user is playing music or talking or the like through the playing device 100, an audio signal played by the playing device 100 at that time is obtained and saved. And converting the audio signal from an analog signal to a voltage signal to obtain a first voltage signal corresponding to the audio signal. And saving the voltage value in the first voltage signal as a reference voltage. Wherein, the reference voltage comprises the volume information of the audio signal which is set by the user. It is understood that the first voltage signal may include not only the reference voltage, but also other information.
Optionally, in an implementation manner of this embodiment, the playing device 100 may include an audio buffer and a first audio converter. And when the audio is played, obtaining an audio signal through the audio buffer and storing the audio signal in the audio buffer. And the audio buffer sends the stored audio signal to the first audio converter to be converted into a voltage signal, so that a first voltage signal is obtained, and a voltage value in the first voltage signal is used as the reference voltage.
Step S120, obtaining a noise signal in an environment where the playback device 100 is located, and converting the noise signal into a second voltage signal including a noise voltage.
In this embodiment, when the audio signal is played, a noise (e.g., construction sound, speech sound of other people, etc.) signal existing in the environment where the playing device 100 is located is obtained. And converting the noise signal obtained when the audio signal is played from an analog signal into a voltage signal to obtain a second voltage signal corresponding to the noise signal obtained when the audio signal is played. And saving the voltage value in the second voltage signal as a noise voltage. Wherein the noise voltage comprises a volume of noise in a playback environment. It is understood that the second voltage signal may include not only a noise voltage but also other information.
The noise signal in the environment where the playback device 100 is located may be obtained according to a preset sampling time period (for example, 5s), or may be obtained by real-time sampling. It will of course be appreciated that the noise signal may be obtained in other ways.
Alternatively, if the voltage value corresponding to the obtained noise signal is fluctuated, that is, the voltage value is not fixed, the voltage average value in the second voltage signal corresponding to the noise signal may be used as the noise voltage, the voltage maximum value in the second voltage signal may be used as the noise voltage, or the noise voltage may be obtained according to the fluctuated voltage value in the second voltage signal in other manners. If the noise signal is obtained in real time, the voltage value in the second voltage signal corresponding to the noise signal can be directly used as the noise voltage.
Optionally, in an implementation manner of this embodiment, the playing device 100 may further include a second audio transducer and a microphone. The microphone is used for receiving sound, so as to obtain a noise signal in the environment where the playing device 100 is located, and then the noise signal is converted from an analog signal to a voltage signal through the second audio converter, so as to obtain a second voltage signal, so as to obtain the noise voltage.
Step S130, when the noise voltage is greater than the reference voltage and the first difference between the noise voltage and the reference voltage is greater than a preset difference, adjusting the volume of the audio signal to be minimum.
In this embodiment, the noise voltage is compared with the reference voltage to determine whether the volume of the noise in the environment where the playback device 100 is located is greater than the volume of the audio signal. If the noise voltage is less than the reference voltage, it indicates that although there is noise in the environment where the playback device 100 is located, the user cannot hear the audio signal being played, and therefore the volume of the audio signal may not be adjusted.
If the noise voltage is greater than the reference voltage, it indicates that the volume of the audio signal being played needs to be adjusted. And calculating a first difference value of the noise voltage and the reference voltage, and comparing the first difference value with the preset difference value. When the noise voltage is greater than the reference voltage and the first difference between the noise voltage and the reference voltage is greater than the preset difference, the volume of the noise is too large, if the influence of the noise is reduced in a mode of increasing the volume, the volume of the audio signal needs to be adjusted to be very large, and therefore the hearing of a user is influenced. In this case, therefore, the volume of the audio signal can be directly adjusted to the minimum.
Alternatively, the playing of the audio signal may be paused directly; it is also possible to directly adjust the volume to the lowest level without pausing the playback of the audio signal. Thereby protecting the user's hearing. In the embodiment of the present embodiment, a method of turning down the volume of the audio signal is adopted.
And when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is not greater than a preset difference value, indicating that the volume of the noise is close to that of the audio signal. In this case, the influence of noise on the user can be reduced without affecting the hearing of the user by finely adjusting the volume of the audio signal, so that the user can hear the audio signal being played. Optionally, if the first difference is increased, it indicates that the noise volume in the environment where the playback device 100 is located is increased; however, the first difference is still not greater than the preset difference, which indicates that the noise volume is still close to the volume of the audio signal although it is increased, and the volume of the audio signal can be increased according to the reference voltage and the first difference. If the first difference is decreased but the first difference is still not greater than the preset difference, the volume of the audio signal may be decreased according to the reference voltage and the first difference.
Referring to fig. 3, fig. 3 is a second schematic flow chart of a volume adjustment method according to an embodiment of the present invention. After step S130, the method may further include step S140.
Step S140, sequentially increasing the volume of the audio signal from the minimum volume when the noise voltage is decreased until the adjusted voltage corresponding to the adjusted audio signal is equal to the reference voltage.
In this embodiment, after the volume of the audio signal is adjusted to the minimum, the noise signal in the environment where the playing device 100 is located is continuously obtained, and the corresponding noise voltage is obtained. And comparing the noise voltage obtained after the volume is adjusted to be minimum with the noise voltage obtained when the audio signal is played so as to judge whether the noise voltage becomes smaller. If the volume of the noise becomes smaller, the volume of the audio signal can be restored.
Referring to fig. 4, fig. 4 is a flowchart illustrating the sub-steps included in step S140 in fig. 3. Step S140 may include substep S141, substep S142, substep S143, substep S144, and substep S145.
And a substep S141 of sequentially turning up the volume of the audio signal by one step.
And a substep S142 of obtaining the audio signal with the volume turned up by one step, and converting the audio signal with the volume turned up by one step into a third voltage signal including a regulation voltage.
And a substep S143 of determining whether the regulated voltage is equal to the reference voltage.
When the regulation voltage is equal to the reference voltage, substep S144 is performed.
And a substep S144 of stopping the adjustment of the volume of the audio signal.
When the regulated voltage is less than the reference voltage, substep S145 is performed.
Substep S145, continuing to increase the volume of the audio signal.
In this embodiment, the volume of the audio signal is sequentially increased to the original volume by first-order and first-order increase, so as to avoid directly restoring the volume to the original volume to stimulate the hearing of the user. After increasing by one step, the audio signal with the volume adjusted up is acquired, and the audio signal with the volume adjusted up is converted into a third voltage signal including the adjustment voltage. And the voltage value in the third voltage signal is the adjusting voltage, and the adjusting voltage comprises volume information after volume is increased. And then comparing the regulating voltage with the reference voltage, if the regulating voltage is equal to the reference voltage, indicating that the volume is restored to the original volume, and stopping continuing the volume increasing operation. If not, it indicates that the current volume is still smaller than the original volume, and the substeps S141 to S143 are required to restore to the original volume. It will be appreciated that the third voltage signal may include not only the regulated voltage, but also other information.
Referring to fig. 5, fig. 5 is a third schematic flow chart of a volume adjustment method according to an embodiment of the present invention. The method may further include step S150.
Step S150, in the process of adjusting the volume from the minimum, when the changed noise voltage is greater than the reference voltage and the second difference between the changed noise voltage and the reference voltage is greater than the preset difference, adjusting the volume to the minimum.
In this embodiment, in the process of adjusting the volume, the noise signal in the environment where the playback device 100 is located is still obtained, and the noise signal is processed to obtain the corresponding noise voltage. And then judging whether the obtained noise voltage is greater than the reference voltage in the process of restoring the volume to the original volume. If the difference is greater than the first threshold, a second difference between the noise voltage and the reference voltage is calculated. If the second difference is larger than the preset difference, it indicates that the noise in the playing environment becomes larger again, and the volume needs to be stopped to be restored to the original volume, and the volume is directly adjusted to the minimum again. And then the steps are repeated to adjust the volume on the basis of hearing protection.
By the above manner, when the playing device 100 directly plays the audio signal or plays the audio signal through the earphone, if the noise is too large, the volume is directly adjusted to be the lowest; and if the noise is reduced after the adjustment is carried out to the minimum, gradually restoring the volume to the original volume. Therefore, the hearing protection of the user is realized, and the excessive use of the hearing of the user for hearing the audio signal is avoided. Especially, in the case that the user plays the audio signal by using the earphone, the hearing protection effect is more obvious.
Referring to fig. 6, fig. 6 is a block diagram of a volume adjustment device 200 according to an embodiment of the present invention. The volume adjustment device 200 may include a reference voltage acquisition module 210, a noise voltage acquisition module 220, and an adjustment module 230.
The reference voltage obtaining module 210 is configured to obtain an audio signal played by the playing device 100, and convert the audio signal into a first voltage signal including a reference voltage.
In this embodiment, the reference voltage obtaining module 210 is configured to execute step S110 in fig. 2, and the detailed description about the reference voltage obtaining module 210 may refer to the description about step S110 in fig. 2.
A noise voltage obtaining module 220, configured to obtain a noise signal in an environment where the playback device 100 is located, and convert the noise signal into a second voltage signal including a noise voltage.
In this embodiment, the noise voltage obtaining module 220 is configured to perform step S120 in fig. 2, and the detailed description about the noise voltage obtaining module 220 may refer to the description of step S120 in fig. 2.
An adjusting module 230, configured to adjust the volume of the audio signal to be minimum when the noise voltage is greater than the reference voltage and a first difference between the noise voltage and the reference voltage is greater than a preset difference.
In this embodiment, the adjusting module 230 is further configured to, when the noise voltage is greater than the reference voltage and a first difference between the noise voltage and the reference voltage is not greater than a preset difference, increase the volume of the audio signal according to the reference voltage and the first difference if the first difference is increased; or
When the noise voltage is greater than the reference voltage and a first difference between the noise voltage and the reference voltage is not greater than a preset difference, if the first difference is reduced, the volume of the audio signal is reduced according to the reference voltage and the first difference.
In this embodiment, the adjusting module 230 is further configured to sequentially increase the volume of the audio signal from the minimum value to the maximum value when the noise voltage is decreased after the volume of the audio signal is adjusted to the minimum value, until the adjusted voltage corresponding to the adjusted audio signal is equal to the reference voltage.
The adjusting module 230 sequentially increases the volume of the audio signal from the minimum volume until the adjusting voltage corresponding to the adjusted audio signal is equal to the reference voltage, including:
sequentially turning up the volume of the audio signals by one step;
acquiring the audio signal with the volume increased by one step, and converting the audio signal with the volume increased by one step into a third voltage signal comprising reference voltage;
judging whether the regulated voltage is equal to the reference voltage or not;
stopping the adjustment of the audio signal volume when the adjustment voltage is equal to the reference voltage;
and when the adjusting voltage is smaller than the reference voltage, continuing to adjust the volume of the audio signal.
The adjusting module 230 is further configured to adjust the volume to be minimum when the changed noise voltage is greater than the reference voltage and a second difference between the changed noise voltage and the reference voltage is greater than the preset difference in a process of adjusting the volume from the minimum value.
In this embodiment, the adjusting module 230 is configured to execute step S130 in fig. 2, step S140 in fig. 3, and step S150 in fig. 5, and the detailed description about the adjusting module 230 may refer to the descriptions of steps S130 to S150.
The embodiment of the invention also provides a readable storage medium, wherein the readable storage medium stores executable computer instructions, and the executable computer instructions realize the volume adjusting method when being executed by a processor.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of 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, embodiments of 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, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are 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.
In summary, the embodiments of the present invention provide a volume adjustment method and device. When the playing device plays the audio signal, the audio signal is obtained, and the audio signal is converted to obtain a first voltage signal including a reference voltage. The method comprises the steps of obtaining a noise signal existing in the environment where the playing equipment is located, and converting the noise signal to obtain a second voltage signal comprising noise voltage. And comparing the noise voltage with a reference voltage, and if the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value, adjusting the volume of the audio signal to be minimum. Therefore, when the noise in the environment where the playing device is located is too large, the volume is directly adjusted to the minimum instead of being adjusted to be always large to reduce the influence of the noise, so that the hearing of the user is prevented from being damaged by the large-volume audio signal.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A volume adjusting method is applied to a playing device, and comprises the following steps:
acquiring an audio signal played by a playing device, and converting the audio signal into a first voltage signal comprising a reference voltage;
acquiring a noise signal in the environment where the playing device is located, and converting the noise signal into a second voltage signal comprising noise voltage;
and when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value, adjusting the volume of the audio signal to be minimum, wherein the preset difference value is greater than 0.
2. The method according to claim 1, wherein the obtaining the noise signal in the environment where the playback device is located comprises:
acquiring a noise signal in the environment where the playing equipment is located according to a preset sampling time period; or
And acquiring a noise signal in the environment where the playing equipment is located through real-time sampling.
3. The method of claim 1, further comprising:
when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is not greater than a preset difference value, if the first difference value is increased, the volume of the audio signal is increased according to the reference voltage and the first difference value; or
When the noise voltage is greater than the reference voltage and a first difference between the noise voltage and the reference voltage is not greater than a preset difference, if the first difference is reduced, the volume of the audio signal is reduced according to the reference voltage and the first difference.
4. The method of claim 1, wherein after the adjusting the volume of the audio signal to a minimum, the method further comprises:
and when the noise voltage is reduced and the difference value between the reduced noise voltage and the reference voltage is not greater than the preset difference value, sequentially increasing the volume of the audio signal from the minimum value until the regulated voltage corresponding to the regulated audio signal is equal to the reference voltage.
5. The method of claim 4, wherein sequentially increasing the volume of the audio signal from the minimum until the corresponding adjusted voltage of the adjusted audio signal is equal to the reference voltage comprises:
sequentially turning up the volume of the audio signals by one step;
acquiring an audio signal with the volume increased by one step, and converting the audio signal with the volume increased by one step into a third voltage signal comprising regulated voltage;
judging whether the regulated voltage is equal to the reference voltage or not;
stopping the adjustment of the audio signal volume when the adjustment voltage is equal to the reference voltage;
and when the adjusting voltage is smaller than the reference voltage, continuing to increase the volume of the audio signal.
6. The method of claim 4, further comprising:
and in the process of adjusting the volume from the minimum value to the maximum value, when the changed noise voltage is greater than the reference voltage and the second difference value between the changed noise voltage and the reference voltage is greater than the preset difference value, adjusting the volume to the minimum value.
7. A volume adjusting device is applied to a playing device, and comprises:
the device comprises a reference voltage acquisition module, a first voltage conversion module and a second voltage conversion module, wherein the reference voltage acquisition module is used for acquiring an audio signal played by a playing device and converting the audio signal into a first voltage signal comprising reference voltage;
the noise voltage acquisition module is used for acquiring a noise signal in the environment where the playing device is located and converting the noise signal into a second voltage signal comprising noise voltage;
and the adjusting module is used for adjusting the volume of the audio signal to be minimum when the noise voltage is greater than the reference voltage and a first difference value between the noise voltage and the reference voltage is greater than a preset difference value, wherein the preset difference value is greater than 0.
8. The apparatus of claim 7,
the adjusting module is further used for sequentially increasing the volume of the audio signal from the minimum value until the adjusting voltage corresponding to the adjusted audio signal is equal to the reference voltage when the difference value between the noise voltage after the noise voltage is reduced and the reduced noise voltage and the reference voltage is not greater than the preset difference value after the volume of the audio signal is adjusted to the minimum value.
9. The apparatus of claim 8, wherein the adjusting module sequentially increases the volume of the audio signal from the minimum volume until the adjusted voltage corresponding to the adjusted audio signal is equal to the reference voltage comprises:
sequentially turning up the volume of the audio signals by one step;
acquiring the audio signal with the volume increased by one step, and converting the audio signal with the volume increased by one step into a third voltage signal comprising regulated voltage;
judging whether the regulated voltage is equal to the reference voltage or not;
stopping the adjustment of the audio signal volume when the adjustment voltage is equal to the reference voltage;
and when the adjusting voltage is smaller than the reference voltage, continuing to adjust the volume of the audio signal.
10. The apparatus of claim 8,
the adjusting module is further used for adjusting the volume to be minimum when the changed noise voltage is larger than the reference voltage and the second difference value between the changed noise voltage and the reference voltage is larger than the preset difference value in the process of adjusting the volume to be maximum from minimum.
CN201810374451.XA 2018-04-24 2018-04-24 Volume adjusting method and device Active CN108595144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810374451.XA CN108595144B (en) 2018-04-24 2018-04-24 Volume adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810374451.XA CN108595144B (en) 2018-04-24 2018-04-24 Volume adjusting method and device

Publications (2)

Publication Number Publication Date
CN108595144A CN108595144A (en) 2018-09-28
CN108595144B true CN108595144B (en) 2021-06-08

Family

ID=63614499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810374451.XA Active CN108595144B (en) 2018-04-24 2018-04-24 Volume adjusting method and device

Country Status (1)

Country Link
CN (1) CN108595144B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972120A (en) * 2006-11-29 2007-05-30 北京中星微电子有限公司 A method and device for implementing adjustment of volume based on environmental noise detection
CN103002236A (en) * 2012-12-17 2013-03-27 深圳Tcl新技术有限公司 Method and system used for adjusting volume and based on environment noise and television
CN104636110A (en) * 2014-12-30 2015-05-20 小米科技有限责任公司 Method and device for controlling volume
US9781537B2 (en) * 2016-01-12 2017-10-03 Disney Enterprises, Inc. Systems and methods for adjusting audio based on ambient sounds
CN107908388A (en) * 2017-11-17 2018-04-13 珠海市魅族科技有限公司 Method for controlling volume and device, computer installation and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9730023B2 (en) * 2015-10-27 2017-08-08 Chatterbeak, Inc. Communication based on geographical region

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972120A (en) * 2006-11-29 2007-05-30 北京中星微电子有限公司 A method and device for implementing adjustment of volume based on environmental noise detection
CN103002236A (en) * 2012-12-17 2013-03-27 深圳Tcl新技术有限公司 Method and system used for adjusting volume and based on environment noise and television
CN104636110A (en) * 2014-12-30 2015-05-20 小米科技有限责任公司 Method and device for controlling volume
US9781537B2 (en) * 2016-01-12 2017-10-03 Disney Enterprises, Inc. Systems and methods for adjusting audio based on ambient sounds
CN107908388A (en) * 2017-11-17 2018-04-13 珠海市魅族科技有限公司 Method for controlling volume and device, computer installation and computer-readable recording medium

Also Published As

Publication number Publication date
CN108595144A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
JP6536320B2 (en) Audio signal processing device, audio signal processing method and program
CN109688498B (en) Volume adjusting method, earphone and storage medium
US20150281853A1 (en) Systems and methods for enhancing targeted audibility
CN103730122B (en) Voice conversion device and method for converting user voice
JP6290429B2 (en) Speech processing system
CN108335700B (en) Voice adjusting method and device, voice interaction equipment and storage medium
US11688515B2 (en) Mobile device based techniques for detection and prevention of hearing loss
JP2006146226A (en) Method and apparatus for detecting voice segment in voice signal processing device
US20180190310A1 (en) De-reverberation control method and apparatus for device equipped with microphone
CN110782891B (en) Audio processing method and device, computing equipment and storage medium
CN109348399B (en) Terminal and control method of stereo sound effect thereof
CN104780259A (en) Automatic adjustment system and method for call voice quality
CA2869884C (en) A processing apparatus and method for estimating a noise amplitude spectrum of noise included in a sound signal
KR20190012003A (en) Electronic device and method for adjusting gain of digital audio signal based on hearing recognition characteristics
CN108595144B (en) Volume adjusting method and device
JP2018174521A5 (en)
JP7194559B2 (en) Program, information processing method, and information processing apparatus
WO2023098103A9 (en) Audio processing method and audio processing apparatus
JP4814861B2 (en) Volume control apparatus, method, and program
CN113963716A (en) Volume balancing method, device and equipment for talking doorbell and readable storage medium
CN113555033A (en) Automatic gain control method, device and system of voice interaction system
CN111243631A (en) Automatic gain control method and electronic equipment
CN111128199A (en) Sensitive speaker monitoring and recording control method and system based on deep learning
CN114827337B (en) Method, device, equipment and storage medium for adjusting volume
CN114007166B (en) Method and device for customizing sound, electronic equipment and storage medium

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