Volume adjustment method, device, electronic device and computer-readable storage medium
The sound recognition model trained through machine learning adjusts the volume of audio and video software according to the environmental sound recognition scene, solving the problem of volume adjustment of electronic products in different environments, reducing the impact on people around you, and improving the convenience of life.
Patent Information
- Application Number
- CN202111257677.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-10-27
AI Technical Summary
It is difficult for electronic products to automatically adjust the volume in different environments, causing inconvenience to people around them, and the existing policies to control the volume are less effective.
The sound recognition model trained by machine learning is used to recognize the scene according to the surrounding environment sound, and adjust the external volume of the audio and video software, including the processing of muting and tuning scenes.
It realizes automatic volume adjustment in different environments, reduces the impact on surrounding people, improves the environmental adaptability of electronic products, and improves life convenience.
Smart Images

Figure CN113993038B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a volume adjustment method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the popularity of electronic products such as mobile phones and tablets, the use of smart devices such as mobile phones is becoming more and more widespread, and the role they play in life is becoming more and more important. In addition to bringing us various conveniences, they also bring us some troubles. For example, when you open a video, if the volume of the video sound does not match the surrounding environment, it will cause great inconvenience to the people around you, and even disturb them.
[0003] Moreover, in real life, it is very easy to open the software on the smart device without realizing it, and then the software starts playing the video at a high volume, and it takes time to turn off the sound. In addition, many places have issued relevant policies that do not allow the sound of the video to be played out loud when watching videos in public places such as subways, and use staff to patrol and dissuade people from playing the sound out loud in public places, but the effect is poor. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a volume adjustment method, device, electronic device and computer-readable storage medium to improve the problem that current electronic products are difficult to adjust the external volume according to the environment, which brings inconvenience to people's lives.
[0005] In order to achieve the above-mentioned purpose, the technical solution adopted in the embodiment of the present invention is as follows.
[0006] In a first aspect, the present application provides a volume adjustment method, which adopts the following technical solution.
[0007] A volume adjustment method, applied to a terminal, comprising:
[0008] Acquire the sound to be tested in the surrounding environment;
[0009] Using a preset sound recognition model, the sound to be tested is recognized to obtain an environmental scene corresponding to the sound to be tested, wherein the sound recognition model is a model trained by using machine learning and taking various environmental sounds as model inputs;
[0010] According to the environmental scenario, the external speaker volume of the audio and video software on the terminal is adjusted.
[0011] In a feasible implementation manner, the step of adjusting the external speaker volume of the audio and video software on the terminal according to the environmental scenario includes:
[0012] According to the environmental scene, obtaining a tuning type corresponding to the environmental scene, the tuning type including a silent scene;
[0013] If the audio adjustment type is a silent scene, the external sound of the audio and video software of the terminal is turned off.
[0014] In a feasible implementation manner, the tuning type further includes a tuning scene, and the step of adjusting the external speaker volume of the audio and video software on the terminal according to the environmental scene further includes:
[0015] If the tuning type is a tuning scene, then according to the environment scene, a volume adjustment formula corresponding to the tuning scene is retrieved;
[0016] Based on the sound to be measured, and according to the volume adjustment formula, a volume value is obtained;
[0017] The external speaker volume of the audio and video software on the terminal is adjusted to the volume value.
[0018] In a feasible implementation manner, the tuning scenario includes multiple scenarios, and the volume adjustment formula includes:
[0019]
[0020] Among them, L p is the volume value, B is the tuning parameter, p rms is the sound pressure of the sound to be measured, P ref For the reference sound pressure, there are multiple tuning parameters, and the multiple scenes correspond to the multiple tuning parameters one by one.
[0021] In a feasible implementation manner, the method further includes:
[0022] Based on the collected various environmental sounds, machine learning is used to train a sound recognition model. When the sound recognition model takes the environmental sound as input, it outputs the environmental scene corresponding to the environmental sound.
[0023] In a feasible implementation, the sound recognition model includes multiple recognition models, and the step of training the sound recognition model based on the collected various environmental sounds using a machine learning model includes:
[0024] Perform feature extraction on the collected various types of environmental sounds, extract the feature value of each type of environmental sound, and each type of environmental sound corresponds to an environmental scene;
[0025] Machine learning is adopted, and the characteristic values of each type of environmental sound are respectively used as model inputs to perform model training, so as to obtain multiple recognition models for recognizing environmental scenes according to environmental sounds, and each recognition model corresponds to an environmental scene.
[0026] In a feasible implementation manner, the step of using a preset sound recognition model to recognize the sound to be tested and obtaining an environmental scene corresponding to the sound to be tested includes:
[0027] Extracting the characteristic value of the sound to be measured, taking the characteristic value of the sound to be measured as the input of a preset sound recognition model, and obtaining the environmental scene output by the sound recognition model;
[0028] The eigenvalues include zero-crossing rate and Mel-frequency cepstral coefficients.
[0029] In a second aspect, the present application provides a volume adjustment device, which adopts the following technical solution.
[0030] A volume adjustment device, applied to a terminal, comprises a collection module, an identification module and an adjustment module;
[0031] The acquisition module is used to acquire the sound to be tested in the surrounding environment;
[0032] The recognition module is used to use a preset sound recognition model to recognize the sound to be tested and obtain the environmental scene corresponding to the sound to be tested. The sound recognition model is a model trained by machine learning using various environmental sounds as model inputs;
[0033] The adjustment module is used to adjust the external speaker volume of the audio and video software on the terminal according to the environmental scenario.
[0034] In a third aspect, the present application provides an electronic device that adopts the following technical solution.
[0035] An electronic device includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the volume adjustment method as described in the first aspect.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution.
[0037] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the volume adjustment method described in the first aspect.
[0038] The volume adjustment method, device, electronic device and computer-readable storage medium provided in the embodiments of the present invention use a preset sound recognition model to identify an environmental scene based on the sound to be tested in the acquired surrounding environment, and adjust the external volume of the audio and video software on the terminal according to the environmental scene, so that the terminal can adjust the external volume to an appropriate level in different environmental scenes, reducing the impact of the external volume on people around, thereby improving the problem that current electronic products are difficult to adjust the external volume according to the environment, which brings inconvenience to people's lives.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 : A schematic diagram of the structure of the tuning system provided in an embodiment of the present application.
[0042] Figure 2 ; A block diagram of a tuning system provided in an embodiment of the present application.
[0043] Figure 3 A block diagram of an embodiment of the present application with your device provided.
[0044] Figure 4 : A flowchart of some steps of the volume adjustment method provided in an embodiment of the present application.
[0045] Figure 5 : A flowchart of another part of the steps of the volume adjustment method provided in the embodiment of the present application.
[0046] Figure 6 for: Figure 5 Schematic diagram of the flow chart of some sub-steps of step S100.
[0047] Figure 7 for: Figure 4 or Figure 2 Schematic diagram of the flow chart of some sub-steps of step S105.
[0048] Figure 8 : A block diagram of a volume adjustment device provided in an embodiment of the present application.
[0049] Icons: 110 - terminal; 120 - volume adjustment device; 130 - radio equipment; 150 - electronic equipment; 160 - communication module; 170 - processor; 180 - memory; 190 - acquisition module; 200 - identification module; 210 - adjustment module. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0051] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0052] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0053] With the popularity of electronic products such as mobile phones and tablets, the use of smart devices such as mobile phones is becoming more and more widespread, and the role they play in life is becoming more and more important. In addition to bringing us various conveniences, they also bring us some troubles. For example, when you open a video, if the volume of the video sound does not match the surrounding environment, it will cause great inconvenience to the people around you, and even disturb them.
[0054] Moreover, in real life, it is very easy to open the software on the smart device without realizing it, and then the software starts playing the video at a high volume, and it takes time to turn off the sound. In addition, many places have issued relevant policies that do not allow the sound of the video to be played out loud when watching videos in public places such as subways, and use staff to patrol and dissuade people from playing the sound out loud in public places, but the effect is poor.
[0055] Based on the above considerations, the present application provides a volume adjustment method, device, electronic device and computer-readable storage medium.
[0056] Please refer to Figure 1 and Figure 2 The volume adjustment method provided in the present application can be applied to a tuning system, which includes a terminal 110, the terminal 110 includes a volume adjustment device 120, and the terminal 110 also includes a sound receiving device 130, and the terminal 110 is installed with multiple audio and video software. Among them, the terminal 110 can be but is not limited to: a personal computer, a laptop computer, a smart phone, a tablet computer and a portable wearable device. The sound receiving device 130 includes a microphone.
[0057] Please refer to Figure 3 , is a block diagram of an electronic device 150. The electronic device 150 includes a memory 180, a processor 170, and a communication module 160. The memory 180, the processor 170, and the communication module 160 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0058] The memory 180 is used to store programs or data. The memory 180 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0059] The processor 170 is used to read / write data, computer programs or machine executable instructions stored in the memory 180 and execute corresponding functions. The processor 170 can execute the computer program or machine executable instructions to implement the volume adjustment method.
[0060] The communication module 160 is used to establish a communication connection between the electronic device 150 and other communication terminals 110 through a network, and to send and receive data through the network.
[0061] It should be understood that Figure 3 The structure shown is only a schematic diagram of the structure of the electronic device 150. The electronic device 150 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0062] In one embodiment, referring to Figure 4 , which is a flow chart of some steps of a volume adjustment method provided by the present application. This embodiment mainly applies the method to Figure 1 The terminal 110 in the example is used to illustrate that the method can also be applied to a server, an electronic device 150, a volume adjustment device 120, etc. In this embodiment, the method includes the following steps.
[0063] S101, obtaining the sound to be tested in the surrounding environment.
[0064] The sound to be tested is the sound of the surrounding environment where the terminal 110 is located.
[0065] The sound receiving device 130 on the terminal 110 can collect the sound to be tested in the surrounding environment. The sound receiving device 130 may be a microphone.
[0066] S103, using a preset sound recognition model to recognize the sound to be tested, and obtaining an environmental scene corresponding to the sound to be tested.
[0067] Among them, the sound recognition model is a model trained by using machine learning and taking various environmental sounds as model inputs.
[0068] Specifically, a preset sound recognition model is stored in the memory 180 on the terminal 110. The terminal 110 calls the preset sound recognition model to recognize the sound to be tested collected in the surrounding environment, and obtains the environmental scene corresponding to the sound to be tested.
[0069] For example, environmental scenarios include subway environments, high-speed train environments, museum environments, waiting room environments, bus environments, etc. After the sound to be tested in the subway is input into the sound recognition model, the sound recognition model can output the subway environment.
[0070] S105, adjusting the external speaker volume of the audio and video software on the terminal 110 according to the environmental scenario.
[0071] Specifically, the terminal 110 adjusts the external speaker volume of the audio and video software on the terminal 110 according to the environmental scene output by the sound recognition model.
[0072] In the above volume adjustment method, by utilizing a preset sound recognition model, the environmental scene is identified according to the sound to be tested in the acquired surrounding environment, and the external volume of the audio and video software on the terminal 110 is adjusted according to the environmental scene, so that the terminal 110 can adjust the external volume to an appropriate level in different environmental scenes, reducing the impact of the external volume on the surrounding people, thereby improving the problem that current electronic products are difficult to adjust the external volume according to the environment, which brings inconvenience to people's lives.
[0073] On the basis of the above, refer to Figure 5 The volume adjustment method provided in the present application may further include step S100.
[0074] S100 uses machine learning to train a sound recognition model based on the collected environmental sounds.
[0075] Among them, the sound recognition model outputs the environmental scene corresponding to the environmental sound when taking the environmental sound as input.
[0076] Specifically, recording equipment such as recording devices are used to collect environmental sounds including but not limited to those on subways, trains, buses, museums, and waiting halls, and a large amount of sound is collected in each scene, and the collected environmental sounds are labeled with the collection environment as a label. Based on the labeled environmental sounds, machine learning is collected, and the labeled environmental sounds are used as input to train a sound recognition model with the purpose of outputting the labels of the environmental sounds.
[0077] It should be noted that different recognition models can be used for different environmental sound recognitions, that is, the sound recognition model includes multiple models, each model corresponds to the recognition of an environmental sound, such as the sound recognition model includes a subway sound recognition model, a bus sound recognition model, a museum sound recognition model, a high-speed train sound recognition model and a waiting hall recognition model, etc.
[0078] Similarly, a sound recognition model can also be used to recognize multiple environmental sounds.
[0079] On this basis, refer to Figure 6 , is a flowchart of some sub-steps of the above step S100.
[0080] S100-1, extracting features of various types of environmental sounds collected, and extracting feature values of each type of environmental sound.
[0081] Each type of environmental sound corresponds to an environmental scene. The characteristic value may be, but is not limited to, a zero-crossing rate and a Mel-frequency cepstral coefficient (MFCC).
[0082] S100-2, using machine learning, taking the characteristic values of each type of environmental sound as model input, performing model training, and obtaining multiple recognition models for recognizing environmental scenes based on environmental sounds.
[0083] The machine learning may be any machine learning algorithm, and each recognition model corresponds to an environmental scenario.
[0084] It should be understood that the above steps S100 - 1 to S100 - 2 may be completed on other terminal 110 devices, and the sound recognition model may be stored on the terminal 110 after the sound recognition model is obtained.
[0085] In the above steps, a sound recognition model can be trained based on the feature values of various environmental sounds and machine learning.
[0086] It should be understood that when adjusting the external speaker volume of the audio and video software on the terminal 110, it is only necessary to execute steps S101 to S105, and S100 does not need to be executed every time.
[0087] Based on the content of the above-mentioned training sound recognition model, a specific implementation process of step S103 in the figure is: extracting the characteristic value of the sound to be tested, using the characteristic value of the sound to be tested as the input of the preset sound recognition model, and obtaining the environmental scene output by the sound recognition model.
[0088] During training, the characteristic values of the environmental sound are extracted as input to train the sound recognition model. Therefore, when using the trained sound recognition model, the characteristic values of the sound to be tested are also used as input of the sound recognition model to recognize the environmental scene.
[0089] In one embodiment, referring to Figure 7 ,for Figure 4 or Figure 5 The flowchart of some sub-steps of step S105 includes the following steps.
[0090] S105-1, according to the environmental scene, obtain the tuning type corresponding to the environmental scene.
[0091] Among them, the tuning type includes a silent scene.
[0092] Specifically, the terminal 110 obtains the tuning type corresponding to the environmental scene according to the environmental scene corresponding to the sound to be tested identified by the sound recognition model.
[0093] For example, a subway environment, a high-speed train environment, and a bus environment may all be silent scenes.
[0094] S105-2, determine the tuning type, if the tuning type is a silent scene, execute step S105-3.
[0095] S105-3, turn off the external sound of the audio and video software of the terminal.
[0096] Specifically, when the audio tuning type belongs to the silent scene, the external sound of the audio and video software on the terminal 110 is turned off.
[0097] In the above method, after obtaining the environmental scene output by the sound recognition model, the environmental scene will be judged to obtain the tuning type. When the tuning type is a silent scene, the external sound on the terminal 110 will be turned off without manual shutdown, and it is the behavior of the terminal 110 itself, reducing the convenience of tuning.
[0098] It is understandable that the specific environment tuning type for the silent scene can be adjusted according to the actual situation and can be updated from time to time.
[0099] Furthermore, the tuning type also includes the tuning scene. On this basis, please continue to refer to Figure 7 , some sub-steps of the above step S105 also include the following steps.
[0100] If the tuning type is a tuning scene, execute step S105 - 4 .
[0101] For example, a waiting room scene, a restaurant scene, etc. can be a tuning scene.
[0102] S105-4, according to the environmental scene, retrieve the volume adjustment formula corresponding to the tuning scene.
[0103] Specifically, the terminal 110 stores volume adjustment formulas corresponding to multiple environment scenes of the tuning scene, that is, each environment scene of the tuning scene has its corresponding volume adjustment formula. When the tuning type is the tuning scene, the terminal 110 retrieves the volume adjustment formula corresponding to the tuning scene.
[0104] S105-5, based on the sound to be measured, obtain a volume value according to a volume adjustment formula.
[0105] S105 - 6 , adjusting the external volume of the audio and video software on the terminal 110 to the volume value.
[0106] Specifically, after the terminal 110 retrieves the volume adjustment formula corresponding to the environmental scene, it obtains the volume value based on the sound to be tested and the volume adjustment formula, and adjusts the external volume of the audio and video software on the terminal 110 to the volume value.
[0107] Through the above steps, when the environmental scene corresponding to the sound to be tested is of the tuning type, the corresponding volume adjustment formula is called out, the volume value is obtained in combination with the sound to be tested, and the external volume of the audio and video software on the terminal 110 is adjusted to the volume value, so that the external sound is automatically adjusted to a volume that matches the current environmental scene, reducing the impact of the external volume on people around, thereby helping to improve the problem that current electronic products are difficult to adjust the external volume according to the environment, which brings inconvenience to people's lives.
[0108] The tuning scene includes multiple scenes, and each scene has its corresponding volume adjustment formula. Specifically, in one embodiment, the volume adjustment formula can be:
[0109]
[0110] Among them, L p is the volume value, B is the tuning parameter, p rms is the sound pressure of the sound to be measured, P ref In addition, there are multiple tuning parameters, and the multiple scenes of the tuning scene correspond to the multiple tuning parameters one by one.
[0111] That is, each scene has its corresponding volume adjustment formula, so that the volume can be adjusted more accurately according to the environmental scene where the terminal 110 is located, making the volume adjustment more targeted.
[0112] It should be understood that the volume value obtained by the volume adjustment formula is the initial volume when the audio and video software on the terminal 110 is played externally, rather than a fixed volume. The user can adjust the external volume value again according to actual needs.
[0113] It should be understood that although Figure 4-Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 4-Figure 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0114] In order to execute the corresponding steps in the above-mentioned embodiments and various possible methods, a method for implementing the volume adjustment device 120 is given below. Optionally, the volume adjustment device 120 can adopt the above-mentioned Figure 3 The device structure of the electronic device 150 is shown. Figure 8 , Figure 8 This is a functional module diagram of a volume adjustment device 120 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the volume adjustment device 120 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The volume adjustment device 120 can also be applied to the terminal 110 as a functional module. The volume adjustment device 120 includes a collection module 190, an identification module 200 and an adjustment module 210.
[0115] The acquisition module 190 is used to acquire the sound to be tested in the surrounding environment.
[0116] The recognition module 200 is used to recognize the sound to be tested by using a preset sound recognition model to obtain the environment scene corresponding to the sound to be tested.
[0117] Among them, the sound recognition model is a model trained by using machine learning and taking various environmental sounds as model inputs.
[0118] The adjustment module 210 is used to adjust the external speaker volume of the audio and video software on the terminal 110 according to the environmental scenario.
[0119] Optionally, the above modules can be stored in the form of software or firmware. Figure 3 The memory 180 shown in the figure may be fixed in the operating system (OS) of the electronic device 150 and may be Figure 3 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 180.
[0120] For the specific definition of the volume adjustment device 120, please refer to the definition of the volume adjustment method above, which will not be repeated here. Each module in the above-mentioned volume adjustment device 120 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor 170 in the computer device in the form of hardware, or can be stored in the memory 180 in the computer device in the form of software, so that the processor 170 can call and execute the operations corresponding to the above modules.
[0121] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] In addition, the functional modules in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0123] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory 180 (ROM, Read-Only Memory), random access memory 180 (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A volume adjustment method, characterized in that: Applied to a terminal, the method comprises: Acquire the sound to be tested in the surrounding environment; The sound to be tested is recognized by using a preset sound recognition model to obtain an environmental scene corresponding to the sound to be tested, wherein the sound recognition model is a model trained by using machine learning and taking various environmental sounds as model inputs; the environmental scenes include a subway environment, a train environment, a museum environment, a waiting room environment, and a bus environment; According to the environmental scenario, adjusting the external volume of the audio and video software on the terminal; The terminal stores a plurality of volume adjustment formulas, each of which corresponds to an environmental scene of the tuning scene; and the step of adjusting the external volume of the audio and video software on the terminal according to the environmental scene comprises: According to the environmental scene, obtaining a tuning type corresponding to the environmental scene, the tuning type including the tuning scene; If the tuning type is a tuning scene, then according to the environment scene, a volume adjustment formula corresponding to the tuning scene is retrieved; Based on the sound to be measured, and according to the volume adjustment formula, a volume value is obtained; Adjusting the external volume of the audio and video software on the terminal to the volume value; The sound recognition module includes a plurality of recognition models, and the method further includes: Perform feature extraction on the collected various types of environmental sounds, extract the feature value of each type of environmental sound, and each type of environmental sound corresponds to an environmental scene; Machine learning is adopted, and the characteristic values of each type of environmental sound are respectively used as model inputs to perform model training, so as to obtain multiple recognition models for recognizing environmental scenes according to environmental sounds, and each recognition model corresponds to an environmental scene.
2. The volume adjustment method according to claim 1, characterized in that: The step of adjusting the external volume of the audio and video software on the terminal according to the environmental scenario also includes: If the audio adjustment type is a silent scene, the external sound of the audio and video software of the terminal is turned off.
3. The volume adjustment method according to claim 1, characterized in that: The tuning scenario includes multiple scenarios, and the volume adjustment formula includes: Among them, L p is the volume value, B is the tuning parameter, p rms is the sound pressure of the sound to be measured, P ref For the reference sound pressure, there are multiple tuning parameters, and the multiple scenes correspond to the multiple tuning parameters one by one.
4. The volume adjustment method according to claim 1, characterized in that: The step of using a preset sound recognition model to recognize the sound to be tested and obtaining an environmental scene corresponding to the sound to be tested includes: Extracting the characteristic value of the sound to be measured, taking the characteristic value of the sound to be measured as the input of a preset sound recognition model, and obtaining the environmental scene output by the sound recognition model; The eigenvalues include zero-crossing rate and Mel-frequency cepstral coefficients.
5. A volume adjustment device, characterized in that: Applied to the terminal, including acquisition module, identification module and adjustment module; The acquisition module is used to acquire the sound to be tested in the surrounding environment; The recognition module is used to use a preset sound recognition model to recognize the sound to be tested and obtain the environmental scene corresponding to the sound to be tested. The sound recognition model is a model trained by machine learning using various environmental sounds as model inputs; the environmental scenes include subway environments, train environments, museum environments, waiting room environments, and bus environments; The adjustment module is used to adjust the external volume of the audio and video software on the terminal according to the environmental scenario; The terminal stores a plurality of volume adjustment formulas, each of which corresponds to an environmental scenario of a tuning scenario; The regulating module is further used for: According to the environmental scene, obtaining a tuning type corresponding to the environmental scene, the tuning type including the tuning scene; If the tuning type is a tuning scene, then according to the environment scene, a volume adjustment formula corresponding to the tuning scene is retrieved; Based on the sound to be measured, and according to the volume adjustment formula, a volume value is obtained; Adjusting the external volume of the audio and video software on the terminal to the volume value; The sound recognition module includes a plurality of recognition models, and the volume adjustment device also includes a model of a module for obtaining: Perform feature extraction on the collected various types of environmental sounds, extract the feature value of each type of environmental sound, and each type of environmental sound corresponds to an environmental scene; Machine learning is adopted, and the characteristic values of each type of environmental sound are respectively used as model inputs to perform model training, so as to obtain multiple recognition models for recognizing environmental scenes according to environmental sounds, and each recognition model corresponds to an environmental scene.
6. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the volume adjustment method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the volume adjustment method according to any one of claims 1 to 4 is implemented.
