Volume adjustment method, device, equipment and storage medium
By obtaining the environmental noise and voice commands of the smart device and dynamically adjusting its output volume, it solves the problem of the smart device's broadcast volume being unable to adapt to the current environment and improves the user experience.
Patent Information
- Application Number
- CN201910578929.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-06-28
AI Technical Summary
During human-computer interaction, the broadcast volume of smart devices cannot adapt to the current environment, resulting in poor user experience and requiring manual or voice adjustment.
By acquiring the noise in the environment where the smart device is located and the voice commands input by the user, the output volume is dynamically adjusted to match the current situation.
It improves the user experience and ensures that the output volume is appropriate and not too loud or too small, reducing the need for manual adjustments by users.
Smart Images

Figure CN112151025B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of voice interaction technology, and in particular to a volume adjustment method, device, equipment and storage medium. Background Art
[0002] With the rapid development of artificial intelligence technology, human-computer voice interaction has also made great progress, and smart devices with voice interaction functions have also been favored by more and more users.
[0003] Currently, when a user interacts with a smart device, the broadcast volume of the smart device is the volume set last time, resulting in the current broadcast volume being inappropriate for the current situation, for example, too loud or too soft. Therefore, the user needs to adjust it manually or by voice, resulting in a poor user experience. Summary of the invention
[0004] Embodiments of the present invention provide a volume adjustment method, apparatus, device and storage medium for adjusting the volume according to environmental noise and a user's voice command.
[0005] In a first aspect, an embodiment of the present invention provides a volume adjustment method, comprising:
[0006] Acquire the ambient noise of the environment where the smart device is located;
[0007] When a voice command input by a user is obtained, a first volume is obtained according to the environmental noise and the voice command;
[0008] The volume of the output voice of the smart device is adjusted to the first volume.
[0009] Optionally, acquiring a first volume according to the ambient noise and the voice command includes:
[0010] Obtaining the volume of the voice command;
[0011] If the volume of the voice command is greater than a first volume threshold, the first volume is obtained according to the ambient noise.
[0012] Optionally, obtaining the volume of the voice command includes:
[0013] Obtaining the amplitude value of the voice command;
[0014] The volume of the voice command is calculated according to the amplitude value of the voice command.
[0015] Optionally, obtaining the first volume according to the ambient noise includes:
[0016] Obtaining the amplitude value of the environmental noise;
[0017] Calculating the volume of the ambient noise according to the amplitude value of the ambient noise;
[0018] According to a first mapping relationship, a first volume corresponding to the volume of the environmental noise is acquired, where the first mapping relationship includes a correspondence between the volume of the environmental noise and the first volume.
[0019] Optionally, the method further includes:
[0020] If the volume of the voice command is less than a second volume threshold, a first volume corresponding to the volume of the voice command is obtained according to a second mapping relationship, where the second mapping relationship includes a correspondence between the volume of the voice command and the first volume.
[0021] In a second aspect, an embodiment of the present invention provides a code generation device, characterized in that it includes:
[0022] A first acquisition module is used to acquire the ambient noise of the environment where the smart device is located;
[0023] The first acquisition module is further configured to acquire a first volume according to the ambient noise and the voice command when a voice command input by a user is acquired;
[0024] The adjustment module is used to adjust the volume of the output voice of the smart device to the first volume.
[0025] Optionally, the first acquisition module is specifically used to:
[0026] Obtaining the volume of the voice command;
[0027] If the volume of the voice command is greater than a first volume threshold, the first volume is obtained according to the ambient noise.
[0028] Optionally, the first acquisition module is specifically used to:
[0029] Obtaining the amplitude value of the voice command;
[0030] The volume of the voice command is calculated according to the amplitude value of the voice command.
[0031] Optionally, the first acquisition module is specifically used to:
[0032] Obtaining the amplitude value of the environmental noise;
[0033] Calculating the volume of the ambient noise according to the amplitude value of the ambient noise;
[0034] According to a first mapping relationship, a first volume corresponding to the volume of the environmental noise is acquired, where the first mapping relationship includes a correspondence between the volume of the environmental noise and the first volume.
[0035] Optionally, the device further comprises:
[0036] The second acquisition module is used to acquire a first volume corresponding to the volume of the voice instruction according to a second mapping relationship if the volume of the voice instruction is less than a second volume threshold, wherein the second mapping relationship includes a correspondence between the volume of the voice instruction and the first volume.
[0037] In a third aspect, an embodiment of the present invention provides a smart device, including:
[0038] Memory and processor;
[0039] The memory is used to store program codes;
[0040] The processor is used to call the program code to execute the volume adjustment method as described in the embodiment of the first aspect of the present invention.
[0041] In a fourth aspect, an embodiment of the present invention provides a readable storage medium having a computer program stored thereon; when the computer program is executed, the volume adjustment method as described in the embodiment of the present invention in the first aspect is implemented.
[0042] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising: a computer program, wherein the computer program is stored in a readable storage medium, and at least one processor of a smart device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the smart device executes the volume adjustment method described in the first aspect.
[0043] The embodiment of the present invention provides a volume adjustment method, device, equipment and storage medium, the method comprising: obtaining the environmental noise of the environment in which the smart device is located, obtaining a first volume according to the environmental noise and the voice command when a voice command input by the user is obtained, and adjusting the volume of the output voice of the smart device to the first volume. In this technical solution, the output volume of the smart device is controlled according to the user's voice command and the environmental noise, so that the output volume of the smart device matches the current situation, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a volume adjustment scenario provided by an embodiment of the present invention;
[0045] Figure 2 A flow chart of a volume adjustment method provided by an embodiment of the present invention;
[0046] Figure 3 A flow chart of a volume adjustment method provided by another embodiment of the present invention;
[0047] Figure 4 A schematic diagram of the structure of a volume adjustment device provided by an embodiment of the present invention;
[0048] Figure 5 A schematic structural diagram of a volume adjustment device provided by another embodiment of the present invention;
[0049] Figure 6 A schematic diagram of the structure of an intelligent device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Figure 1 A schematic diagram of a volume adjustment scenario provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the volume adjustment method provided in the embodiment of the present invention can be applied to a smart device, which may be a smart phone, a smart speaker, a smart robot, etc., and this embodiment does not limit this.
[0052] Currently, when a user interacts with a smart device, the broadcast volume of the smart device is the volume set last time. For example, when the user used the smart device the day before, the volume of the smart device was adjusted to a relatively high level because the usage environment was noisy at that time. When the user used the smart device again the next day, the broadcast volume was the same as the volume of the previous day. However, since it is relatively quiet now, the last broadcast volume may make the user feel harsh. Therefore, the user needs to adjust it manually or by voice, which results in a poor user experience.
[0053] To address this problem, an embodiment of the present invention provides a volume adjustment method, which includes: obtaining the ambient noise of the environment in which the smart device is located, obtaining a first volume according to the ambient noise and the voice command when a voice command input by the user is obtained, and adjusting the volume of the output voice of the smart device to the first volume. In this technical solution, the output volume of the smart device is controlled according to the user's voice command and the ambient noise, so that the output volume of the smart device matches the current situation, thereby improving the user experience.
[0054] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0055] Figure 2 This is a flow chart of a volume adjustment method provided by an embodiment of the present invention. The method can be executed by any device that executes the volume adjustment method, and the device can be implemented by software and / or hardware. In this embodiment, the device can be integrated in a smart device. Figure 2 As shown, the method comprises the following steps:
[0056] S101. Obtain environmental noise of an environment where a smart device is located.
[0057] Generally, the ambient noise of the environment in which the smart device is located is not constant, but may increase or decrease over time, so S101 may include: obtaining the ambient noise of the environment in which the smart device is located within a first preset time period. The starting point of the first preset time period may be the time when the smart device is turned on, and the end point of the first preset time period may be the time when the voice command input by the user is obtained.
[0058] For example, the smart device is installed with an environmental noise collection application (Application, App). When the smart device is turned on, the environmental noise collection APP is started, and after user authorization, the environmental noise collection permission is allowed to be enabled, and the environmental noise collection begins. Accordingly, the smart device obtains the environmental noise in real time until the voice command input by the user is obtained.
[0059] Optionally, the smart device has a positioning function. If it detects that its location has changed, it will restart collecting environmental noise, that is, the environmental noise collected from the time of power-on is reset to zero, and the environmental noise is collected again from the new location. Then, the starting point of the first preset time length is the time at the new location. In this way, it is avoided to introduce environmental noise from other environments, so that the output volume of the smart device does not match the current environment.
[0060] S102: When a voice command input by a user is obtained, a first volume is obtained according to the ambient noise and the voice command.
[0061] In this embodiment, the smart device is installed with a voice collection application (Application, App). When the smart device is turned on, the voice APP is started, and the voice collection permission is allowed to be enabled through user authorization, so that the voice command input by the user can be obtained. In the process of human-computer voice interaction, the user usually inputs voice commands to the smart device, such as "What's the weather like today", "Play blue and white porcelain", "Call Xiao Wang", and the smart device can broadcast the corresponding voice according to the voice command.
[0062] When a voice command input by a user is obtained, the volume of the ambient noise and the volume of the voice command can be obtained, and a first volume can be obtained according to the volume of the ambient noise and the volume of the voice command. The first volume is the volume of the output voice of the smart device, and the output voice includes the response voice corresponding to the voice command. The first volume is a volume that the user can hear and does not cause discomfort such as harshness to the user.
[0063] S103: Adjust the volume of the output voice of the smart device to a first volume.
[0064] After the first volume is acquired, the volume of the output voice of the smart device is adjusted to the first volume, so that the user can hear the output voice without feeling uncomfortable, thereby improving the user experience.
[0065] Optionally, the method further includes:
[0066] S104: When no voice command input by the user is obtained, a first volume is obtained according to environmental noise.
[0067] In actual application, smart devices can also be used to remind some important events, such as alarm clocks, etc. In the prior art, the volume of the reminder voice will also depend on the volume set last time. For example, the volume set last time was relatively loud, and it is early in the morning, and the loud volume will make people feel uncomfortable. Therefore, in this embodiment, when the voice command to be input by the user is not obtained, the first volume can also be obtained according to the environmental noise. The first volume is the volume of the output voice of the smart device, and the output voice includes the preset reminder voice.
[0068] Optionally, the ambient noise of the environment in which the smart device is located is collected when the smart device is turned on. When no voice command input by the user is obtained, the first volume is obtained according to the ambient noise, including:
[0069] When the voice command input by the user is not obtained, the volume of the reminder voice is obtained according to the ambient noise of the second preset duration, wherein the end point of the second preset duration is the playback time of the reminder voice, and the starting point of the second preset duration is the moment that is different from the playback time of the reminder voice by a preset time interval, that is, the moment that is the preset time interval forward from the playback time of the reminder voice. This embodiment does not impose any special restrictions on the preset time interval, which can be determined according to actual conditions.
[0070] A specific implementation of obtaining the first volume according to the ambient noise is shown in Figure 3 The embodiment will not be described in detail here, and then S103 is executed.
[0071] The volume adjustment method provided in this embodiment includes: obtaining the environmental noise of the environment in which the smart device is located, obtaining a first volume according to the environmental noise and the voice command when a voice command input by the user is obtained, and adjusting the volume of the output voice of the smart device to the first volume. In this technical solution, the output volume of the smart device is controlled according to the user's voice command and the environmental noise, so that the output volume of the smart device matches the current situation, thereby improving the user experience.
[0072] Based on the above embodiments, Figure 3 A flow chart of a volume adjustment method provided by another embodiment of the present invention is shown in FIG. Figure 3 As shown, the above S102 can be implemented by the following steps:
[0073] S201: Obtain the volume of the voice command.
[0074] The volume of the voice command is expressed in decibels (dB). In this embodiment, the smart device may have a volume detection function, and after obtaining the voice command, the volume of the voice command may be directly obtained.
[0075] Optionally, step S201 specifically includes:
[0076] A1: Get the amplitude value of the voice command.
[0077] In this embodiment, an amplitude calculation method in a multimedia recording media recoder is called to obtain the amplitude value of the voice instruction, where the amplitude value of the voice instruction is the maximum amplitude value or the average amplitude value.
[0078] A2: Calculate the volume of the voice command according to the amplitude value of the voice command.
[0079] The volume of the voice command is calculated by formula (1):
[0080]
[0081] Among them, L dB is the volume of the voice command, A1 is the amplitude value of the voice command, A0 is the reference amplitude value, and A0 can be set to 1, for example, indicating the minimum sound amplitude that the smart device can obtain.
[0082] S202: If the volume of the voice command is greater than a first volume threshold, obtain a first volume according to ambient noise.
[0083] In this embodiment, if the volume of the voice command is greater than the first volume threshold, the first volume is obtained according to the ambient noise so that the user can hear the output voice of the smart device. The first volume threshold can be selected according to actual conditions and is not particularly limited in this embodiment.
[0084] Step S202 specifically includes:
[0085] B1: Get the amplitude value of the ambient noise.
[0086] In this embodiment, the amplitude value of the ambient noise may be a maximum amplitude value within a first preset time length or an average amplitude value within the first preset time length, and an amplitude calculation method in a multimedia recording media recoder may be called to obtain the amplitude value of the ambient noise.
[0087] B2: Calculate the volume of the ambient noise based on the amplitude value of the ambient noise.
[0088] Specifically, the volume of the ambient noise is calculated by formula (1), where L dB is the volume of the ambient noise, the amplitude value of the ambient noise is substituted into A1, and A0 is the reference amplitude value, for example, it can be set to 1, indicating the minimum sound amplitude that the smart device can obtain.
[0089] B3. According to the first mapping relationship, obtain a first volume corresponding to the volume of the ambient noise.
[0090] In this embodiment, the first mapping relationship includes a correspondence between the volume of the ambient noise and the first volume. The first mapping relationship is queried to obtain the first volume corresponding to the volume of the ambient noise. The first volume is audible to the user and does not cause discomfort to the user.
[0091] Exemplarily, the first mapping relationship is stored in the form of a table, and Table 1 is a schematic diagram of the first mapping relationship.
[0092] Table 1
[0093] Volume of ambient noise (in dB) Specific description First Volume 0-20 The environment is very quiet, you can hear the leaves falling to the ground The volume is higher than the ambient noise and does not exceed 20dB 20-40 The environment is quiet, and you can still hear the whispers clearly. The volume is higher than the ambient noise and does not exceed 40dB 40-60 There is normal noise, and ordinary indoor conversations can be heard clearly The volume is higher than the ambient noise and does not exceed 60dB 60-70 Noisy environment, long-term damage to hearing nerves The volume is higher than the ambient noise and does not exceed 70dB >70 The environment is abnormally noisy, and prolonged exposure can damage the hearing nerves Not less than 70dB
[0094] As shown in Table 1, according to the first mapping relationship, the first volume corresponding to the ambient noise can be obtained. For example, if the volume of the voice command is greater than the first volume threshold and the volume of the ambient noise is 30dB, according to the first mapping relationship, it is determined that the first volume is greater than 30dB and not more than 40dB, for example, 35dB.
[0095] Optionally, the method further includes:
[0096] S203: If the volume of the voice command is less than the second volume threshold, obtain a first volume corresponding to the volume of the voice command according to a second mapping relationship.
[0097] In actual applications, if the voice command is less than the second volume threshold, it indicates that the user is speaking in a relatively low voice, for example, someone is sleeping at the time, then according to the second mapping relationship, the first volume corresponding to the volume of the voice command is obtained, and the second mapping relationship includes the correspondence between the volume of the voice command and the first volume. If the first volume is determined according to the ambient noise, the obtained first volume may be relatively loud, affecting the user experience. Among them, the first volume threshold can be selected according to the actual situation, and this embodiment does not impose any special restrictions.
[0098] Exemplarily, the second mapping relationship is stored in the form of a table, and Table 2 is a schematic diagram of the second mapping relationship.
[0099] Table 2
[0100] Volume of voice commands (in dB) Specific description First Volume 0-20 The user is speaking at a very low volume, such as whispering. The volume is higher than the ambient noise and does not exceed 20dB 20-40 The user is speaking at a low volume, such as in a quiet office The volume is higher than the ambient noise and does not exceed 40dB 40-60 The user is speaking at a normal volume, such as in an office The volume is higher than the ambient noise and does not exceed 60dB 60-70 The user is speaking at a very loud volume, such as outdoors The volume is higher than the ambient noise and does not exceed 70dB >70 The user is speaking at a very loud volume, such as shouting to someone far away in a factory. Not less than 70dB
[0101] For example, if the volume of the voice command is less than the second volume threshold, the volume of the voice command is 50dB, and according to the second mapping relationship, the first volume is determined to be greater than 50dB and not more than 60dB, for example, the first volume is 55dB.
[0102] Exemplarily, the first volume threshold may be 60dB, that is, when the volume of the voice command is greater than 60dB, the first volume is obtained according to the ambient noise; the second volume threshold may be 40dB, that is, when the volume of the voice command is less than 40dB, the first volume corresponding to the volume of the voice command is obtained according to the second mapping relationship.
[0103] Furthermore, if the volume of the voice command is between the first volume threshold and the second volume threshold, that is, greater than 40dB and less than 60dB, it indicates that the user voice is normal and the ambient noise is also normal. Then, the first volume can be determined according to the voice command or the ambient noise, and the first volume can be calculated by the above formula (1).
[0104] The volume adjustment method provided in this embodiment includes: obtaining the volume of the voice command, if the volume of the voice command is greater than the first volume threshold, obtaining the first volume according to the environmental noise, if the volume of the voice command is less than the second volume threshold, obtaining the first volume corresponding to the volume of the voice command according to the second mapping relationship. According to the user's voice command and the environmental noise, the output volume of the smart device is controlled so that the output volume of the smart device matches the current situation, thereby improving the user experience.
[0105] Figure 4 A structural diagram of a volume adjustment device provided by an embodiment of the present invention is shown in FIG. Figure 4 The volume adjustment device 40 provided in this embodiment includes:
[0106] A first acquisition module 41 is used to acquire the ambient noise of the environment where the smart device is located;
[0107] The first acquisition module 41 is further configured to acquire a first volume according to the ambient noise and the voice command when a voice command input by a user is acquired;
[0108] The adjustment module 42 is used to adjust the volume of the output voice of the smart device to the first volume.
[0109] Optionally, the first acquisition module 41 is specifically configured to:
[0110] Obtaining the volume of the voice command;
[0111] If the volume of the voice command is greater than a first volume threshold, the first volume is obtained according to the ambient noise.
[0112] Optionally, the first acquisition module 41 is specifically configured to:
[0113] Obtaining the amplitude value of the voice command;
[0114] The volume of the voice command is calculated according to the amplitude value of the voice command.
[0115] Optionally, the first acquisition module 41 is specifically configured to:
[0116] Obtaining the amplitude value of the environmental noise;
[0117] Calculating the volume of the ambient noise according to the amplitude value of the ambient noise;
[0118] According to a first mapping relationship, a first volume corresponding to the volume of the environmental noise is acquired, where the first mapping relationship includes a correspondence between the volume of the environmental noise and the first volume.
[0119] The volume adjustment device of this embodiment can be used to execute the technical solutions in the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.
[0120] Figure 5 A structural diagram of a volume adjustment device provided by another embodiment of the present invention is shown in FIG. Figure 5 As shown, the device 40 also includes:
[0121] The second acquisition module 43 is used to acquire a first volume corresponding to the volume of the voice instruction according to a second mapping relationship if the volume of the voice instruction is less than a second volume threshold, wherein the second mapping relationship includes a correspondence between the volume of the voice instruction and the first volume.
[0122] The volume adjustment device of this embodiment can be used to execute the technical solutions in the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.
[0123] Figure 6 A schematic diagram of the structure of an intelligent device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the smart device 50 of this embodiment may include: a memory 51 and a processor 52. The memory 51 and the processor 52 may be connected via a bus 53, for example.
[0124] The memory 51 is used to store program codes;
[0125] The processor 52 is used to implement the code generation method provided by any implementation manner in the aforementioned method embodiments by executing the computer program.
[0126] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the volume adjustment method provided by any implementation manner in the aforementioned method embodiment is implemented.
[0127] The present invention also provides a computer program product, including: a computer program, the computer program is stored in a readable storage medium, at least one processor of a smart device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the smart device executes the solution of any of the aforementioned volume adjustment method embodiments.
[0128] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0129] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0131] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0132] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0133] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0134] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0135] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0136] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0137] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A volume adjustment method, characterized in that: Applied to smart devices, including: Acquire the ambient noise of the environment where the smart device is located; When a voice command input by a user is obtained, the volume of the voice command is obtained; if the volume of the voice command is greater than a first volume threshold, a first volume is obtained according to the environmental noise; and the volume of the output voice of the smart device is adjusted to the first volume; When the voice command input by the user is not obtained, the volume of the reminder voice is obtained according to the ambient noise of the second preset duration, wherein the end point of the second preset duration is the playback time of the reminder voice, and the starting point of the second preset duration is the moment that is different from the playback time of the reminder voice by a preset time interval.
2. The method according to claim 1, characterized in that The obtaining the volume of the voice command includes: Obtaining the amplitude value of the voice command; The volume of the voice command is calculated according to the amplitude value of the voice command.
3. The method according to claim 1, characterized in that The acquiring the first volume according to the environmental noise includes: Obtaining the amplitude value of the environmental noise; Calculating the volume of the ambient noise according to the amplitude value of the ambient noise; According to a first mapping relationship, a first volume corresponding to the volume of the environmental noise is acquired, where the first mapping relationship includes a correspondence between the volume of the environmental noise and the first volume.
4. The method according to claim 1, characterized in that: The method further comprises: If the volume of the voice command is less than a second volume threshold, a first volume corresponding to the volume of the voice command is obtained according to a second mapping relationship, where the second mapping relationship includes a correspondence between the volume of the voice command and the first volume.
5. A volume adjustment device, characterized in that: include: A first acquisition module is used to acquire the ambient noise of the environment where the smart device is located; The first acquisition module is further configured to acquire the volume of the voice instruction when acquiring the voice instruction input by the user; if the volume of the voice instruction is greater than a first volume threshold, acquire the first volume according to the environmental noise; An adjustment module, used for adjusting the volume of the output voice of the smart device to the first volume; The first acquisition module is also used to obtain the volume of the reminder voice according to the environmental noise of the second preset time length when the voice command input by the user is not obtained, wherein the end point of the second preset time length is the playing time of the reminder voice, and the starting point of the second preset time length is the moment that is different from the playing time of the reminder voice by a preset time interval.
6. The device according to claim 5, characterized in that The first acquisition module is specifically used to: Obtaining the amplitude value of the voice command; The volume of the voice command is calculated according to the amplitude value of the voice command.
7. The device according to claim 5, characterized in that The first acquisition module is specifically used to: Obtaining the amplitude value of the environmental noise; Calculating the volume of the ambient noise according to the amplitude value of the ambient noise; According to a first mapping relationship, a first volume corresponding to the volume of the environmental noise is acquired, where the first mapping relationship includes a correspondence between the volume of the environmental noise and the first volume.
8. The device according to claim 5, characterized in that The device also includes: The second acquisition module is used to acquire a first volume corresponding to the volume of the voice instruction according to a second mapping relationship if the volume of the voice instruction is less than a second volume threshold, wherein the second mapping relationship includes a correspondence between the volume of the voice instruction and the first volume.
9. A smart device, characterized in that: include: Memory and processor; The memory is used to store program code; The processor is used to call the program code to execute the volume adjustment method according to any one of claims 1 to 4.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program; when the computer program is executed, the volume adjustment method according to any one of claims 1 to 4 is implemented.
11. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, it is used to implement the volume adjustment method according to any one of claims 1 to 4.
