Volume control method and device and storage medium

By collecting environmental audio data in the device and determining whether someone makes a sound, and automatically adjusting the device volume, the problem of users needing to manually lower the volume during chatting, improving the user experience.

CN119902734APending Publication Date: 2025-04-29HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311416636.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When chatting, users need to manually lower the volume due to the loud sound of music or TV, resulting in poor user experience.

Method used

By obtaining the audio data of the environment in which the device is located, it is determined whether someone makes a sound. If so, the volume of the audio output by the device will be automatically reduced.

Benefits of technology

In scenarios such as user chat, the volume of the playback device is automatically lowered to reduce the interference of output audio on chat and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902734A_ABST
    Figure CN119902734A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a volume control method and device, and a storage medium, relates to the technical field of audio, and can automatically turn down the volume of a playing device when a user chats, thereby improving the user experience. The volume control method is applied to a first device and comprises the steps of obtaining first audio data of an environment where the first device is located; and according to the first audio data, determining that someone sounds in the environment where the first device is located, reducing the volume of the output audio of the first device or controlling the second device to reduce the volume of the output audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio technology, and in particular to a volume control method, device and storage medium. Background Art

[0002] When a user is chatting while listening to music or watching TV, if the music or TV volume is too loud, it will affect the user's chat and the user needs to manually lower the music or TV volume, which results in a poor user experience. Summary of the invention

[0003] In view of this, the present application provides a volume control method, device and storage medium, which can automatically lower the volume of a playback device when a user is chatting, thereby improving the user experience.

[0004] In a first aspect, an embodiment of the present application provides a volume control method, which is applied to a first device, and the method includes: obtaining first audio data of an environment in which the first device is located; determining that someone is speaking in the environment in which the first device is located based on the first audio data, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio.

[0005] In a possible implementation, the first device has an audio output function; before obtaining first audio data of the environment in which the first device is located, the method also includes: outputting audio; determining that someone is making a sound in the environment in which the first device is located based on the first audio data, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio, including: determining that someone is making a sound in the environment in which the first device is located based on the first audio data, and reducing the volume of the audio output by the first device.

[0006] In a possible implementation, obtaining first audio data of the environment in which the first device is located includes: sending an environment audio collection instruction to a second device, where the second device has an audio collection function; and receiving the first audio data of the environment in which the first device is located sent by the second device.

[0007] In a possible implementation, the first device has an audio collection function, and the second device has an audio output function; determining that someone is making a sound in the environment where the first device is located based on first audio data, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the output audio, includes: determining that someone is making a sound in the environment where the first device is located based on the first audio data, and controlling the second device to lower the volume of the output audio; obtaining the first audio data of the environment where the first device is located includes: receiving an environmental audio collection instruction from the second device; and collecting the first audio data of the environment where the first device is located in response to the environmental audio collection instruction.

[0008] In a possible implementation, determining, based on first audio data, that a person is making a sound in an environment where the first device is located, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output includes: determining, based on the first audio data, that a person is making a sound in an environment where the first device is located, and the volume of the person's sound exceeds a first volume threshold, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output.

[0009] In a possible implementation, determining, based on first audio data, that a person is speaking in an environment where the first device is located, and the volume of the person's voice exceeds a first volume threshold, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: determining, based on the first audio data, that a person is speaking in an environment where the first device is located, and the volume of the person's voice exceeds the first volume threshold, and the volume of the audio output by the first device exceeds a second volume threshold, and reducing the volume of the audio output by the first device; or determining, based on the first audio data, that a person is speaking in an environment where the first device is located, and the volume of the person's voice exceeds the first volume threshold, and the volume of the audio output by the second device exceeds the second volume threshold, and controlling the second device to reduce the volume of the audio output.

[0010] In a possible implementation, after lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the output audio, it also includes: obtaining second audio data of the environment in which the first device is located; determining based on the second audio data that no one is speaking in the environment in which the first device is located, and restoring the volume of the audio output by the first device or controlling the second device to restore the volume of the output audio.

[0011] In one possible implementation, determining based on the second audio data that no one is making sound in the environment where the first device is located, and restoring the volume of the audio output of the first device or controlling the second device to restore the volume of the audio output, includes: after a preset interval of lowering the volume of the audio output of the first device or controlling the second device to lower the volume of the audio output, determining based on the second audio data that no one is making sound in the environment where the first device is located, and restoring the volume of the audio output of the first device or controlling the second device to restore the volume of the audio output.

[0012] In one possible implementation, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output includes: obtaining the distance to the source of human voice; lowering the volume of the audio output by the first device according to the distance to the source of human voice, so that the sound pressure of the audio output by the first device when it is transmitted to the source of human voice is a preset sound pressure or below the preset sound pressure; or, controlling the second device to lower the volume of the audio output according to the distance to the source of human voice, so that the sound pressure of the audio output by the second device when it is transmitted to the source of human voice is a preset sound pressure or below the preset sound pressure.

[0013] In a possible implementation manner, the preset sound pressure is 45 dB.

[0014] In a possible implementation, before determining based on the first audio data that someone is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio, it also includes: performing echo cancellation and / or noise reduction processing on the first audio data.

[0015] In one possible implementation, determining that a person is making a sound in an environment where the first device is located based on first audio data, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the output audio, includes: dividing the first audio data into multiple audio data parts; separately determining whether each audio data part is human voice audio data; periodically determining a time period, and if the proportion of all human voice audio data in the time period corresponding to the current period in the time period exceeds a threshold, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the output audio.

[0016] In a possible implementation, the proportion of all human voice audio data in the time period corresponding to the current cycle in the time period exceeds the threshold value if: the cumulative duration of all human voice audio data in the time period corresponding to the current cycle exceeds the duration threshold value, or the cumulative number of all human voice audio data in the time period corresponding to the current cycle exceeds the number threshold value.

[0017] In one possible implementation, determining whether each audio data portion is human voice audio data includes: inputting each audio data portion into an audio recognition model for processing, obtaining a recognition confidence corresponding to the audio data portion, and determining that the audio data portion whose recognition confidence is lower than a confidence threshold is human voice audio data, and the audio recognition model is trained by non-human voice audio features.

[0018] In a possible implementation, the non-human voice audio features include pet audio features, household appliance audio features, and car speaker audio features.

[0019] In a second aspect, a device is provided, comprising: a processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the device executes the above method.

[0020] According to a third aspect, a readable storage medium is provided, comprising a program or an instruction. When the program or the instruction runs on a device, the above method is executed.

[0021] The volume control method, device and storage medium in the embodiments of the present application collect environmental audio data through a microphone while the playback device is outputting audio, and adjust the volume of the audio output by the playback device based on the collected environmental audio data. If it is determined based on the collected environmental audio data that someone is speaking in the environment where the playback device is located, the volume of the audio output by the playback device is reduced. In this way, in scenarios such as user chatting, the volume of the playback device can be automatically lowered to reduce the interference of the output audio sound on the user chatting, etc., without the need for manual adjustment by the user, thereby improving the convenience of using the playback device and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 This is a schematic diagram of a system architecture in an embodiment of the present application;

[0024] Figure 2 This is another schematic diagram of a system architecture in an embodiment of the present application;

[0025] Figures 3 to 9 They are respectively flowchart diagrams of various volume control methods in the embodiments of the present application;

[0026] Fig.10 A schematic diagram showing a comparison of audio data before and after noise reduction processing in an embodiment of the present application;

[0027] Fig.11 A schematic diagram of the relationship between audio data and time periods corresponding to multiple cycles in an embodiment of the present application;

[0028] Fig.12 This is a schematic diagram of dividing audio data into multiple parts based on voice activity detection in an embodiment of the present application;

[0029] Fig.13 A schematic diagram of another relationship between audio data and time periods corresponding to multiple cycles in an embodiment of the present application;

[0030] Figures 14 to 17 They are respectively flowchart diagrams of various volume control methods in the embodiments of the present application;

[0031] Fig.18 A schematic diagram of training and using an audio recognition model in an embodiment of the present application;

[0032] Fig.19Schematic diagram of waveforms of different types of audio data;

[0033] Figure 20 to Figure 22 They are schematic diagrams of various system architectures in the embodiments of the present application. DETAILED DESCRIPTION

[0034] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0035] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0036] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0037] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0038] Before describing the embodiments of the present application, the related technologies and their technical problems are described first. In the related technologies, there is a solution for automatically adjusting the volume of a TV according to the collected ambient noise. However, the purpose is to prevent the user from not being able to hear the sound of the TV clearly when the ambient noise is large, and the user will still be disturbed by the sound of the TV when talking. The technical solution of the embodiment of the present application can solve this problem, that is, it can reduce the interference of the device output audio on the user's conversation. The technical solution of the embodiment of the present application is described below.

[0039] like Figure 1As shown, the system architecture involved in the embodiment of the present application may include a separate playback device 1 and a sound receiving device 2. The playback device 1 has an audio output function. The audio output in the embodiment of the present application includes outputting sound through a speaker, and also includes outputting audio data through a wired connection or a wireless connection. For example, the playback device 1 includes a speaker 11, also called a speaker, which is used to convert an audio electrical signal into a sound signal to achieve audio output. The sound of music or TV programs can be played through the speaker 11; in addition, the playback device 1 may not use its own speaker to play sound, but output audio data to an external speaker, and play sound through the speaker. The function of outputting audio signals to an external speaker can also be called audio output. Regardless of which audio output method is used, the playback device 1 can change the volume of the output audio. For the method of outputting audio through a speaker, the volume of the speaker can be directly increased or decreased. For the method of outputting audio data, the audio data itself can be changed to increase or decrease the volume of the output audio. The sound receiving device 2 includes a microphone 21, which is used to collect audio data. For example, the playback device 1 is a television, and the sound receiving device 2 is a speaker; or for example, the playback device 1 is a speaker, and the sound receiving device 2 is a mobile phone, etc. The playback device 1 also includes a first cross-device communication interface 12, and the sound receiving device 2 includes a second cross-device communication interface 22. The two can communicate with each other by wired connection or by wireless connection, and can communicate through the cross-device communication interface, such as by Bluetooth or wireless fidelity (Wi-Fi) network.

[0040] In addition, if Figure 2 As shown, the playback device 1 can also be a sound receiving device at the same time, that is, the playback device 1 is a device integrating audio output function and audio acquisition function, for example, the playback device 1 is a device integrating a speaker 11 and a microphone 21, for example, the playback device 1 can be a television, which has a speaker on the one hand to realize audio output, and a microphone on the other hand to realize audio acquisition; for another example, the playback device 1 can be a speaker, which has a speaker on the one hand to realize audio output, and a microphone on the other hand to realize audio acquisition.

[0041] The technical solution of the embodiment of the present application is to collect environmental audio data through a microphone while the playback device is outputting audio, and adjust the volume of the audio output by the playback device based on the collected environmental audio data. If it is determined based on the collected environmental audio data that someone is making a sound in the environment where the playback device is located, such as someone talking, the volume of the audio output by the playback device is lowered. In this way, in a scenario where users are chatting, the volume of the playback device can be automatically lowered to reduce the interference of the output audio sound with the user's chat, and there is no need for the user to manually adjust it, thereby improving the convenience of using the playback device and the user experience.

[0042] The present application embodiment provides a volume control method, which is applied to a first device, and the first device may be the above-mentioned playback device 1 or the sound receiving device 2. Figure 3 As shown, the volume control method includes:

[0043] The first device executes step 101 to obtain first audio data of an environment in which the first device is located;

[0044] Among them, the audio data of the environment in which the first device is located can be collected by a microphone. If the first device has a sound receiving function, the audio data can be directly obtained. If the first device does not have a sound receiving function, the audio data collected by the sound receiving device can be received, so that the first device can obtain the audio of the environment in which it is located.

[0045] The first device executes step 102, determines whether there is a person making a sound in the environment where the first device is located according to the first audio data, and if so, that is, if it is determined according to the first audio data that there is a person making a sound in the environment where the first device is located, then executes step 103, reduces the volume of the audio output by the first device or controls the second device to reduce the volume of the output audio. If the judgment in step 102 is no, that is, if it is determined according to the first audio data that there is no person making a sound in the environment where the first device is located, then it can return to steps 101 and 102, continue to obtain the first audio data of the environment where the first device is located, and continue to determine whether there is a person making a sound in the environment where the first device is located.

[0046] Among them, if the first device is a playback device, then in step 103, the volume of its own output audio is lowered; if the second device is a playback device, then in step 103, the first device controls the second device to lower the volume of the output audio. Determining whether there is a person speaking in the environment in step 102 means that the cumulative time of someone speaking in the environment within a certain period of time reaches a certain proportion or exceeds a certain threshold. The scene of someone speaking in the environment includes, for example, telephone conversations, multi-person conversations, singing, reading aloud, etc. For example, a person talking can specifically be determined to determine whether the duration of human voices in a certain period of time is high. If so, it is determined that someone is speaking, and if not, it is determined that no one is speaking. For example, sometimes a user will briefly issue a voice command to control, for example, turning on the light, starting the air conditioner, etc. The duration of such a voice command is short and will not be determined as a situation where someone is speaking, so as to avoid misjudging the non-conversational human voice as a scene of human conversation. However, in some scenarios, users will talk on their mobile phones, and such scenarios will be determined as someone speaking.

[0047] The following is an explanation using a specific scenario as an example. For example, the first device is a speaker, the second device is a TV, and the TV and the speaker are in the same space, such as the same room. The TV is playing news, and the user is watching the news. At this time, the pet dog at home is barking next to it. The main component of the first audio data collected by the speaker through its microphone is the barking data of the pet dog. Therefore, in step 102, it is determined that no one is making a sound in the environment. At this time, the volume of the news played by the TV will not be automatically adjusted, that is, it will not affect the user's watching of the news; later, a guest comes to the user's home, and the user and the guest talk in front of the TV, or the user starts to talk to other people on the phone. The first audio data collected by the speaker through the microphone includes the human voice of the person talking. Therefore, in step 102, the speaker determines that someone is making a sound based on the first audio data including the human voice of the person talking. Therefore, the speaker generates a volume reduction instruction and sends the designation to the TV. The TV receives the volume reduction instruction and responds to the instruction to reduce the volume of the news, that is, the speaker controls the TV to reduce the volume of the output audio, thereby reducing the interference of the sound of the news on the conversation.

[0048] For another example, the first device is a TV and the second device is a speaker, and the two are in the same room. The TV is playing news and the user is watching the news. At this time, the speaker collects the first audio data through its microphone and transmits it to the TV. The TV determines whether there is anyone speaking in the environment based on the received first audio data. Suppose there are guests talking with the user in the room, and the pet dog at home is barking next to them, that is, the first audio data contains the superimposed sound of people talking and pet dogs barking. Since the barking of the pet dog lasts for a short time and is not loud, while the sound of people talking lasts for a long time and is loud, that is, the sound of people talking occupies the main part in the first audio data. Therefore, in step 102, it can be determined that someone is speaking in the environment, and the TV reduces the volume of its own output audio, thereby reducing the interference of the sound of the news on the conversation. In addition, in this scenario, if the TV itself has a microphone, the speaker may not be required. The TV collects the first audio data while playing the news, and other processes may remain unchanged.

[0049] The volume control method in the embodiment of the present application obtains audio data of the environment, and when it is determined based on the audio data that someone is speaking in the environment, the volume of the audio output by the playback device is reduced, so as to reduce the interference of the audio output of the playback device on people's conversations, thereby improving the user experience.

[0050] In some embodiments, Figure 4As shown, the first device 30 has an audio output function and an audio collection function; before the above step 101, obtaining the first audio data of the environment where the first device 30 is located, the method further includes: step 201, outputting audio, for example, the first device 30 is a TV, the TV plays news, on the one hand, the TV displays the video screen through the display panel, on the other hand, the TV outputs audio through the speaker. In the scenario where the first device has an audio output function, the problem to be solved is the interference of the audio output of the first device to the scene such as people talking, so the first device 30 triggers the execution of step 101 when outputting audio. The above process of determining that someone is speaking in the environment where the first device is located according to the first audio data, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio is: determining that someone is speaking in the environment where the first device is located according to the first audio data, then executing step 1031, reducing the volume of the audio output by the first device 30. In step 101, the first device 30 can directly collect the first audio data of the environment where the first device 30 is located through the microphone to obtain the first audio data of the environment where the first device 30 is located. The first device 30 may periodically acquire first audio data of an environment in which the first device 30 is located in step 101 , and determine whether there is a person making a sound in the environment in step 102 based on the latest first audio data acquired in each period.

[0051] In some embodiments, Figure 5 As shown, the first device 41 has an audio output function, and the second device 42 has an audio collection function. The first device 41 executes step 201, outputs audio, and triggers the execution of step 1011. The above step 101, obtaining the first audio data of the environment in which the first device is located includes: step 1011, sending an environmental audio collection instruction to the second device 42. The second device 42 receives the environmental audio collection instruction, and in response to the instruction, the second device 42 collects the first audio data of the environment in which the first device 41 is located and sends it to the first device 41. The above step 101 also includes the first device 41 executing step 1012, receiving the first audio data of the environment in which the first device 41 is located sent by the second device 42. After that, the first device 41 executes steps 102 and 1031 and Figure 4 The process and principle shown are the same and will not be repeated here.

[0052] In some embodiments, Figure 6As shown, the first device 51 has an audio collection function, and the second device 52 has an audio output function. The second device 52 outputs audio and sends an environmental audio collection instruction to the first device 51. The above step 101, obtaining the first audio data of the environment in which the first device 51 is located, includes: the first device 51 executes step 1013, receives the environmental audio collection instruction from the second device 52; in response to the environmental audio collection instruction, executes step 1014, collects the first audio data of the environment in which the first device 51 is located. The above process of determining that someone is speaking in the environment in which the first device is located according to the first audio data, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output is: determining that someone is speaking in the environment in which the first device 51 is located according to the first audio data, the first device 51 controls the second device 52 to reduce the volume of the audio output, and controlling the second device 52 to reduce the volume of the audio output can be specifically that the first device 51 executes step 1032, sends an audio reduction instruction to the second device 52, the second device 52 receives the audio reduction instruction, and responds to the audio reduction instruction to reduce the volume of the audio output by the second device.

[0053] In some embodiments, Figures 7 to 9 As shown, before determining that someone is making a sound in the environment where the first device is located based on the first audio data, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio, that is, before step 102, it also includes: step 104, performing echo elimination processing on the first audio data, and / or step 105, performing noise reduction processing on the first audio data.

[0054] Specifically, for the first audio data obtained in step 101, an echo cancellation process may be first performed to eliminate the adverse effect of the echo on the subsequent audio type recognition, and then a noise reduction process may be performed, such as Fig.10 As shown, the noise reduction process can remove obvious noise in the signal to obtain clean audio data. Then, whether there is a person speaking in the environment can be determined based on the first audio data after the echo removal and noise reduction process, which can improve the accuracy of the judgment.

[0055] In some embodiments, Figures 7 to 9 as well as Fig.11As shown, the process of determining that someone is speaking in the environment of the first device based on the first audio data, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio includes: step 1021, dividing the first audio data into multiple audio data parts, where the first audio data can be audio data after echo cancellation processing and noise reduction processing in step 104 and step 105; step 1022, respectively determining whether each audio data part is human voice audio data: periodically executing step 1023, determining the time period, determining whether the proportion of all human voice audio data in the time period corresponding to the current cycle in the time period exceeds the threshold value, if so, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio, if not, returning to step 101, continuing to obtain environmental audio data, determining the time period corresponding to the next cycle, and determining whether the proportion of all human voice audio data in the time period corresponding to the next cycle exceeds the threshold value.

[0056] Specifically, in Fig.11In the example shown, s1 to s8 are respectively 8 audio data parts after division, wherein the human voice audio data is identified as human voice, and the non-human voice audio data is identified as non-human voice. Step 1023 is performed periodically. Exemplarily, the time period can be determined with Δt as the period. In a possible implementation, the time period slides to the right once per cycle, and the time period corresponding to the current cycle can be understood as being obtained by sliding to the right the time period corresponding to the previous cycle. The present application embodiment is illustrated by taking the sliding step of the time period as Δt as an example. The time period corresponding to the first cycle is T1, and T1 includes the time period from t1 to t4. A decision is made based on the T1 time period whether to reduce the volume. If so, the volume of the playback device is reduced. If not, the second cycle is entered. The time period corresponding to the second cycle is T2, and the time period T2 slides to the right by Δt relative to the time period T1. T2 includes the time period from t2 to t5. If it is determined based on the T2 time period that the volume of the playback device is not reduced, the third cycle is entered. The time period corresponding to the third cycle is T3, and the time period T3 slides rightward by Δt relative to the time period T2, and T3 includes the time period from t3 to t6. Taking the time period T1 as the time period corresponding to the current cycle in step 1023 as an example, the time period T1 has 5 audio data parts from s1 to s5, 2 human voice audio data and 3 non-human voice audio data, and the proportion of human voice audio data in this time period is not high enough and does not exceed the threshold, so it will continue to be judged in the next cycle after Δt. If the proportion of human voice audio data in this time period does not exceed the threshold, it means that the human voice in this time period is a sudden behavior, not a continuous behavior. At this time, it is determined that no one is speaking in the environment where the first device is located. For example, the user is issuing voice commands to the smart home appliance, and there is no scene such as someone talking. In this case, there is no need to reduce the volume of the output audio; if the proportion of human voice audio data in the time period T1 exceeds the threshold, it means that the human voice in this time period is a continuous behavior. At this time, it is determined that someone is speaking in the environment where the first device is located, and the volume of the output audio is reduced to reduce the interference of the output audio to the scene such as human conversation.

[0057] In some embodiments, step 1021, dividing the first audio data into a plurality of audio data portions, includes: dividing the first audio data into a plurality of audio data portions based on voice activity detection (VAD). The purpose of voice activity detection is to detect whether there are non-voice segments in the audio data that can be removed during the audio conversation, and to divide the segments based on continuous speech. For example, Fig.12 As shown in the figure, for example, the sentence "Xiao x Xiao x, turn on the light" will be divided into two audio data parts "Xiao x Xiao x" and "turn on the light" based on VAD processing, and the pause between the two is removed. This way of dividing the audio data parts can make the subsequent human voice recognition process more accurate.

[0058] In some embodiments, in the above step 1023, the proportion of all human voice audio data in the time period corresponding to the current cycle in the time period exceeds the threshold value if: the cumulative duration of all human voice audio data in the time period corresponding to the current cycle exceeds the duration threshold value, or the cumulative number of all human voice audio data in the time period corresponding to the current cycle exceeds the number threshold value. The time period in this paragraph refers to the time period corresponding to the current cycle, for example Fig.11 As shown, if the time period corresponding to the current cycle is T1 during the execution of step 1023, then it is determined whether the cumulative duration of all vocal audio data in T1 exceeds the duration threshold, or it is determined whether the cumulative number of all vocal data in T1 exceeds the number threshold. The above time period is implemented in a sliding window manner, and the above steps 101 and 1023 are performed periodically. Therefore, in the periodic process, the time period slides once per cycle, that is, a time period in the form of a sliding window is formed.

[0059] Specifically, the embodiments of the present application do not limit the specific implementation form of the sliding window, and several specific sliding window implementation methods are used as examples for description below.

[0060] For example, the ratio of all human voice audio data in the time period in the time period exceeds the threshold value: the cumulative duration of all human voice audio data in the time period exceeds the duration threshold value. Figure 7 and Fig.11To illustrate, the first audio data is divided into 8 audio data parts including s1 to s8. Before executing step 1023, at least all audio data parts involved in the time period corresponding to the current cycle will be confirmed as human voice audio data or non-human voice audio data. For example, when t1 to t4 is used as the time period corresponding to the current cycle, and before executing step 1023, at least s1 to s5 are determined to be human voice audio data or non-human voice audio data, respectively. When t2 to t5 is used as the time period corresponding to the current cycle, and before executing step 1023, at least s2 to s6 are determined to be human voice audio data or non-human voice audio data, respectively. With the acquisition of the first audio data, the first audio data is processed by echo cancellation and noise reduction and divided into audio data parts, and step 1023 is executed periodically. In this process, each cycle corresponds to a time period, that is, corresponds to a sliding window, and the step size of the time period sliding can be Δt, that is, the previous time period in any two adjacent time periods corresponding to the time period is used as the next time period after sliding Δt to the right. The duration of each time period can be equal, for example, the duration of any one of T1, T2, T3 and T4 is 15s, assuming that the duration threshold is 10s. Assuming that the time period corresponding to the current cycle is from t1 to t4, in step 1023, it is determined whether the cumulative duration of s2 and s5 identified as human voices exceeds the duration threshold of 10s, so as to determine whether to reduce the volume of the audio output by the first device. Here, the cumulative duration of s2 and s5 is shorter and does not exceed the duration threshold of 10s, so step 1031 will not be triggered. Then enter the next cycle, and the time period corresponding to the current cycle is determined to be from t2 to t5, which includes s3 to s6. For this time period, the starting position t2 is not located between the two audio data parts, but is located somewhere in the audio data part s2. For this situation, it can be handled in different ways. For example, one processing method is to determine the duration of the audio data according to the boundary of the current time period, and only count the part of s2 in the time period as the duration of the human voice audio data part s2 in the time period. In step 1023, determine the duration of the human voice audio data part s2 after time t2, and whether the cumulative duration of the human voice audio data s5 and s6 exceeds the duration threshold of 10s; another processing method is to count s2 as a whole as the duration of the human voice audio data s2 in the time period. In step 1023, determine whether the cumulative duration of the human voice audio data s2, s5 and s6 exceeds the duration threshold of 10s; in addition, s2 as a whole can also be not counted as the time period. In step 1023, determine whether the cumulative duration of the human voice audio data s5 and s6 exceeds the duration threshold of 10s. Then entering the next cycle, the time period corresponding to the current cycle determined at this time is from t3 to t6. In step 1023, it is determined that the cumulative duration of the human voice audio data s5, s6, s7 and s8 exceeds the duration threshold of 10s, so step 1031 is executed to reduce the volume of the audio output by the first device.

[0061] For example, combining Figure 7 and Fig.13 To illustrate, in addition to using a fixed duration as the sliding step of the time period, the sliding step of the time period can also be set according to the number of audio data parts. For example, 5 audio data parts correspond to one time period, and the sliding step of the time period can be, for example, 1 audio data part. Of course, 2 audio data parts or other numbers of audio data parts can also be used as the sliding step between adjacent time periods. Here, 1 audio data part is used as the sliding step for explanation. Assuming that the time period corresponding to the current cycle is the first time period, the first time period includes s1 to s5. In step 1023, it is determined that the cumulative duration of the human voice audio data s2 and s5 does not exceed the duration threshold of 10s, so step 1031 will not be triggered. In the next cycle, the time period slides as a sliding window, s1 slides out of the window, and s6 slides into the window. At this time, the corresponding time period of the current cycle is the second time period, and the second time period includes s2 to s6. In step 1023, it is determined that the cumulative duration of the human voice audio data s2, s5 and s6 does not exceed the duration threshold of 10s, so step 1031 will not be triggered. In the next cycle, s2 slides out of the time period, s7 slides into the time period, and the current time period is the third time period, which includes s3 to s7. In step 1023, it is determined that the cumulative duration of the human voice audio data parts s5, s6 and s7 does not exceed the duration threshold of 10s, so step 1031 will not be triggered. In the next cycle, the current time period is the fourth time period, which includes s4 to s8. In step 1023, it is determined that the cumulative duration of the human voice audio data s5, s6, s7 and s8 exceeds the duration threshold of 10s, and step 1031 is executed to reduce the volume of the audio output by the first device. In this way, the time period is not slid with a fixed time step, but the time window is slid with the audio data part as the step, so the duration of each time period is not necessarily the same, but is determined according to the audio data part that slides in and out of the time period.

[0062] In addition, Fig.13In the setting method of the sliding window shown, in addition to determining whether the proportion of all human voice audio data in the time period exceeds the threshold by determining that the cumulative duration of all human voice audio data parts in the time period corresponding to the current cycle does not exceed the duration threshold, it is also possible to determine whether the proportion of all human voice audio data in the time period exceeds the threshold by determining whether the cumulative number of all human voice audio data in the time period exceeds the number threshold in the time period corresponding to the current cycle. For example, 5 audio data parts correspond to one time period, and the number threshold is 3. The number of human voice audio data in any of the first time period, the second time period, and the third time period does not exceed 3, and does not exceed the number threshold. The number of human voice audio data in the fourth time period is 4, which exceeds the number threshold 3. Therefore, step 1031 is executed at this time to reduce the volume of the audio output by the first device.

[0063] In some embodiments, Figures 14 to 16 As shown, the process of determining that someone is speaking in the environment of the first device according to the first audio data, reducing the volume of the audio output of the first device or controlling the second device to reduce the volume of the audio output includes: determining that someone is speaking in the environment of the first device according to the first audio data, and the volume of the person's voice exceeds the first volume threshold, reducing the volume of the audio output of the first device or controlling the second device to reduce the volume of the audio output, that is, adding a judgment condition for reducing the volume of the audio output. If the human voice is loud, it means that someone is speaking near the playback device, and it is necessary to reduce the volume of the playback device to provide a better user experience. If the human voice is small, it means that someone is speaking at a distance from the playback device. This situation will not be affected by the audio output of the playback device, so there is no need to reduce the volume of the playback device. For example, after the judgment of step 1023 is yes, the method also includes: the first device executes step 1024 and determines that the volume of the person's voice exceeds the first volume threshold. If so, the first device can execute step 1031 or step 1032. If not, continue to obtain the first audio data of the environment where the first device is located. It should be noted that the embodiment of the present application does not limit the execution order between step 1023 and step 1024, as long as both are judged as yes and then step 1031 or 1032 is executed.

[0064] In some embodiments, Fig.14 and Fig.15As shown, the above process of determining that someone is speaking in the environment where the first device is located according to the first audio data, and the volume of the person's voice exceeds the first volume threshold, reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio includes: determining that someone is speaking in the environment where the first device is located according to the first audio data, and the volume of the person's voice exceeds the first volume threshold, and the volume of the audio output by the first device exceeds the second volume threshold, and reducing the volume of the audio output by the first device. If the volume of the audio output by the playback device is relatively low, it will not affect people's conversation. Therefore, it is added to determine whether the volume of the audio output by the playback device is relatively high as a condition for whether to reduce the volume of the playback device to avoid unnecessary volume control. For example, after step 1024 is judged as yes, the first device executes step 1025 to determine whether the volume of the audio output by the first device exceeds the second volume threshold. If so, step 1031 is executed. If not, the first audio data of the environment where the first device is located is continuously obtained. It should be noted that the embodiment of the present application does not limit the execution order between steps 1023, 1024 and 1025, as long as all three are judged as yes, then step 1031 is executed. In addition, Fig.14 and Fig.15 Only the implementation method including steps 1023, 1024 and 1025 is illustrated. In other possible implementation methods, only 1023 and 1024 may be included, and if both are judged to be yes, step 1031 is executed. Alternatively, only 1023 and 1025 may be included, and if both are judged to be yes, step 1031 is executed.

[0065] In some embodiments, Fig.16 As shown, the process of determining that someone is speaking in the environment of the first device according to the first audio data, and the volume of the person's voice exceeds the first volume threshold, reducing the volume of the audio output of the first device or controlling the second device to reduce the volume of the output audio includes: determining that someone is speaking in the environment of the first device according to the first audio data, and the volume of the person's voice exceeds the first volume threshold, and the volume of the audio output of the second device exceeds the second volume threshold, and controlling the second device to reduce the volume of the output audio. For example, after the judgment of step 1024 is yes, the first device executes step 1026 to determine whether the volume of the audio output of the second device exceeds the second volume threshold, if so, execute step 1032, if not, continue to obtain the first audio data of the environment of the first device. The embodiment of the present application does not limit the order between steps 1023, 1024 and 1026. In addition, before step 1026, the first device 51 will obtain the volume of the audio output of the second device 52, and the specific acquisition method is not limited. For example, the second device 52 can send the volume of its output audio to the first device 51 when outputting audio.

[0066] In some embodiments, Fig.17As shown, after step 103, lowering the volume of the audio output of the first device or controlling the second device to lower the volume of the output audio, it also includes: the first device executes step 301, obtaining the second audio data of the environment in which the first device is located. The specific process and principle can be the same as the above-mentioned step 101, and will not be repeated here. The difference between the first audio data and the second audio data is only the different acquisition time; step 302, determining whether there is anyone speaking in the environment in which the first device is located according to the second audio data, if not, that is, if it is determined according to the second audio data that no one is speaking in the environment in which the first device is located, then executing step 303, restoring the volume of the audio output of the first device or controlling the second device to restore the volume of the output audio, if so, then step 103 can be continued.

[0067] Specifically, step 302 is essentially the same as step 102 above. For example, the second audio data can be acquired in the same manner as the first audio data, and can be acquired by the first device itself, or can be acquired by the second device and then sent to the first device; the acquired second audio data can be subjected to echo cancellation processing and / or noise reduction processing, and the acquired second audio data can be divided into multiple audio data parts, and it is determined whether each data part is human voice audio data; the time period is periodically determined to determine whether the proportion of all human voice audio data in the time period corresponding to the current period exceeds the threshold value in the time period. If not, it is determined based on the second audio data that no one is speaking in the environment of the first device, and step 303 is executed. If yes, step 301 is executed. After step 303, the process can return to step 101 to continue to detect whether there is anyone talking. If so, the volume of the playback device can be automatically lowered again.

[0068] In some embodiments, Fig.17 As shown, the process of determining that no one is making sound in the environment where the first device is located based on the second audio data, and restoring the volume of the audio output of the first device or controlling the second device to restore the volume of the audio output includes: after a preset interval time of lowering the volume of the audio output of the first device or controlling the second device to lower the volume of the audio output, determining that no one is making sound in the environment where the first device is located based on the second audio data, and restoring the volume of the audio output of the first device or controlling the second device to restore the volume of the audio output.

[0069] Specifically, for example, after the above step 103, a preset interval, such as 1 minute, passes, and then steps 301 and 302 are performed. If it is recognized in step 302 that someone is still speaking, steps 301 and 302 are performed again after 1 minute. In this way, when it is recognized that someone is speaking, the necessary time to reduce the volume of the playback device can be guaranteed to prevent the situation where the volume of the playback device is frequently adjusted during a user's conversation. In the interval of, for example, 1 minute, the second audio data can continue to be collected or can be suspended. In any way, the volume of the audio output by the playback device will not be restored during the interval.

[0070] It should be noted that Fig.17 In the process shown, after executing step 103, steps 301 and 302 will not be executed until a preset interval time has passed. This method is only an example. In fact, in a possible implementation method, the process of step 301 may be independent of the preset interval time, or step 301 may be executed after step 103, but step 302 will not be executed. Instead, step 302 will be executed after a preset interval time has passed since step 103, that is, it can be guaranteed that the volume of the playback device will be restored only after the preset interval time has passed after the volume of the playback device has been lowered.

[0071] In some embodiments, the above step 103, lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output includes: obtaining the distance of the human voice source; lowering the volume of the audio output by the first device according to the distance of the human voice source, so that the sound pressure of the audio output by the first device to the human voice source is a preset sound pressure or below the preset sound pressure; or, controlling the second device to lower the volume of the audio output according to the distance of the human voice source, so that the sound pressure of the audio output by the second device to the human voice source is a preset sound pressure or below the preset sound pressure. That is, when people are talking, according to the user's position, no matter how far the user is from the playback device, after lowering the volume of the output audio, the volume of the audio output by the playback device heard by the user is below the volume that will not disturb the user.

[0072] Specifically, obtaining the distance of the sound source of human voice may refer to obtaining the distance between the sound source of human voice and the playback device, and the playback device may be the first device or the second device. The embodiment of the present application does not limit the method for obtaining the distance, and only two methods are used as examples below. For example, it can be determined based on the sound pressure of human voice. Sound pressure is a parameter related to distance. The audio data collected by the microphone of the sound receiving device can be used to calculate the distance based on its sound pressure. This distance represents the distance between the sound source of human voice and the playback device. In other words, the distance between the sound source of human voice and the playback device can be obtained based on the first audio data obtained. It should be noted that, for example Figure 5In the example shown, although the first audio data is collected by the second device, and the first device is the playback device, since the second device and the first device are located in the same environment, the distance of the human voice source calculated based on the audio data collected by the second device can be considered as the distance between the human voice source and the playback device. For another example, the distance between the human voice source and the playback device can be determined based on the camera. The camera can be set on the first device or the second device, and the image captured by the camera can be used to identify the human portrait, and the distance between the human portrait and the camera can be determined as the distance between the human voice source and the playback device. For the user who is talking, the closer the distance to the playback device is, the louder the sound of the audio played by the playback device is heard, and the farther the distance from the playback device is, the smaller the sound of the audio played by the playback device is heard. The purpose of reducing the volume of the playback device in the embodiment of the present application is to prevent the played audio from interfering with the user's conversation. Therefore, the volume can be dynamically adjusted based on the distance of the user, so that no matter whether the user is talking at a farther position or a closer position, the sound pressure of the audio played by the playback device can be lower.

[0073] In some embodiments, the preset sound pressure is 45dB. For example, the playback device is outputting audio at a certain volume, and the user is talking at a distance of 3m from the playback device. At this time, in step 104, based on the user distance of 3m, the playback volume of the playback device is reduced by a first volume difference, so that the sound pressure of the audio heard by the user is below 45dB; assuming that the playback device is outputting audio at the same certain volume, and the user is talking at a distance of 1m from the playback device, at this time, in step 104, based on the user distance of 1m, the playback volume of the playback device needs to be reduced by a second volume difference, so that the sound pressure of the audio heard by the user is below 45dB. The second volume difference is greater than the first volume difference, that is, the embodiment of the present application can dynamically set the volume reduction value of the playback device based on the user distance.

[0074] Specifically, for example, in step 102, the ambient audio data is input into the audio recognition model, and the recognition confidence is output after being processed by the audio recognition model. The recognition confidence is used to characterize the probability that the ambient audio data belongs to the above-mentioned non-human voice audio feature. If the recognition confidence is less than the confidence threshold, it means that the probability that the ambient audio data belongs to the above-mentioned non-human voice audio feature is relatively low. If the above-mentioned non-human voice audio feature is excluded, the ambient audio data can be considered to be human voice audio data. Therefore, when the preset conditions are met, the volume of the audio output by the playback device is controlled to be reduced, that is, the playback volume can be automatically lowered when people are talking. For step 104, if the execution subject of the volume control method is the playback device, then this step refers to directly controlling the volume of its output audio; if the execution subject of the volume control method is not the playback device, then this step refers to the execution subject generating a volume reduction instruction and sending the instruction to the playback device, so that the playback device controls the playback volume based on the instruction after receiving the volume reduction instruction. It is possible to continuously collect ambient audio data and determine whether all collected ambient audio data meet the preset conditions. It is also possible to continuously collect ambient audio data and periodically determine whether the currently collected ambient audio data meets the preset conditions, for example, continuously collect ambient audio data and determine whether the currently collected ambient audio data meets the preset conditions every 30 seconds. It is also possible to periodically collect ambient audio data and determine whether the collected ambient audio data meets the preset conditions, for example, collect a section of ambient audio data every 30 seconds and determine whether the currently collected ambient audio data meets the preset conditions.

[0075] In some embodiments, the above-mentioned step 1022, determining whether each audio data part is human voice audio data respectively, includes: inputting each audio data part into the audio recognition model for processing respectively, obtaining the recognition confidence corresponding to the audio data part, and recognizing that the audio data part with a recognition confidence lower than the confidence threshold is human voice audio data, and the audio recognition model is trained by non-human voice audio features.

[0076] The audio recognition model may be a pre-trained model, such as Fig.18 As shown, the audio recognition model processing can be trained by various types of non-human voice audio features including pet audio features, household appliance audio features, car horn audio features and other non-human voice audio features. Since the embodiment of the present application is aimed at the scenario of people talking while playing music or playing TV, the non-human voice features commonly seen in such scenarios can be used as training features for the model. The embodiment of the present application does not limit the specific type of training features for the audio recognition model, as long as they are non-human voice audio features. The more non-human voice audio features used in training, the more accurate the recognition results. Fig.18In the process shown, since it is trained through multiple features, a multi-channel audio recognition model can be obtained through training, and then the multi-channel audio recognition model is converted into a single-channel audio recognition model, so that the audio data part inputted from the same channel can be recognized by the single-channel audio recognition model. It can be understood that Fig.18 The process shown is only an example. For example, in other possible implementations, each type of audio feature corresponds to an audio recognition model. When recognizing an audio data portion, the audio data portion is input into each model respectively to obtain a recognition result corresponding to each feature. All recognition results are then comprehensively analyzed to determine whether the audio data portion is human voice audio data.

[0077] like Fig.19 As shown, Fig.19 The waveform of a human voice audio signal, a puppy barking audio signal and a car horn audio signal are shown. For human voice, due to the difference in human voice and the different content of conversation, the difference between different human voice audio signals is large. For non-human voice environmental noise in conversation scenes, the features of the same type of audio signals are relatively close, for example, the features of the audio signals of the barking of pet dogs are relatively close, the features of the audio signals of the calling of pet cats are relatively close, the features of the audio signals of car horns are relatively close, the features of the audio signals of the noise when the air conditioner is working are relatively close, the features of the audio signals of the noise when the range hood is working are relatively close, the features of the audio signals of the noise when the sweeping robot is working are relatively close, and the features of the audio signals of the sound when the faucet is running are relatively close. The above non-human voices are the common non-human voice noises in conversation scenes. Therefore, the audio recognition model trained based on these non-human voice audio features can identify whether the environmental sound belongs to these non-human voice categories. If the environmental sound belongs to these non-human voice categories, it means that the environmental sound does not belong to human voice. If the environmental sound does not belong to these non-human voice categories, we can assume that the probability of the environmental sound being human voice is very high.

[0078] like Figures 20 to 22 As shown, the embodiment of the present application also provides a volume control device 3, including: an audio acquisition module 31, used to obtain first audio data of the environment in which the first device is located; a volume control module 32, used to determine that someone is speaking in the environment in which the first device is located based on the first audio data, and reduce the volume of the audio output by the first device or control the second device to reduce the volume of the output audio. Fig. 20 The figure shows the case where the sound receiving device 2 and the playback device 1 are separate devices. The volume control device 3 may belong to the sound receiving device 2, for example. The audio acquisition module 31 acquires the first audio data collected by the microphone 21, and the volume control module 32 controls the playback device to reduce the volume of the output audio through the communication interface. Fig. 20In the structure shown, the sound receiving device 2 is the first device, and the playback device 1 is the second device; Fig.21 It shows the case where the volume control device 3 belongs to a playback device. Fig.21 In the structure shown, the playback device 1 is the first device, and the sound receiving device 2 is the second device; Fig. 22 The diagram illustrates a situation where a playback device and a sound receiving device are integrated together, that is, the playback device 1 includes a microphone 21 having audio collection functions and audio output functions.

[0079] The volume control device can apply the volume control method in any of the above embodiments. The specific process and principle are the same as those in the above embodiments and will not be repeated here.

[0080] It should be understood that the division of the above volume control device is only a division of logical functions. In actual implementation, all or part of the modules can be integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, any one of the audio acquisition module 31 and the volume control module 32 can be a separate processing element, or it can be integrated in the volume control device, such as integrated in a chip of the volume control device. In addition, it can also be stored in the memory of the volume control device in the form of a program, and called and executed by a processing element of the volume control device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.

[0081] For example, the audio acquisition module 31 and the volume control module 32 can be one or more integrated circuits configured to implement the above method, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or more microprocessors (digital singnal processor, DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processors that can call programs. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0082] In some embodiments, Fig.21 and Fig. 22 As shown, the device also includes an audio output module for outputting audio; the volume control module 32 is specifically used to determine, based on the first audio data, that someone is speaking in the environment where the first device is located, and reduce the volume of the audio output by the first device.

[0083] In some embodiments, Fig.21 As shown, the audio acquisition module 31 is specifically used to send an environmental audio acquisition instruction to the second device, where the second device has an audio acquisition function; and receive first audio data of the environment in which the first device is located, which is sent by the second device.

[0084] In some embodiments, Fig. 20 As shown, the first device has an audio collection function, and the second device has an audio output function; the volume control module 32 is specifically used to determine, based on the first audio data, that someone is speaking in the environment where the first device is located, and control the second device to lower the volume of the output audio; the audio acquisition module 31 is specifically used to receive an environmental audio collection instruction from the second device; and in response to the environmental audio collection instruction, collect the first audio data of the environment where the first device is located.

[0085] In some embodiments, the volume control module 32 is specifically used to determine, based on the first audio data, that there is a person speaking in the environment where the first device is located and the volume of the person speaking exceeds a first volume threshold, and then reduce the volume of the audio output by the first device or control the second device to reduce the volume of the output audio.

[0086] In some embodiments, the volume control module 32 is specifically used to determine, based on the first audio data, that there is a person speaking in the environment where the first device is located, and the volume of the person's voice exceeds a first volume threshold, and the volume of the audio output by the first device exceeds a second volume threshold, and then reduce the volume of the audio output by the first device; or, based on the first audio data, determine that there is a person speaking in the environment where the first device is located, and the volume of the person's voice exceeds the first volume threshold, and the volume of the audio output by the second device exceeds the second volume threshold, and then control the second device to reduce the volume of the output audio.

[0087] In some embodiments, the audio acquisition module 31 is also used to acquire second audio data of the environment in which the first device is located; the volume control module 32 is also used to determine, based on the second audio data, that no one is making a sound in the environment in which the first device is located, and to restore the volume of the audio output by the first device or to control the second device to restore the volume of the audio output.

[0088] In some embodiments, the volume control module 32 is specifically used to determine that no one is speaking in the environment of the first device based on the second audio data after lowering the volume of the audio output of the first device or controlling the second device to lower the volume of the audio output for a preset interval, and to restore the volume of the audio output of the first device or control the second device to restore the volume of the audio output.

[0089] In some embodiments, the volume control module 32 is specifically used to obtain the distance from the human voice source; reduce the volume of the audio output by the first device according to the distance from the human voice source, so that the sound pressure of the audio output by the first device when it is transmitted to the human voice source is a preset sound pressure or below the preset sound pressure; or, control the second device to reduce the volume of the output audio according to the distance from the human voice source, so that the sound pressure of the audio output by the second device when it is transmitted to the human voice source is a preset sound pressure or below the preset sound pressure.

[0090] In some embodiments, the preset sound pressure is 45 dB.

[0091] In some embodiments, the apparatus further comprises an echo cancellation module 33 for performing echo cancellation processing on the first audio data, and / or a noise reduction module 34 for performing noise reduction processing on the first audio data.

[0092] In some embodiments, the volume control module 32 is specifically used to divide the first audio data into multiple audio data parts; determine whether each audio data part is human voice audio data; periodically determine the time period, and if the proportion of all human voice audio data in the time period corresponding to the current cycle in the time period exceeds a threshold, then reduce the volume of the audio output by the first device or control the second device to reduce the volume of the output audio.

[0093] In some embodiments, the proportion of all human voice audio data in the time period corresponding to the current cycle in the time period exceeds a threshold if: the cumulative duration of all human voice audio data in the time period corresponding to the current cycle exceeds a duration threshold, or the cumulative number of all human voice audio data in the time period corresponding to the current cycle exceeds a number threshold.

[0094] In some embodiments, determining whether each audio data portion is human voice audio data includes: inputting each audio data portion into an audio recognition model for processing, obtaining a recognition confidence corresponding to the audio data portion, and determining that the audio data portion whose recognition confidence is lower than a confidence threshold is human voice audio data, and the audio recognition model is trained by non-human voice audio features.

[0095] In some embodiments, the non-human voice audio features include pet audio features, household appliance audio features, and car horn audio features.

[0096] The embodiment of the present application also provides a device, including: a processor and a memory, the memory is used to store at least one instruction, when the instruction is loaded and executed by the processor, the device executes the volume control method in any of the above embodiments. The specific process and principle of the method are the same as those in the above embodiments, and will not be repeated here.

[0097] The present application also provides a readable storage medium, in which instructions are stored. When the instructions are executed on a device, the device executes each step of the volume control method in the above embodiments.

[0098] The present application also provides a program product including instructions. When the program product is run on a device or any at least one processor, the device executes each step of the volume control method in the above embodiments.

[0099] The present application also provides a chip, including a processor, which is used to read and run a program stored in a memory to execute each step of the volume control method in the above embodiments.

[0100] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A volume control method, characterized in that: Applied to a first device, the method includes: Acquire first audio data of an environment in which the first device is located; It is determined according to the first audio data that someone is speaking in the environment where the first device is located, and the volume of the audio output by the first device is reduced or the second device is controlled to reduce the volume of the audio output.

2. The method according to claim 1, characterized in that The first device has an audio output function; Before acquiring the first audio data of the environment in which the first device is located, the method further includes: Output audio; The determining, according to the first audio data, that a person is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: It is determined according to the first audio data that someone is making a sound in the environment where the first device is located, and the volume of the audio output by the first device is reduced.

3. The method according to claim 2, characterized in that The acquiring first audio data of the environment in which the first device is located comprises: Sending an ambient audio collection instruction to a second device, where the second device has an audio collection function; Receive first audio data of an environment where the first device is located, which is sent by the second device.

4. The method according to claim 1, characterized in that: The first device has an audio acquisition function, and the second device has an audio output function; The determining, according to the first audio data, that a person is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: Determining, according to the first audio data, that someone is making a sound in the environment where the first device is located, and controlling the second device to reduce the volume of the output audio; The acquiring first audio data of the environment in which the first device is located comprises: Receiving an ambient audio collection instruction from the second device; In response to the environmental audio collection instruction, first audio data of the environment in which the first device is located is collected.

5. The method according to any one of claims 1 to 4, characterized in that: The determining, according to the first audio data, that a person is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: Determine, based on the first audio data, that a person is speaking in the environment where the first device is located, and the volume of the person's voice exceeds a first volume threshold, reduce the volume of the audio output by the first device or control the second device to reduce the volume of the output audio.

6. The method according to claim 5, characterized in that The determining, according to the first audio data, that a person is speaking in the environment where the first device is located, and the volume of the person's speaking exceeds a first volume threshold, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the output audio, includes: Determining, according to the first audio data, that a person is speaking in the environment where the first device is located, and the volume of the person's speaking exceeds the first volume threshold, and the volume of the audio output by the first device exceeds a second volume threshold, and reducing the volume of the audio output by the first device; Alternatively, it is determined based on the first audio data that there is a person speaking in the environment where the first device is located, and the volume of the person speaking exceeds the first volume threshold, and the volume of the audio output by the second device exceeds the second volume threshold, and the second device is controlled to lower the volume of the output audio.

7. The method according to any one of claims 1 to 6, characterized in that: After lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output, the method further includes: Acquire second audio data of the environment in which the first device is located; Determine, based on the second audio data, that no one is making a sound in the environment where the first device is located, and restore the volume of the audio output by the first device or control the second device to restore the volume of the audio output.

8. The method according to claim 7, characterized in that The determining, according to the second audio data, that no one is uttering in the environment of the first device, and restoring the volume of the audio output by the first device or controlling the second device to restore the volume of the audio output includes: After lowering the volume of the audio output by the first device or controlling the second device to lower the volume of the audio output for a preset interval, determining based on the second audio data that no one is making a sound in the environment where the first device is located, and restoring the volume of the audio output by the first device or controlling the second device to restore the volume of the audio output.

9. The method according to any one of claims 1 to 8, characterized in that The step of reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: Get the distance of the human voice source; reducing the volume of the audio output by the first device according to the distance from the sound source of the human voice, so that the sound pressure of the audio output by the first device transmitted to the sound source of the human voice is a preset sound pressure or below the preset sound pressure; Alternatively, the second device is controlled to reduce the volume of the output audio according to the distance from the human voice source, so that the sound pressure of the output audio of the second device transmitted to the human voice source is a preset sound pressure or below the preset sound pressure.

10. The method according to any one of claims 1 to 9, characterized in that Before the process of determining, according to the first audio data, that someone is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output, the process further includes: Perform echo cancellation processing and / or noise reduction processing on the first audio data.

11. The method according to any one of claims 1 to 10, characterized in that The determining, according to the first audio data, that a person is making a sound in the environment where the first device is located, and reducing the volume of the audio output by the first device or controlling the second device to reduce the volume of the audio output includes: dividing the first audio data into a plurality of audio data portions; Determine whether each of the audio data parts is human voice audio data; A time period is periodically determined, and if the proportion of all human voice audio data in the time period corresponding to the current period in the time period exceeds a threshold, the volume of the audio output by the first device is reduced or the second device is controlled to reduce the volume of the output audio.

12. The method according to claim 11, characterized in that The step of respectively determining whether each of the audio data parts is human voice audio data comprises: Each of the audio data parts is input into the audio recognition model for processing to obtain the recognition confidence corresponding to the audio data part, the audio data part whose recognition confidence is lower than the confidence threshold is human voice audio data, and the audio recognition model is trained by non-human voice audio features.

13. The method according to claim 12, characterized in that The non-human voice audio features include pet audio features, household appliance audio features and car speaker audio features.

14. A device, characterized in that include: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the device executes the method according to any one of claims 1 to 13.

15. A readable storage medium, characterized in that: The device comprises a program or an instruction. When the program or the instruction is run on a device, the method according to any one of claims 1 to 13 is executed.