Voice activity detection method and device, computer equipment and storage medium

Through the channel and spatial position attention mechanism combined with the feature aggregation of different neural networks, the problems of insufficient information utilization and insufficient feature expression in traditional technology are solved, the accuracy of speech activity detection is improved, and it is suitable for complex noise environments.

CN119068907AActive Publication Date: 2024-12-03MOBILITY ASIA SMART TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310649583.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-02
Publication Date
2024-12-03
Estimated Expiration
2043-06-02

AI Technical Summary

Technical Problem

Traditional recurrent neural networks have problems in insufficient information utilization and poor feature expression in speech activity detection, resulting in insufficient detection accuracy, especially in noise environments.

Method used

The channel attention mechanism and spatial position attention mechanism are adopted to give different weights of features through different channels and spatial positions. The feature expressions that fuse the channel and spatial position dependencies are extracted, and feature aggregation is combined with different types of neural networks to improve speech activities. Accuracy of detection.

Benefits of technology

It effectively improves the separation performance of voice segments and non-voice segments in voice data signals, improves the accuracy of voice activity detection, and is suitable for complex noise environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068907A_ABST
    Figure CN119068907A_ABST
Patent Text Reader

Abstract

The invention relates to a voice activity detection method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring to-be-detected audio data, and performing feature extraction on the to-be-detected audio data by using a first neural network to obtain a first intermediate feature; calculating a channel attention weight corresponding to each channel feature of the first intermediate feature by using a channel attention mechanism to serve as a first channel attention weight; extracting a spatial position relationship between channel features of the first intermediate feature as a first spatial position relationship, and calculating a first spatial position attention map according to the first spatial position relationship; calculating a first target feature according to the first intermediate feature, the first channel attention weight and the first spatial position attention map; and performing voice activity detection according to the first target feature. By adopting the method, the accuracy of voice activity detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent voice technology, and in particular to a voice activity detection method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of intelligent voice technology, more and more smart devices are beginning to use intelligent voice technology to complete voice interaction, such as smart cars, smart phones, and smart speakers.

[0003] Voice activity detection technology is one of the key steps in voice interaction. Its purpose is to determine the voice signal from an audio file containing voice. Voice activity detection not only involves digital signal processing issues, but also involves auditory perception characteristics and human voice features. At the same time, the diversity of noise increases the difficulty of voice activity detection.

[0004] In traditional technology, the traditional recurrent neural network structure is used to model audio timing information for voice activity detection. However, although the recurrent neural network based on deep learning achieves good detection results for non-stationary noise signals, it has problems such as insufficient utilization of information and insufficient feature expression. Therefore, the detection of voice activity is still not accurate enough. Summary of the invention

[0005] Based on this, it is necessary to provide a voice activity detection method, apparatus, computer device and storage medium that can improve the accuracy of voice activity detection in response to the above technical problems.

[0006] A voice activity detection method, the method comprising: obtaining audio data to be detected, using a first neural network to perform feature extraction on the audio data to be detected, and obtaining a first intermediate feature; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight; extracting the spatial position relationship between each channel feature of the first intermediate feature as the first spatial position relationship, and calculating a first spatial position attention map according to the first spatial position relationship; calculating a first target feature according to the first intermediate feature, the first channel attention weight and the first spatial position attention map; and performing voice activity detection according to the first target feature.

[0007] In some embodiments, voice activity detection is performed based on a first target feature, including: using a second neural network to extract features of audio data to be detected to obtain a second intermediate feature; wherein the first neural network and the second neural network are neural networks of different types; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the second intermediate feature as the second channel attention weight; extracting the spatial position relationship between each channel feature of the second intermediate feature as the second spatial position relationship, and calculating a second spatial position attention map based on the second spatial position relationship; calculating the second target feature based on the second intermediate feature, the second channel attention weight and the second spatial position attention map; performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature, and performing voice activity detection based on the aggregated feature.

[0008] In some embodiments, a channel attention mechanism is used to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight, including: using a global average pool to perform an information compression operation on the feature map of each channel feature of the first intermediate feature to obtain a first output corresponding to each channel feature of the first intermediate feature; performing two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weight.

[0009] In some embodiments, two layers of nonlinear changes are performed on each first output to obtain channel attention weights of each channel feature of the first intermediate feature, including: obtaining the weights of the first fully connected layer and the weights of the second fully connected layer; performing a first nonlinear change on the first output according to the weights of the first fully connected layer and a linear rectification activation function; performing a second nonlinear change on the first output after the first nonlinear change according to the weights of the second fully connected layer and an S-shaped growth curve activation function to obtain the first channel attention weight.

[0010] In some embodiments, the spatial position relationship between each channel feature of the first intermediate feature is extracted as the first spatial position relationship, and a first spatial position attention map is calculated based on the first spatial position relationship, including: using a maximum pooling algorithm to process each channel feature of the first intermediate feature to obtain a first feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; using an average pooling algorithm to process each channel feature of the first intermediate feature to obtain a second feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; concatenating the first feature description with the second feature description to obtain a concatenated feature description, and performing a convolution operation on the concatenated feature description to obtain a spatial position attention map.

[0011] In some embodiments, feature aggregation is performed on the first target feature and the second target feature to obtain an aggregated feature, including: dimensionality sorting the first target feature and the second target feature; constructing an aggregation parameter matrix according to the total number of dimensions obtained after the dimensionality sorting and the number of categories of neural networks of different categories, the aggregation parameter matrix being pre-trained through machine learning; and feature aggregation processing is performed according to the first target feature, the second target feature, and the aggregation parameter matrix to obtain an aggregated feature.

[0012] In some embodiments, feature aggregation processing is performed according to the first target feature, the second target feature and the aggregation parameter matrix to obtain aggregated features, including: generating a feature matrix according to the first target feature and the second target; calculating the weights corresponding to each element in each row of the feature matrix according to each element in each row of the parameter matrix to generate a weight matrix; and obtaining aggregated features according to the feature matrix and the weight matrix.

[0013] A voice activity detection device, the device comprising:

[0014] An intermediate feature acquisition module, used to acquire audio data to be detected, and use a first neural network to perform feature extraction on the audio data to be detected to obtain a first intermediate feature;

[0015] A channel weight calculation module, used to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature by using the channel attention mechanism as the first channel attention weight;

[0016] A spatial weight calculation module, used to extract the spatial position relationship between the channel features of the first intermediate feature as a first spatial position relationship, and calculate a first spatial position attention map according to the first spatial position relationship;

[0017] A target feature calculation module, configured to calculate a first target feature according to the first intermediate feature, the first channel attention weight, and the first spatial position attention map;

[0018] The voice activity detection module is used to perform voice activity detection according to the first target feature.

[0019] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned voice activity detection methods are implemented.

[0020] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any one of the above-mentioned voice activity detection methods when executed by a processor.

[0021] The above-mentioned voice activity detection method, apparatus, computer equipment and storage medium use the channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the intermediate feature, and extract the spatial position relationship between each channel feature of the intermediate feature to calculate the spatial position attention map. By mixing the dependencies between channels and the dependencies between spatial positions, different weights are assigned to features between different channels and at different spatial positions, resulting in modeling with new channel and spatial position dependencies, so that more meaningful feature expressions that combine the above two methods can be extracted, thereby improving the accuracy of feature expression. This method is applied to voice activity detection, effectively improving the performance of separating voice segments and non-voice segments in voice data signals, and therefore helping to improve the accuracy of voice activity detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flowchart of a voice activity detection method in some embodiments;

[0023] Figure 2 A schematic diagram of the structure of a convolutional recurrent neural network model after inserting a first neural network and a second neural network in some embodiments;

[0024] Figure 3 A schematic flow chart of the steps of extracting the spatial position relationship between the channel features of the first intermediate feature as the first spatial position relationship and calculating the first spatial position attention map according to the first spatial position relationship in some embodiments;

[0025] Figure 4 A schematic diagram of the structure of a hybrid attention module in some embodiments;

[0026] Figure 5 A schematic flow chart of steps of performing feature aggregation on a first target feature and a second target feature to obtain an aggregated feature in some embodiments;

[0027] Figure 6 is a structural block diagram of a voice activity detection device in some embodiments;

[0028] Figure 7 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] In some embodiments, the voice activity detection method involved in the present application can be used in a computer device. It should be noted that its execution subject can be a configuration device for virtual network card resources, which can be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware. The computer device can be a terminal, a client, or a server. The server can be a single server or a server cluster composed of multiple servers. The terminal in the embodiment of the present application can be a smart phone, a smart speaker, a personal computer, a tablet computer, a vehicle-mounted terminal, a wearable device, an intelligent robot, and other intelligent hardware devices. In the following method embodiments, the execution subject is a computer device as an example for explanation.

[0031] In some embodiments, Figure 1 As shown, a voice activity detection method is provided, which is described by taking the method applied to a terminal as an example, and includes the following steps:

[0032] Step S102: Acquire the audio data to be detected, and use the first neural network to extract features from the audio data to be detected to obtain a first intermediate feature.

[0033] The audio data to be detected refers to audio data to be detected, and may be audio sampling data to be detected. In the application scenario of an in-vehicle terminal, the audio data to be detected may be audio data of voice interaction occurring in the vehicle collected by a voice collection device, and the like.

[0034] Exemplarily, the first neural network may be a neural network having an LSTM (Long Short Term Memory) network structure, a GRU (Gated Recurrent Unit) network structure, etc., and the number of first neural networks is not limited. The first intermediate feature is an intermediate feature obtained after feature extraction by the first neural network.

[0035] In this step, the input audio data to be detected can be first divided into frames, and the acoustic features corresponding to each audio frame can be extracted. Then, the extracted acoustic features can be input into the first neural network, and the output of the first neural network can be used as the first intermediate feature. Furthermore, the output tensor of the first neural network can be dimensionally sorted to obtain the first intermediate feature.

[0036] For example, the output tensor of a single-layer LSTM can be dimensionally reorganized to obtain the first intermediate feature U, whose shape is [batch_size×seq_len, channel_num, hight, width], where batch_size is the batch size, seq_len is the sequence length, hight is the height, and width is the width. U=[u1,u2,…,uc ], c is the number of channels, u c The channel characteristic of the c channel of the first intermediate characteristic.

[0037] Exemplarily, the first neural network can be constructed based on a convolutional recurrent neural network model, that is, the first neural network can be inserted into the framework of the convolutional recurrent neural network model. More specifically, reference can be made to Figure 2 As shown, Figure 2 A convolutional recurrent neural network model after inserting the first neural network and the second neural network in some embodiments is shown.

[0038] like Figure 2 As shown, the convolutional recurrent neural network model consists of two convolutional layers with convolution kernels of 5×5 and 3×3. Each convolutional layer is followed by a BatchBorm layer, a ReLu activation function layer, and a 2×2 maximum pooling layer. The first neural network (for example, a single-layer LSTM structure) is attached to the output of the last convolutional layer, and the second neural network (for example, a single-layer GRU structure) is attached to the output of the last convolutional layer, thereby enhancing the temporal dependency of the model. Then, a hybrid attention module is inserted after the single-layer LSTM, and another hybrid attention module is inserted after the single-layer GRU. Next, after feature aggregation is performed through the feature aggregation module, the intermediate feature vector generated by the aggregation can be input into the LayerNorm layer for processing, and then a full connection operation and a tanh activation function operation can be performed. Finally, a full connection operation is performed and a softmax output is obtained, thereby obtaining the final result of voice activity detection.

[0039] Among them, Figure 2 The hybrid attention module in is configured to be used to perform the following steps S104 and S106. The feature aggregation module is configured to be used to perform the following steps S502 to S506.

[0040] Among them, the constructed and modified convolutional recurrent neural network model involved in the present application can be subjected to deep learning training. For example, the model training can be performed through the adam optimization algorithm. The vehicle-borne noise can be used to generate training samples, and the vehicle-borne noise can include at least one of the noise when the vehicle opens the window while driving on the road, the noise when the vehicle closes the window while driving on the road, the noise when the vehicle opens the window in a parking lot environment, and the noise when the vehicle closes the window in a parking lot environment; the training sample set is generated based on the vehicle-borne noise, and the trained convolutional recurrent neural network model can be used for voice activity detection.

[0041] Step S104: Use the channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight.

[0042] Among them, the first channel attention weight refers to the attention weight coefficient of the channel corresponding to each channel feature of the first intermediate feature.

[0043] In this step, based on the channel attention mechanism, a mixed correlation relationship between multiple channels can be established, and different attention weight coefficients can be assigned to different channels, so as to emphasize or weaken the features corresponding to different channels and effectively highlight important features.

[0044] Step S106: extract the spatial position relationship between the channel features of the first intermediate feature as the first spatial position relationship, and calculate the first spatial position attention map according to the first spatial position relationship.

[0045] The first spatial position relationship refers to the spatial distribution position relationship between the channel features of the first intermediate feature in the spatial dimension. The first spatial position attention map is a weight coefficient map reflecting the importance of the position relationship contained in the space.

[0046] In this step, on the basis of the channel dimension, the spatial position relationship between the channel features of each channel can be further extracted. That is, the spatial position dependency relationship between the channel features of each channel can be further integrated on the basis of the dependency relationship between the channels to generate a weight coefficient graph that can reflect the importance of the position relationship contained in the space.

[0047] Step S108: Calculate the first target feature based on the first intermediate feature, the first channel attention weight and the first spatial position attention map.

[0048] In this step, the first channel attention weight and the first spatial position attention map can be used as weight expressions of the features, that is, the first intermediate feature can be multiplied by a spatial position relationship weight expression (first spatial position attention map) and a channel weight expression (first channel attention weight), wherein the first channel attention weight reflects the importance between channels, and the first spatial position attention map reflects the importance of the position relationship contained in the space.

[0049] For example, the calculation method of the first target feature Y may refer to the following formula:

[0050] Y=U·M(U)·s(U)

[0051] The first intermediate feature U can be multiplied by a positional relationship weight expression M(U) and a channel weight expression s(U). The weight value M(U) reflects the importance of the positional relationship contained in the space, and the weight value s(U) reflects the importance between channels. The hybrid attention module can be inserted and integrated into the standard architecture of the convolutional recurrent neural network model after the nonlinear change after each convolution.

[0052] Step S110: performing voice activity detection according to the first target feature.

[0053] In this step, the first target feature extracted by the improved convolutional recurrent neural network model can be used as the detection basis, and further operations such as fully connected layer mapping and exponential normalization can be performed to obtain the probability that the audio frame of the voice data to be detected is voice, and the probability is compared with a preset threshold. If the probability is greater than the preset threshold, the audio frame is determined to be a frame containing voice activity; if the probability is less than the preset threshold, the audio frame is determined to be a frame that does not contain voice activity, thereby realizing the detection of voice activity.

[0054] The above-mentioned voice activity detection method uses the channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the intermediate feature, and extracts the spatial position relationship between each channel feature of the intermediate feature to calculate the spatial position attention map. By mixing the dependencies between channels and the dependencies between spatial positions, different weights are assigned to features between different channels and at different spatial positions, resulting in modeling with new channel and spatial position dependencies, so that a more meaningful feature expression that combines the above two methods can be extracted, thereby improving the accuracy of feature expression. This method is applied to voice activity detection, which effectively improves the performance of separating voice segments and non-voice segments in voice data signals, thereby helping to improve the accuracy of voice activity detection.

[0055] In some embodiments, in order to improve the accuracy of assigning different attention weights to different channels, a compression mechanism and an incentive mechanism can be introduced into the channel attention mechanism.

[0056] More specifically, the channel attention mechanism is used to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight, including: using the global average pool to perform information compression operation on the feature map of each channel feature of the first intermediate feature to obtain the first output corresponding to each channel feature of the first intermediate feature; performing two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weight.

[0057] In this embodiment, the compression operation is generated to solve the problem of channel correlation. The global spatial information is compressed into the channel description, for example, by generating channel statistics through a global average pool, and the specific method of using the global average pool to perform an information compression operation on the feature map of each channel feature of the first intermediate feature to obtain the first output corresponding to each channel feature of the first intermediate feature can be referred to as follows:

[0058]

[0059] Among them, H represents the height of the feature map, W represents the width of the feature map, and z c is the first output corresponding to channel c.

[0060] The excitation operation is generated to utilize the information gathered in the compression operation. The channel attention weights of each channel feature of the first intermediate feature can be obtained by performing two layers of nonlinear transformation on each first output.

[0061] In some embodiments, two layers of nonlinear changes are performed on each first output to obtain channel attention weights of each channel feature of the first intermediate feature, including: obtaining the weights of the first fully connected layer and the weights of the second fully connected layer; performing a first nonlinear change on the first output according to the weights of the first fully connected layer and a linear rectification activation function; performing a second nonlinear change on the first output after the first nonlinear change according to the weights of the second fully connected layer and an S-shaped growth curve activation function to obtain the first channel attention weight.

[0062] Exemplarily, the excitation operation can be implemented by using the information gathered in the compression operation, and is obtained through two layers of nonlinear transformation. For details, please refer to the following formula:

[0063] s=σ(W2δ(W1z))

[0064] Among them, z is the output result of the compression operation, that is, the first output; W1 is the weight of the first fully connected layer, δ is the linear rectification activation function (ReLU activation function), W2 is the weight of the second layer, and σ is the S-shaped growth curve activation function (sigmoid activation function). Among them, W1 and W2 are trainable parameters and can be adjusted through model training.

[0065] The above embodiment uses compression and excitation to generate a model with new inter-channel dependency by assigning different weights to different channels, thereby improving the rationality of emphasizing the importance of channels and further improving the accuracy of voice activity detection.

[0066] In some embodiments, reference Figure 3 As shown, Figure 3A schematic flow chart of the steps of extracting the spatial position relationship between the channel features of the first intermediate feature as the first spatial position relationship and calculating the first spatial position attention map according to the first spatial position relationship is shown in some embodiments, which may specifically include the following steps:

[0067] Step S302: using a maximum pooling algorithm to process the channel features of the first intermediate feature, to obtain a first feature description characterizing the spatial positional relationship between the channel features of the first intermediate feature.

[0068] In this step, the maximum pooling algorithm can be further used in the channel dimension to process the channel features of the first intermediate feature to obtain the first feature description F max , F max The calculation formula can be referred to as follows:

[0069]

[0070] Step S304: using an average pooling algorithm to process the channel features of the first intermediate feature, to obtain a second feature description characterizing the spatial positional relationship between the channel features of the first intermediate feature.

[0071] In this step, the average pooling algorithm can be further used in the channel dimension to process the channel features of the first intermediate feature to obtain the second feature description F avg , F avg The calculation formula can be referred to as follows:

[0072]

[0073] Among them, H represents the height of the feature map, and W represents the width of the feature map.

[0074] Step S306: Concatenate the first feature description and the second feature description to obtain a concatenated feature description, and perform a convolution operation on the concatenated feature description to obtain a spatial position attention map.

[0075] In this step, the above two feature descriptions can be concatenated and a convolution operation can be used to generate a spatial position attention map:

[0076] M(U)=δ(f 7×7 ([F avg ; F max ]))

[0077] Among them, δ is the sigmoid activation function, f 7×7 is a convolution operation with a kernel of 7×7, M(U) represents the spatial position attention map, F max represents the first feature description, F avg Represents the second feature description.

[0078] Below, combined with an application example, you can refer to Figure 4 As shown, Figure 4 The structure diagram of the hybrid attention module in some embodiments is shown. Figure 4 The hybrid attention module can process the first intermediate feature to obtain the first target feature.

[0079] In some embodiments, voice activity detection is performed based on a first target feature, including: using a second neural network to extract features of the audio data to be detected to obtain a second intermediate feature; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the second intermediate feature as the second channel attention weight; extracting the spatial position relationship between each channel feature of the second intermediate feature as the second spatial position relationship, and calculating a second spatial position attention map based on the second spatial position relationship; calculating the second target feature based on the second intermediate feature, the second channel attention weight and the second spatial position attention map; performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature, and performing voice activity detection based on the aggregated feature.

[0080] Exemplarily, the second intermediate feature is c is the number of channels. After processing by the hybrid attention module, we get in, is the second spatial position attention map, is the attention weight of the second channel.

[0081] In this embodiment, the second neural network may be a neural network of a different type from the first neural network. For example, the first neural network is an LSTM network structure, and the second neural network is a GRU network structure, or the first neural network is a GRU network structure, and the second neural network is an LSTM network structure. The acquisition of the second target feature may refer to the description of any one or more of the above embodiments of obtaining the first target feature, and will not be repeated here.

[0082] This embodiment not only utilizes the dependencies between channels and spatial positions in a mixed manner, but also generates a model with new dependencies between channels and spatial positions by assigning different weights to different channels and spatial positions, thereby obtaining a feature expression after weight optimization. In addition, different types of neural networks (such as CNN and LSTM network structures) are fused, and the optimized feature expressions of the heterogeneous networks are aggregated, thereby further enriching the feature expression and weighting the results under different network structures, making the feature expression more meaningful.

[0083] In some embodiments, reference Figure 5 As shown, Figure 5A schematic flow chart of the steps of performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature in some embodiments is shown, which may specifically include the following steps:

[0084] Step S502: Dimensionally sort the first target feature and the second target feature.

[0085] Specifically, in order to maintain the consistency of shape, the first target tensor Y obtained after the hybrid attention module is processed, and its shape can be expressed as [batch_size, seq_len, hidden_dim], where hidden_dim is the number of units in the hidden layer. In addition, the second target feature obtained after the hybrid attention module is processed The dimensions are also reorganized, and its shape can be expressed as [batch_size, seq_len, hidden_dim], where hidden_dim is the number of units in the hidden layer.

[0086] Step S502: construct an aggregation parameter matrix according to the total number of dimensions obtained after dimension sorting and the number of categories of neural networks of different categories, and the aggregation parameter matrix is ​​pre-trained by machine learning.

[0087] Specifically, the parameter matrix can be set as follows:

[0088]

[0089] Among them, i is the feature dimension index, j is the RNN category index, n is the total number of feature dimensions, and m is the number of RNN categories. For example, there can be two categories of RNN, which are LSTM and GRU. The parameter matrix can be obtained through model training.

[0090] Step S504: performing feature aggregation processing according to the first target feature, the second target feature and the aggregation parameter matrix to obtain an aggregated feature.

[0091] In some embodiments, feature aggregation processing is performed according to the first target feature, the second target feature and the aggregation parameter matrix to obtain aggregated features, including: generating a feature matrix according to the first target feature and the second target; calculating the weights corresponding to each element in each row of the feature matrix according to each element in each row of the parameter matrix to generate a weight matrix; and obtaining aggregated features according to the feature matrix and the weight matrix.

[0092] More specifically, the weight corresponding to each row of the feature matrix is ​​defined as:

[0093] w ij =τ(q ij )

[0094] Among them, τ is the Softmax function, and the expression is:

[0095]

[0096] The first target feature obtained after the first neural network (e.g., LSTM network) and the hybrid attention module is set to Set the second target feature obtained by the second neural network (e.g., GRU network) and the hybrid attention mechanism The two eigenvectors are aggregated into f = [f1,f2,…,f i ,…,f n ],in,

[0097] It should be understood that although Figure 1 , 3 The steps in the flowcharts of and 5 are shown in sequence as indicated by arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , 3 At least part of the steps in 5 may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages does not necessarily have to be sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0098] In some embodiments, Figure 6 As shown, a voice activity detection device is provided, including: an intermediate feature acquisition module 602, a channel weight calculation module 604, a space weight calculation module 606, a target feature calculation module 608 and a voice activity detection module 610, wherein:

[0099] An intermediate feature acquisition module 602 is used to acquire audio data to be detected, and use a first neural network to perform feature extraction on the audio data to be detected to obtain a first intermediate feature;

[0100] A channel weight calculation module 604 is used to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature by using a channel attention mechanism as first channel attention weights;

[0101] A spatial weight calculation module 606 is used to extract the spatial position relationship between the channel features of the first intermediate feature as a first spatial position relationship, and calculate a first spatial position attention map according to the first spatial position relationship;

[0102] A target feature calculation module 608, configured to calculate a first target feature according to the first intermediate feature, the first channel attention weight, and the first spatial position attention map;

[0103] The voice activity detection module 610 is used to perform voice activity detection according to the first target feature. In some embodiments, the intermediate feature acquisition module 602 is also used to use the second neural network to extract features of the audio data to be detected to obtain the second intermediate feature; the channel weight calculation module 604 is also used to use the channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the second intermediate feature as the second channel attention weight; the spatial weight calculation module 606 is also used to extract the spatial position relationship between each channel feature of the second intermediate feature as the second spatial position relationship, and calculate the second spatial position attention map according to the second spatial position relationship; the target feature calculation module 608 is also used to calculate the second target feature according to the second intermediate feature, the second channel attention weight and the second spatial position attention map; the voice activity detection module 610 is also used to perform feature aggregation on the first target feature and the second target feature to obtain the aggregated feature, and perform voice activity detection according to the aggregated feature.

[0104] In some embodiments, the channel weight calculation module 604 uses a global average pool to perform information compression operations on the feature maps of each channel feature of the first intermediate feature to obtain a first output corresponding to each channel feature of the first intermediate feature; performs two layers of nonlinear changes on each first output to obtain the channel attention weight of each channel feature of the first intermediate feature as the first channel attention weight.

[0105] In some embodiments, the channel weight calculation module 604 obtains the weight of the first fully connected layer and the weight of the second fully connected layer; performs a first nonlinear change on the first output according to the weight of the first fully connected layer and the linear rectification activation function; performs a second nonlinear change on the first output after the first nonlinear change according to the weight of the second fully connected layer and the S-shaped growth curve activation function to obtain the first channel attention weight.

[0106] In some embodiments, the spatial weight calculation module 606 uses a maximum pooling algorithm to process each channel feature of the first intermediate feature to obtain a first feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; uses an average pooling algorithm to process each channel feature of the first intermediate feature to obtain a second feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; concatenates the first feature description and the second feature description to obtain a concatenated feature description, and performs a convolution operation on the concatenated feature description to obtain a spatial position attention map.

[0107] In some embodiments, the voice activity detection module 610 performs dimensionality sorting on the first target feature and the second target feature; constructs an aggregation parameter matrix based on the total number of dimensions obtained after the dimensionality sorting and the number of categories of neural networks of different categories, and the aggregation parameter matrix is ​​pre-trained through machine learning; performs feature aggregation processing based on the first target feature, the second target feature and the aggregation parameter matrix to obtain an aggregate feature.

[0108] In some embodiments, the voice activity detection module 610 generates a feature matrix based on the first target feature and the second target; calculates the weights corresponding to each element in each row of the feature matrix based on each element in each row of the parameter matrix to generate a weight matrix; and obtains aggregated features based on the feature matrix and the weight matrix.

[0109] For the specific definition of the voice activity detection device, please refer to the definition of the voice activity detection method above, which will not be repeated here. Each module in the above-mentioned voice activity detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0110] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a voice activity detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0111] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In some embodiments, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining audio data to be detected, performing feature extraction on the audio data to be detected using a first neural network to obtain a first intermediate feature; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight; extracting the spatial position relationship between each channel feature of the first intermediate feature as the first spatial position relationship, and calculating the first spatial position attention map according to the first spatial position relationship; calculating the first target feature according to the first intermediate feature, the first channel attention weight, and the first spatial position attention map; and performing voice activity detection according to the first target feature.

[0113] In some embodiments, when the processor executes a computer program to implement voice activity detection based on the first target feature, the following steps are implemented: using a second neural network to extract features of the audio data to be detected to obtain a second intermediate feature; wherein the first neural network and the second neural network are neural networks of different types; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the second intermediate feature as the second channel attention weight; extracting the spatial position relationship between each channel feature of the second intermediate feature as the second spatial position relationship, and calculating the second spatial position attention map based on the second spatial position relationship; calculating the second target feature based on the second intermediate feature, the second channel attention weight and the second spatial position attention map; performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature, and performing voice activity detection based on the aggregated feature.

[0114] In some embodiments, when the processor executes a computer program to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature using the channel attention mechanism as the first channel attention weight, the following steps are implemented: using the global average pool to perform information compression operations on the feature maps of each channel feature of the first intermediate feature to obtain the first output corresponding to each channel feature of the first intermediate feature; performing two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weight.

[0115] In some embodiments, when the processor executes a computer program to implement two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature, the following steps are implemented: obtaining the first fully connected layer weights and the second fully connected layer weights; performing a first nonlinear change on the first output according to the first fully connected layer weights and a linear rectification activation function; performing a second nonlinear change on the first output after the first nonlinear change according to the second fully connected layer weights and an S-shaped growth curve activation function to obtain the first channel attention weight.

[0116] In some embodiments, the processor executes a computer program to extract the spatial position relationship between each channel feature of the first intermediate feature as the first spatial position relationship, and when calculating the first spatial position attention map according to the first spatial position relationship, the following steps are implemented: using the maximum pooling algorithm to process each channel feature of the first intermediate feature to obtain a first feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; using the average pooling algorithm to process each channel feature of the first intermediate feature to obtain a second feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; concatenating the first feature description and the second feature description to obtain a concatenated feature description, and performing a convolution operation on the concatenated feature description to obtain a spatial position attention map.

[0117] In some embodiments, the processor executes a computer program to perform feature aggregation on the first target feature and the second target feature. When the aggregated feature is obtained, the following steps are implemented: dimensionally sorting the first target feature and the second target feature; constructing an aggregation parameter matrix based on the total number of dimensions obtained after the dimension sorting and the number of categories of neural networks of different categories, and the aggregation parameter matrix is ​​pre-trained through machine learning; and performing feature aggregation processing based on the first target feature, the second target feature, and the aggregation parameter matrix to obtain the aggregated feature.

[0118] In some embodiments, the processor executes a computer program to implement feature aggregation processing according to the first target feature, the second target feature, and the aggregation parameter matrix. When the aggregated feature is obtained, the following steps are implemented: a feature matrix is ​​generated according to the first target feature and the second target; a weight matrix is ​​generated by calculating the weights corresponding to each element in each row of the feature matrix according to each element in each row of the parameter matrix; and the aggregated feature is obtained according to the feature matrix and the weight matrix.

[0119] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining audio data to be detected, using a first neural network to perform feature extraction on the audio data to be detected, and obtaining a first intermediate feature; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature as the first channel attention weight; extracting the spatial position relationship between each channel feature of the first intermediate feature as the first spatial position relationship, and calculating the first spatial position attention map according to the first spatial position relationship; calculating the first target feature according to the first intermediate feature, the first channel attention weight and the first spatial position attention map; and performing voice activity detection according to the first target feature.

[0120] In some embodiments, when a computer program is executed by a processor to implement voice activity detection based on a first target feature, the following steps are implemented: using a second neural network to extract features of the audio data to be detected to obtain a second intermediate feature; wherein the first neural network and the second neural network are neural networks of different types; using a channel attention mechanism to calculate the channel attention weights corresponding to each channel feature of the second intermediate feature as the second channel attention weight; extracting the spatial position relationship between each channel feature of the second intermediate feature as the second spatial position relationship, and calculating the second spatial position attention map based on the second spatial position relationship; calculating the second target feature based on the second intermediate feature, the second channel attention weight and the second spatial position attention map; performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature, and performing voice activity detection based on the aggregated feature.

[0121] In some embodiments, when a computer program is executed by a processor to implement the calculation of the channel attention weights corresponding to each channel feature of the first intermediate feature using the channel attention mechanism as the first channel attention weight, the following steps are implemented: using the global average pool to perform information compression operations on the feature maps of each channel feature of the first intermediate feature to obtain the first output corresponding to each channel feature of the first intermediate feature; performing two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weight.

[0122] In some embodiments, when a computer program is executed by a processor to perform two layers of nonlinear changes on each first output to obtain the channel attention weights of each channel feature of the first intermediate feature, the following steps are implemented: obtaining the first fully connected layer weights and the second fully connected layer weights; performing a first nonlinear change on the first output according to the first fully connected layer weights and a linear rectification activation function; performing a second nonlinear change on the first output after the first nonlinear change according to the second fully connected layer weights and an S-shaped growth curve activation function to obtain the first channel attention weight.

[0123] In some embodiments, a computer program is executed by a processor to extract the spatial position relationship between channel features of a first intermediate feature as a first spatial position relationship, and when calculating a first spatial position attention map based on the first spatial position relationship, the following steps are implemented: using a maximum pooling algorithm to process each channel feature of the first intermediate feature to obtain a first feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; using an average pooling algorithm to process each channel feature of the first intermediate feature to obtain a second feature description that characterizes the spatial position relationship between each channel feature of the first intermediate feature; concatenating the first feature description with the second feature description to obtain a concatenated feature description, and performing a convolution operation on the concatenated feature description to obtain a spatial position attention map.

[0124] In some embodiments, a computer program is executed by a processor to perform feature aggregation on a first target feature and a second target feature. When the aggregated feature is obtained, the following steps are performed: dimensionally sorting the first target feature and the second target feature; constructing an aggregation parameter matrix based on the total number of dimensions obtained after the dimension sorting and the number of categories of neural networks of different categories, wherein the aggregation parameter matrix is ​​pre-trained through machine learning; and performing feature aggregation processing based on the first target feature, the second target feature, and the aggregation parameter matrix to obtain an aggregated feature.

[0125] In some embodiments, the computer program is executed by the processor to implement feature aggregation processing based on the first target feature, the second target feature and the aggregation parameter matrix. When the aggregated feature is obtained, the following steps are implemented: a feature matrix is ​​generated based on the first target feature and the second target; the weights corresponding to each element in each row of the feature matrix are calculated based on each element in each row of the parameter matrix to generate a weight matrix; and the aggregated feature is obtained based on the feature matrix and the weight matrix.

[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The terms such as “first” and “second” in the present application are only used to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual contextual relationship or sequence between these entities or operations.

[0129] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A voice activity detection method, the method comprising: Acquire audio data to be detected, and use a first neural network to perform feature extraction on the audio data to be detected to obtain a first intermediate feature; Calculate the channel attention weights corresponding to the channel features of the first intermediate feature respectively as the first channel attention weights by using the channel attention mechanism; Extracting a spatial position relationship between channel features of the first intermediate feature as a first spatial position relationship, and calculating a first spatial position attention map according to the first spatial position relationship; Calculating a first target feature according to the first intermediate feature, the first channel attention weight, and the first spatial position attention map; Perform voice activity detection according to the first target feature.

2. The method according to claim 1, characterized in that: The performing voice activity detection according to the first target feature includes: Using a second neural network to extract features from the audio data to be detected to obtain a second intermediate feature; wherein the first neural network and the second neural network are neural networks of different types; Calculate the channel attention weights corresponding to the channel features of the second intermediate feature respectively as the second channel attention weights by using the channel attention mechanism; Extracting a spatial position relationship between channel features of the second intermediate feature as a second spatial position relationship, and calculating a second spatial position attention map according to the second spatial position relationship; Calculating a second target feature according to the second intermediate feature, the second channel attention weight, and the second spatial position attention map; The first target feature and the second target feature are aggregated to obtain an aggregated feature, and voice activity detection is performed according to the aggregated feature.

3. The method according to claim 1, characterized in that The using the channel attention mechanism to calculate the channel attention weights corresponding to the channel features of the first intermediate feature as the first channel attention weights includes: Using a global average pool, performing an information compression operation on a feature map of each channel feature of the first intermediate feature to obtain a first output corresponding to each channel feature of the first intermediate feature; Perform two layers of nonlinear transformation on each of the first outputs to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weights.

4. The method according to claim 3, characterized in that The performing two-layer nonlinear changes on each of the first outputs to obtain the channel attention weights of each channel feature of the first intermediate feature as the first channel attention weights includes: Get the weight of the first fully connected layer and the weight of the second fully connected layer; Performing a first nonlinear change on the first output according to the first fully connected layer weight and a linear rectification activation function; A second nonlinear change is performed on the first output after the first nonlinear change according to the second fully connected layer weight and the S-shaped growth curve activation function to obtain the first channel attention weight.

5. The method according to claim 1, characterized in that The step of extracting the spatial position relationship between the channel features of the first intermediate feature as a first spatial position relationship, and calculating a first spatial position attention map according to the first spatial position relationship, comprises: Processing each channel feature of the first intermediate feature by using a maximum pooling algorithm to obtain a first feature description characterizing a spatial positional relationship between each channel feature of the first intermediate feature; Processing each channel feature of the first intermediate feature by using an average pooling algorithm to obtain a second feature description characterizing a spatial position relationship between each channel feature of the first intermediate feature; The first feature description and the second feature description are concatenated to obtain a concatenated feature description, and a convolution operation is performed on the concatenated feature description to obtain the spatial position attention map.

6. The method according to claim 2, characterized in that The performing feature aggregation on the first target feature and the second target feature to obtain an aggregated feature includes: Dimensionally sorting the first target feature and the second target feature; Constructing an aggregation parameter matrix according to the total number of dimensions obtained after dimension arrangement and the number of categories of neural networks of different categories, wherein the aggregation parameter matrix is ​​pre-trained by machine learning; Feature aggregation processing is performed according to the first target feature, the second target feature and the aggregation parameter matrix to obtain an aggregated feature.

7. The method according to claim 6, characterized in that The performing feature aggregation processing according to the first target feature, the second target feature and the aggregation parameter matrix to obtain an aggregated feature includes: generating a feature matrix according to the first target feature and the second target; Calculating the weights corresponding to the elements in each row of the feature matrix according to the elements in each row of the parameter matrix to generate a weight matrix; The aggregated features are obtained according to the feature matrix and the weight matrix.

8. A voice activity detection device, characterized in that: The device comprises: An intermediate feature acquisition module, used to acquire audio data to be detected, and use a first neural network to perform feature extraction on the audio data to be detected to obtain a first intermediate feature; A channel weight calculation module, used to calculate the channel attention weights corresponding to each channel feature of the first intermediate feature respectively as the first channel attention weight by using the channel attention mechanism; a spatial weight calculation module, configured to extract a spatial position relationship between channel features of the first intermediate feature as a first spatial position relationship, and calculate a first spatial position attention map according to the first spatial position relationship; A target feature calculation module, configured to calculate a first target feature according to the first intermediate feature, the first channel attention weight, and the first spatial position attention map; A voice activity detection module is used to perform voice activity detection according to the first target feature.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent digital newspaper automatic abstract and voice interaction news chat method and system thereof

    CN112562669A

  • Voice session segmentation method based on deep learning

    CN113963718A

  • Song searching method and device, equipment, medium and product

    CN114764452A

  • Image retrieval method and device, equipment and storage medium

    CN116010643A

  • Multi-mode audio-visual separation method and system fusing two-channel attention mechanism

    CN116110423A