Voice activity detection method, device, equipment and medium

By considering the reception time difference and similarity of speech frames in speech activity detection, and using the feature vectors and weights of the recognition model for detection, the problem of insufficient accuracy of speech activity detection in the existing technology is solved, and the accuracy of speech activity detection is improved. accuracy and real-time performance, improving the performance of speech recognition tasks.

CN118658462APending Publication Date: 2024-09-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410672272.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing voice activity detection technology is difficult to accurately determine the activity of voice frames in real-time scenarios, affecting the performance of voice-related applications.

Method used

By obtaining the first speech frame and at least one second speech frame of the speech signal to be detected, and determining whether the first speech frame is an active speech frame when the difference in reception time is less than or equal to the preset duration and the similarity is greater than or equal to the target threshold, The recognition model is used to perform activity detection based on feature vectors and weights.

Benefits of technology

It improves the accuracy and real-time performance of voice activity detection, enhances the performance of automatic speech recognition tasks, reduces the character error rate, and improves the ability of voice activity detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658462A
    Figure CN118658462A
Patent Text Reader

Abstract

The embodiment of the invention provides a voice activity detection method and device, equipment and a medium, which are used for accurately and effectively carrying out activity detection on voice frames. In the embodiment of the invention, when whether the first voice frame in the to-be-detected voice signal is the active voice frame is determined, the first voice frame is considered, and at least one second voice frame which is close and similar to the receiving time of the first voice frame in the to-be-detected voice signal is also considered; in addition, the multiple voice frames which are close in receiving time and relatively similar generally have the same attribute, that is, generally all the voice frames are active voice frames or all the voice frames are non-active voice frames, so that when whether the first voice frame is the active voice frame or not is determined, at least one second voice frame is also considered, and the accuracy of voice activity detection can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a voice activity detection method, device, equipment and medium. Background Art

[0002] The Voice Activity Detection (VAD) system is used to determine the active and inactive voice frames of the input voice signal. The active voice frames determined will be sent to the subsequent voice processing steps. The Voice Activity Detection system is a crucial pre-step in many voice-related applications, such as voice wake-up, voice enhancement, voice coding, voice recognition, and speaker recognition. These applications have high real-time requirements in many scenarios, such as video conferencing. Therefore, the Voice Activity Detection system needs to send the active voice frames to the subsequent voice processing steps as quickly as possible.

[0003] Therefore, how to improve the accuracy of voice activity detection has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The embodiments of the present application provide a voice activity detection method, apparatus, device and medium for accurately and effectively performing activity detection of voice frames.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting voice activity, the method comprising:

[0006] Determining whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of a speech signal to be detected;

[0007] The difference in receiving time between the first voice frame and the second voice frame is less than or equal to a preset duration, and the similarity between the first voice frame and the second voice frame is greater than or equal to a target threshold.

[0008] In a second aspect, an embodiment of the present application further provides a voice activity detection device, the device comprising:

[0009] An acquisition module, used to acquire a first speech frame and at least one second speech frame of a speech signal to be detected, wherein a difference in receiving time between the first speech frame and the second speech frame is less than or equal to a preset duration, and a similarity between the first speech frame and the second speech frame is greater than or equal to a target threshold;

[0010] The processing module is used to determine whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of the speech signal to be detected.

[0011] In a third aspect, an embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned voice activity detection methods when executing a computer program stored in the memory.

[0012] In a fourth aspect, an embodiment of the present application further provides a computer storage medium storing a computer program executable by an electronic device, wherein when the program runs on the electronic device, the electronic device executes the steps of any of the above-mentioned voice activity detection methods.

[0013] In a fifth aspect, an embodiment of the present application further provides a computer program product, which is stored in a storage medium and implements the steps of the above-mentioned voice activity detection method when the computer program product is executed by at least one processor.

[0014] It can be seen that in the embodiment of the present application, when determining whether the first speech frame in the voice signal to be detected is an active speech frame, in addition to considering the first speech frame itself, at least one second speech frame in the voice signal to be detected whose reception time is relatively close and similar to that of the first speech frame is also considered. Since multiple voice frames whose reception times are close and similar usually have the same properties, that is, they are usually active voice frames or inactive voice frames, when determining whether the first voice frame is an active voice frame, at least one second voice frame is also considered, which can improve the accuracy of voice activity detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of 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 work.

[0016] Figure 1 A schematic diagram of a voice activity detection process provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a process for determining a target feature vector by a recognition model provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of a relationship diagram provided in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of a process for generating a relationship diagram provided in an embodiment of the present application;

[0020] Figure 5A schematic diagram of a relationship diagram provided in an embodiment of the present application;

[0021] Figure 6 A schematic diagram of a process for determining a target feature vector provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of a detailed process of performing activity detection using a recognition model provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of the structure of a voice activity detection device provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, 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 this field without making creative work are within the scope of protection of the present application.

[0027] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0028] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0029] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0030] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0031] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 application.

[0032] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

[0033] In order to determine whether a speech frame is an active speech frame, embodiments of the present application provide a speech activity detection method, apparatus, device and medium.

[0034] The activity detection method includes: an electronic device determines whether a first voice frame is an active voice frame based on a first voice frame and at least one second voice frame of a voice signal to be detected; wherein a reception time difference between the first voice frame and the second voice frame is less than or equal to a preset duration, and a similarity between the first voice frame and the second voice frame is greater than or equal to a target threshold.

[0035] The voice activity detection method of the embodiment of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be a vehicle-mounted device, a user equipment (UE), a mobile device, a user equipment, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory. The server can be an independent physical server, a server cluster consisting of multiple servers, or a cloud server capable of cloud computing.

[0036] The voice activity detection method of the embodiment of the present application can be applied to any scenario requiring voice activity detection, and the method can be applied to products in these scenarios.

[0037] Figure 1 A schematic diagram of a voice activity detection process provided in an embodiment of the present application, the process includes:

[0038] S101: Acquire a first speech frame and at least one second speech frame of a speech signal to be detected; wherein a difference in receiving time between the first speech frame and the second speech frame is less than or equal to a preset duration, and a similarity between the first speech frame and the second speech frame is greater than or equal to a target threshold.

[0039] A voice activity detection method provided in an embodiment of the present application is applied to an electronic device, which may be an intelligent device such as a terminal device or a server.

[0040] It should be noted that for frame-level speech activity detection, a single speech frame is often difficult to distinguish, and its distinction result is strongly correlated with its adjacent frames, so its adjacent frames can be obtained to participate in the activity detection of the first speech frame.

[0041] In order to detect the activity of the speech frame, the electronic device can detect each speech frame in the speech signal to be detected. Specifically, when performing the detection, each speech frame can be taken as the first speech frame and the detection is performed in sequence. The detection process of any speech frame is described below.

[0042] The first voice frame in the voice signal to be detected can be obtained first, and the electronic device can obtain at least one second voice frame of the first voice frame, and the at least one second voice frame obtained is the voice frame participating in the detection of the first voice frame. It should be noted that the at least one second voice frame is a voice frame whose receiving time difference with the receiving time of the first voice frame is less than or equal to the preset duration, and the similarity with the first voice frame is greater than or equal to the target threshold. Among them, the preset duration can be the duration corresponding to a preset number of voice frames. In a possible implementation, the target threshold can also be a pre-set threshold, for example, it can be 0.8 or 0.7, etc.

[0043] Assuming that there are currently 5 frames and the preset duration is the duration corresponding to 2 frames, then each second voice frame participating in the detection of any first voice frame in the same voice signal is the first two frames and the second two frames after the first voice frame. In particular, for the first voice frame, there is no voice frame before it, and the two voice frames after it are voice frames whose receiving time difference with the first voice frame is less than or equal to the preset duration; similarly, for the second voice frame, there is only one voice frame before it, and the previous voice frame and the two voice frames after it are voice frames whose receiving time difference with the second voice frame is less than or equal to the preset duration; for the last voice frame, there is no voice frame after it, and the first two voice frames are voice frames whose receiving time difference with the last voice frame is less than or equal to the preset duration.

[0044] When determining the similarity between any two speech frames, feature vectors of the two speech frames may be extracted, for example, the cepstrum of the speech frame may be extracted, the extracted cepstrum may be used as the feature vector of the speech frame, and the cosine similarity or distance between the two feature vectors may be determined as the similarity between the two speech frames.

[0045] In a speech signal, there may be multiple active speech frames and multiple inactive speech frames. Then homogeneous speech frames (both active speech frames or both inactive speech frames) have similar feature vectors (i.e., have similar feature representations), and heterogeneous speech frames (different active speech frames or different inactive speech frames) have dissimilar feature vectors. Therefore, the electronic device can determine at least one second speech frame that can participate in the detection of the first speech frame based on the similarity between each speech frame in the speech signal to be detected and the first speech frame. Since the probability that the speech frames with higher similarity are homogeneous speech frames is higher, in an embodiment of the present application, the electronic device can sort the similarity between each speech frame in the speech signal to be detected and the first speech frame from large to small, and determine the speech frames with a set number of sorting in front as the second speech frames. Among them, the set number can be determined according to the preset discard rate and the number of speech frames in the speech signal to be detected. Specifically, the product of the discard rate and the number of speech frames can be determined, and the product is rounded down to obtain the set position.

[0046] S102: Determine whether the first speech frame is an active speech frame according to the first speech frame and the at least one second speech frame.

[0047] In order to accurately determine whether the first speech frame is an active speech frame, the electronic device can determine whether the first speech frame is an active speech frame based on the first speech frame and at least one second speech frame. In a possible implementation, the electronic device locally stores a pre-trained recognition model. After the electronic device obtains the first speech frame and the at least one second speech frame, the electronic device can input the first speech frame and the at least one second speech frame into the recognition model. The recognition model identifies whether the first speech frame is an active speech frame based on the first speech frame and the at least one second speech frame. The electronic device can obtain the output of the recognition model, and the output of the recognition model is whether the first speech frame is an active speech frame.

[0048] In an embodiment of the present application, when determining whether a first speech frame in a speech signal to be detected is an active speech frame, in addition to considering the first speech frame itself, at least one second speech frame in the speech signal to be detected whose reception time is close to and similar to that of the first speech frame is also considered. Since multiple speech frames whose reception times are close to and similar to each other usually have the same properties, that is, they are usually active speech frames or inactive speech frames, when determining whether the first speech frame is an active speech frame, at least one second speech frame is also considered, which can improve the accuracy of speech activity detection.

[0049] In order to accurately and effectively perform activity detection, based on the above embodiment, in an embodiment of the present application, determining whether the first speech frame is an active speech frame according to the first speech frame and at least one second speech frame of the speech signal to be detected includes:

[0050] Whether the first speech frame is an active speech frame is determined according to the first feature vector of the first speech frame, the second feature vector of each of the second speech frames, the first weight of the first speech frame and the second weight of each of the second speech frames.

[0051] In a possible implementation, the electronic device may determine the product of the feature vector of the first speech frame and the weight corresponding to the first speech frame as a first vector, and for each second speech frame, determine the product of the feature vector of the second speech frame and the weight corresponding to the second speech frame as a second vector, determine the sum of each second vector obtained as a third vector, and determine the sum of the first vector and the third vector as the target feature vector of the first speech frame. After determining the target feature vector, the similarity between the target feature vector and the active feature vector of a preset active speech frame may be determined. If the similarity exceeds a preset threshold, the first speech frame may be determined as an active speech frame.

[0052] In a possible implementation, the recognition model may determine whether the first speech frame is an active speech frame. Specifically, the recognition model may determine the first feature vector of the first speech frame, and the second feature vector of each second speech frame, and determine the target feature vector of the first speech frame based on the first feature vector and the first weight of the first speech frame, and the second feature vector of each second speech frame and the corresponding second weight. Specifically, the product of the first feature vector of the first speech frame and the first weight may be determined as the first vector, and the product of each second speech frame and its own second weight may be determined as the second vector, and the sum vector of the determined first vector and each second vector may be determined as the target feature vector. After determining the target feature vector of the first speech frame, the recognition model determines whether the first speech frame is an active speech frame based on the target feature vector.

[0053] The recognition model includes a linear layer, at least two feature extraction layers and a fully connected layer (FC), wherein the linear layer also has a layer normalization (LayerNorm) function, the feature extraction layer can also be referred to as LwFormer, and the feature extraction layer also has a LayerNorm function. Specifically, the linear layer obtains the first feature vector of the first speech frame and the second feature vector of each second speech frame, and the at least two feature extraction layers of the recognition model determine the target feature vector of the first speech frame according to the feature vectors of the first speech frame and each second speech frame and the corresponding weights, wherein the target feature vector can also be referred to as a high-level feature representation. The FC of the recognition model determines whether the first speech frame is an active speech frame based on the target feature vector. Specifically, the FC of the recognition model can determine the probability that the first speech frame is an active speech frame. In a possible implementation, the FC of the recognition model can determine the probability that the first speech frame is an active speech frame based on the dot product of the target feature vector and the parameter vector obtained by training.

[0054] The recognition model uses the above method to detect each first speech frame in the speech signal to be detected, so as to determine in turn whether each speech frame is an active speech frame. In a possible implementation, each first speech frame in the speech signal to be detected and the corresponding second speech frame can be input into the recognition model for recognition. Specifically, the electronic device can input the speech signal to be detected and the identifier of at least one second speech frame corresponding to each first speech frame detection into the recognition model. Taking the speech signal containing 400 speech frames as an example, the recognition model can output a 400-dimensional vector, and each component in the vector respectively represents the detection result of whether the corresponding speech frame is an active speech frame.

[0055] Figure 2 A schematic diagram of the process of determining a target feature vector by a recognition model provided in an embodiment of the present application.

[0056] Depend on Figure 2 It can be seen that the identifications of each second speech frame participating in the activity detection of the first speech frame identified as 0" are 1", 2" and 4", respectively, and the feature vectors of each speech frame identified as 0", 1", 2" and 4" determined by the recognition model are V0", V1", V2" and V4", respectively. Based on each feature vector and each corresponding weight, the target feature vector 0"' of the speech frame identified as 0" can be obtained.

[0057] The voice activity detection method adopted in the embodiment of the present application can effectively improve the voice activity detection capability based on the frame level, and improve the performance of downstream tasks. For example, in the automatic speech recognition (Automatic Speech Recognition, ASR) task, it can generate a gain in the character error rate (Character Error Rate, CER) result, which can effectively improve the product strength. Specifically, in the existing ASR task, it is easy to mistakenly identify active speech frames as inactive speech frames, thereby removing active speech frames. The recognition based on the activity detection method provided in the embodiment of the present application will avoid the incorrect recognition of ASR, thereby achieving a gain in the CER result.

[0058] In actual scenarios, in order to improve the detection speed, the electronic device can predetermine the second voice frame corresponding to each first voice frame, and save it in the form of a relationship graph, wherein the relationship graph of each first voice frame records the main node corresponding to the first identifier of the first voice frame and the auxiliary node corresponding to the second identifier of each second voice frame corresponding to the first voice frame, wherein the main node connects each auxiliary node. Specifically, when performing activity detection, the relationship graph of the voice signal to be detected and each first voice frame in the voice signal to be detected is input into the recognition model. The recognition model obtains, for each first voice frame, a relationship graph in which the main node is the identifier of the first voice frame, that is, the relationship graph of the first voice frame, and obtains the identifier corresponding to each auxiliary node in the relationship graph, obtains the second voice frame corresponding to each auxiliary node identifier, and the recognition model determines whether the first voice frame is an active voice frame based on the first voice frame and the obtained second voice frame.

[0059] Figure 3 A schematic diagram of a relationship diagram provided in an embodiment of the present application.

[0060] Figure 3 The node marked as 2 is the primary node, and the nodes marked as 0, 1, 3, and 4 are the secondary nodes. Figure 3 It can be seen that the master node is connected to each slave node, and in an actual scenario, the electronic device can also mark an arrow pointing to the master node on the master node, thereby marking the node as the master node.

[0061] In order to accurately generate a relationship graph, the electronic device can generate a relationship graph corresponding to each first voice frame, and the voice frame corresponding to the main node in the relationship graph is the first voice frame for voice activity detection. Specifically, when generating a relationship graph corresponding to a voice frame, a main node corresponding to the identifier of the first voice frame can be created in the relationship graph, and the main node can be marked with the identifier of the first voice frame. For example, if the first voice frame is the third voice frame, that is, its identifier is 3, then the mark of the main node can be 3. According to the receiving time corresponding to the first voice frame and the receiving time of other voice frames, each candidate voice frame whose receiving time difference with the receiving time of the first voice frame is less than or equal to the preset duration is obtained.

[0062] The electronic device may first add a secondary node corresponding to the identifier of each candidate speech frame in the relationship graph, each secondary node may be marked with the identifier of each candidate speech frame, and the main node and each secondary node may be connected. The electronic device may also delete the secondary node and the connection relationship between the main node and the secondary node if it is determined that the similarity between the candidate speech frame corresponding to the secondary node and the first speech frame is less than a target threshold for each secondary node.

[0063] Figure 4 A schematic diagram of a process for generating a relationship diagram provided in an embodiment of the present application.

[0064] Depend on Figure 4 It can be seen that the main node corresponding to the identifier 0" of the first voice frame can be added to the relationship graph first, and each candidate voice frame whose receiving time difference with the receiving time of the first voice frame is less than or equal to the preset time length can be obtained, and the auxiliary nodes corresponding to the identifiers 1", 2", 3", 4" and 5" of each candidate voice frame can be added to the relationship graph, and the main node and the auxiliary node can be connected to calculate the similarity between each candidate voice frame and the first voice frame, wherein the similarity between the first voice frame and each candidate voice frame identified as 1", 2", 3", 4" and 5" are 0.9, 0.7, 0.6, 0.8 and 0.5 respectively, and according to the set target threshold of 0.65, it can be determined to discard the auxiliary nodes corresponding to the candidate voice frames identified as 3" and 5", and delete the connection between the discarded auxiliary nodes and the main node to obtain a relationship graph.

[0065] Furthermore, in order to improve the efficiency of generating the relationship graph, after obtaining each candidate speech frame, it is possible to first not add the auxiliary node corresponding to each candidate speech frame to the relationship graph, but to determine the similarity between the candidate speech frame and the first speech frame for each candidate speech frame. If the similarity is greater than or equal to the target threshold, then add the auxiliary node corresponding to the identifier of the candidate speech frame to the relationship graph, and connect the main node and the auxiliary node. If the similarity is less than the target threshold, there is no need to add the auxiliary node corresponding to the identifier of the candidate speech frame to the relationship graph.

[0066] Figure 5 A schematic diagram of a relationship diagram provided in an embodiment of the present application.

[0067] Depend on Figure 5 It can be seen that each second voice frame whose receiving time difference with the voice frame identified as 0 is less than or equal to the preset time length and whose similarity is greater than or equal to the target threshold is the voice frame identified as 1 and 2. Therefore, the main node corresponding to the identification 0 is added, and the auxiliary nodes corresponding to the identifications 1 and 2 are added to connect the main node and each auxiliary node.

[0068] Each second voice frame whose receiving time difference with the receiving time of the voice frame identified as 1 is less than or equal to the preset duration and whose similarity is greater than or equal to the target threshold is the voice frame identified as 0, 2 and 3. Therefore, the main node corresponding to the identification 1 is added, and the auxiliary nodes corresponding to the identifications 0, 2 and 3 are added to connect the main node and each auxiliary node.

[0069] Each second voice frame whose receiving time difference with the receiving time of the voice frame identified as 2 is less than or equal to the preset duration and whose similarity is greater than or equal to the target threshold is the voice frame identified as 0, 1, 3 and 4. Therefore, the main node corresponding to the identification 2 is added, and the auxiliary nodes corresponding to the identifications 0, 1, 3 and 4 are added to connect the main node with each auxiliary node.

[0070] Each second voice frame whose receiving time difference with the receiving time of the voice frame identified as 3 is less than or equal to the preset duration and whose similarity is greater than or equal to the target threshold is the voice frame identified as 1, 2, 4 and 5. Therefore, the main node corresponding to the identification 3 is added, and the auxiliary nodes corresponding to the identifications 1, 2, 4 and 5 are added to connect the main node with each auxiliary node.

[0071] Each second voice frame whose receiving time difference with the receiving time of the voice frame identified as 4 is less than or equal to the preset duration and whose similarity is greater than or equal to the target threshold is the voice frame identified as 2, 3 and 5. Therefore, the main node corresponding to the identifier 4 is added, and the auxiliary nodes corresponding to the identifiers 2, 3 and 5 are added to connect the main node with each auxiliary node.

[0072] Each second speech frame whose receiving time difference with the receiving time of the speech frame identified as 5 is less than or equal to the preset duration and whose similarity is greater than or equal to the target threshold is the speech frame identified as 3 and 4. Therefore, the main node corresponding to identification 5 is added, and the auxiliary nodes corresponding to identifications 3 and 4 are added to connect the main node and each auxiliary node.

[0073] In order to accurately perform activity detection on the speech frame, based on the above embodiments, the method further includes:

[0074] Determine a first evaluation value of the first speech frame and a second evaluation value of each of the second speech frames, wherein the first evaluation value is used to characterize the correlation between the query vector and the key vector of the first speech frame, and the second evaluation value is used to characterize the correlation between the query vector of the first speech frame and the key vector of the second speech frame;

[0075] A first weight of the first speech frame and a second weight corresponding to each of the second speech frames are determined according to the first evaluation value and the second evaluation value.

[0076] In order to accurately detect the activity of the speech frame, the recognition model can process the first speech frame and each second speech frame to determine a first evaluation value of the first speech frame and a second evaluation value of each second speech frame, wherein the first evaluation value is used to characterize the correlation between the query vector of the first speech frame and the key vector of the first speech frame, and the second evaluation value is used to characterize the correlation between the query vector of the first speech frame and the key vector of the second speech frame. In a possible implementation, the first evaluation value can be determined based on the similarity between the query vector in the linear transformation result of the first speech frame and the key vector in the linear transformation result of the first speech frame, and the second evaluation value can be determined based on the similarity between the query vector in the linear transformation result of the first speech frame and the key vector in the linear transformation result of the second speech frame.

[0077] After the recognition model obtains the first evaluation value and each second evaluation value, the obtained first evaluation value and each second evaluation value can be normalized so that the normalized result is within (0,1), and each normalized result is respectively determined as the first weight of the first speech frame and the second weight corresponding to each second speech frame. In a possible implementation, the recognition model can normalize the obtained first evaluation value and each second evaluation value based on the Softmax function.

[0078] Among them, the method for determining the weights corresponding to the first speech frame and each second speech frame provided in the embodiment of the present application is usually a method used in the self-attention mechanism. The Softmax function can normalize a set of raw data into numbers between 0 and 1, and the sum of these numbers is 1. In the self-attention mechanism, by applying the Softmax function to the input first evaluation value and each second evaluation value, they are normalized into probability distributions for subsequent processing.

[0079] In order to accurately perform activity detection, on the basis of the above embodiments, in the embodiment of the present application, determining the first evaluation value of the first speech frame and the second evaluation value of each of the second speech frames includes:

[0080] Performing a linear transformation on the spectrogram of the first speech frame to obtain a first transformation result; and performing a linear transformation on each spectrogram of the second speech frame to obtain at least one second transformation result;

[0081] A first evaluation value of the first speech frame is determined according to the first transformation result; and a second evaluation value of each of the second speech frames is determined according to the first transformation result and the second transformation result.

[0082] In order to accurately perform activity detection, the recognition model can obtain the spectrogram of the first speech frame and each second speech frame for each speech frame, wherein the recognition model can perform short-time Fourier transform (STFT) on the first speech frame and each second speech frame to obtain the spectrogram of the first speech frame and each second speech frame. Specifically, the window length of the short-time Fourier transform can be set to 25ms, the frame shift to 10ms, and the number of Fourier transform points n_FFT=512.

[0083] After obtaining the spectrograms of the first speech frame and each second speech frame, the first speech frame can be linearly transformed to obtain a first transformation result, and each second speech frame can be linearly transformed to obtain a second transformation result. The first evaluation value of the first speech frame can be determined based on the first transformation result, and the second evaluation value of the second speech frame can be determined based on the first transformation result and the second transformation result. In a possible implementation, the first transformation result includes a query vector and a key vector of the first speech frame, and the second transformation result includes a key vector of the second speech frame. Specifically, the first evaluation value of the first speech frame can be determined based on the similarity between the query vector and the key vector of the first speech frame, and the second evaluation value of the second speech frame can be determined based on the similarity between the query vector of the first speech frame and the key vector of the second speech frame.

[0084] In order to accurately perform activity detection, on the basis of the above embodiments, in an embodiment of the present application, the first transformation result includes a query vector and a first key vector; determining the first evaluation value of the first speech frame according to the first transformation result includes: determining the first evaluation value of the first speech frame according to the query vector and the first key vector.

[0085] In order to accurately perform activity detection, the first transformation result includes the query vector and key vector of the first speech frame. After determining the first transformation result of the first speech frame, the transposed vector of the first key vector can be determined, and the dot product operation result of the query vector and the transposed vector can be determined, and the dot product operation result is determined as the first evaluation value of the first speech frame.

[0086] It should be noted that after each spectrogram is linearly transformed, the query vector and the first key vector in the first transformation result are obtained. It should be noted that the spectrogram is subjected to two different linear transformations to obtain the query vector and the first key vector. Among them, the query vector and the first key vector can also be called matrices. Specifically, the query vector and the key vector are actually linearly transformed from the same input matrix X (that is, the spectrogram). It can be simply understood as: Q = XW Q , K = XW K , where W Q and W K is a trainable parameter matrix. Specifically, how to perform linear transformation on the spectrogram to obtain the corresponding transformation result is a prior art and will not be described in detail here.

[0087] In order to accurately perform activity detection, on the basis of the above embodiments, in an embodiment of the present application, the second transformation result includes a second key vector; for each of the second speech frames, a second evaluation value of each of the second speech frames is determined, including: determining the second evaluation value of the second speech frame based on the query vector and the second key vector.

[0088] In order to accurately perform activity detection, the second transformation result includes the second key vector of the second speech frame. After determining the first transformation result of the first speech frame and the second transformation result of the second speech frame, the transposed vector of the second key vector of the second speech frame can be determined, and the dot product operation result of the query vector of the first speech frame and the transposed vector can be determined, and the dot product operation result is determined as the second evaluation value of the second speech frame.

[0089] In order to accurately perform activity detection, on the basis of the above embodiments, in an embodiment of the present application, determining the first feature vector of the first speech frame includes: determining the first feature vector of the first speech frame according to the value vector of the first speech frame and the first evaluation value.

[0090] In order to accurately perform activity detection, the first transformation result includes the value vector of the first speech frame. After determining the first evaluation value of the first speech frame, the product of the first evaluation value and the value vector of the first speech frame can be determined, and the product can be determined as the first feature vector of the first speech frame.

[0091] In order to accurately perform activity detection, on the basis of the above embodiments, in an embodiment of the present application, for each of the second speech frames, a second feature vector of the second speech frame is determined, including: determining the second feature vector of the second speech frame according to the value vector of the second speech frame and the second evaluation value.

[0092] In order to accurately perform activity detection, the second transformation result includes the value vector of the second speech frame. After determining the second evaluation value of the second speech frame, the product of the second evaluation value and the value vector of the second speech frame can be determined, and the product can be determined as the second feature vector of the second speech frame.

[0093] Figure 6 A schematic diagram of a process for determining a target feature vector provided in an embodiment of the present application.

[0094] Depend on Figure 6 It can be seen that when determining the target feature vector of the speech frame identified as 2, the recognition model can obtain each second speech frame participating in the detection of the first speech frame, and each second speech frame is respectively identified as 0, 1, 3 and 4, and obtain the key vector and value vector of each second speech frame identified as 0, 1, 3 and 4 respectively, obtain the query vector, key vector and value vector of the first speech frame identified as 2, and determine the transposed vector of the key vector of the first speech frame identified as 2, determine the dot product operation result of the query vector of the first speech frame and the transposed vector, which is the first evaluation value of the first speech frame, and for each second speech frame A speech frame, determines the transposed vector of the key vector of the second speech frame, determines the dot product result of the query vector of the second speech frame and the transposed vector, which is the second evaluation value of the second speech frame, determines the feature vector of each speech frame according to each evaluation value and the value vector of the first speech frame and each second speech frame, which are 0', 1', 2', 3' and 4' respectively, and according to the weights a0, a1, a2, a3 and a4 of the first speech frame and each second speech frame, weights the feature vector of the first speech frame and the feature vector of each second speech frame and sums them to obtain the target feature vector of the speech frame marked as 2.

[0095] Figure 7 A schematic diagram of a detailed process of performing activity detection using a recognition model provided in an embodiment of the present application.

[0096] Assume that the speech signal is single-channel, the sampling rate is 16kHz, and the duration is 1 second, that is, the speech signal can be expressed as (1,16000), where 1 represents a single channel and 16000 represents the number of sampling points.

[0097] The convolutional layer of the recognition model first passes the speech signal (RawWaveForm) through STFT to obtain a spectrogram (Spectrogram), then passes it through a Linear Layer+LayerNorm for dimensionality transformation and abstract feature representation, then passes it through multiple LwFormer+LayerNorm to extract the speech / non-speech target feature vector of each speech frame, and finally passes it through an FC to obtain the detection result (Result).

[0098] Among them, the spectrogram representation of the 1s speech signal is (400,257), where (400,257) means that the spectrogram has 400 speech frames and 257 frequencies. Based on LinearLayer+LayerNorm, a feature vector of (400,128) is obtained, that is, 400 128-dimensional feature vectors are obtained and used as the input of LwFormer+LayerNorm. Based on LwFormer+LayerNorm, the target feature vector (400,128) of the active speech frame / inactive speech frame of the speech signal is output, that is, 400 128-dimensional feature vectors are obtained. After an FC, the discrimination result (400,1) is obtained, where 1 means that the output result is 400 1-dimensional vectors, or it can be said that 400 one-dimensional discrimination results are output, and the value indicates whether the corresponding speech frame is an active speech frame.

[0099] The embodiment of the present application proposes a deep learning-based method for the voice activity detection task, and designs a method for determining the target feature vector by considering the strong relationship between the speech frame to be detected and its adjacent speech frames, as well as the feature differences between homogeneous speech frames and heterogeneous speech frames. This method can effectively improve the modeling capability.

[0100] Based on the same technical concept, on the basis of the above embodiments, the present application provides a voice activity detection device, Figure 8 A schematic diagram of the structure of a voice activity detection device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the device comprises:

[0101] An acquisition module 801 is used to acquire a first speech frame and at least one second speech frame of a speech signal to be detected, wherein a difference in receiving time between the first speech frame and the second speech frame is less than or equal to a preset duration, and a similarity between the first speech frame and the second speech frame is greater than or equal to a target threshold;

[0102] The processing module 802 is used to determine whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of the speech signal to be detected.

[0103] In a possible implementation, the processing module 802 is specifically used to determine whether the first speech frame is an active speech frame based on the first feature vector of the first speech frame, the second feature vector of each of the second speech frames, the first weight of the first speech frame and the second weight of each of the second speech frames.

[0104] In a possible implementation, the processing module 802 is also used to determine a first evaluation value of the first speech frame and a second evaluation value of each of the second speech frames, the first evaluation value being used to characterize the correlation between the query vector and the key vector of the first speech frame, and the second evaluation value being used to characterize the correlation between the query vector of the first speech frame and the key vector of the second speech frame; and based on the first evaluation value and the second evaluation value, determine a first weight of the first speech frame and a second weight corresponding to each of the second speech frames.

[0105] In one possible implementation, the processing module 802 is specifically used to perform a linear transformation on the spectrogram of the first speech frame to obtain a first transformation result; and to perform a linear transformation on the spectrogram of each of the second speech frames to obtain at least one second transformation result; determine a first evaluation value of the first speech frame based on the first transformation result; and determine a second evaluation value of each of the second speech frames based on the first transformation result and the second transformation result.

[0106] In a possible implementation, the processing module 802 is specifically configured to: determine a first evaluation value of the first speech frame according to the query vector and the first key vector; and the first transformation result includes the query vector and the first key vector.

[0107] In a possible implementation, the processing module 802 is specifically configured to: determine a second evaluation value of the second speech frame according to the query vector and the second key vector; and the second transformation result includes the second key vector.

[0108] In a possible implementation, the processing module 802 is specifically configured to determine a first feature vector of the first speech frame according to the value vector of the first speech frame and the first evaluation value.

[0109] In a possible implementation manner, the processing module 802 is specifically configured to determine a second feature vector of the second speech frame according to the value vector of the second speech frame and the second evaluation value.

[0110] Based on the same technical concept, the present application also provides an electronic device, Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, it includes: a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904;

[0111] The memory 903 stores a computer program. When the program is executed by the processor 901, the processor 901 performs the following steps:

[0112] Determining whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of a speech signal to be detected;

[0113] The difference in receiving time between the first voice frame and the second voice frame is less than or equal to a preset duration, and the similarity between the first voice frame and the second voice frame is greater than or equal to a target threshold.

[0114] In a possible implementation manner, determining whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of the speech signal to be detected includes:

[0115] Whether the first speech frame is an active speech frame is determined according to the first feature vector of the first speech frame, the second feature vector of each of the second speech frames, the first weight of the first speech frame and the second weight of each of the second speech frames.

[0116] In a possible implementation, the method further includes:

[0117] Determine a first evaluation value of the first speech frame and a second evaluation value of each of the second speech frames, wherein the first evaluation value is used to characterize the correlation between the query vector and the key vector of the first speech frame, and the second evaluation value is used to characterize the correlation between the query vector of the first speech frame and the key vector of the second speech frame;

[0118] A first weight of the first speech frame and a second weight corresponding to each of the second speech frames are determined according to the first evaluation value and the second evaluation value.

[0119] In a possible implementation manner, determining the first evaluation value of the first speech frame and the second evaluation value of each of the second speech frames includes:

[0120] Performing a linear transformation on the spectrogram of the first speech frame to obtain a first transformation result; and performing a linear transformation on each spectrogram of the second speech frame to obtain at least one second transformation result;

[0121] A first evaluation value of the first speech frame is determined according to the first transformation result; and a second evaluation value of each of the second speech frames is determined according to the first transformation result and the second transformation result.

[0122] In a possible implementation, the first transformation result includes a query vector and a first key vector; and determining the first evaluation value of the first speech frame according to the first transformation result includes: determining the first evaluation value of the first speech frame according to the query vector and the first key vector.

[0123] In a possible implementation, the second transformation result includes a second key vector; for each of the second speech frames, determining a second evaluation value of each of the second speech frames includes: determining the second evaluation value of the second speech frame based on the query vector and the second key vector.

[0124] In a possible implementation, determining the first feature vector of the first speech frame includes: determining the first feature vector of the first speech frame according to the value vector of the first speech frame and the first evaluation value.

[0125] In a possible implementation, for each second speech frame, determining a second feature vector of the second speech frame includes: determining the second feature vector of the second speech frame according to the value vector of the second speech frame and the second evaluation value.

[0126] Since the principle of solving the problem by the above electronic device is similar to that of the voice activity detection method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0127] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 802 is used for communication between the above electronic device and other devices. The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0128] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0129] Based on the same technical concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the program runs on the electronic device, the electronic device implements any of the above embodiments when executing.

[0130] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, MO (magneto-optical disks), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, NAND FLASH (non-volatile memory), SSD (solid state drive), etc.

[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0132] Based on the same technical concept, an embodiment of the present application provides a computer program product, which includes: computer program code, when the computer program code runs on an electronic device, the electronic device implements any of the above embodiments when executing.

[0133] The computer program for performing the operation of the present disclosure may be an assembly instruction, an instruction set architecture (ISA) instruction, a machine instruction, a machine-related instruction, a microcode, a firmware instruction, a state setting data, or a source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0134] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0136] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0138] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for detecting voice activity, characterized in that: The method comprises: Determining whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of a speech signal to be detected; The difference in receiving time between the first voice frame and the second voice frame is less than or equal to a preset duration, and the similarity between the first voice frame and the second voice frame is greater than or equal to a target threshold.

2. The method according to claim 1, characterized in that The step of determining whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of the speech signal to be detected comprises: Whether the first speech frame is an active speech frame is determined according to the first feature vector of the first speech frame, the second feature vector of each of the second speech frames, the first weight of the first speech frame and the second weight of each of the second speech frames.

3. The method according to claim 2, characterized in that The method further comprises: Determine a first evaluation value of the first speech frame and a second evaluation value of each of the second speech frames, wherein the first evaluation value is used to characterize the correlation between the query vector and the key vector of the first speech frame, and the second evaluation value is used to characterize the correlation between the query vector of the first speech frame and the key vector of the second speech frame; A first weight of the first speech frame and a second weight corresponding to each of the second speech frames are determined according to the first evaluation value and the second evaluation value.

4. The method according to claim 3, characterized in that The determining of a first evaluation value of the first speech frame and a second evaluation value of each of the second speech frames comprises: Performing a linear transformation on the spectrogram of the first speech frame to obtain a first transformation result; and performing a linear transformation on each spectrogram of the second speech frame to obtain at least one second transformation result; A first evaluation value of the first speech frame is determined according to the first transformation result; and a second evaluation value of each of the second speech frames is determined according to the first transformation result and the second transformation result.

5. The method according to claim 4, characterized in that The first transformation result includes a query vector and a first key vector; and determining a first evaluation value of the first speech frame according to the first transformation result includes: determining a first evaluation value of the first speech frame according to the query vector and the first key vector.

6. The method according to claim 5, characterized in that The second transformation result includes a second key vector; for each of the second speech frames, determining a second evaluation value of each of the second speech frames includes: determining the second evaluation value of the second speech frame according to the query vector and the second key vector.

7. The method according to claim 4, characterized in that Determining a first feature vector of the first speech frame includes: determining the first feature vector of the first speech frame according to the value vector of the first speech frame and the first evaluation value.

8. The method according to claim 4, characterized in that For each of the second speech frames, determining a second feature vector of the second speech frame includes: determining the second feature vector of the second speech frame according to the value vector of the second speech frame and the second evaluation value.

9. A voice activity detection device, characterized in that: The device comprises: An acquisition module, used to acquire a first speech frame and at least one second speech frame of a speech signal to be detected, wherein a difference in receiving time between the first speech frame and the second speech frame is less than or equal to a preset duration, and a similarity between the first speech frame and the second speech frame is greater than or equal to a target threshold; The processing module is used to determine whether the first speech frame is an active speech frame according to a first speech frame and at least one second speech frame of the speech signal to be detected.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the voice activity detection method according to any one of claims 1 to 8 when executing a computer program stored in the memory.

11. A computer storage medium, characterized in that: It stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device executes the steps of the voice activity detection method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product is stored in a storage medium, and when the computer program product is executed by at least one processor, the steps of the voice activity detection method according to any one of claims 1 to 7 are implemented.