WO2019033943A1 - Volume adjusting method and device, mobile terminal and storage medium - Google Patents

Volume adjusting method and device, mobile terminal and storage medium Download PDF

Info

Publication number
WO2019033943A1
WO2019033943A1 PCT/CN2018/098656 CN2018098656W WO2019033943A1 WO 2019033943 A1 WO2019033943 A1 WO 2019033943A1 CN 2018098656 W CN2018098656 W CN 2018098656W WO 2019033943 A1 WO2019033943 A1 WO 2019033943A1
Authority
WO
WIPO (PCT)
Prior art keywords
amplitude
audio
information
adjustment coefficient
amplitude adjustment
Prior art date
Application number
PCT/CN2018/098656
Other languages
French (fr)
Chinese (zh)
Inventor
严锋贵
许钊铵
郑志勇
甘高亭
杨海
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019033943A1 publication Critical patent/WO2019033943A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M19/00Current supply arrangements for telephone systems
    • H04M19/02Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone
    • H04M19/04Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone the ringing-current being generated at the substations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • Embodiments of the present disclosure relate to the field of computer technologies, for example, to a volume adjustment method, apparatus, mobile terminal, and storage medium.
  • the disclosure 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.
  • Embodiments of the present disclosure provide a volume adjustment method, including:
  • the embodiment of the present disclosure further provides a volume adjustment apparatus, including:
  • An amplitude determining module configured to determine an audio amplitude corresponding to the audio information according to the audio information
  • An adjustment information determining module configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information
  • the adjustment module is configured to adjust the audio amplitude according to the amplitude adjustment coefficient and the noise reduction information.
  • An embodiment of the present disclosure further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement an embodiment of the present disclosure The volume adjustment method described.
  • Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method according to an embodiment of the present disclosure when executed by a terminal device processor.
  • the technical solution provided by the embodiment of the present disclosure improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
  • FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 6 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 7 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 8 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • FIG. 9 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure. This embodiment can be applied to the case where the volume is adjusted when the terminal device plays the sound source.
  • the method can be implemented by the terminal device provided by the embodiment, and the volume adjustment device of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1, the volume adjustment method provided in this embodiment includes the following steps.
  • Step 101 Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
  • 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.
  • the playing of the sound source 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.
  • the sound source file is loaded into a memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder.
  • the audio decoder 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 the audio signal according to the analog audio signal. Audio Player.
  • the sound source playing event it is determined that the terminal device starts to play the sound source.
  • the trigger event may be that the play button displayed in the touch screen is detected to be pressed, or may be detected.
  • the playback device such as the speaker of the terminal device starts playing the sound, it is determined that the terminal device performs the 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 sound source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
  • Step 102 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.
  • the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values.
  • the audio information of the audio source can be obtained by using the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the amplitude of the audio amplitude corresponding to the audio information.
  • the amplitude of the audio amplitude corresponding to the audio information may be obtained by parsing the original file.
  • the amplitude is determined once every predetermined time (eg, 1 second (s), 3 s, or 10 s), or the amplitude of each frame of the audio information of the audio information is determined in real time.
  • the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; determining an audio amplitude corresponding to the audio information according to the audio information, including: according to the audio frame information Determining an audio amplitude of each frame of the audio information.
  • the sound source file is parsed to obtain an audio frame sequence, and the amplitude corresponding to each frame is determined according to each frame of the audio frame sequence.
  • Step 103 Determine an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information, and adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
  • the noise reduction information may be inverted output information of the noise information determined from the audio amplitude.
  • the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is larger, the amplitude of the reverse output in the noise reduction information is correspondingly increased, and the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is relatively larger. In hours, the amplitude of the reverse output in the noise reduction information is also reduced accordingly.
  • the noise reduction information interval is reasonably determined by analyzing the audio amplitude, thereby completing the automatic noise reduction, and no need to artificially set the noise reduction level, and at the same time, since the noise reduction information is determined for the audio amplitude of the real-time input, the noise reduction effect is better.
  • the method further includes: dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients; And adjusting the audio amplitude by the noise reduction information comprises: adjusting the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • a large amplitude adjustment coefficient is assigned to the low-amplitude audio amplitude, and a high-amplitude audio amplitude is correspondingly assigned a smaller amplitude adjustment coefficient.
  • the amplitude adjustment factor is assigned to an audio amplitude of less than -3 decibels (db) and greater than -10 db, and an amplitude adjustment factor of two is allocated to an audio amplitude of less than -10 db and greater than -50 db.
  • the amplitude adjustment coefficient of the previous audio amplitude is 1.2, and the amplitude of the adjustment to the adjacent next audio amplitude requires an amplitude adjustment coefficient of 2, the adjusted audio amplitude will be clearly heard.
  • the problem is abrupt, which is caused by the jump of the amplitude adjustment factor.
  • the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: when detecting that an amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into A preset number of sub-amplitude adjustment factors.
  • the sub-amplitude adjustment coefficients are obtained by linear or non-linear division of the amplitude adjustment coefficients.
  • the preset condition may be that the amplitude adjustment coefficients of the adjacent audio amplitudes are different, for example, the amplitude adjustment coefficient is changed from the amplitude adjustment coefficient 1 of the previous audio amplitude to the amplitude of the latter audio amplitude.
  • the adjustment coefficient 2, or the amplitude adjustment coefficient is changed from 2 to 1.2, etc., at this time, a preset number of sub-amplitude adjustment coefficients can be added between the two amplitude adjustment coefficients corresponding to the adjacent two audio amplitudes.
  • a preset number of sub-amplitude adjustment coefficients can be added between the two amplitude adjustment coefficients corresponding to the adjacent two audio amplitudes.
  • an additional 9 levels that is, 1.28, 1.36, 1.42, ..., 1.92, may be added between 1.2 and 2.
  • each n (for example, n is greater than 1 and less than or equal to 20) frame audio frames may be corresponding to one sub-amplitude adjustment coefficient, and the amplitude of each audio frame is sequentially performed. Adjustment.
  • the sub-amplitude adjustment coefficient corresponding to the 1-20th audio frame at the beginning of the change is 1.28
  • the sub-amplitude adjustment coefficient corresponding to the 21-40th frame audio frame is 1.36. ,And so on.
  • the amplitude adjustment coefficient 2 needs to be adjusted from the 101st frame. Then, if every 20 frames corresponds to the first-level sub-amplitude adjustment coefficient, 180 frames from the beginning of 101 frames, that is, to the 280th frame, the audio frame is completed with the sub-amplitude adjustment coefficient to adjust the transition period of the audio frame, and the amplitude adjustment coefficient 2 can be adjusted from the 281-frame audio frame to avoid obvious hearing acuity. problem.
  • the process of adjusting the audio amplitude may be: parsing the audio file, modifying the data representing the amplitude information in the obtained audio data, and then performing the encapsulation after the modification, when buffering to the corresponding audio source.
  • the audio amplitude corresponding to the file and the sound source file is correspondingly increased; or, in the decoding process of the sound source playing, the audio amplitude is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding amplitude. Adjust the coefficient to change the amplitude and adjust the volume of the source.
  • 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 sound source content is adjusted to improve the adjustment efficiency, thereby improving the volume adjustment efficiency, reducing the power consumption of the terminal device, and adjusting the audio amplitude by using the noise reduction information to achieve automatic noise reduction, without artificially setting the noise reduction level, and simultaneously Since the noise reduction information is determined for the audio amplitude of the real-time input, the noise reduction effect is better.
  • FIG. 2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the volume adjustment method provided in this embodiment includes the following steps.
  • Step 110 Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
  • Step 120 Determine, according to the audio information, a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information.
  • the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information including:
  • the average amplitude between the at least two audio amplitudes is determined as the audio amplitude corresponding to the audio information for each of the preset time periods.
  • every 10s is a preset time period
  • the digital audio signal decoded by the audio decoder can be sampled 5 times in the first 10s to obtain 5 audio amplitudes, and the average between 5 audio amplitudes is calculated.
  • the amplitude, the average amplitude is taken as the first 10s corresponding audio amplitude
  • the digital audio signal decoded by the audio decoder is sampled 5 times in the second 10s to obtain 5 audio amplitudes, and 5 audio amplitudes are calculated.
  • the average amplitude between the two is used as the audio amplitude corresponding to the second 10s, thereby obtaining a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods.
  • the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information including:
  • the audio amplitude is determined once according to the audio information every predetermined period of time.
  • every 10 s is a preset time period
  • the digital audio signal decoded by the audio decoder can be sampled once every 10 s to obtain an audio amplitude, and the sampled audio amplitude is used as the audio corresponding to the audio information of the previous 10 s. amplitude.
  • the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information including:
  • each frame of the audio information corresponds to a preset time period, for example, each 26s is a preset time period, and the audio amplitude corresponding to each frame of the audio information may be determined according to the audio information. Thereby, a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods are respectively obtained.
  • Step 130 Determine an amplitude adjustment coefficient and noise reduction information corresponding to each audio amplitude.
  • the determining a plurality of amplitude adjustment coefficients corresponding to the plurality of audio amplitudes one by one includes: determining, according to an amplitude magnitude of the plurality of audio amplitudes, one-to-one correspondence with the plurality of audio amplitudes Multiple amplitude adjustment factors.
  • the plurality of audio amplitudes include an audio amplitude A, an audio amplitude B, and an audio amplitude C, and an amplitude adjustment coefficient 1 is allocated for an audio amplitude having an amplitude greater than -3 db or less than -50 db, which is an amplitude smaller than -10 db and greater than -50 db.
  • the audio amplitude distribution amplitude adjustment coefficient 2 is an amplitude adjustment coefficient of 1.5 for an amplitude of an amplitude smaller than -3 db and greater than -10 db.
  • the amplitude adjustment coefficient corresponding to the audio amplitude A is 1, if the audio When the amplitude B is smaller than -10 db and larger than -50 db, the amplitude adjustment coefficient corresponding to the audio amplitude B is 2.
  • Step 140 When the first amplitude adjustment coefficient corresponding to the first audio amplitude and the second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different, the first amplitude adjustment coefficient and the second amplitude adjustment coefficient A preset number of sub-amplitude adjustment coefficients are added between them.
  • the preset number of sub-amplitude adjustment coefficients are sequentially incremented or sequentially decremented between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient.
  • the preset number of sub-amplitude adjustment coefficients are obtained by equally spaced between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient.
  • the method further includes: adjusting the amplitude adjustment coefficient according to at least one of the following information: an impedance value of the playback device of the terminal device The noise value of the environment in which the terminal device is located.
  • the first amplitude adjustment coefficient and the second amplitude adjustment coefficient are Adding a preset number of sub-amplitude adjustment coefficients, including: an adjusted first amplitude adjustment coefficient corresponding to the first audio amplitude and an adjusted second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude
  • a preset number of sub-amplitude adjustment coefficients are added between the adjusted first amplitude adjustment coefficient and the adjusted second amplitude adjustment coefficient.
  • Step 150 Adjust a preset number of audio frames starting from a start frame in the audio information according to the preset number of sub-amplitude adjustment coefficients and noise reduction information corresponding to the second audio amplitude.
  • the start frame is a first audio frame when the amplitude adjustment coefficient is changed from the first amplitude adjustment coefficient to the second amplitude adjustment coefficient.
  • the preset number of audio frames includes: a first group of audio frames to an Mth group of audio frames; and the preset number of sub-amplitude adjustment coefficients includes: a first sub-increment or decrement An amplitude adjustment coefficient to a Nth sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N; the predetermined number of sub-amplitude adjustment coefficients and the first
  • the noise reduction information corresponding to the two audio amplitudes adjusts a preset number of audio frames from the start frame in the audio information, including: using the first sub-amplitude adjustment coefficient and the second audio amplitude corresponding to The noise reduction information adjusts the first set of audio frames, and adjusts the second set of audio frames using the second sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude until the Nth sub-amplitude is used
  • the adjustment coefficient and the noise reduction information corresponding to the second audio amplitude adjust the Nth group of audio frames.
  • step 120 the audio amplitude A corresponding to the audio information of the preset time period a, the audio amplitude B corresponding to the audio information of the preset time period b, and the audio amplitude C corresponding to the audio information of the preset time period c are obtained.
  • step 130 it is determined that the amplitude adjustment coefficient corresponding to the audio amplitude A is i and the noise reduction information is R, the amplitude adjustment coefficient corresponding to the audio amplitude B is j and the noise reduction information is S, and the amplitude adjustment coefficient corresponding to the audio amplitude B is k and the noise reduction information is T, first adjusting the audio amplitude of the audio frame from the first frame audio frame in the audio information using the amplitude adjustment coefficient i and the noise reduction information R until the preset time period b is reached At the beginning time, for example, the amplitude adjustment coefficient i and the noise reduction information R are used to adjust the 1-100th frame audio frame.
  • the amplitude adjustment coefficient j corresponding to the audio amplitude B is the same as the amplitude adjustment coefficient i corresponding to the audio amplitude A. Then continue to use the amplitude adjustment coefficient i (ie, the amplitude adjustment coefficient j), and use the noise reduction information S to adjust the audio amplitude of the audio frame from the 101st frame audio frame until the preset time period c is reached. For example, the amplitude adjustment coefficient i and the noise reduction information S are used to adjust the 101st to 300th frame audio frames.
  • each 10 frames of audio frames corresponds to a sub-amplitude adjustment coefficient, and the sub-amplitude adjustment coefficient k1 and the noise reduction information T are used to adjust the 301-310 frame audio frame, and the amplitude adjustment coefficient k2 and the noise reduction information T are used.
  • the 311-320-frame audio frame is adjusted until the 391-400-frame audio frame is adjusted using the amplitude adjustment coefficient k10 and the noise reduction information T, and then the amplitude adjustment coefficient k and the noise reduction information are used from the 401-frame audio frame. T is adjusted.
  • the volume of the sound source is adjusted without changing the original volume of the terminal device system, thereby improving the efficiency of the volume adjustment, reducing the power consumption of the terminal device, and using the sub-amplitude adjustment coefficient to the preset number.
  • the audio frame is adjusted to avoid the sudden hearing problem caused by the jump of the amplitude adjustment coefficient and improve the user experience.
  • FIG. 3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to an amplitude magnitude of the audio amplitude.
  • the volume adjustment method provided in this embodiment includes the following steps.
  • Step 310 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
  • Step 320 Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 330 Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the amplitude of the audio amplitude.
  • the average amplitude of the audio amplitude of the preset length may be determined by acquiring an audio amplitude of a preset length, and then determining an amplitude adjustment coefficient corresponding to the audio amplitude of the preset length according to the average amplitude.
  • the amplitude adjustment coefficient corresponding to the average amplitude may be determined by a pre-stored mapping table, as shown in Table 1:
  • Average amplitude Amplitude adjustment factor Greater than -3db or less than -50db 1 Less than -10db and greater than -50db 2 Less than -3db and greater than -10db 1.5
  • Step 340 The amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • the noise is reduced and the amplitude of the noise is reduced, and on the basis of this, the difference of the adjacent audio amplitudes is further After the amplitude adjustment coefficient is subdivided, the preset number of audio frames in the audio amplitude is adjusted step by step, which can make the sound size reasonable and the sense of hearing smooth during the sound source playing.
  • FIG. 4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to an amplitude magnitude of the audio amplitude and volume information of the terminal device.
  • the volume information includes volume value information, volume increase information, or volume reduction information. As shown in FIG. 4, the volume adjustment method provided in this embodiment includes the following steps.
  • Step 301 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
  • Step 302 Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 303 Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the amplitude magnitude of the audio amplitude and the volume information of the terminal device.
  • the acquired volume information may be one or more of current volume value information, volume increase information, and volume decrease information of the terminal device. Determining, according to the volume information, an amplitude adjustment coefficient corresponding to the audio amplitude may be determined according to one or more of current volume value information, volume increase information, and volume decrease information in the volume information.
  • the terminal device is divided into 18 adjustable levels from mute to maximum volume, and each level corresponds to a volume value.
  • the volume can be obtained by the volume management component of the system (getvolume).
  • the method obtains the current volume value of the terminal device; when the user increases or decreases the volume through the adjustment button or the touch screen of the terminal device, it is determined whether the volume of the current terminal device is increased or decreased.
  • the amplitude adjustment factor corresponding to the audio amplitude is determined based on the current volume value, as shown in Table 2:
  • the amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the current volume increase information or volume reduction information, as shown in Table 3:
  • the amplitude adjustment coefficient may be jointly determined according to the volume increase information or the volume reduction information in conjunction with the volume value of the terminal to achieve adjustment of the audio amplitude.
  • a plurality of amplitude adjustment coefficients may be determined according to volume information of the terminal device, for example, determining a first amplitude adjustment coefficient, a second amplitude adjustment coefficient, and a third amplitude adjustment coefficient according to volume information of the terminal device, where An 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, and then according to the amplitude of the audio amplitude, which of the three amplitude adjustment coefficients is corresponding to each audio amplitude, for example, And an audio amplitude that is greater than the first preset threshold or less than the third preset threshold, the first amplitude adjustment coefficient is allocated, and the second amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the first preset threshold and greater than the second preset threshold.
  • a third amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the second preset threshold and greater than the third preset threshold, where the first preset threshold is greater than the second preset threshold, and the second preset threshold is greater than the third preset threshold And if the amplitude of the amplitude of the audio amplitude is less than the third preset threshold, determining the audio amplitude corresponding to A first amplitude adjustment factor is an amplitude adjustment coefficient.
  • determining an amplitude adjustment coefficient corresponding to the audio amplitude may be: 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 a second amplitude adjustment coefficient is allocated to the audio amplitude of the preset threshold and greater than the second preset threshold, and the third amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the second preset threshold and greater than the third preset threshold, where 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 first preset threshold may be -3db
  • the second preset threshold may be -10db
  • the third preset threshold may be -50db
  • the first amplitude adjustment coefficient is 1 (ie, no The adjustment is made)
  • the second amplitude adjustment coefficient is 1.4
  • the third amplitude adjustment coefficient is 1.8.
  • amplitude adjustment is not performed for an audio amplitude having an excessively large amplitude (for example, greater than -3 db) or an amplitude being too small (for example, less than -50 db), thereby avoiding breakage caused by excessive amplitude adjustment.
  • the problem of noise enhancement caused by the increase of too small noise is avoided, and the volume adjustment method is further optimized.
  • Step 304 Divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients, and adjust the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to a maximum amplitude and an average amplitude of the audio information.
  • the volume adjustment method provided in this embodiment includes the following steps.
  • Step 401 Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
  • Step 402 Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 403 Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the maximum amplitude and the average amplitude of the audio information.
  • the digital audio signal decoded by the audio decoder is sampled to obtain the amplitude information in the preset time period T, wherein the amplitude information is composed of multiple amplitude values, and multiple amplitude values can be determined. The maximum amplitude in and the average amplitude of multiple amplitudes.
  • the preset length of the audio information may be acquired, and the maximum amplitude and the average amplitude of the acquired preset length audio information are taken as the maximum amplitude and the average amplitude of the audio information, or in real time.
  • Determining the audio amplitude of each frame of audio information of the audio information determining the maximum amplitude of the audio amplitude of the multi-frame audio frame and the average amplitude of the audio amplitude of the multi-frame audio frame, thereby determining the maximum amplitude and average amplitude of the audio information. And determining the amplitude adjustment coefficient based on the maximum amplitude and the average amplitude of the audio information.
  • the determining, according to the maximum amplitude and the average amplitude of the audio information, an amplitude adjustment coefficient corresponding to the audio amplitude, if the difference between the maximum amplitude and the average amplitude satisfies a preset condition An amplitude adjustment coefficient corresponding to the audio amplitude is determined based on the maximum amplitude and the average amplitude. For example, when the difference between the maximum amplitude and the average amplitude is greater than a preset threshold (eg, 2 db), an amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the maximum amplitude and the average amplitude, if the difference is not greater than a pre- If the threshold is set, the volume adjustment will not be performed.
  • a preset threshold eg, 2 db
  • a smaller amplitude adjustment coefficient (such as 0.7) is determined.
  • the higher amplitude is adjusted to lower the volume.
  • Step 404 Adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
  • the audio amplitude of the sound source can be adjusted according to the finally determined amplitude adjustment coefficient and noise reduction information.
  • the solution provided by the embodiment determines that the amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the maximum amplitude and the average amplitude of the audio information, so that the volume of the sound source with a large amplitude is prevented from being played, and the sound source is improved.
  • FIG. 6 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to a maximum amplitude, an average amplitude of the audio information, and volume information of the terminal device,
  • the volume information includes volume value information, volume increase information, or volume decrease information.
  • the volume adjustment method provided in this embodiment includes the following steps.
  • Step 501 Acquire audio information of the audio source when detecting that the terminal device performs sound source playback.
  • Step 502 Determine, according to the audio information, an audio amplitude corresponding to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 503 Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device.
  • the volume information of the terminal device may also be acquired, and then the audio is determined according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device.
  • the amplitude adjustment factor corresponding to the amplitude.
  • the determining, according to the maximum amplitude of the audio information, the average amplitude, and the volume information of the terminal device, the amplitude adjustment coefficient corresponding to the audio amplitude comprises: if the difference between the maximum amplitude and the average amplitude When the value satisfies the preset condition, the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value. In one embodiment, when the difference between the maximum amplitude and the average amplitude is large (e.g., 0.2 db), to avoid a louder volume when playing to a larger amplitude source, the higher amplitude is adjusted to lower the volume. In an embodiment, if 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 audio amplitude of the sound source is not adjusted.
  • the amplitude adjustment coefficient may be determined according to the difference between the maximum amplitude and the average amplitude and the volume value. And adjusting, according to the amplitude adjustment coefficient, an audio amplitude of the sound source that is greater than a preset amplitude threshold.
  • the relationship between the amplitude adjustment coefficients is determined according to the difference between the maximum amplitude and the average amplitude and the current volume value of the terminal device, as shown in Table 4:
  • Amplitude difference Volume value Amplitude adjustment factor Greater than 0.4db 8 0.3 Greater than 0.3db and less than 0.4db 10 0.7 Greater than 0.2db and less than 0.3db 15 0.9
  • the preset amplitude threshold may be -2 db, that is, the amplitude of the amplitude greater than the preset amplitude threshold is multiplied by the corresponding amplitude adjustment coefficient to perform amplitude attenuation to reduce the volume.
  • Step 504 Adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
  • the amplitude adjustment coefficient is allocated according to the magnitude of the difference and the current volume of the terminal device, thereby improving the playback effect of the sound source.
  • the amplitude adjustment coefficient adjusts the amplitude of the sound source that satisfies the condition, improves the volume adjustment efficiency, and avoids the problem that the adjustment effect caused by the synchronous adjustment of the unrelated amplitude in the sound source is poor.
  • FIG. 7 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the method further includes: adjusting the amplitude adjustment coefficient according to an impedance value of the terminal device, and correspondingly, adjusting the amplitude
  • the dividing the coefficient into a preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
  • the volume adjustment provided by this embodiment includes the following steps.
  • Step 601 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
  • Step 602 Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 603 Determine an amplitude adjustment coefficient corresponding to the audio amplitude, and adjust the amplitude adjustment coefficient according to an impedance value of a playback device of the terminal device.
  • 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 greater the impedance value the greater the adjustment to the amplitude adjustment factor.
  • the amplitude adjustment coefficient is multiplied by 1.2 according to the determined amplitude adjustment coefficient. Adjusted amplitude adjustment factor.
  • Step 604 The adjusted amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • the impedance value of the playback device is introduced as one of the parameters for determining the amplitude adjustment coefficient, thereby avoiding the increase of the impedance value of the playback device with the increase of the playing time, and thus the normal playing.
  • the volume of the process has an impact problem, so that the adjusted volume is better in accordance with the user's needs, further improving the volume adjustment effect.
  • FIG. 8 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure.
  • the method further includes: adjusting the amplitude adjustment coefficient according to a noise value of an environment in which the terminal device is located; correspondingly, the amplitude is
  • the dividing the adjustment coefficient into the preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
  • the volume adjustment method provided in this embodiment includes the following steps.
  • Step 701 Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
  • Step 702 Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
  • Step 703 Determine an amplitude adjustment coefficient corresponding to the audio amplitude, and adjust the amplitude adjustment coefficient according to a noise value of an environment where the terminal device is located.
  • the noise of the current environment can be collected by the microphone installed by the terminal device to determine a corresponding noise value.
  • the greater the noise value the greater the adjustment to the amplitude adjustment factor.
  • the corresponding amplitude adjustment coefficient is determined. The amplitude adjustment coefficient is multiplied by 1.5 as the adjusted amplitude adjustment coefficient.
  • the amplitude adjustment coefficient of the sound source may also be determined jointly according to the impedance value, the noise value, and the magnitude of the audio amplitude.
  • Step 704 The adjusted amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • 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 more in line with the user's demand. Further improved the volume adjustment effect.
  • FIG. 9 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure.
  • the device 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 apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment information determination module 30, and an adjustment module 40.
  • the obtaining module 10 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.
  • the playing of the sound source 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.
  • the sound source file is loaded into a memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder.
  • the audio decoder 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 the audio signal according to the analog audio signal. Audio Player.
  • the triggering event may be that the playing button displayed in the touch screen is detected to be pressed, or may be determined to determine that the terminal device performs sound source playing when the playing device of the terminal device detects that the sound starts playing.
  • 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 20 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.
  • the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values.
  • 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 acquired audio information 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 the amplitude of each frame of the audio information of the audio information is determined in real time.
  • the acquiring module 10 is configured to: when detecting that the terminal device performs sound source playing, acquire audio frame information of the sound source; the amplitude determining module 20 is configured to: according to the audio frame information Determining an audio amplitude of each frame of the audio information.
  • the sound source file is parsed to obtain an audio frame sequence, and the amplitude corresponding to each frame is determined according to each frame of the audio frame sequence.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient and noise reduction information corresponding to the audio amplitude.
  • the noise reduction information may be inverted output information of the noise information determined from the audio amplitude.
  • the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is larger, the amplitude of the reverse output in the noise reduction information is correspondingly increased, and the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is relatively larger.
  • the amplitude of the reverse output in the noise reduction information is also reduced accordingly, thereby realizing the reasonable determination of the noise reduction information interval by analyzing the audio amplitude, thereby completing the automatic noise reduction, without artificially setting the noise reduction level, and at the same time,
  • the audio amplitude of the real-time input determines the noise reduction information, and the noise reduction effect is better.
  • the adjustment module 40 is configured to adjust the audio amplitude of the sound source according to the adjustment coefficient and the noise reduction information.
  • the adjustment information determining module 30 is further configured to: after determining the amplitude adjustment coefficient corresponding to the audio amplitude, dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients;
  • the module 40 is configured to adjust the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • a large amplitude adjustment coefficient is assigned to the low-amplitude audio amplitude, and a high-amplitude audio amplitude is correspondingly assigned a smaller amplitude adjustment coefficient.
  • the amplitude adjustment coefficient is 1.2 for audio amplitudes less than -3 db and greater than -10 db, and the amplitude adjustment coefficient is 2 for audio amplitudes less than -10 db and greater than -50 db.
  • the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: when detecting that an amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into A preset number of sub-amplitude adjustment factors.
  • the sub-amplitude adjustment coefficients are obtained by linear or non-linear division of the amplitude adjustment coefficients.
  • the preset condition may be that the amplitude adjustment coefficients of the adjacent audio amplitudes are different, for example, the amplitude adjustment coefficient is changed from the amplitude adjustment coefficient 1 of the previous audio amplitude to the amplitude of the latter audio amplitude.
  • the adjustment coefficient 2, or the amplitude adjustment coefficient is changed from 2 to 1.2, etc., at this time, a preset number of sub-amplitude adjustment coefficients can be added between the two amplitude adjustment coefficients corresponding to the adjacent two audio amplitudes.
  • each n (for example, n is greater than 1 and less than or equal to 20) frame audio frames may be corresponding to one sub-amplitude adjustment coefficient, and the amplitude of each audio frame is sequentially adjusted. .
  • the sub-amplitude adjustment coefficient corresponding to the 1-20th audio frame at the beginning of the change is 1.28
  • the sub-amplitude adjustment coefficient corresponding to the 21-40th frame audio frame is 1.36. ,And so on.
  • the process of adjusting the audio amplitude may be: parsing the audio file, modifying the data representing the amplitude information in the obtained audio data, and then performing the encapsulation after the modification, when buffering to the corresponding audio source.
  • the audio amplitude is correspondingly increased; or, in the decoding process of the sound source playing, the audio amplitude is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding amplitude adjustment coefficient.
  • adjust the volume of the source 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 sound source content is adjusted to improve the adjustment efficiency.
  • the technical solution provided by the embodiment improves the volume adjustment efficiency, reduces the power consumption of the mobile terminal, and automatically adjusts the audio amplitude by using the noise reduction information, and does not need to manually set the noise reduction level, and at the same time,
  • the audio amplitude of the real-time input determines the noise reduction information, and the noise reduction effect is better.
  • the adjustment information determining module 30 is further configured to:
  • the amplitude adjustment coefficient After determining the amplitude adjustment coefficient corresponding to the audio amplitude, the amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients.
  • the adjustment module 40 is configured to:
  • the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • the adjustment information determining module 30 is configured to divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients by:
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by:
  • An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the amplitude magnitude of the audio amplitude.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by:
  • An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to a maximum amplitude and an average amplitude of the audio information.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude as follows:
  • volume information includes volume value information, volume increase information, or volume decrease information.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude as follows:
  • volume information includes volume value information, volume increase information, or volume reduction information.
  • the adjustment information determining module 30 is further configured to:
  • the adjustment information determining module 30 is configured to divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients by dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
  • FIG. 9 is a structural block diagram of a volume adjustment apparatus according to another embodiment of the present disclosure.
  • the device 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 apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment information determination module 30, and an adjustment module 40.
  • the obtaining module 10 is configured to acquire audio information of the sound source when the terminal device detects the sound source playing, and the amplitude determining module 20 is configured to determine the audio corresponding to the audio information according to the audio information.
  • An amplitude adjustment adjustment module 30 is configured to determine an amplitude adjustment coefficient and noise reduction information corresponding to the audio amplitude; and an adjustment module 40 configured to adjust an audio amplitude of the sound source according to the adjustment coefficient and the noise reduction information Make adjustments.
  • the amplitude determining module 20 is configured to determine, according to the audio information, a plurality of audio amplitudes respectively corresponding to audio information of the plurality of preset time segments in the audio information; the adjustment information determining module 30 Is configured to: determine an amplitude adjustment coefficient and noise reduction information corresponding to each of the audio amplitudes; the adjustment module 40 is configured to: the first amplitude adjustment coefficient corresponding to the first audio amplitude and the adjacent second audio amplitude When a corresponding second amplitude adjustment coefficient is different, a preset number of sub-amplitude adjustment coefficients are added between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient, wherein the preset number of sub-amplitude adjustments The coefficient is sequentially incremented or sequentially decreased between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient; and the noise reduction information corresponding to the preset number of sub-amplitude adjustment coefficients and the second audio amplitude Adjusting a preset number of audio frames from a start frame in the audio information, where
  • the amplitude determining module 20 is configured to: perform at least two sampling of the audio information in each of the preset time periods to obtain at least two corresponding to each of the preset time periods. Audio amplitude; determining an average amplitude between the at least two audio amplitudes corresponding to each of the preset time periods as an audio amplitude corresponding to audio information of each of the preset time periods.
  • the amplitude determining module 20 is configured to determine an audio amplitude according to the audio information every the preset time period.
  • the amplitude determining module 20 is configured to: determine an audio amplitude corresponding to each frame of the audio information of the audio information according to the audio information, where each frame of the audio frame corresponds to one Preset time period.
  • the preset number of audio frames includes: a first group of audio frames to an Mth group of audio frames; and the preset number of sub-amplitude adjustment coefficients includes: a first sub-increment or decrement The amplitude adjustment coefficient to the Nth sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N;
  • the adjustment module is configured to be implemented according to the preset number as follows a sub-amplitude adjustment coefficient and a noise reduction information corresponding to the second audio amplitude to adjust a preset number of audio frames from a start frame in the audio information: using the first sub-amplitude adjustment coefficient and Adjusting the first set of audio frames by using the noise reduction information corresponding to the second audio amplitude, and adjusting the second set of audio frames by using the second sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude, until And adjusting the Nth group of audio frames by using the Nth sub-amplitude adjustment coefficient and the noise reduction information corresponding
  • the adjustment information determining module 30 is configured to determine, according to the manner, a plurality of amplitude adjustment coefficients that are in one-to-one correspondence with the plurality of audio amplitudes: determining and determining according to the amplitude magnitude of the plurality of audio amplitudes A plurality of amplitude adjustment coefficients corresponding to the plurality of audio amplitudes in one-to-one correspondence.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by determining: corresponding to the audio amplitude according to a maximum amplitude and an average amplitude of the audio information. Amplitude adjustment factor.
  • the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by determining a sum according to a maximum amplitude, an average amplitude of the audio information, and volume information of the terminal device.
  • the adjustment information determining module 30 is further configured to: adjust the amplitude adjustment coefficient according to at least one of the following information: an impedance value of the playback device of the terminal device and an environment where the terminal device is located a noise value; the adjustment module 40 is configured to increase a preset number of sub-amplitude adjustment coefficients by: adjusting the first amplitude adjustment coefficient corresponding to the first audio amplitude and the adjacent second When the adjusted second amplitude adjustment coefficients corresponding to the audio amplitudes are different, a preset number of sub-amplitude adjustment coefficients are added between the adjusted first amplitude adjustment coefficient and the adjusted second amplitude adjustment coefficient.
  • FIG. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • the terminal device 200 includes: a memory 201.
  • Touch screen 212, other input/control devices 210, and external port 204 are communicated via one or more communication buses or signal lines 207.
  • the terminal device 200 illustrated in FIG. 10 is merely an example of a terminal device, and the terminal device 200 may have more or fewer components than those illustrated in FIG. 10, and two or more components may be combined, or Can have different component configurations.
  • the various components shown in FIG. 10 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the terminal device 200 provided in this embodiment is described in detail below.
  • the terminal device 200 takes a smart phone as an example.
  • the memory 201 can be accessed by the CPU 202 and the peripheral interface 203, etc., and the memory 201 can include a high speed random access memory, and can 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 peripherals 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 that are configured to control 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 (pressing buttons or rocker buttons, etc.) ), dial, slide switch, joystick or click on the wheel.
  • the input controller 2092 can be coupled 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 212, 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 may be Run the game's icons or icons that are networked to the appropriate network.
  • the terminal device 200 may further 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 configured to establish communication between the mobile phone and the wireless network (ie, the network side) to implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages and emails.
  • the RF circuit 205 receives and transmits an RF signal, 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 to communicate.
  • the RF circuit 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, Coder-CODEter (CODEC) chipset and Subscriber Identity Module (SIM) and so on.
  • CDDEC Coder-CODEter
  • SIM Subscriber Identity Module
  • the audio circuit 206 is arranged 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 arranged 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 configured to provide power and power management for 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 disclosure, 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 disclosure may perform the volume adjustment method of the terminal device provided by any embodiment of the present disclosure, and have corresponding function modules and beneficial effects for performing the method.
  • Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method when executed by a terminal device processor, the method comprising:
  • the method further includes: dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients;
  • the adjusting, by the noise reduction information, the audio amplitude comprises: adjusting the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
  • the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises:
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
  • An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the amplitude magnitude of the audio amplitude.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
  • An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to a maximum amplitude and an average amplitude of the audio information.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
  • volume information includes volume value information, volume increase information, or volume decrease information.
  • the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
  • volume information includes volume value information, volume increase information, or volume reduction information.
  • the method further includes: performing the amplitude adjustment coefficient according to an impedance value of the playback device of the terminal device and/or a noise value of an environment in which the terminal device is located
  • the adjusting the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
  • Storage media any of a variety of types of memory devices or storage devices.
  • the term "storage medium” is intended to include: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as a dynamic random Random Access Memory (DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Extended Data Output Random Access Memory (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 Components, etc.
  • the storage medium may also include other types of memory or a combination thereof.
  • 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.
  • the term "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.
  • a storage medium containing computer executable instructions the computer executable instructions of which are not limited to the volume adjustment method as described above, and may also perform correlation in the volume adjustment method provided by any embodiment of the present disclosure. operating.

Abstract

A volume adjusting method and device, a mobile terminal and a storage medium. The method comprises: when it is detected that a terminal device plays back a sound source, acquiring audio information of the sound source; determining an audio amplitude corresponding to the audio information according to the audio information; and determining an amplitude adjustment coefficient and noise reduction information corresponding to the audio amplitude, and adjusting the audio amplitude according to the adjustment coefficient and the noise reduction information.

Description

音量调节方法、装置、移动终端及存储介质Volume adjustment method, device, mobile terminal and storage medium
本公开要求申请日为2017年08月18日、申请号为201710711588.5、名称为“音量调节方法、装置、终端设备及存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。The present application claims the priority of the Chinese patent application entitled "Volume Adjustment Method, Apparatus, Terminal Equipment, and Storage Medium" on August 18, 2017, the application number is 201710711588.5, the entire contents of which are incorporated by reference. In the present disclosure.
技术领域Technical field
本公开实施例涉及计算机技术领域,例如涉及一种音量调节方法、装置、移动终端及存储介质。Embodiments of the present disclosure relate to the field of computer technologies, for example, to a volume adjustment method, apparatus, mobile terminal, and storage medium.
背景技术Background technique
随着移动终端普及程度的提高,越来越多的用户使用移动终端执行各种各样的功能以满足自身需求,如使用移动终端阅读文字、观看视频、听音乐以及玩游戏等。然而,当移动终端在播放音视频时,音量大小的调节存在缺陷,需要改进。With the increasing popularity of mobile terminals, more and more users use mobile terminals to perform various functions to meet their own needs, such as reading texts, watching videos, listening to music, and playing games using mobile terminals. However, when the mobile terminal is playing audio and video, the adjustment of the volume level is flawed and needs to be improved.
发明内容Summary of the invention
本公开提供了一种音量调节方法、装置、终端设备及存储介质,提高了音量调节效率,降低了终端设备的功耗。The disclosure 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.
本公开实施例提供了一种音量调节方法,包括:Embodiments of the present disclosure provide a volume adjustment method, including:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining audio information of the sound source when detecting that the terminal device performs sound source playing;
依据所述音频信息确定所述音频信息对应的音频振幅;Determining an audio amplitude corresponding to the audio information according to the audio information;
确定和所述音频振幅对应的振幅调整系数以及降噪信息,依据所述振幅调整系数和所述降噪信息对所述音频振幅进行调整。And determining an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information, and adjusting the audio amplitude according to the amplitude adjustment coefficient and the noise reduction information.
本公开实施例还提供了一种音量调节装置,包括:The embodiment of the present disclosure further provides a volume adjustment apparatus, including:
获取模块,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining a 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 information determining module configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information;
调节模块,设置为依据所述振幅调整系数和所述降噪信息对所述音频振幅进行调整。The adjustment module is configured to adjust the audio amplitude according to the amplitude adjustment coefficient and the noise reduction information.
本公开实施例还提供了一种终端设备,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本公开实施例所述的音量调节方法。An embodiment of the present disclosure further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement an embodiment of the present disclosure The volume adjustment method described.
本公开实施例还提供了一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行本公开实施例所述的音量调节方法。Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method according to an embodiment of the present disclosure when executed by a terminal device processor.
本公开实施例提供的技术方案提高了音量调节效率,降低了终端设备的功耗。The technical solution provided by the embodiment of the present disclosure improves the volume adjustment efficiency and reduces the power consumption of the terminal device.
附图说明DRAWINGS
图1是本公开一实施例提供的一种音量调节方法的流程图;FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure;
图2是本公开另一实施例提供的一种音量调节方法的流程图;2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图3是本公开另一实施例提供的一种音量调节方法的流程图;3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图4是本公开另一实施例提供的一种音量调节方法的流程图;4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图5是本公开另一实施例提供的一种音量调节方法的流程图;FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图6是本公开另一实施例提供的一种音量调节方法的流程图;FIG. 6 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图7是本公开另一实施例提供的一种音量调节方法的流程图;FIG. 7 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图8是本公开另一实施例提供的一种音量调节方法的流程图;FIG. 8 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure;
图9是本公开一实施例提供的一种音量调节装置的结构框图;FIG. 9 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure;
图10是本公开一实施例提供的一种终端设备的结构示意图。FIG. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本公开,而非对本公开的限定。另外,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are intended to be construed In addition, for the convenience of description, only some but not all of the structures related to the present disclosure are shown in the drawings.
图1是本公开一实施例提供的一种音量调节方法的流程图。本实施例可适用于当终端设备播放音源时,对音量进行调节的情况。该方法可以由本实施例提供的终端设备来执行,该终端设备的音量调节装置可采用软件和/或硬件的方式实现。如图1所示,本实施例提供的音量调节方法包括如下步骤。FIG. 1 is a flowchart of a volume adjustment method according to an embodiment of the present disclosure. This embodiment can be applied to the case where the volume is adjusted when the terminal device plays the sound source. The method can be implemented by the terminal device provided by the embodiment, and the volume adjustment device of the terminal device can be implemented by using software and/or hardware. As shown in FIG. 1, the volume adjustment method provided in this embodiment includes the following steps.
步骤101、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 101: Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
终端设备可通过安装的第三方应用程序或系统自带的音视频播放软件进行音源的播放。在一实施例中,音源的播放主要包括音源文件的获取、解码和输出等步骤。在一实施例中,获取到的音源文件可以是通过网络接收到的组播流,还可以是终端设备本地存储的音视频文件。在一实施例中,获取到该音源文件后将该音源文件加载到内存缓冲区中,并对加载到内存缓冲区的音源文件进行解码。在解码开始之前,如果该音源文件同时包含有视频数据,需要进行音频数据和视频数据的分离,将分离后的音频数据输入至音频解码器。在一实施例中,音频解码器主要用于读取内存缓冲区中的音频数据,得到数字音频信号,并将该数字音频信号转换为模拟音频信号,终端设备的播放器件根据该模拟音频信号进行音频播放。在一个实施例中,当监听到音源播放事件被触发时,确定终端设备开始播放音源,在一实施例中,该触发事件可以是检测到触摸屏中显示的播放按钮被按下,还可以是检测到终端设备的播放器件如喇叭开始播放声音时,确定终端设备进行音源播放。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. In an embodiment, the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file. In an embodiment, 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. In an embodiment, after acquiring the sound source file, the sound source file is loaded into a memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder. In an embodiment, the audio decoder 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 the audio signal according to the analog audio signal. Audio Player. In an embodiment, when the sound source playing event is triggered, it is determined that the terminal device starts to play the sound source. In an embodiment, the trigger event may be that the play button displayed in the touch screen is detected to be pressed, or may be detected. When the playback device such as the speaker of the terminal device starts playing the sound, it is determined that the terminal device performs the sound source playback.
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以安卓(Android)系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息。When the terminal device detects the sound source playing, the audio information of the sound source is acquired. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source. In another embodiment, 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. In another embodiment, taking the Android system as an example, the audio information of the sound source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
步骤102、依据所述音频信息确定所述音频信息对应的音频振幅。Step 102: Determine an audio amplitude corresponding to the audio information according to the audio information.
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息。在一实施例中,该振幅信息可由多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到音频信息对应音频振幅的振幅大小。在另一实施例中,当步骤101获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到音频信息对应的音频振幅的振幅大小。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. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T. In an embodiment, the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, taking the Android system as an example, the audio information of the audio source can be obtained by using the android.media.MediaRecorder class or the android.media.AudioRecord class to obtain the amplitude of the audio amplitude corresponding to the audio information. In another embodiment, when the audio information acquired in step 101 is the original file corresponding to the sound source, the amplitude of the audio amplitude corresponding to the audio information may be obtained by parsing the original file.
在一个实施例中,当检测音源播放时,每隔预设时间(如1秒(s)、3s或10s)确定一次振幅,或者实时地对音频信息的每一帧音频帧的振幅进行确定。在一实施例中,所述获取所述音源的音频信息,包括:获取所述音源的音频帧信息;依据所述音频信息确定所述音频信息对应的音频振幅,包括:依据所述音频帧信息确定所述音频信息中每一帧音频帧的音频振幅。在一实施例中,当检测到音源播放时,对音源文件进行解析得到音频帧序列,根据音频帧序列的每一帧确定每一帧对应的振幅。In one embodiment, when detecting the sound source playing, the amplitude is determined once every predetermined time (eg, 1 second (s), 3 s, or 10 s), or the amplitude of each frame of the audio information of the audio information is determined in real time. In an embodiment, the acquiring the audio information of the sound source includes: acquiring audio frame information of the sound source; determining an audio amplitude corresponding to the audio information according to the audio information, including: according to the audio frame information Determining an audio amplitude of each frame of the audio information. In an embodiment, when the sound source is detected, the sound source file is parsed to obtain an audio frame sequence, and the amplitude corresponding to each frame is determined according to each frame of the audio frame sequence.
步骤103、确定和所述音频振幅对应的振幅调整系数以及降噪信息,依据所述振幅调整系数和所述降噪信息对所述音源的音频振幅进行调整。Step 103: Determine an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information, and adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
在一个实施例中,降噪信息可以是依据音频振幅确定出的噪声信息的反向输出信息。在一实施例中,当依据音频振幅确定的音频振幅对应的噪声振幅越大,则降噪信息中反向输出的振幅也相应增大,当依据音频振幅确定的音频振幅对应的噪声振幅相对较小时,则降噪信息中反向输出的振幅也相应减小。由此实现了通过分析音频振幅合理地确定降噪信息区间,进而完成自动降噪,无需人为设置降噪等级,同时,由于针对了实时输入的音频振幅确定降噪信息,降噪效果更佳。In one embodiment, the noise reduction information may be inverted output information of the noise information determined from the audio amplitude. In an embodiment, when the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is larger, the amplitude of the reverse output in the noise reduction information is correspondingly increased, and the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is relatively larger. In hours, the amplitude of the reverse output in the noise reduction information is also reduced accordingly. Therefore, the noise reduction information interval is reasonably determined by analyzing the audio amplitude, thereby completing the automatic noise reduction, and no need to artificially set the noise reduction level, and at the same time, since the noise reduction information is determined for the audio amplitude of the real-time input, the noise reduction effect is better.
在一个实施例中,在所述确定和所述音频振幅对应的振幅调整系数之后,还包括:将所述振幅调整系数划分为预设数目的子振幅调整系数;所述依据所述振幅调整系数和所述降噪信息对所述音频振幅进行调整包括:依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。In an embodiment, after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients; And adjusting the audio amplitude by the noise reduction information comprises: adjusting the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
在一实施例中,为提高音源中低振幅区域的音量,对低振幅的音频振幅分配较大的振幅调整系数,高振幅的音频振幅相应的分配一较小的振幅调整系数。在一实施例中,对小于-3分贝(db)且大于-10db音频振幅分配振幅调整系数为1.2,对小于-10db且大于-50db的音频振幅分配振幅调整系数为2。此时,在音源播放过程中,如果前一段音频振幅的振幅调整系数为1.2,而过渡到相邻的下一段音频振幅需要振幅调整系数为2的话,进行调整后的音频振幅会存在明显的听感突兀的问题,这是由振幅调整系数跳跃带来的。In one embodiment, to increase the volume of the low-amplitude region of the sound source, a large amplitude adjustment coefficient is assigned to the low-amplitude audio amplitude, and a high-amplitude audio amplitude is correspondingly assigned a smaller amplitude adjustment coefficient. In one embodiment, the amplitude adjustment factor is assigned to an audio amplitude of less than -3 decibels (db) and greater than -10 db, and an amplitude adjustment factor of two is allocated to an audio amplitude of less than -10 db and greater than -50 db. At this time, during the sound source playing, if the amplitude adjustment coefficient of the previous audio amplitude is 1.2, and the amplitude of the adjustment to the adjacent next audio amplitude requires an amplitude adjustment coefficient of 2, the adjusted audio amplitude will be clearly heard. The problem is abrupt, which is caused by the jump of the amplitude adjustment factor.
在一实施例中,所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:检测到不同音频振幅对应的振幅调整系数满足预设条件时,将所述振幅调整系数划分为预设数目的子振幅调整系数。在一实施例中,所述子振幅调整系数为依据所述振幅调整系数线性或非线性划分得到。在一实施例中,该预设条件可以是相邻的音频振幅的振幅调整系数不相同,如振幅调整系数由前一音频振幅的振幅调整系数1变成(跳跃为)后一音频振幅的振幅调整系数2,或振幅调整系数由2变成1.2等,此时,可以在相邻的两个音频振幅对应的两个振幅调整系数之间增加预设数目的子振幅调整系数。在一实施例中,当确定出的相邻音频振幅的振幅调整系数为1.2和2时,可在1.2到2之间再增加9个等级,即1.28、1.36、1.42、...、1.92。在调节过程中,在振幅调整系数从1.2到2的过渡阶段,可将每n(例如,n大于1小于等于20)帧音频帧对应一个子振幅调整系数,依次对每一音频帧的振幅进行调整。在一实施例中,振幅调整系数由1.2改变为2时,改变开始时的第1-20音频帧对应的子振幅调整系数为1.28,第21-40帧音频帧对应的子振幅调整系数为1.36,依次类推。在该实施例中,假设振幅调整系数为1.2的前100帧音频帧已调整完成,从第101帧开始需要使用振幅调整系数2来调整,那么每20帧对应一级子振幅调整系数的话,从101帧开始的180帧,即到第280帧音频帧完成用子振幅调整系数调整音频帧的过渡阶段,从第281帧音频帧开始可以使用振幅调整系数2来调整,从而避免明显的听感突兀问题。In an embodiment, the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: when detecting that an amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into A preset number of sub-amplitude adjustment factors. In an embodiment, the sub-amplitude adjustment coefficients are obtained by linear or non-linear division of the amplitude adjustment coefficients. In an embodiment, the preset condition may be that the amplitude adjustment coefficients of the adjacent audio amplitudes are different, for example, the amplitude adjustment coefficient is changed from the amplitude adjustment coefficient 1 of the previous audio amplitude to the amplitude of the latter audio amplitude. The adjustment coefficient 2, or the amplitude adjustment coefficient is changed from 2 to 1.2, etc., at this time, a preset number of sub-amplitude adjustment coefficients can be added between the two amplitude adjustment coefficients corresponding to the adjacent two audio amplitudes. In an embodiment, when the amplitude adjustment coefficients of the determined adjacent audio amplitudes are 1.2 and 2, an additional 9 levels, that is, 1.28, 1.36, 1.42, ..., 1.92, may be added between 1.2 and 2. During the adjustment process, in the transition phase of the amplitude adjustment coefficient from 1.2 to 2, each n (for example, n is greater than 1 and less than or equal to 20) frame audio frames may be corresponding to one sub-amplitude adjustment coefficient, and the amplitude of each audio frame is sequentially performed. Adjustment. In an embodiment, when the amplitude adjustment coefficient is changed from 1.2 to 2, the sub-amplitude adjustment coefficient corresponding to the 1-20th audio frame at the beginning of the change is 1.28, and the sub-amplitude adjustment coefficient corresponding to the 21-40th frame audio frame is 1.36. ,And so on. In this embodiment, it is assumed that the first 100 frames of audio frames whose amplitude adjustment coefficient is 1.2 have been adjusted, and the amplitude adjustment coefficient 2 needs to be adjusted from the 101st frame. Then, if every 20 frames corresponds to the first-level sub-amplitude adjustment coefficient, 180 frames from the beginning of 101 frames, that is, to the 280th frame, the audio frame is completed with the sub-amplitude adjustment coefficient to adjust the transition period of the audio frame, and the amplitude adjustment coefficient 2 can be adjusted from the 281-frame audio frame to avoid obvious hearing acuity. problem.
在一实施例中,对音频振幅进行调整的过程可以是:对音源文件进行解析,对得到的音频数据中的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件且音源文件被播放时音频振幅相应的已被增大;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到音频振幅,将该振幅数据乘以对应的振幅调整系数以改变振幅大小,进而对音源的音量进行调节。In an embodiment, the process of adjusting the audio amplitude may be: parsing the audio file, modifying the data representing the amplitude information in the obtained audio data, and then performing the encapsulation after the modification, when buffering to the corresponding audio source. The audio amplitude corresponding to the file and the sound source file is correspondingly increased; or, in the decoding process of the sound source playing, the audio amplitude is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding amplitude. Adjust the coefficient to change the amplitude and 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 sound source content is adjusted to improve the adjustment efficiency, thereby improving the volume adjustment efficiency, reducing the power consumption of the terminal device, and adjusting the audio amplitude by using the noise reduction information to achieve automatic noise reduction, without artificially setting the noise reduction level, and simultaneously Since the noise reduction information is determined for the audio amplitude of the real-time input, the noise reduction effect is better.
图2是本公开另一实施例提供的一种音量调节方法的流程图。参见图2,本实施例提供 的音量调节方法包括如下步骤。FIG. 2 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. Referring to Fig. 2, the volume adjustment method provided in this embodiment includes the following steps.
步骤110、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 110: Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
步骤120、依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅。Step 120: Determine, according to the audio information, a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information.
在一实施例中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括:In an embodiment, the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information, including:
在每个所述预设时间段内对所述音频信息进行至少两次取样获取每个所述预设时间段对应的至少两个音频振幅;将每个所述预设时间段各自对应的所述至少两个音频振幅之间的平均振幅确定为每个所述预设时间段的音频信息对应的音频振幅。Performing at least two samplings on the audio information for each of the preset time periods to obtain at least two audio amplitudes corresponding to each of the preset time periods; The average amplitude between the at least two audio amplitudes is determined as the audio amplitude corresponding to the audio information for each of the preset time periods.
例如,每10s为一个预设时间段,则可在第一个10s内对音频解码器解码得到的数字音频信号进行5次取样,得到5个音频振幅,并计算5个音频振幅之间的平均振幅,将该平均振幅作为第一个10s对应的音频振幅,在第二个10s内对音频解码器解码得到的数字音频信号进行5次取样,得到5个音频振幅,并计算5个音频振幅之间的平均振幅,将该平均振幅作为第二个10s对应的音频振幅,由此,可得到多个预设时间段的音频信息分别对应的多个音频振幅。For example, every 10s is a preset time period, and the digital audio signal decoded by the audio decoder can be sampled 5 times in the first 10s to obtain 5 audio amplitudes, and the average between 5 audio amplitudes is calculated. The amplitude, the average amplitude is taken as the first 10s corresponding audio amplitude, and the digital audio signal decoded by the audio decoder is sampled 5 times in the second 10s to obtain 5 audio amplitudes, and 5 audio amplitudes are calculated. The average amplitude between the two is used as the audio amplitude corresponding to the second 10s, thereby obtaining a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods.
在一实施例中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括:In an embodiment, the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information, including:
每隔所述预设时间段依据所述音频信息确定一次音频振幅。The audio amplitude is determined once according to the audio information every predetermined period of time.
例如,每10s为一个预设时间段,可每隔10s对音频解码器解码得到的数字音频信号进行一次取样得到一个音频振幅,并将取样得到的音频振幅作为前一个10s的音频信息对应的音频振幅。For example, every 10 s is a preset time period, and the digital audio signal decoded by the audio decoder can be sampled once every 10 s to obtain an audio amplitude, and the sampled audio amplitude is used as the audio corresponding to the audio information of the previous 10 s. amplitude.
在一实施例中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括:In an embodiment, the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time segments in the audio information, including:
依据所述音频信息确定所述音频信息的每一帧音频帧对应的音频振幅,其中,所述每一帧音频帧对应一个所述预设时间段。Determining, according to the audio information, an audio amplitude corresponding to each frame of the audio information, wherein each frame of the audio frame corresponds to one of the preset time periods.
在一实施例中,音频信息的每一帧音频帧对应一个预设时间段,例如每26s为一个预设时间段,则可依据音频信息确定音频信息的每一帧音频帧对应的音频振幅,由此得到多个预设时间段的音频信息分别对应的多个音频振幅。In an embodiment, each frame of the audio information corresponds to a preset time period, for example, each 26s is a preset time period, and the audio amplitude corresponding to each frame of the audio information may be determined according to the audio information. Thereby, a plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods are respectively obtained.
步骤130、确定和每个音频振幅对应的振幅调整系数和降噪信息。Step 130: Determine an amplitude adjustment coefficient and noise reduction information corresponding to each audio amplitude.
在一实施例中,所述确定和所述多个音频振幅一一对应的多个振幅调整系数,包括:依据所述多个音频振幅的振幅大小确定和所述多个音频振幅一一对应的多个振幅调整系数。In an embodiment, the determining a plurality of amplitude adjustment coefficients corresponding to the plurality of audio amplitudes one by one includes: determining, according to an amplitude magnitude of the plurality of audio amplitudes, one-to-one correspondence with the plurality of audio amplitudes Multiple amplitude adjustment factors.
例如,多个音频振幅包括音频振幅A、音频振幅B和音频振幅C,并为振幅大小大于-3db或小于-50db的音频振幅分配振幅调整系数1,为振幅大小小于-10db且大于-50db的音频振幅分配振幅调整系数2,为振幅大小小于-3db且大于-10db的音频振幅分配振幅调整系数1.5,则如果音频振幅A大于-3db,则音频振幅A对应的振幅调整系数为1,如果音频振幅B小于-10db且大于-50db,则音频振幅B对应的振幅调整系数为2。For example, the plurality of audio amplitudes include an audio amplitude A, an audio amplitude B, and an audio amplitude C, and an amplitude adjustment coefficient 1 is allocated for an audio amplitude having an amplitude greater than -3 db or less than -50 db, which is an amplitude smaller than -10 db and greater than -50 db. The audio amplitude distribution amplitude adjustment coefficient 2 is an amplitude adjustment coefficient of 1.5 for an amplitude of an amplitude smaller than -3 db and greater than -10 db. If the audio amplitude A is greater than -3 db, the amplitude adjustment coefficient corresponding to the audio amplitude A is 1, if the audio When the amplitude B is smaller than -10 db and larger than -50 db, the amplitude adjustment coefficient corresponding to the audio amplitude B is 2.
步骤140、当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数。Step 140: When the first amplitude adjustment coefficient corresponding to the first audio amplitude and the second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different, the first amplitude adjustment coefficient and the second amplitude adjustment coefficient A preset number of sub-amplitude adjustment coefficients are added between them.
在一实施例中,所述预设数目的子振幅调整系数是在所述第一振幅调整系数和所述第二振幅调整系数之间依次递增或依次递减的。In an embodiment, the preset number of sub-amplitude adjustment coefficients are sequentially incremented or sequentially decremented between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient.
在一实施例中,所述预设数目的子振幅调整系数是在所述第一振幅调整系数和所述第二振幅调整系数之间进行等间距划分得到的。In an embodiment, the preset number of sub-amplitude adjustment coefficients are obtained by equally spaced between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient.
在一实施例中,在确定和所述音频振幅对应的振幅调整系数之后,还包括:依据以下信息至少之一对所述振幅调整系数进行调整:所述终端设备的播放器件的阻抗值以及所述终端 设备所处环境的噪声值。In an embodiment, after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: adjusting the amplitude adjustment coefficient according to at least one of the following information: an impedance value of the playback device of the terminal device The noise value of the environment in which the terminal device is located.
所述当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数,包括:当所述第一音频振幅对应的调整后的第一振幅调整系数和相邻的所述第二音频振幅对应的调整后的第二振幅调整系数不相同时,在调整后的第一振幅调整系数和调整后的第二振幅调整系数之间增加预设数目的子振幅调整系数。When the first amplitude adjustment coefficient corresponding to the first audio amplitude and the second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different, the first amplitude adjustment coefficient and the second amplitude adjustment coefficient are Adding a preset number of sub-amplitude adjustment coefficients, including: an adjusted first amplitude adjustment coefficient corresponding to the first audio amplitude and an adjusted second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude When not the same, a preset number of sub-amplitude adjustment coefficients are added between the adjusted first amplitude adjustment coefficient and the adjusted second amplitude adjustment coefficient.
步骤150、依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整。Step 150: Adjust a preset number of audio frames starting from a start frame in the audio information according to the preset number of sub-amplitude adjustment coefficients and noise reduction information corresponding to the second audio amplitude.
在一实施例中,所述起始帧为振幅调整系数由所述第一振幅调整系数变化为所述第二振幅调整系数时的首个音频帧。In an embodiment, the start frame is a first audio frame when the amplitude adjustment coefficient is changed from the first amplitude adjustment coefficient to the second amplitude adjustment coefficient.
在一实施例中,所述预设数量的音频帧,包括:第一组音频帧至第M组音频帧;所述预设数目的子振幅调整系数,包括:依次递增或递减的第一子振幅调整系数至第N子振幅调整系数,其中,M和N均为大于或等于1的正整数,且M大于或等于N;所述依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整,包括:使用所述第一子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第一组音频帧进行调整,使用第二子振幅调整系数和所述第二音频振幅对应的降噪信息对第二组音频帧进行调整,直至使用所述第N子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第N组音频帧进行调整。In an embodiment, the preset number of audio frames includes: a first group of audio frames to an Mth group of audio frames; and the preset number of sub-amplitude adjustment coefficients includes: a first sub-increment or decrement An amplitude adjustment coefficient to a Nth sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N; the predetermined number of sub-amplitude adjustment coefficients and the first The noise reduction information corresponding to the two audio amplitudes adjusts a preset number of audio frames from the start frame in the audio information, including: using the first sub-amplitude adjustment coefficient and the second audio amplitude corresponding to The noise reduction information adjusts the first set of audio frames, and adjusts the second set of audio frames using the second sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude until the Nth sub-amplitude is used The adjustment coefficient and the noise reduction information corresponding to the second audio amplitude adjust the Nth group of audio frames.
例如,在步骤120中获取了预设时间段a的音频信息对应的音频振幅A、预设时间段b的音频信息对应的音频振幅B以及预设时间段c的音频信息对应的音频振幅C,并在步骤130中确定了音频振幅A对应的振幅调整系数为i且降噪信息为R,音频振幅B对应的振幅调整系数为j且降噪信息为S,音频振幅B对应的振幅调整系数为k且降噪信息为T,则首先使用振幅调整系数i和降噪信息R对从音频信息中的第一帧音频帧开始的音频帧的音频振幅进行调整,直至到达预设时间段b的起始时间,例如此时已使用振幅调整系数i和降噪信息R对第1-100帧音频帧进行调整,如果音频振幅B对应的振幅调整系数j和音频振幅A对应的振幅调整系数i相同,则继续使用振幅调整系数i(即振幅调整系数j),并使用降噪信息S对从第101帧音频帧开始的音频帧的音频振幅进行调整,直至到达预设时间段c的起始时间,例如此时已使用振幅调整系数i和降噪信息S对第101-300帧音频帧进行调整,如果音频振幅C对应的振幅调整系数k和音频振幅B对应的振幅调整系数j不相同,例如k小于j,则在振幅调整系数j和振幅调整系数k之间增加10个子振幅调整系数,10个子振幅调整系数分别为依次递减的k1,k2,...,k10,则从第301帧音频帧开始,每10帧音频帧对应一个子振幅调整系数,并使用子振幅调整系数k1和降噪信息T对第301-310帧音频帧进行调整,使用振幅调整系数k2和降噪信息T对第311-320帧音频帧进行调整,直至使用振幅调整系数k10和和降噪信息T对第391-400帧音频帧进行调整,然后从401帧音频帧开始使用振幅调整系数k和和降噪信息T进行调整。For example, in step 120, the audio amplitude A corresponding to the audio information of the preset time period a, the audio amplitude B corresponding to the audio information of the preset time period b, and the audio amplitude C corresponding to the audio information of the preset time period c are obtained. In step 130, it is determined that the amplitude adjustment coefficient corresponding to the audio amplitude A is i and the noise reduction information is R, the amplitude adjustment coefficient corresponding to the audio amplitude B is j and the noise reduction information is S, and the amplitude adjustment coefficient corresponding to the audio amplitude B is k and the noise reduction information is T, first adjusting the audio amplitude of the audio frame from the first frame audio frame in the audio information using the amplitude adjustment coefficient i and the noise reduction information R until the preset time period b is reached At the beginning time, for example, the amplitude adjustment coefficient i and the noise reduction information R are used to adjust the 1-100th frame audio frame. If the amplitude adjustment coefficient j corresponding to the audio amplitude B is the same as the amplitude adjustment coefficient i corresponding to the audio amplitude A, Then continue to use the amplitude adjustment coefficient i (ie, the amplitude adjustment coefficient j), and use the noise reduction information S to adjust the audio amplitude of the audio frame from the 101st frame audio frame until the preset time period c is reached. For example, the amplitude adjustment coefficient i and the noise reduction information S are used to adjust the 101st to 300th frame audio frames. If the amplitude adjustment coefficient k corresponding to the audio amplitude C and the amplitude adjustment coefficient j corresponding to the audio amplitude B are different, For example, if k is less than j, 10 sub-amplitude adjustment coefficients are added between the amplitude adjustment coefficient j and the amplitude adjustment coefficient k, and the 10 sub-amplitude adjustment coefficients are respectively successively decreasing k1, k2, ..., k10, and then from the 301st frame At the beginning of the audio frame, each 10 frames of audio frames corresponds to a sub-amplitude adjustment coefficient, and the sub-amplitude adjustment coefficient k1 and the noise reduction information T are used to adjust the 301-310 frame audio frame, and the amplitude adjustment coefficient k2 and the noise reduction information T are used. The 311-320-frame audio frame is adjusted until the 391-400-frame audio frame is adjusted using the amplitude adjustment coefficient k10 and the noise reduction information T, and then the amplitude adjustment coefficient k and the noise reduction information are used from the 401-frame audio frame. T is adjusted.
由此,在不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,提高了音量调节的效率,降低了终端设备的功耗,且通过使用子振幅调整系数对预设数量的音频帧进行调整,可避免由振幅调整系数的跳跃带来的听感突兀的问题,提高用户体验。Thereby, the volume of the sound source is adjusted without changing the original volume of the terminal device system, thereby improving the efficiency of the volume adjustment, reducing the power consumption of the terminal device, and using the sub-amplitude adjustment coefficient to the preset number. The audio frame is adjusted to avoid the sudden hearing problem caused by the jump of the amplitude adjustment coefficient and improve the user experience.
图3是本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:依据所述音频振幅的振幅大小确定和所述音频振幅对应的振幅调整系数。如图3所示,本实施例提供的音量调节方法包括如下步骤。FIG. 3 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to an amplitude magnitude of the audio amplitude. As shown in FIG. 3, the volume adjustment method provided in this embodiment includes the following steps.
步骤310、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 310: Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
步骤320、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 320: Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤330、依据所述音频振幅的振幅大小确定和所述音频振幅对应的振幅调整系数。Step 330: Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the amplitude of the audio amplitude.
在一个实施例中,可通过获取预设长度的音频振幅确定该预设长度的音频振幅的平均振幅大小,进而依据该平均振幅大小确定该预设长度的音频振幅对应的振幅调整系数。在一实施例中,可通过预存的映射关系表进行确定平均振幅对应的振幅调整系数,例如表1所示:In an embodiment, the average amplitude of the audio amplitude of the preset length may be determined by acquiring an audio amplitude of a preset length, and then determining an amplitude adjustment coefficient corresponding to the audio amplitude of the preset length according to the average amplitude. In an embodiment, the amplitude adjustment coefficient corresponding to the average amplitude may be determined by a pre-stored mapping table, as shown in Table 1:
表1Table 1
平均振幅Average amplitude 振幅调整系数Amplitude adjustment factor
大于-3db或小于-50dbGreater than -3db or less than -50db 11
小于-10db且大于-50dbLess than -10db and greater than -50db 22
小于-3db且大于-10dbLess than -3db and greater than -10db 1.51.5
如表1所示,当平均振幅大于-3db或小于-50db时,不对振幅进行调节;当振幅小于-3db且大于-10db时,该振幅属于高振幅区,为该振幅分配振幅调整系数为1.5,当振幅小于-10db且大于-50db时,该振幅属于中振幅区,为该振幅分配振幅调整系数为2,以显著提高中振幅区的振幅大小。步骤340、将所述振幅调整系数划分为预设数目的子振幅调整系数,依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。As shown in Table 1, when the average amplitude is greater than -3 db or less than -50 db, the amplitude is not adjusted; when the amplitude is less than -3 db and greater than -10 db, the amplitude belongs to the high amplitude region, and the amplitude distribution coefficient is 1.5 for the amplitude. When the amplitude is less than -10 db and greater than -50 db, the amplitude belongs to the medium amplitude region, and the amplitude distribution coefficient is 2 for the amplitude to significantly increase the amplitude of the medium amplitude region. Step 340: The amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
由上述可知,通过对不同振幅大小的音频振幅分配不同的振幅调整系数,避免了破音的同时,降低了对噪音的振幅提升,而且在此基础上,进一步对相邻的音频振幅对应的不同的振幅调整系数进行细分后,对音频振幅中预设数量音频帧进行逐级调整,可以使得音源播放过程中声音大小合理,听感平滑。It can be seen from the above that by assigning different amplitude adjustment coefficients to the amplitudes of the audio of different amplitudes, the noise is reduced and the amplitude of the noise is reduced, and on the basis of this, the difference of the adjacent audio amplitudes is further After the amplitude adjustment coefficient is subdivided, the preset number of audio frames in the audio amplitude is adjusted step by step, which can make the sound size reasonable and the sense of hearing smooth during the sound source playing.
图4是本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:依据所述音频振幅的振幅大小和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数。在一实施例中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。如图4所示,本实施例提供的音量调节方法包括如下步骤。FIG. 4 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to an amplitude magnitude of the audio amplitude and volume information of the terminal device. In an embodiment, the volume information includes volume value information, volume increase information, or volume reduction information. As shown in FIG. 4, the volume adjustment method provided in this embodiment includes the following steps.
步骤301、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 301: Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
步骤302、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 302: Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤303、依据所述音频振幅的振幅大小和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数。Step 303: Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the amplitude magnitude of the audio amplitude and the volume information of the terminal device.
在一个实施例中,该获取的音量信息可以是终端设备当前的音量值信息、音量增加信息和音量减小信息中的一种或多种。依据所述音量信息确定和所述音频振幅对应的振幅调整系数可以是依据音量信息中的当前的音量值信息、音量增加信息和音量减小信息中的一种或多种进行确定。In an embodiment, the acquired volume information may be one or more of current volume value information, volume increase information, and volume decrease information of the terminal device. Determining, according to the volume information, an amplitude adjustment coefficient corresponding to the audio amplitude may be determined according to one or more of current volume value information, volume increase information, and volume decrease information in the volume information.
在一实施例中,终端设备由静音到最大音量总共分为18个可调等级,每个等级对应一个音量值,当终端设备播放音源时,可通过系统的音量管理组件的获取音量(getvolume)方法得到终端设备的当前音量值;当用户通过终端设备的调节按钮或者触摸屏进行音量增大或减小调节时,相应的确定当前终端设备的音量是增大还是减小。在一个实施例中,依据当前的音量值确定和音频振幅对应的振幅调整系数,如表2所示:In an embodiment, the terminal device is divided into 18 adjustable levels from mute to maximum volume, and each level corresponds to a volume value. When the terminal device plays the sound source, the volume can be obtained by the volume management component of the system (getvolume). The method obtains the current volume value of the terminal device; when the user increases or decreases the volume through the adjustment button or the touch screen of the terminal device, it is determined whether the volume of the current terminal device is increased or decreased. In one embodiment, the amplitude adjustment factor corresponding to the audio amplitude is determined based on the current volume value, as shown in Table 2:
表2Table 2
音量值Volume value 振幅调整系数Amplitude adjustment factor
55 0.50.5
1010 1.51.5
1515 22
在另一个实施例中,依据当前的音量增加信息或音量减小信息确定和音频振幅对应的振幅调整系数,如表3所示:In another embodiment, the amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the current volume increase information or volume reduction information, as shown in Table 3:
表3table 3
Figure PCTCN2018098656-appb-000001
Figure PCTCN2018098656-appb-000001
在另一个实施例中,还可根据音量增加信息或音量减小信息结合终端的音量值共同确定振幅调整系数以对音频振幅实现调整。In another embodiment, the amplitude adjustment coefficient may be jointly determined according to the volume increase information or the volume reduction information in conjunction with the volume value of the terminal to achieve adjustment of the audio amplitude.
在一实施例中,可依据终端设备的音量信息确定多个振幅调整系数,例如依据终端设备的音量信息确定了第一振幅调整系数、第二振幅调整系数和第三振幅调整系数,其中,第一振幅调整系数小于第二振幅调整系数,第二振幅调整系数小于第三振幅调整系数,然后依据音频振幅的振幅大小确定每个音频振幅对应三个振幅调整系数中的哪个振幅调整系数,例如为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值且大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值且大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,第一预设阈值大于第二预设阈值,第二预设阈值大于第三预设阈值,则如果某一音频振幅的振幅大小小于第三预设阈值,则确定该音频振幅对应的振幅调整系数为第一振幅调整系数。In an embodiment, a plurality of amplitude adjustment coefficients may be determined according to volume information of the terminal device, for example, determining a first amplitude adjustment coefficient, a second amplitude adjustment coefficient, and a third amplitude adjustment coefficient according to volume information of the terminal device, where An 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, and then according to the amplitude of the audio amplitude, which of the three amplitude adjustment coefficients is corresponding to each audio amplitude, for example, And an audio amplitude that is greater than the first preset threshold or less than the third preset threshold, the first amplitude adjustment coefficient is allocated, and the second amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the first preset threshold and greater than the second preset threshold. And a third amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the second preset threshold and greater than the third preset threshold, where the first preset threshold is greater than the second preset threshold, and the second preset threshold is greater than the third preset threshold And if the amplitude of the amplitude of the audio amplitude is less than the third preset threshold, determining the audio amplitude corresponding to A first amplitude adjustment factor is an amplitude adjustment coefficient.
在一实施例中,确定和所述音频振幅对应的振幅调整系数方式可以是:为大于第一预设阈值或小于第三预设阈值的音频振幅分配第一振幅调整系数,为小于或等于第一预设阈值且大于第二预设阈值的音频振幅分配第二振幅调整系数,为小于或等于第二预设阈值且大于第三预设阈值的音频振幅分配第三振幅调整系数,其中,所述第一振幅调整系数小于所述第二振幅调整系数,所述第二振幅调整系数小于所述第三振幅调整系数。在一实施例中,该第一预设阈值可以是-3db,第二预设阈值可以是-10db,第三预设阈值可以是-50db,相应的,第一振幅调整系数为1(即不进行调整),第二振幅调整系数为1.4,第三振幅调整系数为1.8。在一实施例中,对于振幅过大(例如,大于-3db)或振幅过小(例如,小于-50db)的音频振幅不进行振幅调节,避免了对过大振幅调节后造成的破音,也避免了对过小的噪音进行调高带来的杂音增强的问题,进一步优化了音量调节方法。In an embodiment, determining an amplitude adjustment coefficient corresponding to the audio amplitude may be: 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 a second amplitude adjustment coefficient is allocated to the audio amplitude of the preset threshold and greater than the second preset threshold, and the third amplitude adjustment coefficient is allocated to the audio amplitude that is less than or equal to the second preset threshold and greater than the third preset threshold, where 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. In an embodiment, the first preset threshold may be -3db, the second preset threshold may be -10db, and the third preset threshold may be -50db, correspondingly, the first amplitude adjustment coefficient is 1 (ie, no The adjustment is made), the second amplitude adjustment coefficient is 1.4, and the third amplitude adjustment coefficient is 1.8. In an embodiment, amplitude adjustment is not performed for an audio amplitude having an excessively large amplitude (for example, greater than -3 db) or an amplitude being too small (for example, less than -50 db), thereby avoiding breakage caused by excessive amplitude adjustment. The problem of noise enhancement caused by the increase of too small noise is avoided, and the volume adjustment method is further optimized.
步骤304、将所述振幅调整系数划分为预设数目的子振幅调整系数,依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。图5是本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。如图5所示,本实施例提供的音量调节方法包括如下步骤。Step 304: Divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients, and adjust the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information. FIG. 5 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to a maximum amplitude and an average amplitude of the audio information. As shown in FIG. 5, the volume adjustment method provided in this embodiment includes the following steps.
步骤401、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 401: Acquire audio information of the sound source when detecting that the terminal device performs sound source playback.
步骤402、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 402: Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤403、依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。Step 403: Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the maximum amplitude and the average amplitude of the audio information.
在一实施例中,在对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息后,其中,该振幅信息由多个振幅值组成,可确定多个振幅值中的最大振幅以及多个振幅的平均振幅。在另一实施例中,当检测音源播放时,可获取预设长度的音频信息,将获取的预设长度的音频信息中的最大振幅和平均振幅作为音频信息的最大振幅和平均振幅,或者实时地对音频信息的每一帧音频帧的音频振幅进行确定,确定多帧音频帧的音频振 幅中的最大振幅以及多帧音频帧的音频振幅的平均振幅,进而确定音频信息的最大振幅和平均振幅,进而依据音频信息的最大振幅和平均振幅确定振幅调整系数。In an embodiment, the digital audio signal decoded by the audio decoder is sampled to obtain the amplitude information in the preset time period T, wherein the amplitude information is composed of multiple amplitude values, and multiple amplitude values can be determined. The maximum amplitude in and the average amplitude of multiple amplitudes. In another embodiment, when detecting the sound source playing, the preset length of the audio information may be acquired, and the maximum amplitude and the average amplitude of the acquired preset length audio information are taken as the maximum amplitude and the average amplitude of the audio information, or in real time. Determining the audio amplitude of each frame of audio information of the audio information, determining the maximum amplitude of the audio amplitude of the multi-frame audio frame and the average amplitude of the audio amplitude of the multi-frame audio frame, thereby determining the maximum amplitude and average amplitude of the audio information. And determining the amplitude adjustment coefficient based on the maximum amplitude and the average amplitude of the audio information.
在一实施例中,所述依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数包括:如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅和所述平均振幅确定和所述音频振幅对应的振幅调整系数。例如,当最大振幅和平均振幅的差值大于预设阈值(如2db)时,则依据所述最大振幅和所述平均振幅确定和所述音频振幅对应的振幅调整系数,如果差值不大于预设阈值,则不进行音量调整。在一实施例中,当最大振幅和平均振幅差值较大时(如0.2db),为避免播放到较大振幅的音源时音量较大,则确定一个较小的振幅调整系数(如0.7),从而对较高的振幅进行调节以降低音量。In an embodiment, the determining, according to the maximum amplitude and the average amplitude of the audio information, an amplitude adjustment coefficient corresponding to the audio amplitude, if the difference between the maximum amplitude and the average amplitude satisfies a preset condition, An amplitude adjustment coefficient corresponding to the audio amplitude is determined based on the maximum amplitude and the average amplitude. For example, when the difference between the maximum amplitude and the average amplitude is greater than a preset threshold (eg, 2 db), an amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the maximum amplitude and the average amplitude, if the difference is not greater than a pre- If the threshold is set, the volume adjustment will not be performed. In an embodiment, when the difference between the maximum amplitude and the average amplitude is large (for example, 0.2 db), in order to avoid a loud volume when playing a sound source with a large amplitude, a smaller amplitude adjustment coefficient (such as 0.7) is determined. Thus, the higher amplitude is adjusted to lower the volume.
步骤404、依据所述振幅调整系数和所述降噪信息对所述音源的音频振幅进行调整。Step 404: Adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
由此,可依据最终确定的振幅调整系数和降噪信息对音源的音频振幅进行调整。Thereby, the audio amplitude of the sound source can be adjusted according to the finally determined amplitude adjustment coefficient and noise reduction information.
本实施例提供的方案实现了依据音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数,可避免播放到较大振幅的音源时音量较大,提高了音源的播放效果。The solution provided by the embodiment determines that the amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the maximum amplitude and the average amplitude of the audio information, so that the volume of the sound source with a large amplitude is prevented from being played, and the sound source is improved.
图6为本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。参见图6,本实施例提供的音量调节方法包括如下步骤。FIG. 6 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises: determining an amplitude adjustment coefficient corresponding to the audio amplitude according to a maximum amplitude, an average amplitude of the audio information, and volume information of the terminal device, The volume information includes volume value information, volume increase information, or volume decrease information. Referring to FIG. 6, the volume adjustment method provided in this embodiment includes the following steps.
步骤501、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 501: Acquire audio information of the audio source when detecting that the terminal device performs sound source playback.
步骤502、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 502: Determine, according to the audio information, an audio amplitude corresponding to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤503、依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数。Step 503: Determine an amplitude adjustment coefficient corresponding to the audio amplitude according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device.
在一实施例中,在获取音频信息的最大振幅和平均振幅的基础上,还可获取终端设备的音量信息,进而依据音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数。In an embodiment, on the basis of obtaining the maximum amplitude and the average amplitude of the audio information, the volume information of the terminal device may also be acquired, and then the audio is determined according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device. The amplitude adjustment factor corresponding to the amplitude.
在一个实施例中,所述依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数包括:如果所述最大振幅和所述平均振幅的差值满足预设条件,则依据所述最大振幅、所述平均振幅和所述音量值确定振幅调整系数。在一实施例中,当最大振幅和平均振幅差值较大时(如0.2db),为避免播放到较大振幅的音源时音量较大,对较高的振幅进行调节以降低音量。在一实施例中,若最大振幅和平均振幅之差不满足预设条件,即相差不大,则不对音源的音频振幅进行调节。In one embodiment, the determining, according to the maximum amplitude of the audio information, the average amplitude, and the volume information of the terminal device, the amplitude adjustment coefficient corresponding to the audio amplitude comprises: if the difference between the maximum amplitude and the average amplitude When the value satisfies the preset condition, the amplitude adjustment coefficient is determined according to the maximum amplitude, the average amplitude, and the volume value. In one embodiment, when the difference between the maximum amplitude and the average amplitude is large (e.g., 0.2 db), to avoid a louder volume when playing to a larger amplitude source, the higher amplitude is adjusted to lower the volume. In an embodiment, if 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 audio amplitude of the sound source is not adjusted.
在一个实施例中,如果所述最大振幅和所述平均振幅的差值满足预设条件,可依据所述最大振幅和所述平均振幅的差值以及所述音量值确定振幅调整系数。且可依据所述振幅调整系数,对所述音源中大于预设振幅阈值的音频振幅进行调节。在一实施例中,依据最大振幅和平均振幅的差值以及终端设备当前的音量值确定振幅调整系数的关系如表4:In one embodiment, if the difference between the maximum amplitude and the average amplitude satisfies a preset condition, the amplitude adjustment coefficient may be determined according to the difference between the maximum amplitude and the average amplitude and the volume value. And adjusting, according to the amplitude adjustment coefficient, an audio amplitude of the sound source that is greater than a preset amplitude threshold. In an embodiment, the relationship between the amplitude adjustment coefficients is determined according to the difference between the maximum amplitude and the average amplitude and the current volume value of the terminal device, as shown in Table 4:
表4Table 4
振幅差值Amplitude difference 音量值Volume value 振幅调整系数Amplitude adjustment factor
大于0.4dbGreater than 0.4db 88 0.30.3
大于0.3db且小于0.4dbGreater than 0.3db and less than 0.4db 1010 0.70.7
大于0.2db且小于0.3dbGreater than 0.2db and less than 0.3db 1515 0.90.9
在一实施例中,该预设振幅阈值可以是-2db,即将大于预设振幅阈值的振幅大小乘以对应的振幅调整系数以进行振幅衰减降低音量。由此,实现了对音源中振幅较大的部分进行合 理衰减以避免听感突兀,提高了音源的播放效果。In an embodiment, the preset amplitude threshold may be -2 db, that is, the amplitude of the amplitude greater than the preset amplitude threshold is multiplied by the corresponding amplitude adjustment coefficient to perform amplitude attenuation to reduce the volume. Thereby, the reasonable attenuation of the amplitude portion in the sound source is realized to avoid the sudden sense of hearing, and the sound source playing effect is improved.
步骤504、依据所述振幅调整系数和所述降噪信息对所述音源的音频振幅进行调整。Step 504: Adjust an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
由上述可知,当检测到音频信息中最大振幅和平均振幅的差值满足预设条件的情况下,依据该差值的大小以及终端设备当前音量的大小分配振幅调整系数,提高了音源的播放效果,同时,该振幅调整系数针对满足条件的音源的振幅进行调节,提高了音量调节效率,避免了音源中无关振幅被同步调节带来的调节效果较差的问题。It can be seen from the above that when it is detected that the difference between the maximum amplitude and the average amplitude in the audio information satisfies the preset condition, the amplitude adjustment coefficient is allocated according to the magnitude of the difference and the current volume of the terminal device, thereby improving the playback effect of the sound source. At the same time, the amplitude adjustment coefficient adjusts the amplitude of the sound source that satisfies the condition, improves the volume adjustment efficiency, and avoids the problem that the adjustment effect caused by the synchronous adjustment of the unrelated amplitude in the sound source is poor.
图7是本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,在确定和所述音频振幅对应的振幅调整系数之后,还包括:依据终端设备播放器件的阻抗值对所述振幅调整系数进行调整;相应的,所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:将调整后的振幅调整系数划分为预设数目的子振幅调整系数。如图7所示,本实施例提供的音量调节包括如下步骤。FIG. 7 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: adjusting the amplitude adjustment coefficient according to an impedance value of the terminal device, and correspondingly, adjusting the amplitude The dividing the coefficient into a preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients. As shown in FIG. 7, the volume adjustment provided by this embodiment includes the following steps.
步骤601、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 601: Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
步骤602、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 602: Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤603、确定和所述音频振幅对应的振幅调整系数,依据终端设备的播放器件的阻抗值对所述振幅调整系数进行调整。Step 603: Determine an amplitude adjustment coefficient corresponding to the audio amplitude, and adjust the amplitude adjustment coefficient according to an impedance value of a playback device of the terminal device.
在一个实施例中,可通过功放芯片检测终端设备中安装的播放器件(如:扬声器)的阻抗值,还可以是通过物理方式检测播放器件的阻抗。在一实施例中,该阻抗值越大对应的对振幅调整系数的调整越大。在一实施例中,假设播放器件的标称阻抗值为x,通过检测得到的阻抗值为1.2x,则相应的在确定出的振幅调整系数的基础上,将该振幅调整系数乘以1.2作为调整后的振幅调整系数。In one embodiment, 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. In an embodiment, the greater the impedance value, the greater the adjustment to the amplitude adjustment factor. In an embodiment, assuming that the nominal impedance value of the playback device is x, and the impedance value obtained by the detection is 1.2x, the amplitude adjustment coefficient is multiplied by 1.2 according to the determined amplitude adjustment coefficient. Adjusted amplitude adjustment factor.
步骤604、将调整后的振幅调整系数划分为预设数目的子振幅调整系数,依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。Step 604: The adjusted amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
由上述可知,在对音源的振幅进行调节过程中,引入播放器件的阻抗值作为确定振幅调整系数的参量之一,避免了播放器件随播放时长的增加阻抗值越来越高,进而对正常播放过程中的音量大小产生影响的问题,使得调节后的音量大小更佳符合用户需求,进一步提高了音量调节效果。It can be seen from the above that in the process of adjusting the amplitude of the sound source, the impedance value of the playback device is introduced as one of the parameters for determining the amplitude adjustment coefficient, thereby avoiding the increase of the impedance value of the playback device with the increase of the playing time, and thus the normal playing. The volume of the process has an impact problem, so that the adjusted volume is better in accordance with the user's needs, further improving the volume adjustment effect.
图8是本公开另一实施例提供的一种音量调节方法的流程图。在一实施例中,在确定和所述音频振幅对应的振幅调整系数之后,还包括:依据终端设备所处环境的噪声值对所述振幅调整系数进行调整;相应的,所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:将调整后的振幅调整系数划分为预设数目的子振幅调整系数。如图8所示,本实施例提供的音量调节方法包括如下步骤。FIG. 8 is a flowchart of a volume adjustment method according to another embodiment of the present disclosure. In an embodiment, after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: adjusting the amplitude adjustment coefficient according to a noise value of an environment in which the terminal device is located; correspondingly, the amplitude is The dividing the adjustment coefficient into the preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients. As shown in FIG. 8, the volume adjustment method provided in this embodiment includes the following steps.
步骤701、当检测到终端设备进行音源播放时,获取所述音源的音频信息。Step 701: Acquire audio information of the sound source when detecting that the terminal device performs sound source playing.
步骤702、依据所述音频信息确定所述音频信息对应的音频振幅,确定和所述音频振幅对应的降噪信息。Step 702: Determine an audio amplitude corresponding to the audio information according to the audio information, and determine noise reduction information corresponding to the audio amplitude.
步骤703、确定和所述音频振幅对应的振幅调整系数,依据终端设备所处环境的噪声值对所述振幅调整系数进行调整。Step 703: Determine an amplitude adjustment coefficient corresponding to the audio amplitude, and adjust the amplitude adjustment coefficient according to a noise value of an environment where the terminal device is located.
在一个实施例中,可通过终端设备安装的麦克风采集当前所处环境的噪音以确定对应的噪声值。在一实施中,该噪声值越大对应的对振幅调整系数的调整越大。在一实施例中,假设终端设备在安静环境下的噪声值为y,终端设备处于户外或嘈杂环境中时,确定的噪声值为1.5y,则相应的在确定出的振幅调整系数的基础上,将该振幅调整系数乘以1.5作为调整后的振幅调整系数。在一实施例中,还可依据阻抗值、噪声值以及音频振幅的大小共同确定音源的振幅调整系数。In one embodiment, the noise of the current environment can be collected by the microphone installed by the terminal device to determine a corresponding noise value. In one implementation, the greater the noise value, the greater the adjustment to the amplitude adjustment factor. In an embodiment, assuming that the noise value of the terminal device in a quiet environment is y, and the determined noise value is 1.5 y when the terminal device is in an outdoor or noisy environment, the corresponding amplitude adjustment coefficient is determined. The amplitude adjustment coefficient is multiplied by 1.5 as the adjusted amplitude adjustment coefficient. In an embodiment, the amplitude adjustment coefficient of the sound source may also be determined jointly according to the impedance value, the noise value, and the magnitude of the audio amplitude.
步骤704、将调整后的振幅调整系数划分为预设数目的子振幅调整系数,依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。Step 704: The adjusted amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients, and the audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
由上述可知,在对音源的振幅进行调节过程中,考虑了噪声对终端设备音量的影响,将确定的噪声值作为确定振幅调整系数的参量之一,使得调节后的音量大小更加符合用户需求,进一步提高了音量调节效果。It can be seen from the above that in the process of adjusting the amplitude of the sound source, 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 more in line with the user's demand. Further improved the volume adjustment effect.
图9是本公开一实施例提供的一种音量调节装置的结构框图。该装置用于执行上述实施例提供的音量调节方法,具备执行方法相应的功能模块和有益效果。如图9所示,该装置包括:获取模块10、振幅确定模块20、调节信息确定模块30和调节模块40。FIG. 9 is a structural block diagram of a volume adjustment apparatus according to an embodiment of the present disclosure. The device 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. As shown in FIG. 9, the apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment information determination module 30, and an adjustment module 40.
其中,获取模块10,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息。The obtaining module 10 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. In an embodiment, the playing of the sound source mainly includes the steps of acquiring, decoding, and outputting the sound source file. In an embodiment, 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. In an embodiment, after acquiring the sound source file, the sound source file is loaded into a memory buffer, and the sound source file loaded into the memory buffer is decoded. Before the decoding starts, if the sound source file contains video data at the same time, separation of the audio data and the video data is required, and the separated audio data is input to the audio decoder. In an embodiment, the audio decoder 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 the audio signal according to the analog audio signal. Audio Player. In one embodiment, when it is detected that the sound source play event is triggered, it is determined that the terminal device starts playing the sound source. In an embodiment, the triggering event may be that the playing button displayed in the touch screen is detected to be pressed, or may be determined to determine that the terminal device performs sound source playing when the playing device of the terminal device detects that the sound starts playing.
当检测到终端设备进行音源播放时,获取所述音源的音频信息。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,确定该音源对应的音频信息。在另一实施例中,还可以获取当前播放的音源的原始文件,通过对该原始文件的解析确定音源对应的音频信息。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息。When the terminal device detects the sound source playing, the audio information of the sound source is acquired. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to determine audio information corresponding to the audio source. In another embodiment, 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. In another embodiment, taking the Android system as an example, the audio information of the audio source can be obtained through the android.media.MediaRecorder class or the android.media.AudioRecord class.
振幅确定模块20,设置为依据所述音频信息确定所述音频信息对应的音频振幅。The amplitude determining module 20 is configured to determine an audio amplitude corresponding to the audio information according to the audio information.
振幅指物体震动过程中偏离原来位置的最大距离,人耳听到的声音的响度与音源的振幅相关,振幅越大响度越强。在一个实施例中,可对音频解码器解码得到的数字音频信号进行取样,获取预设时间段T内的振幅信息。在一实施例中,该振幅信息可由多个振幅值组成,依据得到的多个振幅值可相应的确定在该预设时间段T内播放的音源的振幅曲线。在另一实施例中,以Android系统为例,可通过android.media.MediaRecorder类或android.media.AudioRecord类获取音源的音频信息后得到对应的振幅大小。在另一实施例中,当获取到的音频信息为音源对应的原始文件时,可通过对原始文件进行解析以得到对应的振幅大小。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. In one embodiment, the digital audio signal decoded by the audio decoder may be sampled to obtain amplitude information within a preset time period T. In an embodiment, the amplitude information may be composed of a plurality of amplitude values, and the amplitude curves of the sound sources played during the preset time period T may be correspondingly determined according to the obtained plurality of amplitude values. In another embodiment, taking the Android system as an example, 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. In another embodiment, when the acquired audio information is the original file corresponding to the sound source, the original file may be parsed to obtain a corresponding amplitude size.
在一个实施例中,当检测音源播放时,每隔预设时间(如1s、3s或10s)确定一次振幅,或者实时地对音频信息的每一帧音频帧的振幅进行确定。在一实施例中,所述获取模块10是设置为:当检测到终端设备进行音源播放时,获取所述音源的音频帧信息;所述振幅确定模块20是设置为:依据所述音频帧信息确定所述音频信息中每一帧音频帧的音频振幅。在一实施例中,当检测到音源播放时,对音源文件进行解析得到音频帧序列,根据音频帧序列的每一帧确定每一帧对应的振幅。In one embodiment, when detecting the sound source playing, the amplitude is determined once every preset time (eg, 1 s, 3 s, or 10 s), or the amplitude of each frame of the audio information of the audio information is determined in real time. In an embodiment, the acquiring module 10 is configured to: when detecting that the terminal device performs sound source playing, acquire audio frame information of the sound source; the amplitude determining module 20 is configured to: according to the audio frame information Determining an audio amplitude of each frame of the audio information. In an embodiment, when the sound source is detected, the sound source file is parsed to obtain an audio frame sequence, and the amplitude corresponding to each frame is determined according to each frame of the audio frame sequence.
调节信息确定模块30,设置为确定和所述音频振幅对应的振幅调整系数以及降噪信息。The adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient and noise reduction information corresponding to the audio amplitude.
在一个实施例中,降噪信息可以是依据音频振幅确定出的噪声信息的反向输出信息。在一实施例中,当依据音频振幅确定的音频振幅对应的噪声振幅越大,则降噪信息中反向输出的振幅也相应增大,当依据音频振幅确定的音频振幅对应的噪声振幅相对较小时,则降噪信息中反向输出的振幅也相应减小,由此实现了通过分析音频振幅合理地确定降噪信息区间,进而完成自动降噪,无需人为设置降噪等级,同时,由于针对了实时输入的音频振幅确定降 噪信息,降噪效果更佳。In one embodiment, the noise reduction information may be inverted output information of the noise information determined from the audio amplitude. In an embodiment, when the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is larger, the amplitude of the reverse output in the noise reduction information is correspondingly increased, and the noise amplitude corresponding to the audio amplitude determined according to the audio amplitude is relatively larger. In hours, the amplitude of the reverse output in the noise reduction information is also reduced accordingly, thereby realizing the reasonable determination of the noise reduction information interval by analyzing the audio amplitude, thereby completing the automatic noise reduction, without artificially setting the noise reduction level, and at the same time, The audio amplitude of the real-time input determines the noise reduction information, and the noise reduction effect is better.
调节模块40,设置为依据所述调整系数和所述降噪信息对所述音源的音频振幅进行调整。The adjustment module 40 is configured to adjust the audio amplitude of the sound source according to the adjustment coefficient and the noise reduction information.
在一个实施例中,所述调节信息确定模块30还设置为在所述确定和所述音频振幅对应的振幅调整系数之后,将所述振幅调整系数划分为预设数目的子振幅调整系数;调节模块40是设置为:依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。In an embodiment, the adjustment information determining module 30 is further configured to: after determining the amplitude adjustment coefficient corresponding to the audio amplitude, dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients; The module 40 is configured to adjust the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
在一实施例中,为提高音源中低振幅区域的音量,对低振幅的音频振幅分配较大的振幅调整系数,高振幅的音频振幅相应的分配一较小的振幅调整系数。在一实施例中,对小于-3db且大于-10db音频振幅分配振幅调整系数为1.2,对小于-10db且大于-50db的音频振幅分配振幅调整系数为2。此时,在音源播放过程中,如果前一段音频振幅的振幅调整系数1.2,而过渡到相邻的下一段音频振幅需要振幅调整系数为2的话,进行调整后的音频振幅会存在明显的听感突兀的问题,这是由振幅调整系数跳跃带来的。在一实施例中,所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:检测到不同音频振幅对应的振幅调整系数满足预设条件时,将所述振幅调整系数划分为预设数目的子振幅调整系数。在一实施例中,所述子振幅调整系数为依据所述振幅调整系数线性或非线性划分得到。在一实施例中,该预设条件可以是相邻的音频振幅的振幅调整系数不相同,如振幅调整系数由前一音频振幅的振幅调整系数1变成(跳跃为)后一音频振幅的振幅调整系数2,或振幅调整系数由2变成1.2等,此时,可以在相邻的两个音频振幅对应的两个振幅调整系数之间增加预设数目的子振幅调整系数。在一实施例中,当确定出的相邻音频振幅的振幅调整系数为1.2和2时,可在1.2到2之间再增加9个等级,即1.28、1.36、1.42、...、1.92。在调节过程中,在振幅调整系数1.2到2的过渡阶段,可将每n(例如,n大于1小于等于20)帧音频帧对应一个子振幅调整系数,依次对每一音频帧的振幅进行调整。在一实施例中,振幅调整系数由1.2改变为2时,改变开始时的第1-20音频帧对应的子振幅调整系数为1.28,第21-40帧音频帧对应的子振幅调整系数为1.36,依次类推。In one embodiment, to increase the volume of the low-amplitude region of the sound source, a large amplitude adjustment coefficient is assigned to the low-amplitude audio amplitude, and a high-amplitude audio amplitude is correspondingly assigned a smaller amplitude adjustment coefficient. In one embodiment, the amplitude adjustment coefficient is 1.2 for audio amplitudes less than -3 db and greater than -10 db, and the amplitude adjustment coefficient is 2 for audio amplitudes less than -10 db and greater than -50 db. At this time, during the sound source playing, if the amplitude of the previous audio amplitude is adjusted by 1.2, and the transition to the next next audio amplitude requires an amplitude adjustment coefficient of 2, the adjusted audio amplitude will have a distinct sense of hearing. The abrupt problem, which is caused by the jump of the amplitude adjustment factor. In an embodiment, the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: when detecting that an amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into A preset number of sub-amplitude adjustment factors. In an embodiment, the sub-amplitude adjustment coefficients are obtained by linear or non-linear division of the amplitude adjustment coefficients. In an embodiment, the preset condition may be that the amplitude adjustment coefficients of the adjacent audio amplitudes are different, for example, the amplitude adjustment coefficient is changed from the amplitude adjustment coefficient 1 of the previous audio amplitude to the amplitude of the latter audio amplitude. The adjustment coefficient 2, or the amplitude adjustment coefficient is changed from 2 to 1.2, etc., at this time, a preset number of sub-amplitude adjustment coefficients can be added between the two amplitude adjustment coefficients corresponding to the adjacent two audio amplitudes. In an embodiment, when the amplitude adjustment coefficients of the determined adjacent audio amplitudes are 1.2 and 2, an additional 9 levels, that is, 1.28, 1.36, 1.42, ..., 1.92, may be added between 1.2 and 2. In the adjustment process, in the transition phase of the amplitude adjustment coefficient 1.2 to 2, each n (for example, n is greater than 1 and less than or equal to 20) frame audio frames may be corresponding to one sub-amplitude adjustment coefficient, and the amplitude of each audio frame is sequentially adjusted. . In an embodiment, when the amplitude adjustment coefficient is changed from 1.2 to 2, the sub-amplitude adjustment coefficient corresponding to the 1-20th audio frame at the beginning of the change is 1.28, and the sub-amplitude adjustment coefficient corresponding to the 21-40th frame audio frame is 1.36. ,And so on.
在一实施例中,对音频振幅进行调整的过程可以是:对音源文件进行解析,对得到的音频数据中的表征振幅信息的数据进行修改,修改完毕后再进行封装,当缓冲到对应的音源文件并被播放时音频振幅相应的已被增大;还可以是,在音源播放的解码过程中,通过对得到的数字音频信号进行分析得到音频振幅,将该振幅数据乘以对应的振幅调整系数以改变振幅大小,进而对音源的音量进行调节。由此,实现了在不改变终端设备系统原有音量的前提下对音源音量的大小进行了调节,调节过程可以在音源文件未进入缓冲区前,以减少播放负载,也可以是针对缓冲区中的音源内容进行调节以提高调节效率。In an embodiment, the process of adjusting the audio amplitude may be: parsing the audio file, modifying the data representing the amplitude information in the obtained audio data, and then performing the encapsulation after the modification, when buffering to the corresponding audio source. When the file is played, the audio amplitude is correspondingly increased; or, in the decoding process of the sound source playing, the audio amplitude is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the corresponding amplitude adjustment coefficient. To change the amplitude, 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 sound source content is adjusted to improve the adjustment efficiency.
本实施例提供的技术方案,提高了音量调节效率,降低了移动终端的功耗,且通过使用降噪信息对音频振幅进行调整可实现自动降噪,无需人为设置降噪等级,同时,由于针对了实时输入的音频振幅确定降噪信息,降噪效果更佳。The technical solution provided by the embodiment improves the volume adjustment efficiency, reduces the power consumption of the mobile terminal, and automatically adjusts the audio amplitude by using the noise reduction information, and does not need to manually set the noise reduction level, and at the same time, The audio amplitude of the real-time input determines the noise reduction information, and the noise reduction effect is better.
在一实施例中,所述调节信息确定模块30还设置为:In an embodiment, the adjustment information determining module 30 is further configured to:
在所述确定和所述音频振幅对应的振幅调整系数之后,将所述振幅调整系数划分为预设数目的子振幅调整系数。After determining the amplitude adjustment coefficient corresponding to the audio amplitude, the amplitude adjustment coefficient is divided into a preset number of sub-amplitude adjustment coefficients.
所述调节模块40是设置为:The adjustment module 40 is configured to:
依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。The audio amplitude is adjusted according to the sub-amplitude adjustment coefficient and the noise reduction information.
在一实施例中,所述调节信息确定模块30是设置为通过如下方式将所述振幅调整系数划分为预设数目的子振幅调整系数:In an embodiment, the adjustment information determining module 30 is configured to divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients by:
检测到不同音频振幅对应的振幅调整系数满足预设条件时,将所述振幅调整系数划分为预设数目的子振幅调整系数,其中,所述子振幅调整系数为依据所述振幅调整系数线性或非线性划分得到。When detecting that the amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients, wherein the sub-amplitude adjustment coefficient is linear according to the amplitude adjustment coefficient or Nonlinear division is obtained.
在一实施例中,所述调整信息确定模块30是设置为通过如下方式确定和所述音频振幅对应的振幅调整系数:In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by:
依据所述音频振幅的振幅大小确定和所述音频振幅对应的振幅调整系数。An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the amplitude magnitude of the audio amplitude.
在一实施例中,所述调整信息确定模块30是设置为通过如下方式确定和所述音频振幅对应的振幅调整系数:In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by:
依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to a maximum amplitude and an average amplitude of the audio information.
在一实施例中,所述调整信息确定模块30是设置为过如下方式确定和所述音频振幅对应的振幅调整系数:In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude as follows:
依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。And determining, according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device, an amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume decrease information.
在一实施例中,所述调整信息确定模块30是设置为过如下方式确定和所述音频振幅对应的振幅调整系数:In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude as follows:
依据所述音频振幅的振幅大小和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。And determining, according to the amplitude magnitude of the audio amplitude and the volume information of the terminal device, an amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume reduction information.
在一实施例中,所述调整信息确定模块30还设置为:In an embodiment, the adjustment information determining module 30 is further configured to:
在确定和所述音频振幅对应的振幅调整系数之后,依据终端设备的播放器件的阻抗值和/或终端设备所处环境的噪声值对所述振幅调整系数进行调整;After determining the amplitude adjustment coefficient corresponding to the audio amplitude, adjusting the amplitude adjustment coefficient according to the impedance value of the playback device of the terminal device and/or the noise value of the environment in which the terminal device is located;
调整信息确定模块30是设置为通过如下方式将所述振幅调整系数划分为预设数目的子振幅调整系数:将调整后的振幅调整系数划分为预设数目的子振幅调整系数。The adjustment information determining module 30 is configured to divide the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients by dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
请继续参照图9,图9是本公开另一实施例提供的一种音量调节装置的结构框图。该装置用于执行上述实施例提供的音量调节方法,具备执行方法相应的功能模块和有益效果。如图9所示,该装置包括:获取模块10、振幅确定模块20、调节信息确定模块30和调节模块40。Please refer to FIG. 9 , which is a structural block diagram of a volume adjustment apparatus according to another embodiment of the present disclosure. The device 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. As shown in FIG. 9, the apparatus includes an acquisition module 10, an amplitude determination module 20, an adjustment information determination module 30, and an adjustment module 40.
在一实施例中,获取模块10,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息;振幅确定模块20,设置为依据所述音频信息确定所述音频信息对应的音频振幅;调节信息确定模块30,设置为确定和所述音频振幅对应的振幅调整系数以及降噪信息;调节模块40,设置为依据所述调整系数和所述降噪信息对所述音源的音频振幅进行调整。In an embodiment, the obtaining module 10 is configured to acquire audio information of the sound source when the terminal device detects the sound source playing, and the amplitude determining module 20 is configured to determine the audio corresponding to the audio information according to the audio information. An amplitude adjustment adjustment module 30 is configured to determine an amplitude adjustment coefficient and noise reduction information corresponding to the audio amplitude; and an adjustment module 40 configured to adjust an audio amplitude of the sound source according to the adjustment coefficient and the noise reduction information Make adjustments.
在一实施例中,所述振幅确定模块20是设置为依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅;所述调节信息确定模块30是设置为:确定和每个所述音频振幅对应振幅调整系数和降噪信息;所述调节模块40是设置为:当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数,其中,所述预设数目的子振幅调整系数是在所述第一振幅调整系数和所述第二振幅调整系数之间依次递增或依次递减的;依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整,其中,所述起始帧为振幅调整系数由所述第一振幅调整系数变化为所述第二振幅调整系数时的首个音频帧。In an embodiment, the amplitude determining module 20 is configured to determine, according to the audio information, a plurality of audio amplitudes respectively corresponding to audio information of the plurality of preset time segments in the audio information; the adjustment information determining module 30 Is configured to: determine an amplitude adjustment coefficient and noise reduction information corresponding to each of the audio amplitudes; the adjustment module 40 is configured to: the first amplitude adjustment coefficient corresponding to the first audio amplitude and the adjacent second audio amplitude When a corresponding second amplitude adjustment coefficient is different, a preset number of sub-amplitude adjustment coefficients are added between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient, wherein the preset number of sub-amplitude adjustments The coefficient is sequentially incremented or sequentially decreased between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient; and the noise reduction information corresponding to the preset number of sub-amplitude adjustment coefficients and the second audio amplitude Adjusting a preset number of audio frames from a start frame in the audio information, wherein the start frame is an amplitude adjustment coefficient adjusted by the first amplitude Variation coefficients when the first audio frame to the second amplitude adjusting coefficient.
在一实施例中,所述振幅确定模块20是设置为:在每个所述预设时间段内对所述音频信息进行至少两次取样获取每个所述预设时间段对应的至少两个音频振幅;将每个所述预设时间段各自对应的所述至少两个音频振幅之间的平均振幅确定为每个所述预设时间段的音频信息对应的音频振幅。In an embodiment, the amplitude determining module 20 is configured to: perform at least two sampling of the audio information in each of the preset time periods to obtain at least two corresponding to each of the preset time periods. Audio amplitude; determining an average amplitude between the at least two audio amplitudes corresponding to each of the preset time periods as an audio amplitude corresponding to audio information of each of the preset time periods.
在一实施例中,所述振幅确定模块20是设置为:每隔所述预设时间段依据所述音频信息确定一次音频振幅。In an embodiment, the amplitude determining module 20 is configured to determine an audio amplitude according to the audio information every the preset time period.
在一实施例中,所述振幅确定模块20是设置为:依据所述音频信息确定所述音频信息的每一帧音频帧对应的音频振幅,其中,所述每一帧音频帧对应一个所述预设时间段。In an embodiment, the amplitude determining module 20 is configured to: determine an audio amplitude corresponding to each frame of the audio information of the audio information according to the audio information, where each frame of the audio frame corresponds to one Preset time period.
在一实施例中,所述预设数量的音频帧,包括:第一组音频帧至第M组音频帧;所述预设数目的子振幅调整系数,包括:依次递增或递减的第一子振幅调整系数至第N子振幅调整系数,其中,M和N均为大于或等于1的正整数,且M大于或等于N;所述调节模块是设 置为通过如下方式实现依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整:使用所述第一子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第一组音频帧进行调整,使用第二子振幅调整系数和所述第二音频振幅对应的降噪信息对第二组音频帧进行调整,直至使用所述第N子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第N组音频帧进行调整。In an embodiment, the preset number of audio frames includes: a first group of audio frames to an Mth group of audio frames; and the preset number of sub-amplitude adjustment coefficients includes: a first sub-increment or decrement The amplitude adjustment coefficient to the Nth sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N; the adjustment module is configured to be implemented according to the preset number as follows a sub-amplitude adjustment coefficient and a noise reduction information corresponding to the second audio amplitude to adjust a preset number of audio frames from a start frame in the audio information: using the first sub-amplitude adjustment coefficient and Adjusting the first set of audio frames by using the noise reduction information corresponding to the second audio amplitude, and adjusting the second set of audio frames by using the second sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude, until And adjusting the Nth group of audio frames by using the Nth sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude.
在一实施例中,所述调节信息确定模块30是设置为通过如下方式确定和所述多个音频振幅一一对应的多个振幅调整系数:依据所述多个音频振幅的振幅大小确定和所述多个音频振幅一一对应的多个振幅调整系数。In an embodiment, the adjustment information determining module 30 is configured to determine, according to the manner, a plurality of amplitude adjustment coefficients that are in one-to-one correspondence with the plurality of audio amplitudes: determining and determining according to the amplitude magnitude of the plurality of audio amplitudes A plurality of amplitude adjustment coefficients corresponding to the plurality of audio amplitudes in one-to-one correspondence.
在一实施例中,所述调节信息确定模块30是设置为通过如下方式确定和所述音频振幅对应的振幅调整系数:依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by determining: corresponding to the audio amplitude according to a maximum amplitude and an average amplitude of the audio information. Amplitude adjustment factor.
在一实施例中,所述调节信息确定模块30是设置为通过如下方式确定和所述音频振幅对应的振幅调整系数:依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。In an embodiment, the adjustment information determining module 30 is configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude by determining a sum according to a maximum amplitude, an average amplitude of the audio information, and volume information of the terminal device. The amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume decrease information.
在一实施例中,所述调整信息确定模块30还设置为:依据以下信息至少之一对所述振幅调整系数进行调整:所述终端设备的播放器件的阻抗值以及所述终端设备所处环境的噪声值;所述调整模块40是设置为通过如下方式增加预设数目的子振幅调整系数:当所述第一音频振幅对应的调整后的第一振幅调整系数和相邻的所述第二音频振幅对应的调整后的第二振幅调整系数不相同时,在调整后的第一振幅调整系数和调整后的第二振幅调整系数之间增加预设数目的子振幅调整系数。In an embodiment, the adjustment information determining module 30 is further configured to: adjust the amplitude adjustment coefficient according to at least one of the following information: an impedance value of the playback device of the terminal device and an environment where the terminal device is located a noise value; the adjustment module 40 is configured to increase a preset number of sub-amplitude adjustment coefficients by: adjusting the first amplitude adjustment coefficient corresponding to the first audio amplitude and the adjacent second When the adjusted second amplitude adjustment coefficients corresponding to the audio amplitudes are different, a preset number of sub-amplitude adjustment coefficients are added between the adjusted first amplitude adjustment coefficient and the adjusted second amplitude adjustment coefficient.
本实施例在上述多个实施例的基础上提供了一种终端设备,图10是本公开实施例提供的一种终端设备的结构示意图,如图10所示,该终端设备200包括:存储器201、处理器(Central Processing Unit,CPU)202、外设接口203、射频(Radio Frequency,RF)电路205、音频电路206、扬声器211、电源管理芯片208、输入/输出(I/O)子系统209、触摸屏212、其他输入/控制设备210以及外部端口204,这些部件通过一个或多个通信总线或信号线207来通信。The present embodiment provides a terminal device based on the foregoing multiple embodiments. FIG. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure. As shown in FIG. 10, the terminal device 200 includes: a memory 201. A central processing unit (CPU) 202, a peripheral interface 203, a radio frequency (RF) circuit 205, an audio circuit 206, a speaker 211, a power management chip 208, and an input/output (I/O) subsystem 209 Touch screen 212, other input/control devices 210, and external port 204 are communicated via one or more communication buses or signal lines 207.
图10示出的终端设备200仅仅是终端设备的一个范例,并且终端设备200可以具有比图10中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图10中所示出的多种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The terminal device 200 illustrated in FIG. 10 is merely an example of a terminal device, and the terminal device 200 may have more or fewer components than those illustrated in FIG. 10, and two or more components may be combined, or Can have different component configurations. The various components shown in FIG. 10 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
下面就本实施例提供的终端设备200进行详细的描述,该终端设备200以智能手机为例。The terminal device 200 provided in this embodiment is described in detail below. The terminal device 200 takes a smart phone as an example.
存储器201,所述存储器201可以被CPU202以及外设接口203等访问,所述存储器201可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 201 can be accessed by the CPU 202 and the peripheral interface 203, etc., and the memory 201 can include a high speed random access memory, and can also include a nonvolatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
外设接口203,所述外设接口203可以将设备的输入和输出外设连接到CPU202和存储器201。 Peripheral interface 203, which can connect the input and output peripherals of the device to CPU 202 and memory 201.
I/O子系统209,所述I/O子系统209可以将设备上的输入外设和输出外设,例如触摸屏212和其他输入/控制设备210,连接到外设接口203。I/O子系统209可以包括显示控制器2091和设置为控制其他输入/控制设备210的一个或多个输入控制器2092。其中,一个或多个输入控制器2092从其他输入/控制设备210接收电信号或者向其他输入/控制设备210发送电信号,其他输入/控制设备210可以包括物理按钮(按压按钮或摇臂按钮等)、拨号盘、滑动开关、操纵杆或点击滚轮。在一实施例中,输入控制器2092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 209, which can connect input peripherals 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 that are configured to control other input/control devices 210. Wherein, 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 (pressing buttons or rocker buttons, etc.) ), dial, slide switch, joystick or click on the wheel. In an embodiment, the input controller 2092 can be coupled to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏212,所述触摸屏212是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标以及视频等。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.
I/O子系统209中的显示控制器2091从触摸屏212接收电信号或者向触摸屏212发送电信号。触摸屏212检测触摸屏212上的接触,显示控制器2091将检测到的接触转换为与显示在触摸屏212上的用户界面对象的交互,即实现人机交互,显示在触摸屏212上的用户界面对象可以是运行游戏的图标或联网到相应网络的图标等。在一实施例中,终端设备200还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。 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 212, 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 may be Run the game's icons or icons that are networked to the appropriate network. In an embodiment, the terminal device 200 may further 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.
RF电路205,设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息以及电子邮件等。在一实施例中,RF电路205接收并发送RF信号,RF信号也称为电磁信号,RF电路205将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路205可以包括用于执行这些功能的已知电路,RF电路205包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组以及用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 205 is configured to establish communication between the mobile phone and the wireless network (ie, the network side) to implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages and emails. In an embodiment, the RF circuit 205 receives and transmits an RF signal, 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 to communicate. The RF circuit 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, Coder-CODEter (CODEC) chipset and Subscriber Identity Module (SIM) and so on.
音频电路206,设置为从外设接口203接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器211。The audio circuit 206 is arranged 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.
扬声器211,设置为将手机通过RF电路205从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 211 is arranged 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.
电源管理芯片208,设置为为CPU202、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 208 is configured to provide power and power management for 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 disclosure, and have corresponding function modules and beneficial effects for performing the method. For the technical details that are not described in detail in the above embodiments, reference may be made to the volume adjustment method of the terminal device provided by any embodiment of the present disclosure.
本公开实施例还提供一种包含终端设备可执行指令的存储介质,所述终端设备可执行指令在由终端设备处理器执行时用于执行一种音量调节方法,该方法包括:Embodiments of the present disclosure also provide a storage medium including terminal device executable instructions for performing a volume adjustment method when executed by a terminal device processor, the method comprising:
当检测到终端设备进行音源播放时,获取所述音源的音频信息;依据所述音频信息确定所述音频信息对应的音频振幅;确定和所述音频振幅对应的振幅调整系数以及降噪信息,依据所述振幅调整系数和所述降噪信息对所述音频振幅进行调整。Obtaining audio information of the audio source when detecting the sound source playing by the terminal device; determining an audio amplitude corresponding to the audio information according to the audio information; determining an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information, according to The amplitude adjustment coefficient and the noise reduction information adjust the audio amplitude.
在一实施例中,在所述确定和所述音频振幅对应的振幅调整系数之后,还包括:将所述振幅调整系数划分为预设数目的子振幅调整系数;所述依据所述调整系数和所述降噪信息对所述音频振幅进行调整包括:依据所述子振幅调整系数和所述降噪信息对所述音频振幅进行调整。In an embodiment, after the determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients; The adjusting, by the noise reduction information, the audio amplitude comprises: adjusting the audio amplitude according to the sub-amplitude adjustment coefficient and the noise reduction information.
在一实施例中,所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:In an embodiment, the dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises:
检测到不同音频振幅对应的振幅调整系数满足预设条件时,将所述振幅调整系数划分为预设数目的子振幅调整系数,其中,所述子振幅调整系数依据所述振幅调整系数线性或非线性划分得到。When detecting that the amplitude adjustment coefficient corresponding to different audio amplitudes satisfies a preset condition, dividing the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients, wherein the sub-amplitude adjustment coefficient is linear or non-linear according to the amplitude adjustment coefficient Linear division is obtained.
在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
依据所述音频振幅的振幅大小确定和所述音频振幅对应的振幅调整系数。An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to the amplitude magnitude of the audio amplitude.
在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to a maximum amplitude and an average amplitude of the audio information.
在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息And determining, according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device, an amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume decrease information.
在一实施例中,所述确定和所述音频振幅对应的振幅调整系数包括:In an embodiment, the determining an amplitude adjustment coefficient corresponding to the audio amplitude comprises:
依据所述音频振幅的振幅大小和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。And determining, according to the amplitude magnitude of the audio amplitude and the volume information of the terminal device, an amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume reduction information.
在一实施例中,在确定和所述音频振幅对应的振幅调整系数之后,还包括:依据终端设备的播放器件的阻抗值和/或终端设备所处环境的噪声值对所述振幅调整系数进行调整;所述将所述振幅调整系数划分为预设数目的子振幅调整系数包括:将调整后的振幅调整系数划分为预设数目的子振幅调整系数。In an embodiment, after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further includes: performing the amplitude adjustment coefficient according to an impedance value of the playback device of the terminal device and/or a noise value of an environment in which the terminal device is located The adjusting the amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients comprises: dividing the adjusted amplitude adjustment coefficient into a preset number of sub-amplitude adjustment coefficients.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如紧凑型光盘只读储存器(Compact Disc Read-Only Memory,CD-ROM)、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如动态随机存取存储器(Dynamic Random Access Memory,DRAM)、双倍数据速率随机存取存储器(Double Data Rate Random Access Memory,DDR RAM)、静态随机存取存储器(Static Random Access Memory,SRAM)、扩展数据输出随机存取存储器(Extended Data Output Random Access Memory,EDO RAM),兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。Storage media - any of a variety of types of memory devices or storage devices. The term "storage medium" is intended to include: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as a dynamic random Random Random Access Memory (DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Extended Data Output Random Access Memory (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 Components, etc. 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. The term "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.
本公开实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的音量调节方法,还可以执行本公开任意实施例所提供的音量调节方法中的相关操作。A storage medium containing computer executable instructions, the computer executable instructions of which are not limited to the volume adjustment method as described above, and may also perform correlation in the volume adjustment method provided by any embodiment of the present disclosure. operating.
上述仅为本公开的实施例及所运用技术原理。The above are only the embodiments of the present disclosure and the technical principles applied thereto.

Claims (20)

  1. 一种音量调节方法,包括:A volume adjustment method includes:
    当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining audio information of the sound source when detecting that the terminal device performs sound source playing;
    依据所述音频信息确定所述音频信息对应的音频振幅;Determining an audio amplitude corresponding to the audio information according to the audio information;
    确定和所述音频振幅对应的振幅调整系数以及降噪信息,依据所述振幅调整系数和所述降噪信息对所述音源的音频振幅进行调整。And determining an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information, and adjusting an audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述依据所述音频信息确定所述音频信息对应的音频振幅,包括:依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅;Determining the audio amplitude corresponding to the audio information according to the audio information, comprising: determining, according to the audio information, a plurality of audio amplitudes respectively corresponding to audio information of the plurality of preset time segments in the audio information;
    所述确定和所述音频振幅对应的振幅调整系数以及降噪信息,包括:确定和每个所述音频振幅对应的振幅调整系数和降噪信息;Determining the amplitude adjustment coefficient and the noise reduction information corresponding to the audio amplitude, comprising: determining an amplitude adjustment coefficient and noise reduction information corresponding to each of the audio amplitudes;
    所述依据所述振幅调整系数和所述降噪信息对所述音源的音频振幅进行调整,包括:当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数,其中,所述预设数目的子振幅调整系数是在所述第一振幅调整系数和所述第二振幅调整系数之间依次递增或依次递减的;以及,依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整,其中,所述起始帧为振幅调整系数由所述第一振幅调整系数变化为所述第二振幅调整系数时的首个音频帧。And adjusting the audio amplitude of the sound source according to the amplitude adjustment coefficient and the noise reduction information, comprising: a first amplitude adjustment coefficient corresponding to the first audio amplitude and a second corresponding to the adjacent second audio amplitude When the amplitude adjustment coefficients are different, a preset number of sub-amplitude adjustment coefficients are added between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient, wherein the preset number of sub-amplitude adjustment coefficients are in the The first amplitude adjustment coefficient and the second amplitude adjustment coefficient are sequentially incremented or sequentially decremented; and, according to the preset number of sub-amplitude adjustment coefficients and the second audio amplitude corresponding to the noise reduction information pair a preset number of audio frames starting from a start frame in the audio information, wherein the start frame is when the amplitude adjustment coefficient is changed from the first amplitude adjustment coefficient to the second amplitude adjustment coefficient The first audio frame.
  3. 根据权利要求2所述的方法,其中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括:The method according to claim 2, wherein the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods in the audio information comprises:
    在每个所述预设时间段内对所述音频信息进行至少两次取样获取每个所述预设时间段对应的至少两个音频振幅;Performing at least two samplings on the audio information in each of the preset time periods to obtain at least two audio amplitudes corresponding to each of the preset time periods;
    将每个所述预设时间段各自对应的所述至少两个音频振幅之间的平均振幅确定为每个所述预设时间段的音频信息对应的音频振幅。And determining an average amplitude between the at least two audio amplitudes corresponding to each of the preset time periods as an audio amplitude corresponding to audio information of each of the preset time periods.
  4. 根据权利要求2所述的方法,其中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括:The method according to claim 2, wherein the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods in the audio information comprises:
    每隔所述预设时间段依据所述音频信息确定一次音频振幅。The audio amplitude is determined once according to the audio information every predetermined period of time.
  5. 根据权利要求2所述的方法,其中,所述依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅,包括::The method according to claim 2, wherein the determining, according to the audio information, the plurality of audio amplitudes corresponding to the audio information of the plurality of preset time periods in the audio information comprises:
    依据所述音频信息确定所述音频信息的每一帧音频帧对应的音频振幅,其中,所述每一帧音频帧对应一个所述预设时间段。Determining, according to the audio information, an audio amplitude corresponding to each frame of the audio information, wherein each frame of the audio frame corresponds to one of the preset time periods.
  6. 根据权利要求2-5任一项所述的方法,其中,所述预设数量的音频帧,包括:第一组音频帧至第M组音频帧;所述预设数目的子振幅调整系数,包括:依次递增或递减的第一子振幅调整系数至第N子振幅调整系数,其中,M和N均为大于或等于1的正整数,且M大于或等于N;The method according to any one of claims 2 to 5, wherein the preset number of audio frames comprises: a first group of audio frames to an Mth group of audio frames; the preset number of sub-amplitude adjustment coefficients, The method includes: a first sub-amplitude adjustment coefficient sequentially increasing or decreasing to a N-th sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N;
    所述依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述 音频信息中的起始帧开始的预设数量的音频帧进行调整,包括:And adjusting the preset number of audio frames from the start frame in the audio information according to the preset number of sub-amplitude adjustment coefficients and the noise reduction information corresponding to the second audio amplitude, including:
    使用所述第一子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第一组音频帧进行调整,使用第二子振幅调整系数和所述第二音频振幅对应的降噪信息对第二组音频帧进行调整,直至使用所述第N子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第N组音频帧进行调整。Adjusting the first set of audio frames by using the first sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude, using a second sub-amplitude adjustment coefficient and a noise reduction corresponding to the second audio amplitude The information is adjusted for the second set of audio frames until the Nth set of audio frames are adjusted using the Nth sub-amplitude adjustment factor and the noise reduction information corresponding to the second audio amplitude.
  7. 根据权利要求2-6任一项所述的方法,其中,所述确定和所述多个音频振幅一一对应的多个振幅调整系数,包括:The method of any one of claims 2-6, wherein the determining a plurality of amplitude adjustment coefficients that correspond one-to-one with the plurality of audio amplitudes comprises:
    依据所述多个音频振幅的振幅大小确定和所述多个音频振幅一一对应的多个振幅调整系数。And determining a plurality of amplitude adjustment coefficients that are in one-to-one correspondence with the plurality of audio amplitudes according to the amplitude magnitudes of the plurality of audio amplitudes.
  8. 根据权利要求1所述的方法,其中,所述确定和所述音频振幅对应的振幅调整系数,包括:The method of claim 1 wherein said determining an amplitude adjustment factor corresponding to said audio amplitude comprises:
    依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。An amplitude adjustment coefficient corresponding to the audio amplitude is determined according to a maximum amplitude and an average amplitude of the audio information.
  9. 根据权利要求1所述的方法,其中,所述确定和所述音频振幅对应的振幅调整系数,包括:The method of claim 1 wherein said determining an amplitude adjustment factor corresponding to said audio amplitude comprises:
    依据所述音频信息的最大振幅、平均振幅和终端设备的音量信息确定和所述音频振幅对应的振幅调整系数,其中,所述音量信息包括音量值信息、音量增加信息或音量减小信息。And determining, according to the maximum amplitude, the average amplitude of the audio information, and the volume information of the terminal device, an amplitude adjustment coefficient corresponding to the audio amplitude, wherein the volume information includes volume value information, volume increase information, or volume decrease information.
  10. 根据权利要求1-9任一项所述的方法,其中,在确定和所述音频振幅对应的振幅调整系数之后,还包括:The method according to any one of claims 1 to 9, wherein after determining the amplitude adjustment coefficient corresponding to the audio amplitude, the method further comprises:
    依据以下信息至少之一对所述振幅调整系数进行调整:所述终端设备的播放器件的阻抗值以及所述终端设备所处环境的噪声值;Adjusting the amplitude adjustment coefficient according to at least one of the following information: an impedance value of the playback device of the terminal device and a noise value of an environment in which the terminal device is located;
    所述当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数,包括:When the first amplitude adjustment coefficient corresponding to the first audio amplitude and the second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different, the first amplitude adjustment coefficient and the second amplitude adjustment coefficient are Add a preset number of sub-amplitude adjustment factors, including:
    当所述第一音频振幅对应的调整后的第一振幅调整系数和相邻的所述第二音频振幅对应的调整后的第二振幅调整系数不相同时,在调整后的第一振幅调整系数和调整后的第二振幅调整系数之间增加预设数目的子振幅调整系数。Adjusting the first amplitude adjustment coefficient when the adjusted first amplitude adjustment coefficient corresponding to the first audio amplitude and the adjusted second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different A preset number of sub-amplitude adjustment coefficients are added between the adjusted second amplitude adjustment coefficient.
  11. 一种音量调节装置,包括:A volume adjustment device includes:
    获取模块,设置为当检测到终端设备进行音源播放时,获取所述音源的音频信息;Obtaining a 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 information determining module configured to determine an amplitude adjustment coefficient corresponding to the audio amplitude and noise reduction information;
    调节模块,设置为依据所述调整系数和所述降噪信息对所述音源的音频振幅进行调整。The adjustment module is configured to adjust an audio amplitude of the sound source according to the adjustment coefficient and the noise reduction information.
  12. 根据权利要求11所述的装置,其中,所述振幅确定模块是设置为依据所述音频信息确定所述音频信息中多个预设时间段的音频信息分别对应的多个音频振幅;The apparatus according to claim 11, wherein the amplitude determining module is configured to determine, according to the audio information, a plurality of audio amplitudes respectively corresponding to audio information of a plurality of preset time periods in the audio information;
    所述调节信息确定模块是设置为:确定和每个所述音频振幅对应的振幅调整系数和降噪信息;The adjustment information determining module is configured to: determine an amplitude adjustment coefficient and noise reduction information corresponding to each of the audio amplitudes;
    所述调节模块是设置为:当第一音频振幅对应的第一振幅调整系数和相邻的第二音频振 幅对应的第二振幅调整系数不相同时,在所述第一振幅调整系数和所述第二振幅调整系数之间增加预设数目的子振幅调整系数,其中,所述预设数目的子振幅调整系数是在所述第一振幅调整系数和所述第二振幅调整系数之间依次递增或依次递减的;以及,依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整,其中,所述起始帧为振幅调整系数由所述第一振幅调整系数变化为所述第二振幅调整系数时的首个音频帧。The adjusting module is configured to: when the first amplitude adjustment coefficient corresponding to the first audio amplitude and the second amplitude adjustment coefficient corresponding to the adjacent second audio amplitude are different, the first amplitude adjustment coefficient and the Adding a preset number of sub-amplitude adjustment coefficients between the second amplitude adjustment coefficients, wherein the preset number of sub-amplitude adjustment coefficients are sequentially incremented between the first amplitude adjustment coefficient and the second amplitude adjustment coefficient Or sequentially decreasing; and, according to the preset number of sub-amplitude adjustment coefficients and the noise reduction information corresponding to the second audio amplitude, performing a preset number of audio frames starting from a start frame in the audio information. The adjustment, wherein the start frame is a first audio frame when an amplitude adjustment coefficient is changed from the first amplitude adjustment coefficient to the second amplitude adjustment coefficient.
  13. 根据权利要求12所述的装置,其中,所述振幅确定模块是设置为:The apparatus of claim 12 wherein said amplitude determining module is configured to:
    在每个所述预设时间段内对所述音频信息进行至少两次取样获取每个所述预设时间段对应的至少两个音频振幅;Performing at least two samplings on the audio information in each of the preset time periods to obtain at least two audio amplitudes corresponding to each of the preset time periods;
    将每个所述预设时间段各自对应的所述至少两个音频振幅之间的平均振幅确定为每个所述预设时间段的音频信息对应的音频振幅。And determining an average amplitude between the at least two audio amplitudes corresponding to each of the preset time periods as an audio amplitude corresponding to audio information of each of the preset time periods.
  14. 根据权利要求12所述的装置,其中,所述振幅确定模块是设置为:每隔所述预设时间段依据所述音频信息确定一次音频振幅。The apparatus according to claim 12, wherein said amplitude determining module is configured to determine an audio amplitude based on said audio information every said predetermined period of time.
  15. 根据权利要求12所述的装置,其中,所述振幅确定模块是设置为:依据所述音频信息确定所述音频信息的每一帧音频帧对应的音频振幅,其中,所述每一帧音频帧对应一个所述预设时间段。The apparatus according to claim 12, wherein said amplitude determining module is configured to: determine an audio amplitude corresponding to each frame of the audio frame of said audio information in accordance with said audio information, wherein said each frame of said audio frame Corresponding to one of the preset time periods.
  16. 根据权利要求12-15任一项所述的装置,其中,所述预设数量的音频帧,包括:第一组音频帧至第M组音频帧;所述预设数目的子振幅调整系数,包括:依次递增或递减的第一子振幅调整系数至第N子振幅调整系数,其中,M和N均为大于或等于1的正整数,且M大于或等于N;The apparatus according to any one of claims 12-15, wherein the preset number of audio frames comprises: a first group of audio frames to an Mth group of audio frames; the preset number of sub-amplitude adjustment coefficients, The method includes: a first sub-amplitude adjustment coefficient sequentially increasing or decreasing to a N-th sub-amplitude adjustment coefficient, wherein M and N are both positive integers greater than or equal to 1, and M is greater than or equal to N;
    所述调节模块是设置为通过如下方式实现依据所述预设数目的子振幅调整系数和所述第二音频振幅对应的降噪信息对从所述音频信息中的起始帧开始的预设数量的音频帧进行调整:使用所述第一子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第一组音频帧进行调整,使用第二子振幅调整系数和所述第二音频振幅对应的降噪信息对第二组音频帧进行调整,直至使用所述第N子振幅调整系数和所述第二音频振幅对应的降噪信息对所述第N组音频帧进行调整。The adjustment module is configured to implement, according to the preset number of sub-amplitude adjustment coefficients and noise reduction information corresponding to the second audio amplitude, a preset number from a start frame in the audio information. Adjusting the audio frame by using the first sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude to adjust the first set of audio frames, using the second sub-amplitude adjustment coefficient and the second The noise reduction information corresponding to the audio amplitude adjusts the second group of audio frames until the Nth group of audio frames are adjusted using the Nth sub-amplitude adjustment coefficient and the noise reduction information corresponding to the second audio amplitude.
  17. 根据权利要求12-16任一项所述的装置,其中,所述调节信息确定模块是设置为:依据所述多个音频振幅的振幅大小确定和所述多个音频振幅一一对应的多个振幅调整系数。The apparatus according to any one of claims 12-16, wherein the adjustment information determining module is configured to: determine a plurality of one-to-one correspondences with the plurality of audio amplitudes according to an amplitude magnitude of the plurality of audio amplitudes Amplitude adjustment factor.
  18. 根据权利要求11所述的装置,其中,所述调节信息确定模块是设置为通过如下方式确定和所述音频振幅对应的振幅调整系数:依据所述音频信息的最大振幅和平均振幅确定和所述音频振幅对应的振幅调整系数。The apparatus according to claim 11, wherein said adjustment information determining module is configured to determine an amplitude adjustment coefficient corresponding to said audio amplitude by: determining and said according to a maximum amplitude and an average amplitude of said audio information The amplitude adjustment factor corresponding to the audio amplitude.
  19. 一种移动终端,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-10中任一项所述的音量调节方法。A mobile terminal comprising: a processor, a memory, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the method of any one of claims 1-10 The volume adjustment method.
  20. 一种包含移动终端可执行指令的存储介质,所述移动终端可执行指令在由移动终端处理器执行时用于执行如权利要求1-10任一项所述的音量调节方法。A storage medium comprising executable instructions of a mobile terminal, the mobile terminal executable instructions, when executed by a mobile terminal processor, for performing the volume adjustment method of any of claims 1-10.
PCT/CN2018/098656 2017-08-18 2018-08-03 Volume adjusting method and device, mobile terminal and storage medium WO2019033943A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710711588.5A CN107465824B (en) 2017-08-18 2017-08-18 Volume adjusting method and device, mobile terminal and storage medium
CN201710711588.5 2017-08-18

Publications (1)

Publication Number Publication Date
WO2019033943A1 true WO2019033943A1 (en) 2019-02-21

Family

ID=60550109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/098656 WO2019033943A1 (en) 2017-08-18 2018-08-03 Volume adjusting method and device, mobile terminal and storage medium

Country Status (2)

Country Link
CN (1) CN107465824B (en)
WO (1) WO2019033943A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112185338A (en) * 2020-09-30 2021-01-05 北京大米科技有限公司 Audio processing method and device, readable storage medium and electronic equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465824B (en) * 2017-08-18 2020-06-05 Oppo广东移动通信有限公司 Volume adjusting method and device, mobile terminal and storage medium
CN108737648B (en) * 2018-05-10 2020-12-04 上海麦克风文化传媒有限公司 Music volume self-adaptive adjusting method, device, storage medium and terminal
CN108897516B (en) * 2018-06-13 2021-04-09 Oppo广东移动通信有限公司 Wearable device volume adjustment method and related product
CN109375893A (en) * 2018-11-20 2019-02-22 北京小米移动软件有限公司 Audio frequency playing method and device
CN112558916B (en) * 2020-12-24 2024-01-05 阿波罗智联(北京)科技有限公司 Audio adjustment method, device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140086422A1 (en) * 2012-09-21 2014-03-27 Hon Hai Precision Industry Co., Ltd. Electronic device, system and method for managing sound effect
CN103701419A (en) * 2013-12-06 2014-04-02 乐视致新电子科技(天津)有限公司 Volume regulating method and device
CN103761063A (en) * 2013-12-19 2014-04-30 北京百度网讯科技有限公司 Method and device for controlling audio output volume in playing device
CN203596902U (en) * 2013-12-05 2014-05-14 无锡焺通微电子有限公司 Audio frequency power amplification integrated circuit chip having linear power volume control function
CN106648527A (en) * 2016-11-08 2017-05-10 乐视控股(北京)有限公司 Volume control method, device and playing equipment
CN106792386A (en) * 2016-12-05 2017-05-31 青岛海信电器股份有限公司 A kind of terminal volume adjusting method and device
CN106878866A (en) * 2017-03-03 2017-06-20 广东欧珀移动通信有限公司 Acoustic signal processing method, device and terminal
CN107465824A (en) * 2017-08-18 2017-12-12 广东欧珀移动通信有限公司 volume adjusting method, device, mobile terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140086422A1 (en) * 2012-09-21 2014-03-27 Hon Hai Precision Industry Co., Ltd. Electronic device, system and method for managing sound effect
CN203596902U (en) * 2013-12-05 2014-05-14 无锡焺通微电子有限公司 Audio frequency power amplification integrated circuit chip having linear power volume control function
CN103701419A (en) * 2013-12-06 2014-04-02 乐视致新电子科技(天津)有限公司 Volume regulating method and device
CN103761063A (en) * 2013-12-19 2014-04-30 北京百度网讯科技有限公司 Method and device for controlling audio output volume in playing device
CN106648527A (en) * 2016-11-08 2017-05-10 乐视控股(北京)有限公司 Volume control method, device and playing equipment
CN106792386A (en) * 2016-12-05 2017-05-31 青岛海信电器股份有限公司 A kind of terminal volume adjusting method and device
CN106878866A (en) * 2017-03-03 2017-06-20 广东欧珀移动通信有限公司 Acoustic signal processing method, device and terminal
CN107465824A (en) * 2017-08-18 2017-12-12 广东欧珀移动通信有限公司 volume adjusting method, device, mobile terminal and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112185338A (en) * 2020-09-30 2021-01-05 北京大米科技有限公司 Audio processing method and device, readable storage medium and electronic equipment
CN112185338B (en) * 2020-09-30 2024-01-23 北京大米科技有限公司 Audio processing method, device, readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN107465824A (en) 2017-12-12
CN107465824B (en) 2020-06-05

Similar Documents

Publication Publication Date Title
WO2019033943A1 (en) Volume adjusting method and device, mobile terminal and storage medium
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
CN107566618B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2019033942A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
WO2017215657A1 (en) Sound effect processing method, and terminal device
WO2019033940A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
WO2019033941A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
CN107799113B (en) Audio processing method and device, storage medium and mobile terminal
CN107508983B (en) Volume adjusting method and device, storage medium and terminal equipment
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2019033939A1 (en) Volume adjustment method and apparatus, terminal device, and storage medium
US11039246B2 (en) Volume adjusting method, device, and terminal device
CN106293607B (en) Method and system for automatically switching audio output modes
CN112307161B (en) Method and apparatus for playing audio
CN110799936B (en) Volume adjusting method, volume adjusting device, terminal equipment and storage medium
TW201830229A (en) Calibration method and computer readable recording medium
WO2019033439A1 (en) Volume adjustment method, apparatus, storage medium, and mobile terminal
CN107506170A (en) volume adjusting method, device, terminal device and storage medium
CN116627377A (en) Audio processing method, device, electronic equipment and storage medium
CN117061946A (en) Output loudness enhancement method, device, terminal and medium
CN107506169A (en) volume adjusting method, device, terminal device and storage medium

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: 18847075

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18847075

Country of ref document: EP

Kind code of ref document: A1