Automatic volume adjustment method, device, medium and equipment
Patent Information
- Application Number
- JP2022560858
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-07
- Filing Date
- 2021-03-11
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2041-03-11
Smart Images

Figure 0007632813000001 
Figure 0007632813000002 
Figure 0007632813000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of computer technology, and more particularly to a method, device, medium and apparatus for automatic volume adjustment. [Background technology]
[0002] Conventionally, when a user plays audio or video using a mobile terminal such as a mobile phone or a tablet computer, it is common for the user to manually set an appropriate playback volume. When the environment changes, for example, when entering a noisy subway, the user needs to manually increase the playback volume again because the original playback volume is inaudible due to interference from environmental noise. When the environment changes frequently, the user also needs to frequently adjust the playback volume. Summary of the Invention
[0003] This Summary is provided to broadly introduce the principles, which are described in detail in the Detailed Description section below. This Summary is not intended to identify key features or necessary features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect of the present disclosure, there is provided an automatic volume adjustment method including the steps of acquiring a noise signal external to a terminal when there is no sound on the terminal in speaker mode, determining noise energy based on the noise signal, and adjusting audio or video playback volume on the terminal based on the noise energy.
[0005] In a second aspect of the present disclosure, there is provided an automatic volume adjustment device including a noise signal acquisition module for acquiring a noise signal external to a terminal when there is no sound on the terminal in speaker mode, a noise energy determination module for determining noise energy based on the noise signal, and a volume adjustment module for adjusting audio or video playback volume based on the noise energy.
[0006] In a third aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processing device, performs the steps of the method according to the first aspect of the present disclosure.
[0007] In a fourth aspect of the present disclosure, there is provided a storage device in which a computer program is stored, Remembered and a processing device for executing the computer program to implement the steps of the method according to the first aspect of the present disclosure.
[0008] In a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program carried on a computer readable medium which, when executed by a processor, performs the steps of the method according to the first aspect of the present disclosure.
[0009] In a sixth aspect of the present disclosure, there is provided a computer program which, when executed on an electronic device, causes the electronic device to perform the steps of the method according to the first aspect of the present disclosure.
[0010] Using the above technical solution, when the terminal has no sound in speaker mode, a noise signal external to the terminal can be obtained, and then noise energy can be determined based on the noise signal. Then, the audio or video playback volume in the terminal can be adjusted based on the noise energy, thereby realizing automatic adjustment of the playback volume. This not only avoids the user from manually adjusting the playback volume, but also avoids the playback volume of the terminal itself from interfering with the noise of the terminal's external environment itself in the process of automatically adjusting the playback volume, so that the playback volume can be automatically adjusted more accurately based only on the noise of the terminal's external environment itself.
[0011] Other features and advantages of the present disclosure are described in detail in the Detailed Description section that follows.
[0012] The described and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent by reference to the drawings and the following detailed description of the preferred embodiments. In all figures, the same or similar elements are represented by the same or similar reference numerals. It should be understood that the drawings are illustrative and that the parts and elements are not necessarily drawn to scale. [Brief description of the drawings]
[0013] [Figure 1] FIG. 2 is an exemplary schematic diagram of a terminal when there is no sound when playing audio or video in speaker mode; [Diagram 2] 4 is a flowchart of an automatic volume adjustment method according to an embodiment of the present disclosure. [Diagram 3] 1 is a block diagram illustrating an automatic volume control device according to an embodiment of the present disclosure. [Figure 4] 1 is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the drawings show some embodiments of the present disclosure, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments shown herein, but rather, these embodiments are provided to allow a deeper and more complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are provided solely for illustrative purposes, and are not intended to limit the scope of protection of the present disclosure.
[0015] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit steps that are shown, and the scope of the present disclosure is not limited in this respect.
[0016] As used herein, the terms "including" and variations thereof are open-ended and mean "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one other embodiment," and the term "in some embodiments" means "at least some embodiments." Definitions of other terms are provided below in the description.
[0017] It should be noted that references in this disclosure to "first", "second", etc. are intended to distinguish different devices, modules or units, and not to limit the order or interdependence of functions performed by those devices, modules or units.
[0018] It should be noted that the modifications made with "one" and "multiple" in this disclosure are exemplary and not limiting, and that those of skill in the art will understand "one or more" unless otherwise indicated in the context.
[0019] The names of messages or information exchanged among devices in the embodiments of the present disclosure are used for illustrative purposes only and are not intended to limit the scope of those messages or information.
[0020] The inventors of the present disclosure have found that when playing audio or video in speaker mode, the sound outside the terminal includes not only the sound of the terminal's external environment, but also the sound of the audio or video being played on the terminal itself.
[0021] In addition, the inventor of the present disclosure has found that when a user plays audio or video in speaker mode, the user generally frequently performs actions such as turning a page, sliding the screen up, switching to the next audio or video, pausing the playback audio or video, etc. During the duration of these actions, the terminal does not play audio or video, for example, the duration of a page turning action is approximately several seconds to several tens of seconds, during which the terminal does not play audio or video. In the present disclosure, the above-described situations are generally referred to as when the terminal has no sound in speaker mode, and the duration of the above-described actions is generally referred to as an interval period during which audio or video is switched. FIG. 1 is an exemplary schematic diagram of when the terminal has no sound when playing audio or video in speaker mode. In FIG. 1, Location marked with multiple blocks is the period when the device is in speaker mode and there is no sound. Corresponding to .
[0022] In addition, the inventors of the present disclosure have discovered that if it is possible to collect noise signals external to the terminal during periods when there is no sound on the terminal when playing audio or video in speaker mode, it is possible to avoid interference of the playback volume of the terminal itself with the noise signals of the terminal's external environment itself, and only the noise signals of the terminal's external environment itself will be collected, thereby making it possible to obtain only the noise energy of the terminal's external environment.
[0023] 2 is a flowchart of an automatic volume control method according to an embodiment of the present disclosure. As shown in FIG. 2, the automatic volume control method may include the following steps S11 to S13.
[0024] In step S11, when the terminal is in speaker mode and there is no sound, a noise signal outside the terminal is obtained.
[0025] The terminal may be a mobile terminal such as a mobile phone or a tablet computer, a terminal such as a smart TV, or a smart audio playback terminal such as a small speaker.
[0026] In one implementation, the terminal can determine whether it is currently in a silent period in speaker mode by returning the current playback state in real time from an application on the terminal.
[0027] In one implementation, a microphone attached to the terminal can be used to capture noise signals external to the terminal.
[0028] In step S12, the noise energy is determined based on the noise signal.
[0029] In step S13, the audio or video playback volume at the terminal is adjusted based on the noise energy.
[0030] Using the above technical solution, when the terminal has no sound in speaker mode, a noise signal external to the terminal can be obtained, and then noise energy can be determined based on the noise signal. Then, the audio or video playback volume in the terminal can be adjusted based on the noise energy, thereby realizing automatic adjustment of the playback volume. This not only avoids the user from manually adjusting the playback volume, but also avoids the playback volume of the terminal itself from interfering with the noise of the terminal's external environment itself in the process of automatically adjusting the playback volume, so that the playback volume can be automatically adjusted more accurately based only on the noise of the terminal's external environment itself.
[0031] In one embodiment, determining the noise energy based on the noise signal in step S12 has various implementations, of which only some implementations are given below.
[0032] The first implementation may include determining the signal energy of the last acquired one frame signal of the noise signal as the noise energy. The duration of the signal of each frame can be set based on the actual situation, for example, 10 ms, 8 ms, 15 ms, etc., and the present disclosure is not limited in this respect. The signal energy of the noise signal can be calculated using a conventional signal energy calculation method, and the present disclosure is not limited in this respect. Using this implementation, the noise energy of the external environment of the terminal at that time can be determined.
[0033] A second implementation may be as follows.
[0034] First, the signal energy of the first N frames of the noise signal is smoothed to obtain the smoothed energy of the first N frames of the noise signal. The first N frames of the noise signal are the signals of N frames before the last acquired frame of the noise signal, where N is a positive integer equal to or greater than 1. As mentioned above, the duration of the signal of each frame can be set according to the actual situation, and this disclosure is not limited in this respect. The signal energy of each frame of the noise signal can be calculated using a conventional signal energy calculation method, and this disclosure is not limited in this respect.
[0035] Then, based on the smoothed energy of the signals of the first N frames and the signal energy of the signal of the last acquired frame, a smoothing process is performed on the signal energy of the signal of the last acquired frame to obtain the smoothed energy of the signal of the last acquired frame. For example, the smoothing process can be realized using the following formula: E_smoothed(t)=a1*E_smoothed(t-1)+a2*E_smoothed(t-2)+···+aN*E_smoothed(tN)+b1*E(t).
[0036] Here, E_smoothed(t) is the smoothed energy of the signal in the last acquired frame. E_smoothed(t-1), E_smoothed(t-2), ..., E_smoothed(tN) are the smoothed energies of the signals in the first N frames, respectively. E(t) is the signal energy of the signal in the last acquired frame. a1, a2, ..., aN, b1 are coefficients whose sum is 1. t is time.
[0037] For example, when N is 1, E_smoothed(t)=a1*E_smoothed(t-1)+b1*E(t), where a1 may have a value between 0.7 and 0.95, e.g., 0.9, and b1 may have a value between 0.05 and 0.3, e.g., 0.1.
[0038] Finally, the smoothed energy of the last acquired frame of the signal, i.e., E_smoothed(t), is determined as the noise energy.
[0039] Using the above implementation, a smoothing process is performed on the signal energy of the last acquired frame signal based on the smoothed energy of the signals of the first N frames and the signal energy of the last acquired frame signal, thereby smoothing out the detected noise energy of the external environment of the terminal, allowing the playback volume to be smoothly adjusted, avoiding a large increase or decrease in the playback volume, and improving the user experience.
[0040] A third implementation may be as follows.
[0041] First, the signal energy of the first N frames of the noise signal is smoothed to obtain the smoothed energy of the first N frames of the noise signal. The first N frames of the noise signal are the signals of N frames before the last acquired frame of the noise signal, where N is a positive integer equal to or greater than 1. As mentioned above, the duration of the signal of each frame can be set according to the actual situation, and this disclosure is not limited in this respect. The signal energy of the noise signal of each frame can be calculated using a conventional signal energy calculation method, and this disclosure is not limited in this respect.
[0042] Next, based on the smoothed energy of the signals of the first N frames and the signal energy of the signal of the last acquired frame, a smoothing process is performed on the signal energy of the signal of the last acquired frame to obtain the smoothed energy of the signal of the last acquired frame.
[0043] For example, the smoothing process can be realized using the following equation: E_smoothed(t)=a1*E_smoothed(t-1)+a2*E_smoothed(t-2)+···+aN*E_smoothed(tN)+b1*E(t).
[0044] Here, E_smoothed(t) is the smoothed energy of the signal in the last acquired frame. E_smoothed(t-1), E_smoothed(t-2), ..., E_smoothed(tN) are the smoothed energies of the signals in the first N frames, respectively. E(t) is the signal energy of the signal in the last acquired frame. a1, a2, ..., aN, b1 are coefficients whose sum is 1. t is time.
[0045] For example, when N is 1, E_smoothed(t)=a1*E_smoothed(t-1)+b1*E(t), where a1 may have a value between 0.7 and 0.95, e.g., 0.9, and b1 may have a value between 0.05 and 0.3, e.g., 0.1.
[0046] Then, the smoothed energy of the last acquired frame of the signal, i.e., E_smoothed(t), is calculated by subtracting the previously updated noise energy N 以前に更新されたノイズエネルギー Compare with.
[0047] Here, when processing the noise signal of the first frame, the smoothed energy E_smoothed(1) of the noise signal of the first frame and the preset initial noise energy N 予め設定された初期ノイズエネルギー The preset initial noise energy N 予め設定された初期ノイズエネルギー is typically set as a value for a quiet environment, e.g., a preset initial noise energy N 予め設定された初期ノイズエネルギー The value may be in the range of -120 dBFS to 170 dBFS, and is set to, for example, -96 dBFS.
[0048] Finally, based on the result of the comparison, the previously updated noise energy is updated to obtain an updated noise energy.
[0049] Here, the smoothed energy E_smoothed(t) of the last acquired frame of the signal is multiplied by the previously updated noise energy N 以前に更新されたノイズエネルギー If N is smaller than , the previously updated noise energy N 以前に更新されたノイズエネルギー Update. N 更新後のノイズエネルギー = (a*E_smoothed(t)+b*Npreviously updated noise energy)*c.
[0050] The smoothed energy E_smoothed(t) of the last acquired signal frame is multiplied by the previously updated noise energy N 以前に更新されたノイズエネルギーIf , the previously updated noise energy N 以前に更新されたノイズエネルギー Update. N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー *d.
[0051] Here, N 更新後のノイズエネルギー is the noise energy after updating, that is, the noise energy outside the terminal at that time. a, b, c, and d are coefficients, the sum of coefficients a and b is 1, and coefficients c and d may be in the range of 1 to 1.1, for example, c and d may both be set to 1.0002. t is time.
[0052] The implementation of the present invention can realize smooth automatic adjustment of the playback volume, and avoid the playback volume from suddenly increasing or decreasing significantly. For example, when a user suddenly goes from a very quiet environment to a very noisy environment and opens a video application TikTok to watch a short video, the smoothed energy E_smoothed(t) of the last acquired signal frame is always greater than or equal to the preset initial noise energy N 予め設定された初期ノイズエネルギー In this case, E_smoothed(t)>N 予め設定された初期ノイズエネルギー Therefore, the above formula N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー * Using d, N 予め設定された初期ノイズエネルギー (When processing the noise signal of the first frame, N 以前に更新されたノイズエネルギー What is N 予め設定された初期ノイズエネルギー ), then in the next frame, E_smoothed(t) is still N 以前に更新されたノイズエネルギー Therefore, according to the method of the present disclosure, the formula N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー * Using d, N 以前に更新されたノイズエネルギー By updating and repeating this process, N 更新後のノイズエネルギー gradually approaches E_smoothed(t), and the playback volume decreases with the noise energy N 更新後のノイズエネルギー Since the playback volume is adjusted based on the above, the method of the present disclosure can achieve smooth automatic adjustment of the playback volume.
[0053] In one embodiment, the step S13 of adjusting the playback volume of the audio or video based on the noise energy may have various implementation forms. One implementation form may be to use a preset correspondence table to determine a target volume corresponding to the noise energy, and then determine the playback volume of the audio or video based on the target volume. Another implementation form may be to use a preset functional relationship to calculate a target volume corresponding to the noise energy (the target volume and the noise energy satisfy a preset functional relationship), and then determine the playback volume of the audio or video based on the target volume. The preset correspondence table, the preset functional relationship, and the like can all be obtained through experiments. For example, the playback volumes when different users watch audio or video in different environments with noise are collected in advance, and then the playback volumes and environmental noises are used as samples for training, or the average or root mean square of the playback volumes in the same environment with noise is obtained, and so on, to obtain a preset correspondence relationship between the playback volume and the environmental noise. When adjusting the playback volume, the playback volume is automatically adjusted based on the preset correspondence relationships, so that the playback volume is automatically increased in a noisy environment and automatically decreased in a quiet environment, allowing the user to watch comfortably in any environment.
[0054] In one implementation, during the period when the terminal has no sound in the speaker mode, the noise signal of the external environment of the terminal is constantly collected, so that the adjustment of the playback volume may also be performed continuously during the period when the terminal has no sound in the speaker mode. Of course, the playback volume may be adjusted only when the period when the terminal has no sound in the speaker mode ends, that is, while the period when the terminal has no sound in the speaker mode is continuing and not ending, the various implementations described above continuously determine the noise energy outside the terminal but do not adjust the playback volume, and then, only when the period ends, adjust the playback volume based on the determined environmental noise energy at that time, thereby saving the use of resources in the terminal.
[0055] In one implementation, the automatic volume control method according to the embodiment of the present disclosure continues to run while the user is watching audio or video. For example, if the user is going from a quiet environment at home to a noisy street and continues to watch short videos, the automatic volume control method according to the embodiment of the present disclosure continues to run during that time. By terminal application If a user watches a short video, closes the terminal application, and then goes out into the noisy street and opens the terminal application again to watch the short video, the automatic volume adjustment method according to the embodiment of the present disclosure will continue to be executed each time the user opens the terminal application to watch the short video for the second time.
[0056] 3 is a block schematic diagram of an automatic volume control device according to an embodiment of the present disclosure. As shown in FIG. 3, the automatic volume control device includes a noise signal acquisition module 31 for acquiring a noise signal outside the terminal when the terminal has no sound in speaker mode, a noise energy determination module 32 for determining a noise energy based on the noise signal, and a volume adjustment module 33 for adjusting the playback volume of an audio or video based on the noise energy.
[0057] Using the above technical solution, when there is no sound on the terminal in speaker mode, a noise signal outside the terminal can be obtained, and then the noise energy can be determined based on the noise signal. Then, the audio or video playback volume on the terminal can be adjusted based on the noise energy, thereby realizing automatic adjustment of the playback volume. This not only avoids the user from manually adjusting the playback volume, but also avoids the playback volume of the terminal itself from interfering with the noise of the terminal's external environment itself in the process of automatically adjusting the playback volume, so that the volume can be automatically adjusted more accurately based only on the noise of the terminal's external environment itself.
[0058] Optionally, the noise energy determination module 32 is used to determine the signal energy of the last acquired one frame of the noise signal as the noise energy.
[0059] Optionally, the noise energy determination module 32 performs a smoothing process on the signal energy of the first N frames of the noise signal to obtain a smoothed energy of the first N frames of the signal (the first N frames of the signal are the N frames of the signal before the last acquired frame of the noise signal, where N is a positive integer greater than or equal to 1); and performs a smoothing process on the signal energy of the last acquired frame of the signal based on the smoothed energy of the first N frames of the signal and the signal energy of the last acquired frame of the signal to obtain a smoothed energy of the last acquired frame of the signal; and the smoothed energy of the last acquired frame of the signal is used to determine the noise energy.
[0060] Optionally, the noise energy determination module 32 is used to perform a smoothing process on the signal energy of the first N frames of the noise signal to obtain a smoothed energy of the first N frames of the signal (the first N frames of the signal are the signals of the N frames before the last acquired frame of the noise signal, where N is a positive integer greater than or equal to 1); perform a smoothing process on the signal energy of the last acquired frame of the signal based on the smoothed energy of the first N frames of the signal and the signal energy of the last acquired frame of the signal to obtain a smoothed energy of the last acquired frame of the signal; compare the smoothed energy of the last acquired frame of the signal with a previously updated noise energy; and update the previously updated noise energy based on the comparison result to obtain an updated noise energy.
[0061] Optionally, the noise energy determination module 32 is also used to perform the following. If the smoothed energy of the last acquired frame signal is smaller than the previously updated noise energy, the previously updated noise energy is updated using the following formula: N更新後のノイズエネルギー =(a*E_smoothed(t)+b*N 以前に更新されたノイズエネルギー )*c. If the smoothed energy of the last acquired frame of the signal is greater than the previously updated noise energy, the previously updated noise energy is updated using the following formula: N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー *d.
[0062] Here, N 更新後のノイズエネルギー is the updated noise energy, E_smoothed(t) is the smoothed energy of the last frame, and N 以前に更新されたノイズエネルギー is the previously updated noise energy, a, b, c, d are coefficients, and t is time.
[0063] Optionally, the volume adjustment module 33 is used to determine a target volume corresponding to the noise energy using a preset correspondence table, and determine the playback volume of the audio or video based on the target volume.
[0064] Optionally, the volume adjustment module 33 is used to calculate a target volume corresponding to the noise energy using a preset functional relationship (the target volume and the noise energy satisfy a preset functional relationship), and determine the playback volume of the audio or video based on the target volume.
[0065] Specific implementation forms regarding operations performed by each module of the automatic volume control device according to the embodiment of the present disclosure are described in detail in the related methods, and therefore detailed description thereof will be omitted here.
[0066] Reference is now made to FIG. 4, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiments of the present disclosure. Terminal devices according to the embodiments of the present disclosure include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet personal computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital televisions and desktop personal computers. The electronic device shown in FIG. 4 is merely an example, and is in no way intended to limit the functions and scope of use of the embodiments of the present disclosure.
[0067] 4, the electronic device 600 may include a processing unit (e.g., a central processing unit, a graphic processor, etc.) 601 that can perform various appropriate operations and processes based on programs stored in a read only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. The RAM 603 also stores various programs and data necessary for the operation of the electronic device 600. The processing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0068] In general, devices connectable to the I / O interface 605 include input devices 606, such as a touch panel, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608, such as a magnetic tape, hard disk, etc.; and communication devices 609. The communication devices 609 allow the electronic device 600 to communicate wirelessly or via wires with other devices to exchange data. Although FIG. 4 illustrates the electronic device 600 having various devices, it should be understood that the electronic device 600 may not necessarily be embodied in or include all of the devices shown. Instead, the electronic device 600 may be embodied in or include more or fewer devices.
[0069] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product having a computer program carried on a non-transitory computer-readable medium, the computer program including a program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network by a communication device 609, or may be installed from a storage device 608, or may be installed from a ROM 602. When the computer program is executed by the processing device 601, the functions defined in the method of the embodiment of the present disclosure are performed. An embodiment of the present disclosure further includes a computer program that, when executed in an electronic device, performs the functions defined in some of the embodiment methods of the present disclosure.
[0070] It should be noted that the computer readable medium described in this disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of both. The computer readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or component, or any combination thereof. More specific examples of computer readable storage media include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage component, a magnetic storage component, or any suitable combination thereof. In this disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, device or component. In this disclosure, the computer readable signal medium may include a data signal carrying the computer readable program code, propagated in baseband or as part of a carrier wave. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program used by or in combination with an instruction execution system, device, or component. The program code contained in the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, electrical wire, optical cable, RF (radio frequency), or the like, or any suitable combination thereof.
[0071] In some embodiments, the clients and servers may communicate using any conventional or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be connected to each other via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), an internetwork (e.g., the Internet), a peer-to-peer network (e.g., an ad hoc peer-to-peer network), and any conventional or later developed network.
[0072] The computer readable medium may be included in the electronic device, or may exist separately and not integrated into the electronic device.
[0073] The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to obtain a noise signal external to the terminal when there is no sound at the terminal in speaker mode, determine noise energy based on the noise signal, and adjust audio or video playback volume at the terminal based on the noise energy.
[0074] Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a single independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. When a remote computer is involved, the remote computer may be connected to the user's computer by any type of network, including a local area network (LAN), a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0075] The flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations that can be implemented in the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logical function. It should be noted that in some alternative implementations, the functions shown in the blocks may be executed in a different order than that shown in the drawings. For example, two blocks shown to be connected may actually be executed substantially in parallel, or may sometimes be executed in the reverse order, as determined by the related functions. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated system consisting of hardware that executes a certain function or operation, or may be implemented in a combination of dedicated hardware and computer instructions.
[0076] The modules referred to in the description of the embodiments of the present disclosure may be realized as software or hardware, and the names of the modules may not constitute limitations on the modules themselves in some cases.
[0077] The functions described herein above may be performed at least in part by one or more hardware logic components, for example, but without limitation, examples of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), combined programmable logic devices (CPLDs), etc.
[0078] According to one or more embodiments of the present disclosure, as Example 1, there is provided an automatic volume adjustment method, including the steps of acquiring a noise signal external to a terminal when there is no sound on the terminal in speaker mode, determining noise energy based on the noise signal, and adjusting an audio or video playback volume on the terminal based on the noise energy.
[0079] According to one or more embodiments of the present disclosure, there is provided, as Example 2, the method of Example 1, further comprising a step of determining the signal energy of the signal of the last acquired frame of the noise signal as the noise energy.
[0080] According to one or more embodiments of the present disclosure, there is provided, as Example 3, the method of Example 1, further including the steps of: smoothing signal energy of first N frames of the noise signal to obtain smoothed energy of the first N frames of the signal, where the first N frames of the signal are signals of N frames prior to the signal of the last acquired frame of the noise signal, where N is a positive integer greater than or equal to 1; smoothing signal energy of the last acquired frame of the signal based on the smoothed energy of the first N frames of the signal and the signal energy of the last acquired frame to obtain smoothed energy of the signal of the last acquired frame; and determining the smoothed energy of the signal of the last acquired frame as the noise energy.
[0081] According to one or more embodiments of the present disclosure, there is provided, as Example 4, the method of Example 1, further including the steps of: smoothing signal energy of signals of first N frames of the noise signal to obtain smoothed energy of the signals of the first N frames, where the signals of the first N frames are signals of N frames before the signal of the last acquired frame of the noise signal, where N is a positive integer greater than or equal to 1; smoothing signal energy of the signal of the last acquired frame based on the smoothed energy of the signals of the first N frames and the signal energy of the signal of the last acquired frame to obtain smoothed energy of the signal of the last acquired frame; comparing the smoothed energy of the signal of the last acquired frame with a previously updated noise energy; and updating the previously updated noise energy based on a result of the comparison to obtain an updated noise energy.
[0082] According to one or more embodiments of the present disclosure, as Example 5, when the smoothed energy of the last acquired one frame signal is smaller than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =(a*E_smoothed(t)+b*N 以前に更新されたノイズエネルギー )*c updating the previously updated noise energy using If the smoothed energy of the last acquired frame of the signal is greater than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー *d updating the previously updated noise energy using Further comprising: Here, N 更新後のノイズエネルギー is the updated noise energy, E_smoothed(t) is the smoothed energy of the last acquired frame, and N 以前に更新されたノイズエネルギーThe method of Example 1 is provided, where a is the previously updated noise energy, a, b, c, d are coefficients, and t is time.
[0083] According to one or more embodiments of the present disclosure, there is provided, as Example 6, the method of Example 1, further including the steps of determining a target volume corresponding to the noise energy using a preset correspondence table, and determining a playback volume of the audio or video based on the target volume.
[0084] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, further comprising: calculating a target volume corresponding to the noise energy using a preset functional relationship, wherein the target volume and the noise energy satisfy the preset functional relationship; and determining a playback volume of the audio or video based on the target volume.
[0085] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 1, further comprising acquiring a noise signal external to the terminal during an interval period during which the audio or video switches.
[0086] The above description is merely a description of the preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the present disclosure is not limited to the technical solution of the specific combination of the above technical features, but also includes other technical solutions obtained by arbitrarily combining the above technical features or equivalent features without departing from the spirit of the above disclosure. For example, the above features are replaced with (but not limited to) technical features having similar functions to those described in the present disclosure.
[0087] Furthermore, although operations are described in a particular order, it is not to be understood that the operations are required to be performed in the particular order or sequence shown. In some cases, multitasking and parallel processing may be useful. Also, the above discussion includes some implementation details, which should not be construed as limitations on the scope of the disclosure. Some features described before and after in one embodiment can be implemented in combination in one embodiment. Conversely, various features described before and after in one embodiment may be implemented in multiple embodiments, each or in part.
[0088] Although the present invention has been described in a form that focuses on structural features and / or logical operations of a method, it should be understood that the inventions covered in the claims are not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely examples of forms for implementing the claims. Since the manner in which the operations are performed by each module in the apparatus according to the above embodiment is described in detail in the method embodiment, a detailed description will be omitted here.
[0089] This application claims priority to a Chinese patent application filed on April 7, 2020, bearing application number 202010266544.8 and entitled "Volume automatic adjustment method, device, medium and apparatus," the contents of which are incorporated herein by reference.
Claims
1. acquiring a noise signal external to the terminal when the terminal is in speaker mode and has no sound; determining a noise energy based on the noise signal; adjusting the audio or video playback volume at the terminal based on the noise energy; Including, The step of determining noise energy based on the noise signal further comprises: a step of smoothing the signal energy of the first N frames of the noise signal to obtain smoothed energy of the first N frames of the noise signal, the first N frames of the noise signal being N frames of the noise signal prior to the last acquired frame of the noise signal, where N is a positive integer equal to or greater than 1; performing a smoothing process on the signal energy of the last acquired one frame based on the smoothed energy of the signals of the first N frames and the signal energy of the last acquired one frame to obtain a smoothed energy of the signal of the last acquired one frame; comparing the smoothed energy of the last acquired frame of the signal with a previously updated noise energy; updating the previously updated noise energy based on a result of the comparison to obtain an updated noise energy; Including, The step of updating the previously updated noise energy based on a result of the comparison comprises: If the smoothed energy of the last acquired frame of the signal is smaller than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =(a*E_smoothed(t)+b*N 以前に更新されたノイズエネルギー )*c updating the previously updated noise energy using If the smoothed energy of the last acquired frame of the signal is greater than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー *d updating the previously updated noise energy using Including, Here, N 更新後のノイズエネルギー is the updated noise energy, E_smoothed(t) is the smoothed energy of the last acquired frame of the signal, and N 以前に更新されたノイズエネルギー is the previously updated noise energy, a, b, c, and d are coefficients, and t is time.
2. said step of adjusting the audio or video playback volume based on said noise energy further comprising: determining a target volume corresponding to the noise energy using a preset correspondence table; determining a playback volume of the audio or video based on the target volume; Including, 2. The method of claim 1 .
3. said step of adjusting the audio or video playback volume based on said noise energy further comprising: calculating a target volume corresponding to the noise energy using a preset functional relationship, the target volume and the noise energy satisfying the preset functional relationship; determining a playback volume of the audio or video based on the target volume; Including, 3. The method according to claim 1 or 2.
4. The step of acquiring a noise signal outside the terminal when there is no sound in the terminal in speaker mode includes: Acquiring a noise signal outside the terminal during an interval in which the audio or video is switched; The method according to any one of claims 1 to 3.
5. A noise signal acquisition module for acquiring a noise signal outside the terminal when the terminal has no sound in speaker mode; a noise energy determination module for determining a noise energy based on the noise signal; a volume adjustment module for adjusting the volume of audio or video playback based on the noise energy; Including, When the noise energy determination module determines the noise energy based on the noise signal, performing a smoothing process on signal energy of the first N frames of the noise signal to obtain smoothed energy of the first N frames of the signal, the first N frames of the signal being N frames of the noise signal prior to the last acquired frame of the signal, where N is a positive integer equal to or greater than 1; performing a smoothing process on the signal energy of the last acquired one frame based on the smoothed energy of the signals of the first N frames and the signal energy of the last acquired one frame to obtain a smoothed energy of the signal of the last acquired one frame; Comparing the smoothed energy of the last acquired frame of the signal with a previously updated noise energy; updating the previously updated noise energy based on a result of the comparison to obtain an updated noise energy; If the smoothed energy of the last acquired frame of the signal is smaller than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =(a*E_smoothed(t)+b*N 以前に更新されたノイズエネルギー )*c updating the previously updated noise energy using If the smoothed energy of the last acquired frame of the signal is greater than the previously updated noise energy, the following formula is used: N 更新後のノイズエネルギー =N 以前に更新されたノイズエネルギー *d updating the previously updated noise energy using Here, N 更新後のノイズエネルギー is the updated noise energy, E_smoothed(t) is the smoothed energy of the last acquired frame of the signal, and N 以前に更新されたノイズエネルギー is the previously updated noise energy, a, b, c, and d are coefficients, and t is time.
6. A computer readable medium having a computer program stored thereon, the computer program causing, when executed by a processor, to implement the steps of the method according to any one of claims 1 to 4.
7. A storage device in which a computer program is stored; a processor for implementing the steps of the method according to any one of claims 1 to 4 by executing the computer program in the storage device; 16. An electronic device comprising:
8. A computer program which, when executed on an electronic device, causes the electronic device to carry out the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Sound signal processing device and method
JP2009296297A
Broadcast wireless system, volume enhancement control method, volume enhancement control program, and program recording medium
JP2011013995A
Sound correction device, voice output device, sound correction circuit, sound correction method, and program
JP2013213889A