WO2019033440A1 - 音量调节方法、装置、终端设备及存储介质 - Google Patents
音量调节方法、装置、终端设备及存储介质 Download PDFInfo
- Publication number
- WO2019033440A1 WO2019033440A1 PCT/CN2017/098176 CN2017098176W WO2019033440A1 WO 2019033440 A1 WO2019033440 A1 WO 2019033440A1 CN 2017098176 W CN2017098176 W CN 2017098176W WO 2019033440 A1 WO2019033440 A1 WO 2019033440A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- amplitude
- audio
- adjustment
- amplitude adjustment
- magnitude
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000004590 computer program Methods 0.000 claims description 5
- 230000005236 sound signal Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 12
- 230000002093 peripheral effect Effects 0.000 description 8
- 230000008859 change Effects 0.000 description 7
- 230000001965 increasing effect Effects 0.000 description 6
- 238000012937 correction Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000011038 discontinuous diafiltration by volume reduction Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/04—Circuits for transducers, loudspeakers or microphones for correcting frequency response
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/22—Automatic control in amplifiers having discharge tubes
- H03G3/24—Control dependent upon ambient noise level or sound level
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/30—Automatic control in amplifiers having semiconductor devices
- H03G3/3005—Automatic control in amplifiers having semiconductor devices in amplifiers suitable for low-frequencies, e.g. audio amplifiers
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/30—Automatic control in amplifiers having semiconductor devices
- H03G3/32—Automatic control in amplifiers having semiconductor devices the control being dependent upon ambient noise level or sound level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G5/00—Tone control or bandwidth control in amplifiers
- H03G5/16—Automatic control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2430/00—Signal processing covered by H04R, not provided for in its groups
- H04R2430/01—Aspects of volume control, not necessarily automatic, in sound systems
Definitions
- Embodiments of the present invention relate to computer technologies, and in particular, to a volume adjustment method, apparatus, terminal device, and storage medium.
- terminal devices With the increasing popularity of terminal devices, more and more users use terminal devices to perform various functions to meet their own needs, such as reading text, watching videos, listening to music, playing games, and the like using terminal devices.
- the invention provides a volume adjustment method, device, terminal device and storage medium, which improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
- an embodiment of the present invention provides a volume adjustment method, including:
- Different amplitude adjustment coefficients are assigned according to the magnitude of the audio amplitude, and the audio amplitude is adjusted according to the amplitude adjustment coefficient.
- an embodiment of the present invention further provides a volume adjustment apparatus, including:
- An acquiring module configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing
- An amplitude determining module configured to determine an audio amplitude corresponding to the audio information according to the audio information
- An adjustment coefficient determining module configured to allocate different amplitude adjustment coefficients according to the magnitude of the audio amplitude
- an adjustment module configured to adjust the audio amplitude according to the amplitude adjustment coefficient.
- an embodiment of the present invention further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program, such as The volume adjustment method described in the embodiment of the invention.
- an embodiment of the present invention further provides a storage medium including a terminal device executable instruction, where the terminal device executable instruction is used to perform volume adjustment according to an embodiment of the present invention when executed by a terminal device processor. method.
- FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present invention.
- FIG. 2 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- FIG. 3 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- FIG. 5 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- FIG. 6 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- FIG. 7 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- FIG. 8 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
- FIG. 1 is a flowchart of a method for adjusting a volume according to an embodiment of the present invention.
- the present embodiment is applicable to a situation in which a volume adjustment is performed when a terminal device plays a sound source.
- the method may be performed by a terminal device provided by an embodiment of the present invention.
- the volume adjustment device of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1 , the specific solution provided by this embodiment is as follows:
- Step S101 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- the terminal device can play the sound source through the installed third-party application or the audio and video playback software that comes with the system. Among them, it mainly includes the steps of acquiring, decoding and outputting the sound source file.
- the obtained sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device; after the sound source file is obtained, it is loaded into a memory buffer; Inside The audio source file of the buffer is decoded. Before the decoding starts, if the audio file contains video data at the same time, the audio data and the video data need to be separated, and the separated audio data is input to the audio decoder, wherein the audio decoding is performed.
- the device is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal.
- the sound source playing event it is determined that the terminal device starts to play the sound source, wherein the trigger event may be that the detected play button displayed in the touch screen is pressed, or the terminal device may be detected.
- a playback device such as a speaker starts playing a sound, it is determined that the terminal device performs sound source playback.
- the audio information of the sound source is acquired.
- the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source.
- the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file.
- the audio information of the audio source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
- Step S102 Determine an audio amplitude corresponding to the audio information according to the audio information.
- Amplitude refers to the maximum distance from the original position during the vibration of the object.
- the loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness.
- the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T, wherein the amplitude information may be composed of multiple amplitude values, depending on the obtained multiple amplitudes. The value can correspondingly determine the amplitude curve of the sound source played during the preset time period T.
- the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude.
- the audio information acquired in step S101 is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
- the amplitude when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined.
- the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; and correspondingly, determining the amplitude of the sound source according to the audio information, comprising: determining, according to the audio frame information, the sound source The amplitude of a frame.
- the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
- Step S103 assign different amplitude adjustment coefficients according to the magnitude of the audio amplitude, and adjust the audio amplitude according to the amplitude adjustment coefficient.
- corresponding different amplitude adjustment coefficients may be determined according to the determined magnitude of the audio amplitude, and the audio amplitude is adjusted according to the amplitude adjustment coefficient.
- the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file containing the audio information, and then the package is modified after being modified, and buffered to the corresponding sound source.
- the audio amplitude is correspondingly modified; or, in the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change
- the amplitude is adjusted to adjust the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer.
- the audio content is adjusted to improve the adjustment efficiency.
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude includes: assigning a first amplitude adjustment coefficient to an audio amplitude greater than a first preset threshold or less than a third preset threshold, being less than or equal to the first
- the second amplitude adjustment coefficient is allocated to the audio amplitude of the preset threshold greater than the second preset threshold
- the third amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the second preset threshold greater than the third preset threshold, wherein the first The amplitude adjustment coefficient is smaller than the second amplitude adjustment coefficient, and the second amplitude adjustment coefficient is smaller than the third amplitude adjustment coefficient.
- the first amplitude adjustment coefficient may be 1, and the second amplitude adjustment coefficient may be 2
- the third amplitude adjustment coefficient may be 1.5
- the first amplitude threshold may be -3 db
- the second amplitude threshold may be -10 db
- the third amplitude threshold may be -50 db.
- the correspondence may be as shown in the following table:
- the gain is not adjusted; when the amplitude is less than -3db greater than -10db, the amplitude is a high-amplitude region, and its distribution gain coefficient is 1.5, when the amplitude When it is smaller than -10db and larger than -50db, it is a medium amplitude region, and it is assigned an amplitude coefficient of 2 to significantly increase the amplitude of the amplitude of the portion. It can be seen from the above that when the terminal device detects the sound source, The audio amplitude is automatically adjusted to obtain a suitable output volume, which makes the user's sense of hearing more and improves the volume adjustment efficiency.
- the amplitude adjustment factor may be determined based on the maximum amplitude and the average amplitude in the audio information, and the audio amplitude is adjusted in accordance with the amplitude adjustment factor.
- the amplitude adjustment coefficient is determined according to the maximum amplitude and the average amplitude.
- the difference between the maximum amplitude and the average amplitude is large (for example, 0.2 db)
- the volume is not avoided when playing to a large amplitude sound source, and the higher amplitude is adjusted to lower the volume.
- the difference between the maximum amplitude and the average amplitude does not satisfy the preset condition, that is, the phase difference is not large, the amplitude of the sound source is not adjusted.
- the amplitude adjustment coefficient may also be determined in advance according to the audio amplitude and the current volume of the terminal device, and then the audio amplitude is adjusted according to the amplitude adjustment coefficient.
- the terminal device is divided by the mute to the maximum volume.
- amplitude Volume value (level) Adjustment factor Greater than -3db 5 0.5 Less than -3db is greater than -10db 15 0.8 Less than -20db 18 2
- the corresponding setting adjustment coefficient is 0.5 to lower the audio amplitude higher portion; when the audio amplitude is less than -3 db is greater than -10 db, and the current terminal
- the corresponding adjustment coefficient is 0.8 to finely adjust the audio amplitude in the middle amplitude region; when the audio amplitude is less than -20db and the current terminal device volume value is higher, the corresponding lower portion of the audio amplitude is increased. Big.
- the method further includes: determining the audio information.
- Amplifying the audio amplitude of the preset frequency; correspondingly, the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises: allocating a first amplitude adjustment coefficient for the audio amplitude satisfying the preset frequency.
- the technical solution is as follows:
- Step S201 When detecting that the terminal device performs sound source playing, acquiring audio information of the sound source.
- Step S202 Determine an audio amplitude corresponding to the audio information according to the audio information.
- Step S203 Determine an audio amplitude that satisfies a preset frequency in the audio information, and allocate a first amplitude adjustment coefficient to the audio amplitude that satisfies the preset frequency.
- the first amplitude adjustment coefficient may be 1, that is, the magnitude of the audio amplitude is not adjusted.
- the preset frequency may be 300hz, that is, when the amplitude of the fixed frequency 300hz is detected in the audio information, it is used as noise, and the amplitude is not adjusted to avoid the problem of synchronously amplifying the noise, and at the same time, The volume adjustment efficiency is further improved.
- FIG. 3 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- the method further includes: determining, by using identity verification information, Corresponding first amplitude adjustment information is determined according to the identity attribute of the current terminal device user; correspondingly, the different amplitude adjustment coefficients are allocated according to the magnitude of the audio amplitude, including: according to the audio amplitude The first amplitude adjustment information determines a corresponding amplitude adjustment coefficient.
- the specific includes:
- Step S301 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- Step S302 Determine an audio amplitude corresponding to the audio information according to the audio information.
- Step S303 Determine, by the identity identification information, an identity attribute of the current terminal device user, and determine corresponding first amplitude adjustment information according to the identity attribute.
- the current user may be identified by the fingerprint module of the terminal device, and then the corresponding first amplitude adjustment information, the first amplitude adjustment information, is determined according to the stored user identity attributes, such as occupation, age, gender, and the like. Can be a correction factor.
- the corresponding first amplitude adjustment information may be 0.8, that is, the originally determined amplitude adjustment coefficient is multiplied by 0.8 as the corrected amplitude adjustment coefficient. .
- Step S304 determining a corresponding amplitude adjustment coefficient according to the magnitude of the audio amplitude and the first amplitude adjustment information, and adjusting the audio amplitude according to the amplitude adjustment coefficient.
- the user's own attributes are referenced in the process of adjusting the audio amplitude, so that the volume adjustment is more in line with the user's needs, and can be adjusted according to the adaptability of different users.
- the method further includes: determining, by the terminal device, a playback device of the terminal device And determining, according to the impedance value, corresponding second amplitude adjustment information; correspondingly, the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises: according to the magnitude of the audio amplitude, the second amplitude The adjustment information determines the corresponding amplitude adjustment factor.
- the method further includes: determining, by the terminal device, a playback device of the terminal device And determining, according to the impedance value, corresponding second amplitude adjustment information; correspondingly, the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises: according to the magnitude of the audio amplitude, the second amplitude
- the adjustment information determines the corresponding amplitude adjustment factor. As shown in Figure 4, Specifically include:
- Step S401 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- Step S402 determining an audio amplitude corresponding to the audio information according to the audio information.
- Step S403 determining an impedance value of the terminal device playing device, and determining corresponding second amplitude adjustment information according to the impedance value.
- the impedance value of the playback device (eg, speaker) installed in the terminal device may be detected by the power amplifier chip, or the impedance of the playback device may be physically detected.
- the second amplitude adjustment information may be a correction coefficient.
- Step S404 Determine a corresponding amplitude adjustment coefficient according to the magnitude of the audio amplitude and the second amplitude adjustment information, and adjust the audio amplitude according to the amplitude adjustment coefficient.
- the corresponding second amplitude adjustment information may be 1.2, that is, when different amplitude adjustment coefficients are allocated for the audio amplitude.
- the assigned amplitude adjustment coefficients are all multiplied by 1.2 as the adjusted amplitude adjustment coefficients.
- the impedance value of the playing device is introduced as one of the parameters for determining the amplitude adjusting coefficient, thereby avoiding the increase of the impedance value of the playing device with the playing time and the normal playing process.
- the volume level in the middle of the problem affects, so that the adjusted volume is better in line with the user's needs, further improving the volume adjustment effect.
- FIG. 5 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- the method further includes: determining that the terminal device is currently located.
- Corresponding third amplitude adjustment information is determined according to the noise value; correspondingly, the different amplitude adjustment coefficients are allocated according to the magnitude of the audio amplitude: according to the magnitude of the audio amplitude, the first The three amplitude adjustment information determines a corresponding amplitude adjustment coefficient.
- the specific includes:
- Step S501 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- Step S502 Determine an audio amplitude corresponding to the audio information according to the audio information.
- Step S503 Determine a noise value of a current environment of the terminal device, and determine corresponding third amplitude adjustment information according to the noise value.
- the noise of the current environment can be collected by the microphone installed by the terminal device to determine a corresponding noise value.
- the third amplitude adjustment information may be a correction coefficient.
- Step S504 determining corresponding according to the magnitude of the audio amplitude and the third amplitude adjustment information.
- the amplitude adjustment coefficient adjusts the audio amplitude according to the amplitude adjustment coefficient.
- the corresponding third amplitude adjustment information may be 1.5, that is, When the audio amplitudes are assigned different amplitude adjustment coefficients, the assigned amplitude adjustment coefficients are multiplied by 1.5 as the adjusted amplitude adjustment coefficients.
- the influence of noise on the volume of the terminal device is considered, and the determined noise value is taken as one of the parameters for determining the amplitude adjustment coefficient, so that the adjusted volume is better in accordance with the user's demand. , further improve the volume adjustment effect.
- FIG. 6 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- the method further includes: determining a sound source of the sound source. And determining, according to the type of the sound source, corresponding fourth amplitude adjustment information; correspondingly, the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises: adjusting the fourth amplitude according to the magnitude of the audio amplitude The information determines the corresponding amplitude adjustment factor.
- the specific includes:
- Step S601 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- Step S602 determining an audio amplitude corresponding to the audio information according to the audio information.
- Step S603 determining a sound source type of the sound source, and determining corresponding fourth amplitude adjustment information according to the sound source type.
- the type of the sound source may be a music type, such as a song file played, or an episode in an audio or video file, or music entrained in an audio and video file play; or a conversation type, such as between characters in a played movie. Dialogue; it can also be a noise type such as noise during a call, or a noisy sound in a movie.
- the corresponding sound source type may be determined by analyzing the attribute information of the sound source, and the type of the sound source may also be determined by analyzing the audio amplitude. For example, when the curve waveform of the audio amplitude is irregularly distributed, it may be determined as The type of noise.
- the fourth amplitude adjustment information may be a correction coefficient. When it is determined that the sound source type is a music type, the corresponding original amplitude adjustment coefficient may be correspondingly multiplied by 1.2 as the corrected amplitude adjustment. coefficient.
- Step S604 determining a corresponding amplitude adjustment coefficient according to the magnitude of the audio amplitude and the fourth amplitude adjustment information, and adjusting the audio amplitude according to the amplitude adjustment coefficient.
- the sound source type is introduced as the adjustment correction parameter, so that the adjustment of the audio amplitude is more reasonable.
- FIG. 7 is a flowchart of another volume adjustment method according to an embodiment of the present invention.
- the method further includes: determining a corresponding volume according to the amplitude adjustment coefficient. Adjusting information; adjusting the current volume of the terminal device according to the volume adjustment information. As shown in FIG. 7, the specific includes:
- Step S701 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- Step S702 determining an audio amplitude corresponding to the audio information according to the audio information.
- Step S703 assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, and adjusting the audio amplitude according to the amplitude adjustment coefficient.
- Step S704 determining corresponding volume adjustment information according to the amplitude adjustment coefficient, and adjusting a current volume of the terminal device according to the volume adjustment information.
- the corresponding volume adjustment information is determined based on the amplitude adjustment factor.
- the corresponding volume increase information is determined, and when the amplitude adjustment coefficient is less than 1, the corresponding volume reduction information is determined.
- the information of the volume increase or the volume decrease is a corresponding target volume value.
- the terminal device is divided into 18 adjustable levels from mute to maximum volume, and each level corresponds to a volume value, and the target volume value corresponding to the volume reduction information may be 3 or 4, and the volume increase information corresponds to The target volume value may be 14 or 15.
- the volume value is correspondingly increased to 14 or 15.
- the volume value is correspondingly reduced.
- the information that the volume is increased or the volume is decreased is a corresponding volume change value.
- the terminal device is divided into 18 adjustable levels from mute to maximum volume, each level corresponding to a volume value, and the volume change information and the volume change information corresponding to the volume change value is 3, for example, the current terminal.
- the volume value of the device is 10.
- the sound volume is increased by 3 based on the current volume value, and the sound is played by the 13th level volume.
- the current volume value is based. Decrease by 3 to use the 7th level volume for sound playback.
- the method before adjusting the volume of the terminal device, the method further includes: determining a play time of the sound source, and when the play time is greater than the preset time, for example, 30s is used according to the volume increase information or the volume decrease information.
- the volume change value adjusts the current volume value of the terminal device, thereby further improving the volume adjustment efficiency and reducing the power consumption of the terminal device.
- the playback volume of the terminal device is adaptively adjusted, thereby further enhancing the adjustment effect, so that the volume during the sound source playing process is better and moderate, and meets the user's needs.
- FIG. 8 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present invention.
- the apparatus is configured to perform the volume adjustment method provided by the foregoing embodiment, and has a function module and a beneficial effect corresponding to the execution method.
- the device specifically includes: an obtaining module 101, an amplitude determining module 102, an adjustment coefficient determining module 103, and an adjusting module 104.
- the obtaining module 101 is configured to acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
- the terminal device can play the sound source through the installed third-party application or the audio and video playback software that comes with the system. Among them, it mainly includes the steps of acquiring, decoding and outputting the sound source file.
- the obtained sound source file may be a multicast stream received through a network, or may be an audio and video file stored locally by the terminal device; after the sound source file is obtained, it is loaded into a memory buffer; The audio source file of the memory buffer is decoded. Before the decoding starts, if the audio file contains video data at the same time, the audio data and the video data need to be separated, and the separated audio data is input to the audio decoder, wherein the audio decoding is performed.
- the device is mainly used for reading audio data in the memory buffer, obtaining a digital audio signal, and converting the digital audio signal into an analog audio signal, and the playing device of the terminal device performs audio playback according to the analog audio signal.
- the sound source playing event it is determined that the terminal device starts to play the sound source, wherein the trigger event may be that the detected play button displayed in the touch screen is pressed, or the terminal device may be detected.
- a playback device such as a speaker starts playing a sound, it is determined that the terminal device performs sound source playback.
- the audio information of the sound source is acquired.
- the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source.
- the original file of the currently played sound source may also be acquired, and the audio information corresponding to the sound source is determined by parsing the original file.
- the audio information of the audio source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
- the amplitude determining module 102 is configured to determine an audio amplitude corresponding to the audio information according to the audio information.
- Amplitude refers to the maximum distance from the original position during the vibration of the object.
- the loudness of the sound heard by the human ear is related to the amplitude of the sound source. The louder the amplitude, the stronger the loudness.
- the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T, wherein the amplitude information may be composed of multiple amplitude values, depending on the obtained multiple amplitudes. The value can be determined accordingly in the preset The amplitude curve of the sound source played during the time period T.
- the audio information of the sound source can be obtained by the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the corresponding amplitude.
- the audio information acquired in step S101 is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
- the amplitude when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or in real time, the amplitude of each frame of the audio information is determined.
- the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; and correspondingly, determining the amplitude of the sound source according to the audio information, comprising: determining, according to the audio frame information, the sound source The amplitude of a frame.
- the sound source file is parsed to obtain an audio frame sequence, and the corresponding amplitude is determined according to each frame of the audio frame sequence.
- the adjustment coefficient determining module 103 is configured to allocate different amplitude adjustment coefficients according to the magnitude of the audio amplitude.
- corresponding different amplitude adjustment coefficients may be determined according to the determined magnitude of the audio amplitude, and the audio amplitude is adjusted according to the amplitude adjustment coefficient.
- the data representing the amplitude information in the obtained audio data may be modified by parsing the sound source file containing the audio information, and then the package is modified after being modified, and buffered to the corresponding sound source.
- the audio amplitude is correspondingly modified; or, in the decoding process of the sound source playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding adjustment coefficient to change
- the amplitude is adjusted to adjust the volume of the source. Therefore, the volume of the sound source is adjusted without changing the original volume of the terminal device system, and the adjustment process may reduce the playback load before the sound source file does not enter the buffer, or may be in the buffer.
- the audio content is adjusted to improve the adjustment efficiency.
- the adjustment module 104 is configured to adjust the audio amplitude according to the amplitude adjustment coefficient.
- the technical solution provided by the embodiment when detecting that the terminal device performs sound source playing, acquiring audio information of the sound source; determining an audio amplitude corresponding to the audio information according to the audio information; and assigning according to the size of the audio amplitude Different amplitude adjustment coefficients are used to adjust the audio amplitude according to the amplitude adjustment coefficient.
- the solution improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
- the adjustment coefficient determining module 103 is specifically configured to:
- a second amplitude adjustment coefficient is allocated to an audio amplitude that is less than or equal to the first preset threshold greater than the second preset threshold, and a third amplitude adjustment is allocated to an audio amplitude that is less than or equal to the second preset threshold greater than the third preset threshold a coefficient, wherein the first amplitude adjustment coefficient is smaller than the second amplitude adjustment coefficient, and the second amplitude adjustment coefficient is smaller than the third amplitude adjustment coefficient.
- the amplitude determining module 102 is further configured to:
- the adjustment coefficient determining module 103 is specifically configured to:
- a first amplitude adjustment coefficient is assigned to the audio amplitude that satisfies the preset frequency.
- the adjustment module 104 is further configured to:
- the adjustment coefficient determining module 103 is specifically configured to:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the first amplitude adjustment information.
- the adjustment module 104 is further configured to:
- the adjustment coefficient determining module 103 is specifically configured to:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the second amplitude adjustment information.
- the adjustment module 104 is further configured to:
- the adjustment coefficient determining module 103 is specifically configured to:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the third amplitude adjustment information.
- the adjustment module 104 is further configured to:
- the adjustment coefficient determining module 103 is specifically configured to:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the fourth amplitude adjustment information.
- the adjustment module 104 is further configured to:
- the sizes of the second preset threshold and the third preset threshold are dynamically adjusted according to the current volume of the terminal device.
- the adjustment module 104 is further configured to:
- FIG. 9 is a schematic structural diagram of another terminal device according to an embodiment of the present invention.
- the terminal device 200 includes: a memory 201, a central processing unit (CPU) 202, a peripheral interface 203, and an RF. (Radio Frequency) circuit 205, audio circuit 206, speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, other input/control devices 210, and external port 204, these components pass One or more communication buses or signal lines 207 are in communication.
- the illustrated terminal device 200 is merely one example of a terminal device, and the terminal device 200 may have more or fewer components than those shown in the figures, and two or more components may be combined. Or it can have different component configurations.
- the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the terminal device for rights management of a multi-open application provided in this embodiment is described in detail below.
- the terminal device takes a smart phone as an example.
- the memory 201 may be accessed by the CPU 202, the peripheral interface 203, etc., and the memory 201 may include a high speed random access memory, and may also include a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
- Peripheral interface 203 which can connect the input and output peripherals of the device to CPU 202 and memory 201.
- the I/O subsystem 209 which can connect input and output peripherals on the device, such as touch screen 212 and other input/control devices 210, to peripheral interface 203.
- the I/O subsystem 209 can include a display controller 2091 and one or more input controllers 2092 for controlling other input/control devices 210.
- one or more input controllers 2092 receive electrical signals from other input/control devices 210 or transmit electrical signals to other input/control devices 210, and other input/control devices 210 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, click wheel.
- the input controller 2092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
- the touch screen 212 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user.
- the visual output may include graphics, text, icons, videos, and the like.
- Display controller 2091 in I/O subsystem 209 receives electrical signals from touch screen 212 or transmits electrical signals to touch screen 212.
- the touch screen 212 detects the contact on the touch screen, and the display controller 2091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 212, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 212 can be operated.
- the icon of the game, the icon of the network to the corresponding network, and the like.
- the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
- the RF circuit 205 is mainly used for establishing communication between the mobile phone and the wireless network (ie, the network side), and realizing data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like. Specifically, the RF circuit 205 receives and transmits an RF signal, which is also referred to as an electromagnetic signal, and the RF circuit 205 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate.
- an RF signal which is also referred to as an electromagnetic signal
- the RF circuit 205 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate.
- RF circuitry 205 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, codec) Chipset, Subscriber Identity Module (SIM), etc.
- an antenna system an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, codec) Chipset, Subscriber Identity Module (SIM), etc.
- CODEC COder-DECoder, codec
- SIM Subscriber Identity Module
- the audio circuit 206 is mainly used to receive audio data from the peripheral interface 203, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 211.
- the speaker 211 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 205 to sound and play the sound to the user.
- the power management chip 208 is used for power supply and power management of the hardware connected to the CPU 202, the I/O subsystem, and the peripheral interface.
- the volume adjustment device and the terminal device of the terminal device provided in the foregoing embodiments may perform the volume adjustment method of the terminal device provided by any embodiment of the present invention, and have corresponding function modules and beneficial effects for performing the method.
- the volume adjustment method of the terminal device provided by any embodiment of the present invention may perform the volume adjustment method of the terminal device provided by any embodiment of the present invention.
- the embodiment of the present invention further provides a storage medium including terminal device executable instructions, where the terminal device executable instructions are used to execute a volume adjustment method when executed by a terminal device processor, the method comprising:
- Different amplitude adjustment coefficients are assigned according to the magnitude of the audio amplitude, and the audio amplitude is adjusted according to the amplitude adjustment coefficient.
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude includes:
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises:
- a first amplitude adjustment coefficient is assigned to the audio amplitude that satisfies the preset frequency.
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the first amplitude adjustment information.
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the second amplitude adjustment information.
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the third amplitude adjustment information.
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude comprises:
- Corresponding amplitude adjustment coefficients are determined according to the magnitude of the audio amplitude and the fourth amplitude adjustment information.
- the method before the assigning different amplitude adjustment coefficients according to the magnitude of the audio amplitude, the method further includes:
- the second preset threshold and the third preset threshold are dynamically adjusted according to the current volume of the terminal device.
- the method further includes:
- Storage media any of a variety of types of memory devices or storage devices.
- the term "storage medium” It is intended to include: installation media such as CD-ROM, floppy disk or tape device; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile Memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, and the like.
- the storage medium may also include other types of memory or a combination thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet.
- the second computer system can provide program instructions to the first computer for execution.
- storage medium can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network).
- a storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.
- the computer executable instructions are not limited to the volume adjustment method operation as described above, and may also perform the volume adjustment method provided by any embodiment of the present invention. Related operations in .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Acoustics & Sound (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Circuit For Audible Band Transducer (AREA)
- Telephone Function (AREA)
Abstract
本发明实施例公开了一种音量调节方法、装置、终端设备及存储介质,该方法包括当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定和所述音频信息对应的音频振幅;依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。本方案提高了音量调节效率,降低了终端设备的功耗。
Description
本发明实施例涉及计算机技术,尤其涉及一种音量调节方法、装置、终端设备及存储介质。
随着终端设备普及程度的提高,越来越多的用户使用终端设备执行各种各样的功能以满足自身需求,如使用终端设备阅读文字、观看视频、听音乐、玩游戏等。
发明内容
本发明提供了一种音量调节方法、装置、终端设备及存储介质,提高了音量调节效率,降低了终端设备的功耗。
第一方面,本发明实施例提供了一种音量调节方法,包括:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;
依据所述音频信息确定和所述音频信息对应的音频振幅;
依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
第二方面,本发明实施例还提供了一种音量调节装置,包括:
获取模块,用于当检测到终端设备进行音源播放时,获取所述音源的音频信息;
振幅确定模块,用于依据所述音频信息确定和所述音频信息对应的音频振幅;
调整系数确定模块,用于依据所述音频振幅的大小分配不同的振幅调整系数;
调整模块,用于依据所述振幅调整系数对所述音频振幅进行调整。
第三方面,本发明实施例还提供了一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本发明实施例所述的音量调节方法。
第四方面,本发明实施例还提供了一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行本发明实施例所述的音量调节方法。
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:
图1是本发明实施例提供的一种音量调节方法的流程图;
图2是本发明实施例提供的另一种音量调节方法的流程图;
图3是本发明实施例提供的另一种音量调节方法的流程图;
图4是本发明实施例提供的另一种音量调节方法的流程图;
图5是本发明实施例提供的另一种音量调节方法的流程图;
图6是本发明实施例提供的另一种音量调节方法的流程图;
图7是本发明实施例提供的另一种音量调节方法的流程图;
图8是本发明实施例提供的一种音量调节装置的结构框图;
图9是本发明实施例提供的一种终端设备的结构示意图。
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。
图1是本发明实施例提供的一种音量调节方法的流程图,本实施例可适用于终端设备播放音源时进行音量调节的情况,该方法可以由本发明实施例提供的终端设备来执行,该终端设备的音量调节装置可采用软件和/或硬件的方式实现,如图1所示,本实施例提供的具体方案如下:
步骤S101、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
终端设备可通过安装的第三方应用程序或系统自带的音视频播放软件进行音源的播放。其中,主要包括音源文件的获取、解码和输出等步骤。示例性的,获取到的音源文件可以是通过网络接收到的组播流,还可以是终端设备本地存储的音视频文件;获取到该音源文件后将其加载到内存缓冲区中;对加载到内
存缓冲区的音源文件进行解码,在解码开始之前,如果该音源文件同时包含有视频数据,需要进行音频数据和视频数据的分离,将分离后的音频数据输入至音频解码器,其中,音频解码器主要用于读取内存缓冲区中的音频数据,得到数字音频信号,并将该数字音频信号转换为模拟音频信号,终端设备的播放器件根据该模拟音频信号进行音频播放。在一个实施例中,当监听到音源播放事件被触发时,确定终端设备开始播放音源,其中,该触发事件可以是检测到的触摸屏中显示的播放按钮被按下,还可以是检测到终端设备的播放器件如喇叭开始播放声音时,确定终端设备进行音源播放。
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息。
步骤S102、依据所述音频信息确定和所述音频信息对应的音频振幅。
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息,其中,该振幅信息可有多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到对应的振幅大小。在另一实施例中,当步骤S101获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到对应的振幅大小。
在一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次振幅,或者实时的,对音频信息的每一帧的振幅进行确定。具体的,所述获取所述音源的音频信息包括:获取所述音源的音频帧信息;相应的,依据所述音频信息确定所述音源的振幅包括:依据所述音频帧信息确定所述音源每一帧的振幅。示例性的,当检测到音源播放时,对音源文件进行解析得到音频帧序列,根据音频帧序列的每一帧确定对应的振幅。
步骤S103、依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
在一个实施例中,可根据确定的音频振幅的大小确定对应的不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。在对音频振幅进行调节的过程中,可通过对包含音频信息的音源文件进行解析,对得到的音频数据中的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件并被播放时音频振幅相应的已被修改;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到振幅数据,将该振幅数据乘以对应的调节系数以改变振幅大小,进而对音源的音量进行调节。由此,实现了不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,调节过程可以在音源文件未进入缓冲区前,以减少播放负载,也可以是针对缓冲区中的音源内容进行调节以提高调节效率。
具体的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数,示例性的,该第一振幅调整系数可以是1,第二振幅调整系数可以是2,第三振幅调整系数可以是1.5,第一振幅阈值可以是-3db,第二振幅阈值可以是-10db,第三振幅阈值可以是-50db,相应的,给出对应关系可以如下表所示:
表1
振幅 | 调节系数 |
大于-3db或小于-50db | 1 |
小于-10db大于-50db | 2 |
小于-3db大于-10db | 1.5 |
如表1所示,当音频振幅大于-3db或小于-50db时,不对其增益进行调节;当振幅小于-3db大于-10db时,振幅为高振幅区,为其分配增益系数为1.5,当振幅小于-10db大于-50db时,为中振幅区,为其分配振幅系数为2以显著提高该部分振幅的振幅大小。由上述内容可知,当检测到终端设备播放音源时,对
音频振幅进行自动调节,以得到合适的输出音量,使得用户的听感更加,提高了音量调节效率。
在一个可能的实施例中,可根据音频信息中的最大振幅和平均振幅确定振幅调整系数,在根据振幅调整系数对音频振幅进行调整。示例性的,如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅和所述平均振幅确定振幅调节系数。示例性的,当最大振幅和平均振幅差值较大时(如0.2db),未避免播放到较大振幅的音源时音量较大,对较高的振幅进行调节以的降低音量。可选的,若最大振幅和平均振幅之差不满足预设条件,即相差不大,则不对音源的振幅进行调节。
在一个可能的实施例中,还可以预先根据音频振幅以及终端设备当前的音量确定振幅调整系数,再依据该振幅调整系数对音频振幅进行调整,示例性的,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值。具体的对应关系如下表所示:
表2
振幅 | 音量值(等级) | 调节系数 |
大于-3db | 5 | 0.5 |
小于-3db大于-10db | 15 | 0.8 |
小于-20db | 18 | 2 |
如表2所示,当音频振幅大于-3db且当前终端设备音量值较低时,相应的设置调节系数为0.5将音频振幅较高部分降低;当音频振幅小于-3db大于-10db,且当前终端设备音量值适中时,相应的设置调节系数为0.8对位于中振幅区域的音频振幅进行微调;当音频振幅小于-20db且当前终端设备音量值较高时,相应的将音频振幅较低部分进行增大。
图2是本发明实施例提供的另一种音量调节方法的流程图,可选的,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定所述音频信息中满足预设频率的音频振幅;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:为所述满足预设频率的音频振幅分配第一振幅调整系数。如图2所示,技术方案具体如下:
步骤S201、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S202、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S203、确定所述音频信息中满足预设频率的音频振幅,为所述满足预设频率的音频振幅分配第一振幅调整系数。
其中,该第一振幅调整系数可以是1,即不对音频振幅的大小进行调节。示例性的,该预设频率可以是300hz,即当检测到音频信息中存在固定频率300hz的振幅,则将其作为噪音,不对其进行振幅调整,以避免将噪音同步放大的问题,同时,也进一步提高了音量调节效率。
图3是本发明实施例提供的另一种音量调节方法的流程图,可选的,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数。如图3所示,具体包括:
步骤S301、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S302、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S303、通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息。
在一个实施例中,可通过终端设备的指纹模组对当前用户进行识别,进而依据存储的用户身份属性,如职业、年龄、性别等确定对应的第一振幅调整信息,该第一振幅调整信息可以是一修正系数。示例性的,当确定出的用户年龄较小如小于15岁时,则对应的该第一振幅调整信息可以是0.8,即将原有确定出的振幅调整系数乘以0.8作为修正后的振幅调整系数。
步骤S304、依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
由上述可知,在对音频振幅进行调整过程中参考了用户自身的属性,使得音量的调节更加符合用户需求,可根据不同用户适应性的进行调整。
图4是本发明实施例提供的另一种音量调节方法的流程图,可选的,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系数。如图4所示,
具体包括:
步骤S401、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S402、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S403、确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息。
在一个实施例中,可通过功放芯片检测终端设备中安装的播放器件(如:扬声器)的阻抗值,还可以是通过物理方式检测播放器件的阻抗。该第二振幅调整信息可以为一修正系数。
步骤S404、依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
示例性的,假设播放器件的标称阻抗值为x,通过检测得到的阻抗值为1.2x,则相应的第二振幅调整信息可以是1.2,即在为音频振幅分配不同的振幅调整系数时,将分配的振幅调整系数均乘以1.2以作为调整后的振幅调整系数。
由上述可知,在对音源的振幅进行调节过程中,引入播放器件的阻抗值作为确定振幅调节系数的参量之一,避免了播放器件随播放时长的增加阻抗值越来越高进而对正常播放过程中的音量大小产生影响的问题,使得调节后的音量大小更佳符合用户需求,进一步提高了音量调节效果。
图5是本发明实施例提供的另一种音量调节方法的流程图,可选的,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第三振幅调整信息确定对应的振幅调整系数。如图5所示,具体包括:
步骤S501、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S502、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S503、确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息。
在一个实施例中,可通过终端设备安装的麦克风采集当前所处环境的噪音以确定对应的噪声值。该第三振幅调整信息可以为一修正系数。
步骤S504、依据所述音频振幅的大小、所述第三振幅调整信息确定对应的
振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
示例性的,假设终端设备在安静环境下的噪声值为y,终端设备处于户外或嘈杂环境中时,确定的噪声值为1.5y,则相应的第三振幅调整信息可以是1.5,即在为音频振幅分配不同的振幅调整系数时,将分配的振幅调整系数均乘以1.5以作为调整后的振幅调整系数。
由上论述可知,在对音频振幅进行调节过程中,考虑了噪声对终端设备音量的影响,将确定的噪声值作为确定振幅调节系数的参量之一,使得调节后的音量大小更佳符合用户需求,进一步提高了音量调节效果。
图6是本发明实施例提供的另一种音量调节方法的流程图,可选的,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定所述音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数。如图6所示,具体包括:
步骤S601、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S602、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S603、确定所述音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息。
示例性的,音源的类型可以是音乐类型,如播放的歌曲文件,或者音视频文件中的插曲,或者音视频文件播放中夹带的音乐;还可以是对话类型,如播放的电影中人物之间的对话;还可以是噪音类型如通话过程中的噪声,或者影视片中的嘈杂声。在一个实施例中,可通过分析音源的属性信息确定对应的音源类型,还可以通过分析音频振幅确定音源的类型,举例而言,当音频振幅的曲线波形呈无规则分布时,可确定其为噪声类型。同前所述,该第四振幅调整信息可为一修正系数,当判断出音源类型为音乐类型是,可相应的在分配的原有振幅调整系数的基础上乘以1.2以作为修正后的振幅调整系数。
步骤S604、依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
由上述可知,在对音频振幅进行调整的过程中,引入了音源类型作为调整修正参量,使得音频振幅的调整更加合理。
图7是本发明实施例提供的另一种音量调节方法的流程图,可选的,在依据所述振幅调整系数对音频振幅进行调整之后,还包括:依据所述振幅调整系数确定对应的音量调节信息;依据所述音量调节信息对终端设备当前的音量进行调节。如图7所示,具体包括:
步骤S701、当检测到终端设备进行音源播放时,获取所述音源的音频信息。
步骤S702、依据所述音频信息确定和所述音频信息对应的音频振幅。
步骤S703、依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
步骤S704、依据所述振幅调整系数确定对应的音量调节信息,依据所述音量调节信息对终端设备当前的音量进行调节。
在一个实施例中,根据振幅调节系数确定对应的音量调节信息。示例性的,当振幅调节系数大于1时,则确定对应的音量增大信息,当振幅调节系数小于1时,则确定对应的音量减小信息。具体的,在一个实施例中,该音量增大或音量减小的信息为对应的目标音量值。示例性的,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值,该音量减小信息对应的目标音量值可以是3或4,该音量增大信息对应的目标音量值可以是14或15,当确定出的音源振幅偏小时,则相应的将音量值增大至14或15,当确定出的音源振幅偏大时,则相应的将音量值减小至3或4。在另一实施例中,该音量增大或音量减小的信息为对应的音量改变值。示例性的,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值,该音量增大信息和音量减小信息对应的音量改变值为3,例如,当前终端设备的音量值为10,当需要增大音量信息时,则在当前音量值的基础上增加3即采用第13级音量进行声音播放,当需要减小音量信息时,则在当前音量值的基础上减小3即采用第7级音量进行声音播放。可选的,在对终端设备的音量进行调节之前,还包括:确定该音源的播放时间,当播放时间大于预设时间时,如30s则采用依据所述音量增大信息或音量减小信息中的音量改变值对所述终端设备当前的音量值进行调节的方式,由此进一步提高了音量调节效率,降低了终端设备的能耗。
由此,在对音源的振幅进行调节的基础上,适应性的对终端设备的播放音量进行调节,进一步增强了调节效果,使得音源播放过程中的音量更佳适中,符合用户需求。
图8是本发明实施例提供的一种音量调节装置的结构框图,该装置用于执行上述实施例提供的音量调节方法,具备执行方法相应的功能模块和有益效果。如图8所示,该装置具体包括:获取模块101、振幅确定模块102、调整系数确定模块103和调整模块104。
其中,获取模块101,用于当检测到终端设备进行音源播放时,获取所述音源的音频信息。
终端设备可通过安装的第三方应用程序或系统自带的音视频播放软件进行音源的播放。其中,主要包括音源文件的获取、解码和输出等步骤。示例性的,获取到的音源文件可以是通过网络接收到的组播流,还可以是终端设备本地存储的音视频文件;获取到该音源文件后将其加载到内存缓冲区中;对加载到内存缓冲区的音源文件进行解码,在解码开始之前,如果该音源文件同时包含有视频数据,需要进行音频数据和视频数据的分离,将分离后的音频数据输入至音频解码器,其中,音频解码器主要用于读取内存缓冲区中的音频数据,得到数字音频信号,并将该数字音频信号转换为模拟音频信号,终端设备的播放器件根据该模拟音频信号进行音频播放。在一个实施例中,当监听到音源播放事件被触发时,确定终端设备开始播放音源,其中,该触发事件可以是检测到的触摸屏中显示的播放按钮被按下,还可以是检测到终端设备的播放器件如喇叭开始播放声音时,确定终端设备进行音源播放。
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息。
振幅确定模块102,用于依据所述音频信息确定和所述音频信息对应的音频振幅。
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息,其中,该振幅信息可有多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设
时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到对应的振幅大小。在另一实施例中,当步骤S101获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到对应的振幅大小。
在一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次振幅,或者实时的,对音频信息的每一帧的振幅进行确定。具体的,所述获取所述音源的音频信息包括:获取所述音源的音频帧信息;相应的,依据所述音频信息确定所述音源的振幅包括:依据所述音频帧信息确定所述音源每一帧的振幅。示例性的,当检测到音源播放时,对音源文件进行解析得到音频帧序列,根据音频帧序列的每一帧确定对应的振幅。
调整系数确定模块103,用于依据所述音频振幅的大小分配不同的振幅调整系数。
在一个实施例中,可根据确定的音频振幅的大小确定对应的不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。在对音频振幅进行调节的过程中,可通过对包含音频信息的音源文件进行解析,对得到的音频数据中的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件并被播放时音频振幅相应的已被修改;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到振幅数据,将该振幅数据乘以对应的调节系数以改变振幅大小,进而对音源的音量进行调节。由此,实现了不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,调节过程可以在音源文件未进入缓冲区前,以减少播放负载,也可以是针对缓冲区中的音源内容进行调节以提高调节效率。
调整模块104,用于依据所述振幅调整系数对所述音频振幅进行调整。
本实施例提供的技术方案,当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定和所述音频信息对应的音频振幅;依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。本方案提高了音量调节效率,降低了终端设备的功耗。
在一个可能的实施例中,所述调整系数确定模块103具体用于:
为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系
数,为小于或等于第一预设阈值大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数。
在一个可能的实施例中,所述振幅确定模块102还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定所述音频信息中满足预设频率的音频振幅;
所述调整系数确定模块103具体用于:
为所述满足预设频率的音频振幅分配第一振幅调整系数。
在一个可能的实施例中,所述调整模块104还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息;
所述调整系数确定模块103具体用于:
依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,所述调整模块104还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息;
所述调整系数确定模块103具体用于:
依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,所述调整模块104还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息;
所述调整系数确定模块103具体用于:
依据所述音频振幅的大小、所述第三振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,所述调整模块104还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定所述
音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息;
所述调整系数确定模块103具体用于:
依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,所述调整模块104还用于:
在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,依据终端设备的当前音量大小动态调整第二预设阈值和第三预设阈值的大小。
在一个可能的实施例中,所述调整模块104还用于:
在依据所述振幅调整系数对所述音频振幅进行调整之后,依据所述振幅调整系数确定对应的音量调节信息;
依据所述音量调节信息对终端设备当前的音量进行调节。
本实施例在上述各实施例的基础上提供了一种终端设备,该终端设备可以包括本发明提供的音量调节装置。图9是本发明实施例提供的另一种终端设备的结构示意图,如图9所示,该终端设备200包括:存储器201、处理器(Central Processing Unit,CPU)202、外设接口203、RF(Radio Frequency,射频)电路205、音频电路206、扬声器211、电源管理芯片208、输入/输出(I/O)子系统209、触摸屏212、其他输入/控制设备210以及外部端口204,这些部件通过一个或多个通信总线或信号线207来通信。
应该理解的是,图示终端设备200仅仅是终端设备的一个范例,并且终端设备200可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面就本实施例提供的用于多开应用的权限管理的终端设备进行详细的描述,该终端设备以智能手机为例。
存储器201,所述存储器201可以被CPU202、外设接口203等访问,所述存储器201可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口203,所述外设接口203可以将设备的输入和输出外设连接到CPU202和存储器201。
I/O子系统209,所述I/O子系统209可以将设备上的输入输出外设,例如触摸屏212和其他输入/控制设备210,连接到外设接口203。I/O子系统209可以包括显示控制器2091和用于控制其他输入/控制设备210的一个或多个输入控制器2092。其中,一个或多个输入控制器2092从其他输入/控制设备210接收电信号或者向其他输入/控制设备210发送电信号,其他输入/控制设备210可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器2092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
触摸屏212,所述触摸屏212是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。
I/O子系统209中的显示控制器2091从触摸屏212接收电信号或者向触摸屏212发送电信号。触摸屏212检测触摸屏上的接触,显示控制器2091将检测到的接触转换为与显示在触摸屏212上的用户界面对象的交互,即实现人机交互,显示在触摸屏212上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路205,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路205接收并发送RF信号,RF信号也称为电磁信号,RF电路205将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路205可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。
音频电路206,主要用于从外设接口203接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器211。
扬声器211,用于将手机通过RF电路205从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片208,用于为CPU202、I/O子系统及外设接口所连接的硬件进行供电及电源管理。
上述实施例中提供的终端设备的音量调节装置及终端设备可执行本发明任意实施例所提供的终端设备的音量调节方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的终端设备的音量调节方法。
本发明实施例还提供一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行一种音量调节方法,该方法包括:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;
依据所述音频信息确定和所述音频信息对应的音频振幅;
依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
在一个可能的实施例中,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
确定所述音频信息中满足预设频率的音频振幅;
相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
为所述满足预设频率的音频振幅分配第一振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息;
相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息;
相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息;
相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
依据所述音频振幅的大小、所述第三振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
确定所述音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息;
相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:
依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数。
在一个可能的实施例中,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:
依据终端设备的当前音量大小动态调整第二预设阈值和第三预设阈值的大小。
在一个可能的实施例中,在依据所述振幅调整系数对音频振幅进行调整之后,还包括:
依据所述振幅调整系数确定对应的音量调节信息;
依据所述音量调节信息对终端设备当前的音量进行调节。
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”
旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的音量调节方法操作,还可以执行本发明任意实施例所提供的音量调节方法中的相关操作。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。
Claims (20)
- 一种音量调节方法,其特征在于,包括:当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定和所述音频信息对应的音频振幅;依据所述音频振幅的大小分配不同的振幅调整系数,依据所述振幅调整系数对所述音频振幅进行调整。
- 根据权利要求1所述的方法,其特征在于,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数。
- 根据权利要求2所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定所述音频信息中满足预设频率的音频振幅;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:为所述满足预设频率的音频振幅分配第一振幅调整系数。
- 根据权利要求1所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数。
- 根据权利要求1所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系 数。
- 根据权利要求1所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第三振幅调整信息确定对应的振幅调整系数。
- 根据权利要求1所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:确定所述音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息;相应的,所述依据所述音频振幅的大小分配不同的振幅调整系数包括:依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数。
- 根据权利要求2-7中任一项所述的方法,其特征在于,在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,还包括:依据终端设备的当前音量大小动态调整第二预设阈值和第三预设阈值的大小。
- 根据权利要求8所述的方法,其特征在于,在依据所述振幅调整系数对音频振幅进行调整之后,还包括:依据所述振幅调整系数确定对应的音量调节信息;依据所述音量调节信息对终端设备当前的音量进行调节。
- 一种音量调节装置,其特征在于,包括:获取模块,用于当检测到终端设备进行音源播放时,获取所述音源的音频信息;振幅确定模块,用于依据所述音频信息确定和所述音频信息对应的音频振幅;调整系数确定模块,用于依据所述音频振幅的大小分配不同的振幅调整系数;调整模块,用于依据所述振幅调整系数对所述音频振幅进行调整。
- 根据权利要求10所述的装置,其特征在于,所述调整系数确定模块具体用于:为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数。
- 根据权利要求11所述的装置,其特征在于,所述振幅确定模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定所述音频信息中满足预设频率的音频振幅;所述调整系数确定模块具体用于:为所述满足预设频率的音频振幅分配第一振幅调整系数。
- 根据权利要求10所述的装置,其特征在于,所述调整模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,通过身份验证识别信息确定当前终端设备使用者的身份属性,依据所述身份属性确定对应的第一振幅调整信息;所述调整系数确定模块具体用于:依据所述音频振幅的大小、所述第一振幅调整信息确定对应的振幅调整系数。
- 根据权利要求10所述的装置,其特征在于,所述调整模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定终端设备播放器件的阻抗值,依据所述阻抗值确定对应的第二振幅调整信息;所述调整系数确定模块具体用于:依据所述音频振幅的大小、所述第二振幅调整信息确定对应的振幅调整系数。
- 根据权利要求10所述的装置,其特征在于,所述调整模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定终端设备当前所处环境的噪声值,依据所述噪声值确定对应的第三振幅调整信息;所述调整系数确定模块具体用于:依据所述音频振幅的大小、所述第三振幅调整信息确定对应的振幅调整系数。
- 根据权利要求10所述的装置,其特征在于,所述调整模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,确定所述音源的音源类型,依据所述音源类型确定对应的第四振幅调整信息;所述调整系数确定模块具体用于:依据所述音频振幅的大小、所述第四振幅调整信息确定对应的振幅调整系数。
- 根据权利要求11-16中任一项所述的装置,其特征在于,所述调整模块还用于:在所述依据所述音频振幅的大小分配不同的振幅调整系数之前,依据终端设备的当前音量大小动态调整第二预设阈值和第三预设阈值的大小。
- 根据权利要求17所述的装置,其特征在于,所述调整模块还用于:在依据所述振幅调整系数对所述音频振幅进行调整之后,依据所述振幅调整系数确定对应的音量调节信息;依据所述音量调节信息对终端设备当前的音量进行调节。
- 一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-9中任一项所述的音量调节方法。
- 一种包含终端设备可执行指令的存储介质,其特征在于,所述终端设备可执行指令在由终端设备处理器执行时用于执行如权利要求1-9中任一项所述的音量调节方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP17921919.1A EP3671430A4 (en) | 2017-08-18 | 2017-08-18 | METHOD AND DEVICE FOR VOLUME ADJUSTMENT, TERMINAL DEVICE AND STORAGE MEDIUM |
US16/639,121 US11039246B2 (en) | 2017-08-18 | 2017-08-18 | Volume adjusting method, device, and terminal device |
CN201780092562.5A CN110799936B (zh) | 2017-08-18 | 2017-08-18 | 音量调节方法、装置、终端设备及存储介质 |
PCT/CN2017/098176 WO2019033440A1 (zh) | 2017-08-18 | 2017-08-18 | 音量调节方法、装置、终端设备及存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/098176 WO2019033440A1 (zh) | 2017-08-18 | 2017-08-18 | 音量调节方法、装置、终端设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019033440A1 true WO2019033440A1 (zh) | 2019-02-21 |
Family
ID=65362758
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/098176 WO2019033440A1 (zh) | 2017-08-18 | 2017-08-18 | 音量调节方法、装置、终端设备及存储介质 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11039246B2 (zh) |
EP (1) | EP3671430A4 (zh) |
CN (1) | CN110799936B (zh) |
WO (1) | WO2019033440A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113163298A (zh) * | 2020-01-07 | 2021-07-23 | 深圳市三诺数字科技有限公司 | 一种耳机音频均衡器的调节方法及装置 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111787268B (zh) * | 2020-07-01 | 2022-04-22 | 广州视源电子科技股份有限公司 | 音频信号的处理方法、装置、电子设备及存储介质 |
CN112306451A (zh) * | 2020-10-30 | 2021-02-02 | 西安万像电子科技有限公司 | 一种音量调整方法、装置及系统 |
CN113659950B (zh) * | 2021-08-13 | 2024-03-22 | 深圳市百匠科技有限公司 | 一种高保真多用途音响控制方法、系统、装置及存储介质 |
CN116456022B (zh) * | 2023-04-19 | 2024-02-23 | 东莞恒泰数字技术有限公司 | 基于物联网的设备控制方法、装置、设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1610451A (zh) * | 2003-10-20 | 2005-04-27 | 乐金电子(惠州)有限公司 | 多通道音频的输出振幅调节装置 |
CN102610232A (zh) * | 2012-01-10 | 2012-07-25 | 天津大学 | 一种自适应音频感知响度调整方法 |
CN104105031A (zh) * | 2014-06-27 | 2014-10-15 | 中科创达软件股份有限公司 | 一种音量调节方法及装置 |
CN106161781A (zh) * | 2016-06-22 | 2016-11-23 | 北京小米移动软件有限公司 | 音量调整方法及装置 |
Family Cites Families (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AUPQ439299A0 (en) * | 1999-12-01 | 1999-12-23 | Silverbrook Research Pty Ltd | Interface system |
CA2581810C (en) * | 2004-10-26 | 2013-12-17 | Dolby Laboratories Licensing Corporation | Calculating and adjusting the perceived loudness and/or the perceived spectral balance of an audio signal |
CN101026363B (zh) | 2006-02-18 | 2010-12-08 | 鸿富锦精密工业(深圳)有限公司 | 保护听力的系统、方法及声音输出装置 |
CN102007777B (zh) * | 2008-04-09 | 2014-08-20 | 皇家飞利浦电子股份有限公司 | 用于声音换能器的驱动信号的生成 |
US20090323985A1 (en) * | 2008-06-30 | 2009-12-31 | Qualcomm Incorporated | System and method of controlling power consumption in response to volume control |
JP5295238B2 (ja) * | 2008-07-11 | 2013-09-18 | クラリオン株式会社 | 音響処理装置 |
JP2010187363A (ja) | 2009-01-16 | 2010-08-26 | Sanyo Electric Co Ltd | 音響信号処理装置及び再生装置 |
US8457321B2 (en) * | 2010-06-10 | 2013-06-04 | Nxp B.V. | Adaptive audio output |
JP5707219B2 (ja) * | 2011-05-13 | 2015-04-22 | 富士通テン株式会社 | 音響制御装置 |
US8939669B2 (en) * | 2011-09-13 | 2015-01-27 | Young Living Essential Oils, Lc | Roller-ball applicator assembly for topical oils application |
US9276543B2 (en) * | 2012-06-26 | 2016-03-01 | Nook Digital, Llc | Enhanced audio component in streamed media |
US9685921B2 (en) * | 2012-07-12 | 2017-06-20 | Dts, Inc. | Loudness control with noise detection and loudness drop detection |
CN103684303B (zh) * | 2012-09-12 | 2018-09-04 | 腾讯科技(深圳)有限公司 | 一种音量控制方法、装置及终端 |
JP6105929B2 (ja) * | 2012-12-27 | 2017-03-29 | キヤノン株式会社 | 音声処理装置及びその制御方法 |
TWI529667B (zh) * | 2013-05-13 | 2016-04-11 | Multi - computer vision recognition system for cross - traffic obstacle | |
JP6168451B2 (ja) * | 2013-07-11 | 2017-07-26 | パナソニックIpマネジメント株式会社 | 音量調整装置、音量調整方法及び音量調整システム |
GB2534949B (en) * | 2015-02-02 | 2017-05-10 | Cirrus Logic Int Semiconductor Ltd | Loudspeaker protection |
JP6456249B2 (ja) * | 2015-06-02 | 2019-01-23 | アルパイン株式会社 | オーディオ装置、電流制御プログラムおよび電流制御方法 |
CN106504765B (zh) * | 2016-10-20 | 2019-08-13 | 广州视源电子科技股份有限公司 | 一种音频信号的自动增益控制方法和装置 |
-
2017
- 2017-08-18 EP EP17921919.1A patent/EP3671430A4/en active Pending
- 2017-08-18 WO PCT/CN2017/098176 patent/WO2019033440A1/zh unknown
- 2017-08-18 US US16/639,121 patent/US11039246B2/en active Active
- 2017-08-18 CN CN201780092562.5A patent/CN110799936B/zh active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1610451A (zh) * | 2003-10-20 | 2005-04-27 | 乐金电子(惠州)有限公司 | 多通道音频的输出振幅调节装置 |
CN102610232A (zh) * | 2012-01-10 | 2012-07-25 | 天津大学 | 一种自适应音频感知响度调整方法 |
CN104105031A (zh) * | 2014-06-27 | 2014-10-15 | 中科创达软件股份有限公司 | 一种音量调节方法及装置 |
CN106161781A (zh) * | 2016-06-22 | 2016-11-23 | 北京小米移动软件有限公司 | 音量调整方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3671430A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113163298A (zh) * | 2020-01-07 | 2021-07-23 | 深圳市三诺数字科技有限公司 | 一种耳机音频均衡器的调节方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN110799936A (zh) | 2020-02-14 |
US11039246B2 (en) | 2021-06-15 |
EP3671430A1 (en) | 2020-06-24 |
EP3671430A4 (en) | 2020-08-26 |
CN110799936B (zh) | 2024-05-03 |
US20200213732A1 (en) | 2020-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11251763B2 (en) | Audio signal adjustment method, storage medium, and terminal | |
US11201598B2 (en) | Volume adjusting method and mobile terminal | |
US10440464B2 (en) | Method and apparatus for adjusting volume, terminal device and storage medium | |
CN110799936B (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN107465824B (zh) | 音量调节方法、装置、移动终端及存储介质 | |
CN107526570B (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN107566618B (zh) | 音量调节方法、装置、终端设备及存储介质 | |
US10027299B2 (en) | Volume control | |
WO2019033942A1 (zh) | 音量调节方法、装置、终端设备及存储介质 | |
WO2019033941A1 (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN107483734B (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN107506168B (zh) | 音量调节方法、装置、终端设备及存储介质 | |
WO2019033939A1 (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN110753919B (zh) | 音量调节方法、装置、存储介质及移动终端 | |
CN107506170A (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN107506169A (zh) | 音量调节方法、装置、终端设备及存储介质 | |
CN114520949A (zh) | 音量控制方法、装置、设备及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17921919 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2017921919 Country of ref document: EP Effective date: 20200316 |