CN113824835A - Volume control method and device, electronic equipment and storage medium - Google Patents

Volume control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113824835A
CN113824835A CN202111242630.6A CN202111242630A CN113824835A CN 113824835 A CN113824835 A CN 113824835A CN 202111242630 A CN202111242630 A CN 202111242630A CN 113824835 A CN113824835 A CN 113824835A
Authority
CN
China
Prior art keywords
volume
audio
processed
amplitude
playing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111242630.6A
Other languages
Chinese (zh)
Inventor
王鹤鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111242630.6A priority Critical patent/CN113824835A/en
Publication of CN113824835A publication Critical patent/CN113824835A/en
Priority to PCT/CN2022/112719 priority patent/WO2023071425A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a volume control method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs; acquiring a volume adjustment amount corresponding to the amplitude gear; and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user. By the method, the playing volume of the audio to be processed can be adaptively adjusted according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.

Description

Volume control method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of device control technologies, and in particular, to a volume control method and apparatus, an electronic device, and a storage medium.
Background
Along with the development of intelligent terminal technology, more and more intelligent terminals are configured with a volume balance function, so that when songs are played through audio playing software, all songs can be played in sound with similar volume, and high-quality auditory experience is brought to users. However, the associated volume balancing functionality is still not intelligent enough.
Disclosure of Invention
The application provides a volume control method and device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present application provides a volume control method, which is applied to an electronic device, and the method includes: acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs, and acquiring a volume adjustment amount corresponding to the amplitude gear; and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user.
In a second aspect, an embodiment of the present application provides a volume control apparatus, which is operated in an electronic device, and includes: the amplitude gear acquisition module is used for acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs; the volume adjustment quantity acquisition module is used for acquiring the volume adjustment quantity corresponding to the amplitude gear; and the volume control module is used for adjusting the playing volume of the audio to be processed by the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to the target volume, and the target volume is a value determined according to user habits.
In a third aspect, an embodiment of the present application provides an electronic device, which includes one or more processors and a memory; one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of the first aspect described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, where the program code executes the method of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising computer program/instructions for implementing the steps of the method according to the first aspect when executed by a processor.
According to the volume control method and device, the electronic equipment and the storage medium, the amplitude gear to which the signal amplitude of the audio to be processed belongs is obtained, then the volume adjustment amount corresponding to the amplitude gear is obtained, then the playing volume of the audio to be processed is adjusted by the volume adjustment amount, so that the playing volume of the audio to be processed is close to the target volume, and the target volume is a value determined according to the habit of a user. Therefore, the playing volume of the audio to be processed can be adaptively adjusted according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flow chart illustrating a method of volume control according to an embodiment of the present application;
fig. 2 is a flow chart of a method for controlling volume according to another embodiment of the present application;
fig. 3 is a flow chart of a method for controlling volume according to another embodiment of the present application;
fig. 4 is a block diagram illustrating a volume control apparatus according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a volume control apparatus according to another embodiment of the present application;
fig. 6 is a block diagram illustrating a volume control apparatus according to still another embodiment of the present application;
fig. 7 is a block diagram illustrating an electronic device for executing a volume control method according to an embodiment of the present application;
fig. 8 is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing a volume control method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In recent years, with the continuous development of intelligent terminal technology and the development of internet technology, more and more users watch short videos through intelligent devices such as mobile phones, the content of the short videos covers the aspects of life, and the amateur life and the visual field of people are greatly enriched. However, the sound source volume of the short video is usually uneven, so that the user needs to repeatedly adjust the volume in the process of refreshing the short video, and the user experience is poor.
As a mode for adjusting the volume, a volume balance function can be configured for the intelligent device, so that the playing volume of the audio can be automatically balanced. The principle of the volume balance is that the volume information of all audio frequencies is scanned once, the average volume is calculated, the average value is close to the average value through a sound reduction shell for the audio frequency with large sound, and the average value is close to the average value through a sound addition shell for the audio frequency with small sound, and therefore the effect of volume balance is achieved. However, the inventor has found through long-term research that the related volume balance function has a limited range of applications (for example, only can be applied to a local sound source, and a specific software needs to be connected for use), and is not intelligent enough.
In order to optimize the above problem, embodiments of the present application provide a volume control method and apparatus, an electronic device, and a storage medium, which can adaptively adjust the playing volume of a to-be-processed audio according to an amplitude gear to which a signal amplitude of the to-be-processed audio belongs, so that the playing volume of the to-be-processed audio is close to a target volume, thereby improving the intelligence of volume control.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for controlling a volume according to an embodiment of the present application is shown, where the method for controlling a volume according to the embodiment is applicable to an electronic device, and the method includes:
step S110: and acquiring an amplitude gear to which the signal amplitude of the audio to be processed belongs.
The audio to be processed in this embodiment of the application is an audio to be played online in real time (for example, the audio to be played after buffering is completed), and the audio to be processed in this manner may be derived from a video, a short video, or an audio on a network. Optionally, in other embodiments, the audio to be processed may be audio to be played, and the audio to be processed in this manner may originate from the local. In the embodiment of the present application, the content form of the to-be-processed audio may not be limited, for example, the to-be-processed audio may be music, movie dubbing, recited program audio, or station program audio.
The amplitude of the audio to be processed represents the maximum absolute value of the instantaneous appearance of the alternating current in one period, and the maximum absolute value can be understood as the distance from a peak to a trough in an audio signal sine wave diagram of the audio to be processed and can also be understood as a value representing the signal sound size. For a section of audio to be processed, the signal amplitude of the audio to be processed in the embodiment of the present application represents the signal amplitude mean value of the audio to be processed, and as a manner, the signal amplitude mean value of the audio to be processed may be calculated by detecting the plurality of amplitudes of the audio to be processed, and different audio to be processed each corresponds to a respective signal amplitude mean value.
The magnitude of the signal amplitude of the audio to be processed may affect the gain degree of the sound source in the manner of the relevant balanced volume, for example, if the signal amplitude of the audio to be processed is higher than the signal amplitude mean value, negative gain processing needs to be performed on the sound source corresponding to the audio; if the signal amplitude of the audio to be processed is lower than the average value of the signal amplitudes, positive gain processing needs to be performed on the sound source corresponding to the audio, and thus, when the volume of each section of audio is balanced, the signal amplitudes and the average value of the signal amplitudes need to be compared, and corresponding gain processing is performed according to the comparison result, so that the complexity of volume balance processing is increased, and the intelligence of the volume adjustment process is reduced.
In the embodiment of the present application, the signal amplitudes of the audio are divided into steps (referred to as "step"), so as to obtain at least two amplitude steps, each amplitude step may include the same number of signal amplitudes, and specific values of the number may not be limited, for example, each amplitude step may include 10 signal amplitudes or 100 signal amplitudes. For example, if the amplitude levels obtained after the stepping include-20 db to-10 db and-10 db to 0db, the signal amplitude of-15 db belongs to the amplitude levels of-20 db to-10 db, and the signal amplitude of-5 db belongs to the amplitude levels of-10 db to-0 db; the signal amplitudes of-8 db and-6 db belong to the amplitude range of-10 db to-0 db.
In this way, for the signal amplitude mean value of the audio to be processed obtained in the present application, the amplitude gear to which the signal amplitude mean value belongs can be determined, and then the gain degree of the audio to be processed is determined according to the amplitude gear to realize the volume balance, thereby avoiding realizing the volume balance by comparing the magnitude of each signal amplitude of the audio to be processed with the magnitude of the signal amplitude mean value, and further reducing the complexity of the volume balance processing.
Step S120: and acquiring the volume adjustment amount corresponding to the amplitude gear.
In the embodiment of the application, different amplitude gears correspond to different volume adjustment amounts, that is, the signal amplitude mean values of the different amplitude gears correspond to different volume adjustment amounts. By obtaining the volume adjustment amount corresponding to the amplitude gear, the playing volume of the audio to be processed can be adjusted more intelligently according to the volume adjustment amount corresponding to the amplitude gear where the signal amplitude mean value of the audio to be processed is located.
Step S130: and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user.
The target volume is a value determined according to user habits, the target volume can be understood as user preference volume under the current type of audio to be processed, the types of the audio to be processed are different, the corresponding target volumes can be different, or the content of the audio to be processed is different, and the corresponding target volumes can be different. The playing volume of the audio to be processed is adjusted by the volume adjustment amount corresponding to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the adjusted playing volume of the audio to be processed is close to the target volume.
It should be noted that, the signal amplitude mean value of the to-be-processed audio in the embodiment of the present application corresponds to an amplitude gear, and in order to facilitate that the to-be-processed audio can meet the preference loudness of the user when the to-be-processed audio starts to be played, the play volume of the to-be-processed audio can be adjusted by the obtained volume adjustment amount when the to-be-processed audio starts to be played, so that the play volume in the whole playing process of the to-be-processed audio can meet the preference loudness of the user by adjusting the play volume once. The adjustment of the playing volume of the audio to be processed refers to the adjustment of the volume of the electronic device for playing the audio to be processed.
Optionally, after the playing volume of the audio to be processed is adjusted by the volume control method in this embodiment, if the user adjusts the playing volume of the audio to be processed, the electronic device may continue to play the audio to be processed with the playing volume adjusted by the user.
The volume adjustment method in this embodiment may be executed when the current audio to be played is switched from other audio to the audio to be processed, or may be executed when the current audio to be played is switched from the audio to be processed to other audio, and the playing volume of the audio to be processed is adjusted by using the volume adjustment amount corresponding to the amplitude gear, so that the electronic device may automatically adjust the playing volume of the audio to be processed in a targeted manner, and the intelligence of volume control is improved.
According to the volume control method, the amplitude gear to which the signal amplitude of the audio to be processed belongs is acquired, then the volume adjustment amount corresponding to the amplitude gear is acquired, different amplitude gears correspond to different volume adjustment amounts, and then the volume adjustment amount is used for adjusting the playing volume of the audio to be processed, so that the playing volume of the audio to be processed is close to the target volume. The method can adaptively adjust the playing volume of the audio to be processed according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.
Referring to fig. 2, a flowchart of a method for controlling a volume according to another embodiment of the present application is shown, where the method for controlling a volume according to the present embodiment is applicable to an electronic device, and the method includes:
step S210: and obtaining the amplitude average value corresponding to each of the plurality of sample audios.
Wherein the plurality of sample audios may be different content types of audios, may be the same content type of audio, or may be a combination of the same content type of audio and different content types of audio. The source of the sample audio may not be limited, and may be derived from online real-time playing video, short video, or audio, for example.
As one way, the signal amplitude of each of a plurality of sample audios may be obtained, where a sample audio includes a plurality of frames of audios, and each frame of audio corresponds to one signal amplitude, and then the average value of the amplitudes of each sample audio is calculated according to the respective signal amplitudes.
Step S220: and acquiring the appointed volume level corresponding to each of the plurality of sample audios.
The volume level represents the volume of playing, the designated volume level represents the volume of playing frequently used (or preferred) by the user, and the designated volume levels corresponding to different sample audios can be different.
In an implementation manner, a volume level of each of the multiple sample audios at the playing end time may be obtained, where the playing end time may be understood as a time when a last frame of audio is played, the volume level at the playing end time may be understood as a volume of the last frame of the played audio, and the volume level at the playing end time may be defaulted to a volume level preferred by a user, so that the volume level of the audio at the playing end time may be used as an assigned volume level corresponding to the audio.
In another implementation, the volume level of the audio at the end of the playing may be detected, and if the volume level of the audio at the end of the playing is lower than a preset volume level (at this time, the volume level may be 0, i.e. a mute state, for example, when a user makes a trouble while listening to a song, the music may be played at the volume after being turned down until the end of the playing, or when the user sets the mobile phone volume to a mute mode while in a meeting, the music may be played in the mute mode until the end of the playing, at which time, even if the music is played, the sound cannot be heard), the preset volume level may be a critical volume level that enables the user to hear the sound, in this way, in order to ensure that the sample audio can be played at the playing volume according with the user's usage habit, the designated volume level for each of the plurality of sample audios may be obtained in a fully sampled manner. Specifically, the volume level corresponding to the sample audio in any playing time period may be obtained, and then all the obtained volume levels are averaged to obtain the specified volume level.
Optionally, if the user suddenly turns the playing volume low during the process of playing music, the time when the playing volume of the audio is turned down for the first time and the volume corresponding to each previous time may be obtained, and then the specified volume level corresponding to the audio is obtained in a full sampling manner, where the specific obtaining principle is similar to the above implementation manner, and is not described here again.
Step S230: and acquiring the target volume corresponding to the audio to be processed based on the amplitude average value and the designated volume level.
As one way, the user preferred volume may be constructed based on the amplitude average value and the specified volume level as the target volume corresponding to the audio to be processed. In a specific application scenario, assuming that the audio to be processed is audio a, the volume of the audio a played by the user at different time intervals may be recorded, for example, the volume of the audio a played by the user in the morning may be recorded as a1, the volume of the audio a played by the user in the noon is recorded as a2, the volume of the audio a played by the user in the evening is recorded as a3, and the average value of the amplitudes of the audio a is B, a user portrait may be constructed based on a1, a2, a3, and B, specifically, a1, a2, a3, and B may be input to a machine learning model, and a user preferred volume may be learned, in which manner, the user preferred volume may be used as a target volume corresponding to the audio to be processed.
Step S240: and acquiring an amplitude gear to which the signal amplitude of the audio to be processed belongs.
Step S250: and acquiring the volume adjustment amount corresponding to the amplitude gear.
As an embodiment, in order to facilitate that the playing volume in the playing process of the to-be-processed audio is in the loudness range preferred by the user, when the volume adjustment amount corresponding to the amplitude gear is obtained, the volume adjustment amount corresponding to the amplitude gear may be determined based on the target volume, specifically, the volume adjustment amount corresponding to the signal amplitude mean value of the amplitude gear may be determined based on the target volume (in this manner, the volume adjustment amount corresponding to the signal amplitude mean value of the amplitude gear may be taken as the volume adjustment amount corresponding to the amplitude gear), so that the playing volume of the to-be-processed audio after adjustment may be close to the target volume.
For example, in a specific application scenario, assuming that the target volume is-40 db, the signal amplitude of the audio to be processed is stepped into 6 steps, which are: -60db to-50 db, -50db to-40 db, -40db to-30 db, -30db to-20 db, -20db to-10 db, -10db to 0db, the signal amplitude mean value of each of the signal amplitudes of the 6 steps is-55 db, -45db, -35db, -25db, -15db and-5 db, then the volume adjustment amount corresponding to each of the 6 signal amplitude mean values can be determined as +15db, +5db, -5db, -15db, -25db and-35 db by combining the target volume, wherein the signal amplitude mean value of-55 db can be understood as the current reference playback volume of-55 db for the audio to be processed (it should be noted that the reference playback volume here can be understood as the approximate playback volume, assuming that the signal amplitude of the audio to be processed is-52 db, and since-52 db falls within the amplitude range of-60 db to-50 db, the volume adjustment amount corresponding to the signal amplitude mean value of-55 db of the amplitude range of-60 db to-50 db may also be used as the volume adjustment amount corresponding to the signal amplitude of-52 db), in order to make the playing volume of the audio to be processed close to the target volume, the playing volume of the audio to be processed may be controlled to be adjusted to +15db, so that the adjusted playing volume of the audio to be processed is-55 db +15db to-40 db, and the above-mentioned values are merely used as examples, and do not constitute a limitation to the present scheme, and other values may be used in actual implementation. Similarly, when the signal amplitude of the audio to be processed falls in other gears, the playing volume of the audio to be processed is adjusted by the volume adjustment amount corresponding to the other amplitude gears, so that the adjusted playing volume of the audio to be processed is the same as or close to the target volume, which is not described herein again. It should be noted that the value of the target volume in this embodiment may be changed, and the electronic device in this embodiment may determine the volume adjustment amount corresponding to the amplitude step based on the target volume in real time as the target volume is changed.
As another embodiment, the volume adjustment amount corresponding to the amplitude gear may be obtained from a preset table, where the preset table is determined according to the target volume. Specifically, a corresponding volume adjustment amount may be configured for the signal amplitude mean value of each amplitude gear, and the amplitude gear and the volume adjustment amount are stored in a table form after establishing a corresponding relationship. In contrast to the previous embodiment, in the present embodiment, when acquiring the volume adjustment amount, the incidence relation among the target volume, the amplitude gear and the volume adjustment quantity can be established, the volume adjustment quantity corresponding to the amplitude gear determined based on the target volume in real time is stored in a preset table form, in this manner, the preset table may store therein volume adjustment amounts corresponding to the magnitude steps determined based on target volumes of various values, when the volume adjustment amount corresponding to the amplitude gear is obtained, the volume adjustment amount corresponding to the amplitude gear can be directly obtained from the preset table in a table look-up manner, in other words, the acquiring process of the volume adjustment amount in this way is static, and the volume adjustment amount corresponding to the amplitude gear does not need to be calculated based on the target volume every time, so that the power consumption of the electronic equipment is saved.
Step S260: and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user.
According to the volume control method, amplitude average values corresponding to a plurality of sample audios are obtained; acquiring an appointed volume level corresponding to each audio frequency in the plurality of sample audio frequencies; acquiring a target volume corresponding to the audio to be processed based on the amplitude average value and the designated volume level; acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs; acquiring a volume adjustment amount corresponding to the amplitude gear; and adjusting the playing volume of the audio to be processed by the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to the target volume. The method can adaptively adjust the playing volume of the audio to be processed according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.
Referring to fig. 3, a flowchart of a method for controlling a volume according to another embodiment of the present application is shown, where the method for controlling a volume provided in this embodiment is applicable to an electronic device, and the method includes:
step S310: and acquiring scene information to which the audio to be processed belongs.
The content types of the audio to be processed may be various, the scene information to which the audio to be processed of different content types belongs is different, and the scene information may be understood as the usage scene of the audio to be processed. For example, if the audio to be processed is rock music, the scene information to which the audio to be processed belongs may be a music festival scene, if the audio to be processed is light music, the scene information to which the audio to be processed belongs may be a learning scene, and if the audio to be processed is hypnotic music, the scene information to which the audio to be processed belongs may be a sleep scene. As a mode, the scene information corresponding to the to-be-processed audio of different content types may be preconfigured, and then the scene information to which the to-be-processed audio belongs may be obtained according to the content type of the to-be-processed audio.
As another mode, the scene information to which the audio to be processed belongs may be determined according to the position of the electronic device, where the electronic device may determine the position where the electronic device is located by combining the position information and the camera. For example, when it is detected that the electronic device is located in a public place such as a hospital or a subway (the public place advocates not to play out the volume of the electronic device so as not to disturb other users), it may be determined that the scene information to which the audio to be processed belongs is an earphone wearing playing scene, and if it is detected that the electronic device is located in a museum or the like, it may be determined that the scene information to which the audio to be processed belongs is a mute scene.
Step S320: and taking the volume corresponding to the scene information as the target volume corresponding to the audio to be processed.
Different scene information can be configured with different volumes correspondingly, and after the scene information of the audio to be processed is determined, the volume corresponding to the scene information can be used as the target volume corresponding to the audio to be processed.
Step S330: and acquiring an amplitude gear to which the signal amplitude of the audio to be processed belongs.
Step S340: determining a volume adjustment corresponding to the magnitude gear based on the target volume.
For a specific implementation process of determining the volume adjustment amount corresponding to the amplitude gear based on the target volume, reference may be made to the related description in the foregoing embodiment, and details are not repeated here.
Step S350: and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user.
According to the volume control method, the scene information to which the audio to be processed belongs is acquired; taking the volume corresponding to the scene information as the target volume corresponding to the audio to be processed; acquiring an amplitude gear to which the signal amplitude of the audio to be processed belongs; determining a volume adjustment corresponding to the amplitude gear based on the target volume; and then adjusting the playing volume of the audio to be processed by the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to the target volume. The method can adaptively adjust the playing volume of the audio to be processed according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.
Referring to fig. 4, a block diagram of a volume control apparatus 400 according to an embodiment of the present disclosure is shown, where the volume control apparatus 400 according to the embodiment can be operated in an electronic device, the apparatus 400 includes an amplitude step acquiring module 410, a volume adjustment amount acquiring module 420, and a volume control module 430:
an amplitude step acquiring module 410, configured to acquire an amplitude step to which a signal amplitude of the audio to be processed belongs.
And a volume adjustment amount obtaining module 420, configured to obtain a volume adjustment amount corresponding to the amplitude gear.
And the volume control module 430 is configured to adjust the playing volume of the audio to be processed by the volume adjustment amount, so that the playing volume of the audio to be processed is close to the target volume, where the target volume is a value determined according to user habits.
Referring to fig. 5, a block diagram of a volume control device 500 according to another embodiment of the present application is shown, where the volume control device 500 according to this embodiment can be operated in an electronic device, and the device 500 includes an amplitude average value obtaining unit 510, a volume level obtaining unit 520, a target volume obtaining unit 530, an amplitude step obtaining unit 540, a volume adjustment amount determining unit 550, and a volume control unit 560:
an amplitude mean value obtaining unit 510 is configured to obtain amplitude mean values corresponding to the plurality of sample audios.
A volume level obtaining unit 520, configured to obtain a specified volume level corresponding to each of the plurality of sample audios.
As an embodiment, the volume level obtaining unit 520 may be specifically configured to obtain a volume level of each of the plurality of sample audios at the playing end time; and taking the volume level of the playing ending moment as the designated volume level corresponding to each audio.
As another embodiment, the volume level obtaining unit 520 may be specifically configured to obtain, in a full sampling manner, a specified volume level corresponding to each of the plurality of sample audios if the volume level at the time when the sample audio is played is lower than a preset volume level.
A target volume obtaining unit 530, configured to obtain a target volume corresponding to the audio to be processed based on the average amplitude value and the specified volume level.
The target volume obtaining unit 530 may be specifically configured to construct a user preferred volume based on the average amplitude value and the specified volume level, and use the user preferred volume as the target volume corresponding to the to-be-processed audio.
The amplitude step acquiring unit 540 is configured to acquire an amplitude step to which a signal amplitude of the audio to be processed belongs.
And a volume adjustment amount determining unit 550, configured to obtain a volume adjustment amount corresponding to the amplitude gear.
In one embodiment, the volume adjustment amount determining unit 550 may be specifically configured to determine the volume adjustment amount corresponding to the magnitude gear based on the target volume.
In another embodiment, the volume adjustment amount determining unit 550 may be specifically configured to obtain a volume adjustment amount corresponding to the amplitude gear from a preset table, where the preset table is determined according to the target volume.
And a volume control unit 560, configured to adjust the playing volume of the audio to be processed by the volume adjustment amount, so that the playing volume of the audio to be processed is close to the target volume, where the target volume is a value determined according to a habit of a user.
Referring to fig. 6, a block diagram of a volume control device 600 according to another embodiment of the present application is shown, where the volume control device 600 according to this embodiment can be operated in an electronic device, and the device 600 includes a scene obtaining unit 610, a target volume obtaining unit 620, an amplitude step obtaining unit 630, a volume adjustment amount determining unit 640, and a volume control unit 650:
a scene obtaining unit 610, configured to obtain scene information to which the audio to be processed belongs.
A target volume obtaining unit 620, configured to obtain a volume corresponding to the scene information as a target volume corresponding to the audio to be processed.
An amplitude step acquiring unit 630, configured to acquire an amplitude step to which a signal amplitude of the audio to be processed belongs.
A volume adjustment amount determination unit 640, configured to determine a volume adjustment amount corresponding to the amplitude gear based on the target volume.
And the volume control unit 650 is configured to adjust the playing volume of the audio to be processed by the volume adjustment amount, so that the playing volume of the audio to be processed is close to the target volume, where the target volume is a value determined according to user habits.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 7, based on the volume control method and apparatus, an embodiment of the present application further provides an electronic device 100 capable of executing the volume control method and apparatus. The electronic device 100 includes a memory 102 and one or more processors 104 (only one shown) coupled to each other, the memory 102 and the processors 104 being communicatively coupled to each other. The memory 102 stores therein a program that can execute the contents of the foregoing embodiments, and the processor 104 can execute the program stored in the memory 102.
The processor 104 may include one or more processing cores, among other things. The processor 104 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 102 and invoking data stored in the memory 102. Alternatively, the processor 104 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 104 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 104, but may be implemented by a communication chip.
The Memory 102 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 102 may be used to store instructions, programs, code sets, or instruction sets. The memory 102 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the foregoing embodiments, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
Referring to fig. 8, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 700 has stored therein program code that can be called by a processor to execute the methods described in the above-described method embodiments.
The computer-readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 700 includes a non-transitory computer-readable storage medium. The computer readable storage medium 700 has storage space for program code 710 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 710 may be compressed, for example, in a suitable form.
Embodiments of the present application further provide a computer program product comprising a determining computer program/instructions, which when executed by a processor, implement the steps of the method described in the above method embodiments.
In summary, the present application provides a volume control method and apparatus, an electronic device, and a storage medium, where the method includes: acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs; acquiring a volume adjustment amount corresponding to the amplitude gear; and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user. The method can adaptively adjust the playing volume of the audio to be processed according to the amplitude gear to which the signal amplitude of the audio to be processed belongs, so that the playing volume of the audio to be processed is close to the target volume, and the intelligence of volume control is improved.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (12)

1. A volume control method is applied to an electronic device, and the method comprises the following steps:
acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs;
acquiring a volume adjustment amount corresponding to the amplitude gear;
and adjusting the playing volume of the audio to be processed by using the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to a target volume, wherein the target volume is a value determined according to the habit of a user.
2. The method of claim 1, wherein said obtaining a volume adjustment corresponding to said magnitude gear comprises:
determining a volume adjustment corresponding to the magnitude gear based on the target volume.
3. The method of claim 1, wherein said obtaining a volume adjustment corresponding to said magnitude gear comprises:
and acquiring a volume adjustment amount corresponding to the amplitude gear from a preset table, wherein the preset table is determined according to the target volume.
4. The method according to claim 1, wherein before obtaining the amplitude level to which the signal amplitude of the audio to be processed belongs, the method further comprises:
obtaining amplitude average values corresponding to a plurality of sample audios;
acquiring an appointed volume level corresponding to each audio frequency in the plurality of sample audio frequencies;
and acquiring the target volume corresponding to the audio to be processed based on the amplitude average value and the designated volume level.
5. The method of claim 4, wherein obtaining the specified volume level for each of the plurality of sample audios comprises:
acquiring the volume level of each audio frequency in the plurality of sample audio frequencies at the playing end moment;
and taking the volume level of the playing ending moment as the designated volume level corresponding to each audio.
6. The method of claim 4, wherein obtaining the specified volume level for each of the plurality of sample audios comprises:
and if the volume level of the sample audio at the playing end moment is lower than the preset volume level, acquiring the designated volume level corresponding to each of the plurality of sample audios according to a full sampling mode.
7. The method of claim 4, wherein obtaining a target volume corresponding to the audio to be processed based on the amplitude mean and the specified volume level comprises:
and constructing user preference volume based on the amplitude average value and the designated volume level, and using the user preference volume as the target volume corresponding to the audio to be processed.
8. The method according to claim 1, wherein before obtaining the amplitude level to which the signal amplitude of the audio to be processed belongs, the method further comprises:
acquiring scene information to which the audio to be processed belongs;
and taking the volume corresponding to the scene information as the target volume corresponding to the audio to be processed.
9. A volume control apparatus, operable with an electronic device, the apparatus comprising:
the amplitude gear acquisition module is used for acquiring an amplitude gear to which a signal amplitude of the audio to be processed belongs;
the volume adjustment quantity acquisition module is used for acquiring the volume adjustment quantity corresponding to the amplitude gear;
and the volume control module is used for adjusting the playing volume of the audio to be processed by the volume adjustment amount so as to enable the playing volume of the audio to be processed to be close to the target volume, and the target volume is a value determined according to user habits.
10. An electronic device comprising one or more processors and memory;
one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-8.
11. A computer-readable storage medium, having program code stored therein, wherein the program code when executed by a processor performs the method of any of claims 1-8.
12. A computer program product comprising computer program/instructions for implementing the steps of the method according to any one of claims 1 to 8 when executed by a processor.
CN202111242630.6A 2021-10-25 2021-10-25 Volume control method and device, electronic equipment and storage medium Pending CN113824835A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111242630.6A CN113824835A (en) 2021-10-25 2021-10-25 Volume control method and device, electronic equipment and storage medium
PCT/CN2022/112719 WO2023071425A1 (en) 2021-10-25 2022-08-16 Volume control method and apparatus, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111242630.6A CN113824835A (en) 2021-10-25 2021-10-25 Volume control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113824835A true CN113824835A (en) 2021-12-21

Family

ID=78919063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111242630.6A Pending CN113824835A (en) 2021-10-25 2021-10-25 Volume control method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113824835A (en)
WO (1) WO2023071425A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071425A1 (en) * 2021-10-25 2023-05-04 Oppo广东移动通信有限公司 Volume control method and apparatus, and electronic device and storage medium
WO2023185589A1 (en) * 2022-03-28 2023-10-05 华为技术有限公司 Volume control method and electronic device
WO2024098958A1 (en) * 2022-11-07 2024-05-16 Oppo广东移动通信有限公司 Audio processing method and apparatus, and electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130136277A1 (en) * 2011-11-28 2013-05-30 Kabushiki Kaisha Toshiba Volume controller, volume control method and electronic device
CN107479852A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium
CN107526568A (en) * 2017-08-18 2017-12-29 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium
CN113055786A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Volume control method and device and electronic equipment
CN113422866A (en) * 2021-06-17 2021-09-21 Oppo广东移动通信有限公司 Volume adjusting method and device, storage medium and electronic equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8135147B2 (en) * 2006-10-09 2012-03-13 Lg Electronics Inc. Method and device for adjusting audio volume level
CN103929140A (en) * 2014-04-30 2014-07-16 深圳市中兴移动通信有限公司 Method and device for pre-processing voice frequency
CN104410379B (en) * 2014-10-29 2019-05-14 深圳市金立通信设备有限公司 A kind of volume adjusting method
CN106775563A (en) * 2016-12-13 2017-05-31 珠海市魅族科技有限公司 The method and device of volume adjusting
CN107124149B (en) * 2017-05-05 2020-12-01 北京小鱼在家科技有限公司 Volume adjustment method, device and equipment
CN107807809A (en) * 2017-10-26 2018-03-16 努比亚技术有限公司 A kind of terminal volume adjusting method, terminal and computer-readable recording medium
CN108521521B (en) * 2018-04-19 2021-04-02 Oppo广东移动通信有限公司 Volume adjusting method, mobile terminal and computer readable storage medium
CN108647005A (en) * 2018-05-15 2018-10-12 努比亚技术有限公司 Audio frequency playing method, mobile terminal and computer readable storage medium
CN109996143B (en) * 2019-03-07 2021-07-23 上海蔚来汽车有限公司 Volume adjusting method, device and system, audio playing equipment and vehicle
CN110312146B (en) * 2019-06-06 2021-11-09 百度在线网络技术(北京)有限公司 Audio processing method and device, electronic equipment and storage medium
CN110308888B (en) * 2019-06-28 2023-05-23 Oppo广东移动通信有限公司 Volume control method, electronic equipment and computer readable storage medium
CN111580778B (en) * 2020-05-11 2023-08-15 潍坊歌尔电子有限公司 Volume correction method and device, audio playing device and readable storage medium
CN113824835A (en) * 2021-10-25 2021-12-21 Oppo广东移动通信有限公司 Volume control method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130136277A1 (en) * 2011-11-28 2013-05-30 Kabushiki Kaisha Toshiba Volume controller, volume control method and electronic device
CN107479852A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium
CN107526568A (en) * 2017-08-18 2017-12-29 广东欧珀移动通信有限公司 volume adjusting method, device, terminal device and storage medium
CN113055786A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Volume control method and device and electronic equipment
CN113422866A (en) * 2021-06-17 2021-09-21 Oppo广东移动通信有限公司 Volume adjusting method and device, storage medium and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071425A1 (en) * 2021-10-25 2023-05-04 Oppo广东移动通信有限公司 Volume control method and apparatus, and electronic device and storage medium
WO2023185589A1 (en) * 2022-03-28 2023-10-05 华为技术有限公司 Volume control method and electronic device
WO2024098958A1 (en) * 2022-11-07 2024-05-16 Oppo广东移动通信有限公司 Audio processing method and apparatus, and electronic device and storage medium

Also Published As

Publication number Publication date
WO2023071425A1 (en) 2023-05-04

Similar Documents

Publication Publication Date Title
CN113824835A (en) Volume control method and device, electronic equipment and storage medium
US11632621B2 (en) Method for controlling volume of wireless headset, and computer-readable storage medium
US9525392B2 (en) System and method for dynamically adapting playback device volume on an electronic device
CN108810749B (en) Player control method, device, terminal equipment and storage medium
EP3846020A1 (en) Sound effect adjusting method and apparatus, electronic device, and storage medium
US20220345817A1 (en) Audio processing method and device, terminal, and computer-readable storage medium
CN107526570B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107465824B (en) Volume adjusting method and device, mobile terminal and storage medium
CN107155133A (en) Volume adjusting method, audio-frequency playing terminal and computer-readable recording medium
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
CN111179861A (en) Brightness calibration method and device, storage medium and terminal
US11822854B2 (en) Automatic volume adjustment method and apparatus, medium, and device
TW202037178A (en) Video playback method and apparatus and multimedia data playback method
CN114845212A (en) Volume optimization method and device, electronic equipment and readable storage medium
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN107681993B (en) Method for adjusting audio parameters and mobile terminal
CN116095595B (en) Audio processing method and device
CN115696123A (en) Audio compensation method and audio compensation device
KR101867618B1 (en) Device and method for terminating music play in wireless terminal
CN113660599B (en) Speaker control method and device, mobile terminal and storage medium
CN108024016B (en) Volume adjusting method and device, storage medium and electronic equipment
WO2021042538A1 (en) Method and device for audio processing, and computer storage medium
CN112187204A (en) Electronic device and equalizer adjusting method thereof according to volume
CN110753919B (en) Volume adjusting method and device, storage medium and mobile terminal

Legal Events

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