Voice activity detection method and device, computer equipment and storage medium
By combining the long short-term memory network and the gated recurrent neural network, and using the soft attention weight allocation mechanism for feature fusion, the problem of insufficient voice activity detection accuracy in traditional technology is solved, especially in complex noise environments, which significantly improves the detection effect.
Patent Information
- Application Number
- CN202310337811.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In speech activity detection, the traditional recurrent neural network has a model that is too single and the feature expressions are not diverse enough, resulting in insufficient detection accuracy, especially in the face of non-stationary noise.
Using a method that combines long short-term memory network and gated recurrent neural network, the output of the two is fused through a soft attention weight distribution mechanism to diversify and weight the feature expression, thereby improving the accuracy of speech activity detection.
Through feature fusion and weight allocation, the diversity and accuracy of feature expressions are improved, and the accuracy of voice activity detection is improved, especially the performance in complex environments such as vehicle noise.
Smart Images

Figure CN118737205A_ABST
Abstract
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 intelligent voice technology. 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 characteristics. At the same time, the diversity of noise also 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 the model being too single and the expression of features not being diverse enough. 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:
[0007] Acquiring acoustic features of each audio frame of the audio sampling data;
[0008] According to the acoustic features and the pre-trained long short-term memory network, the first tensor is obtained;
[0009] According to the acoustic features and the pre-trained gated recurrent neural network, a second tensor is obtained;
[0010] The first tensor and the second tensor are fused based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and
[0011] Perform voice activity detection based on the fused tensor.
[0012] In some embodiments, the first tensor and the second tensor are fused based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion, including: performing in-place addition processing on the first tensor and the second tensor to obtain a third tensor; performing global pooling processing on the third tensor to obtain a pooled output; performing convolution transformation processing on the pooled output through two grouped convolution layers to obtain a convolution output; obtaining a fusion weight based on the convolution output and the soft attention weight allocation mechanism; performing weighted sum processing on the first tensor, the second tensor and the fusion weight to obtain a fused tensor.
[0013] In some embodiments, the third tensor is globally pooled to obtain a pooled output, including: obtaining a global feature map of the third tensor, determining the height and width of the global feature map; and performing global pooling according to the height, width and the third tensor to obtain a pooled output.
[0014] In some embodiments, a fusion weight is obtained according to the convolution output and the soft attention weight allocation mechanism, including: inputting the convolution output as input to the normalized activation function layer; normalizing the convolution output based on the normalized activation function layer, the soft attention mechanism and the exponential function; and obtaining the fusion weight.
[0015] In some embodiments, a first tensor is obtained based on acoustic features and a pre-trained long short-term memory network, including: inputting the acoustic features into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and expanding the output tensor according to a preset batch size, sequence length, and hidden layer dimension to obtain the first tensor.
[0016] In some embodiments, a second tensor is obtained based on acoustic features and a pre-trained gated recurrent neural network, including: inputting the acoustic features into the gated recurrent neural network to obtain an output tensor output by the gated recurrent neural network, and expanding the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a second tensor.
[0017] In some embodiments, voice activity detection is performed based on the fused tensor, including: dimensionality compression processing on the fused tensor; performing fully connected layer mapping and normalization processing on the dimensionality compressed fused tensor to obtain a probability for determining whether each audio frame is a voice frame; and voice activity detection is performed based on the probability.
[0018] In some embodiments, the method also includes: obtaining vehicle noise, the vehicle noise including at least one of the noise when the vehicle is driving on a road with the windows open, the noise when the vehicle is driving on a road with the windows closed, the noise when the vehicle is in a parking lot environment with the windows open, and the noise when the vehicle is in a parking lot environment with the windows closed; generating an audio sample set based on the vehicle noise; optimizing the parameters of the long short-term memory network and the gated recurrent neural network using the audio sample set and minimizing the cross-entropy loss function; and training the long short-term memory network and the gated recurrent neural network using the audio sample set and an adaptive torque estimation optimization algorithm.
[0019] A voice activity detection device, the device comprising:
[0020] An acoustic feature acquisition module, used to acquire acoustic features of each audio frame of the audio sample;
[0021] A first tensor acquisition module, used for obtaining a first tensor according to acoustic features and a pre-trained long short-term memory network;
[0022] A second tensor acquisition module, used for obtaining a second tensor according to acoustic features and a pre-trained gated recurrent neural network;
[0023] A tensor fusion module, used for fusing the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and
[0024] The voice activity detection module is used to detect voice activities based on the fused tensor.
[0025] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned voice activity detection methods when executing the computer program.
[0026] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any of the above-mentioned voice activity detection methods when executed by a processor.
[0027] The above-mentioned voice activity detection method, apparatus, computer equipment and storage medium perform feature processing on the acoustic features of each audio frame of the audio sampling data through a long short-term memory network and a gated recurrent neural network respectively, and then fuse the processing structures of the two different neural networks, and further combine the soft attention mechanism to realize the reasonable allocation of feature weights, thereby realizing the diversification of feature expression and weighting of important features. Therefore, the fused tensor is used for the detection of voice activity, which can achieve the purpose of improving the accuracy of voice activity detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1is a flowchart of a voice activity detection method in some embodiments;
[0029] Figure 2 A flowchart of a step of fusing a first tensor and a second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion in some embodiments;
[0030] Figure 3 A schematic diagram of a model structure of voice activity detection based on a hybrid neural network structure in some embodiments;
[0031] Figure 4 is a structural block diagram of a voice activity detection device in some embodiments;
[0032] Figure 5 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION
[0033] 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.
[0034] The voice activity detection method provided 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 a 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 vehicle-mounted terminal, a smart phone, a smart speaker, a personal computer, a tablet computer, 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.
[0035] In some embodiments, Figure 1 As shown, a voice activity detection method is provided, which is described by taking the method applied to a vehicle-mounted terminal as an example, and includes the following steps:
[0036] Step S102: Acquire the acoustic features of each audio frame of the audio sampling data.
[0037] The audio sampling data refers to data sampled from the audio to be detected, and the audio to be detected may be real-time collected or pre-recorded audio. The acoustic feature refers to a feature containing acoustic information.
[0038] Specifically, the vehicle-mounted terminal can perform voice signal processing on the audio samples, for example, it can perform voice framing and other processing to obtain at least one audio frame, and then extract acoustic features from each audio frame to obtain acoustic features corresponding to each audio frame.
[0039] In some embodiments, obtaining the acoustic features of each audio frame of the audio sampling data includes: obtaining the audio sampling data; dividing the audio sampling data into frames to obtain at least one audio frame; and extracting features from each audio frame to obtain the acoustic features corresponding to each audio frame.
[0040] Step S104: Obtain a first tensor according to the acoustic features and the pre-trained long short-term memory network.
[0041] Among them, the Long Short Term Memory (LSTM) network is a time recursive neural network. The first tensor refers to the output tensor obtained after the acoustic feature is input into the pre-trained Long Short Term Memory network.
[0042] Specifically, a two-layer long short-term memory network can be constructed and trained, and the acoustic features can be converted into the first tensor through the trained long short-term memory network. For the training of the long short-term memory network, for example, an audio sample set generated based on vehicle noise can be used for deep learning training based on a neural network.
[0043] In some embodiments, a first tensor is obtained based on acoustic features and a long short-term memory network, including: inputting the acoustic features into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and expanding the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain the first tensor.
[0044] Exemplarily, the acoustic features are input into a constructed and trained two-layer long short-term memory network, and the tensor output by the long short-term memory network is dimensionally expanded. The long short-term memory network is dimensionally expanded by the preset batch size (batch_size), sequence length (seq_len), and hidden layer dimension (hidden_dim) to match the dimensional requirements of subsequent calculations. For example, a two-layer LSTM structure network is constructed, and the tensor output by the LSTM is dimensionally expanded to obtain X, whose shape is [batch_size, 1, seq_len, hidden_dim], where batch_size is the batch size, seq_len is the sequence length, and hidden_dim is the dimension of the hidden layer.
[0045] Step S106: Obtain a second tensor based on the acoustic features and the pre-trained gated recurrent neural network.
[0046] Among them, the gated recurrent neural network (GRU) can better capture the dependencies with large time step distances in the time series, and it controls the flow of information through learnable gates. The second tensor refers to the output tensor obtained after inputting the acoustic features into the pre-trained gated recurrent neural network.
[0047] Specifically, a two-layer GRU network can be constructed and trained, and the acoustic features can be converted into a second tensor through the trained GRU network. For the pre-training of the GRU network, for example, an audio sample set generated based on vehicle noise can be used for deep learning training based on a neural network.
[0048] In some embodiments, a second tensor is obtained based on acoustic features and a pre-trained gated recurrent neural network, including: inputting the acoustic features into the gated recurrent neural network to obtain an output tensor output by the gated recurrent neural network, and expanding the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a second tensor.
[0049] Exemplarily, the acoustic features are input into a trained two-layer GRU network, and the tensor output by the GRU network is dimensionally expanded. The GRU network is dimensionally expanded by the preset batch size (batch_size), sequence length (seq_len), and hidden layer dimension (hidden_dim) to match the dimensional requirements of subsequent calculations. For example, a structural model of a two-layer GRU network is constructed, and the tensor output by the GRU network is dimensionally expanded to obtain Y, whose shape is [batch_size, 1, seq_len, hidden_dim], where batch_size is the batch size, seq_len is the sequence length, and hidden_dim is the dimension of the hidden layer.
[0050] Step S108: Fuse the first tensor and the second tensor based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion.
[0051] In this step, the first tensor and the second tensor can be fused, and the fused tensor can be weighted based on the soft attention weight allocation mechanism to improve the diversity and accuracy of feature expression.
[0052] Step S110: Detect voice activity based on the fused tensor.
[0053] In this step, voice activity detection can be performed based on the fused tensor after feature fusion, that is, whether the audio frame is a frame containing voice activity can be determined based on the fused tensor.
[0054] The above-mentioned voice activity detection method processes the acoustic features of each audio frame of the audio sampling data through a long short-term memory network and a gated recurrent neural network respectively, and then fuses the processing structures of the two different neural networks, and further combines the soft attention mechanism to achieve a reasonable allocation of feature weights, thereby achieving diversified feature expression and weighting important features. Therefore, the fused tensor is used for voice activity detection, which can achieve the purpose of improving the accuracy of voice activity detection.
[0055] In some embodiments, reference may be made to Figure 2 As shown, Figure 2 A flow chart of the steps of fusing the first tensor and the second tensor based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion in some embodiments is shown. The steps may specifically include:
[0056] Step S202: perform co-location addition processing on the first tensor and the second tensor to obtain a third tensor.
[0057] In this step, the tensors output and expanded by the long short-term memory network and the gated recurrent neural network can be used as inputs to perform a co-location addition operation. For example, the formula can be referred to as follows:
[0058] Z=X+Y
[0059] Among them, X is the first tensor, Y is the second tensor, and Z is the third tensor.
[0060] Step S204: perform global pooling processing on the third tensor to obtain a pooling output.
[0061] In this step, the global feature information of the third tensor can be compressed based on the global feature map and through global pooling processing, so as to emphasize important information.
[0062] In some embodiments, the third tensor is globally pooled to obtain a pooled output, including: obtaining a global feature map of the third tensor, determining the height and width of the global feature map; and performing global pooling according to the height, width and the third tensor to obtain a pooled output.
[0063] For example, the output of the previous step is used as input for global pooling processing, and the formula is as follows:
[0064]
[0065] Among them, H and W represent the height and width of the global feature map, which are used to indicate the size of the global feature map; s represents the pooling output.
[0066] Step S206: The pooled output is subjected to convolution transformation processing of two grouped convolution layers to obtain a convolution output.
[0067] In this step, the result of global pooling processing (pooling output) can be used as input, and then convolution transformation is performed through two grouped convolution layers to obtain the convolution output g k (s), where k is the index of the algorithm.
[0068] Step S208: Obtain fusion weights based on the convolution output and the soft attention weight allocation mechanism.
[0069] In this step, the convolution output g can be assigned to k (s) is used as the input of the normalized activation function layer to obtain the weight distribution α of the soft attention mechanism, which is also the fusion weight.
[0070] In some embodiments, a fusion weight is obtained according to the convolution output and the soft attention weight allocation mechanism, including: inputting the convolution output as input to the normalized activation function layer; normalizing the convolution output based on the normalized activation function layer, the soft attention mechanism and the exponential function; and obtaining the fusion weight.
[0071] For example, the r-Softmax layer can be used, where r and k represent the same meaning, that is, the index of the algorithm. k (s) is used as input, α is the weight distribution of the soft attention mechanism, that is, the fusion weight, and its calculation formula can be referred to as follows:
[0072]
[0073] Step S210: Perform weighted sum processing on the first tensor, the second tensor and the fusion weight to obtain a fused tensor.
[0074] In this step, the first tensor X and the second tensor Y can be used as inputs and weighted summed with the fusion weight α to obtain a fusion tensor. The formula can be referred to as follows:
[0075] H=X·α 1 +Y·α 2
[0076] Through the above embodiments, the output tensors of different recurrent neural networks can be better fused. Different recurrent neural networks have different angles of feature extraction. Therefore, the diversity of feature expression can be improved through a mixed neural network, and the fusion weight is calculated based on the soft attention mechanism. The fused tensor is further weighted, thereby enriching the feature expression and improving the accuracy of feature expression.
[0077] In some embodiments, further, voice activity detection is performed based on the fused tensor, including: dimensional compression of the fused tensor; fully connected layer mapping and normalization of the dimensionally compressed fused tensor to obtain a probability for determining whether each audio frame is a voice frame; and voice activity detection is performed based on the probability.
[0078] In this embodiment, the fused tensor can be dimensionally compressed. In order to maintain the consistency of shape, the fused tensor H generated by the weighting of the soft attention mechanism is dimensionally compressed, and its shape can be expressed as [batch_size, seq_len, hidden_dim]. Then, after a fully connected layer and a Softmax layer, a probability value indicating that the audio frame is a frame containing voice activity is obtained, and then, voice activity detection is performed by judging the size of the probability value and a preset threshold.
[0079] Exemplarily, if the probability value is greater than a preset threshold, the audio frame is determined to be a frame containing voice activity; if the probability value is less than the preset threshold, the audio frame is determined to be a frame not containing voice activity.
[0080] More specifically, see Figure 3 As shown, Figure 3 The model structure diagram of voice activity detection based on hybrid neural network structure in some embodiments is shown. Figure 3 The ⊕ in the equation indicates that tensors are added together. Represents the multiplication operation between tensors.
[0081] In some embodiments, the method also includes: obtaining vehicle noise, the vehicle noise including at least one of the noise when the vehicle is driving on a road with the windows open, the noise when the vehicle is driving on a road with the windows closed, the noise when the vehicle is in a parking lot environment with the windows open, and the noise when the vehicle is in a parking lot environment with the windows closed; generating an audio sample set based on the vehicle noise; optimizing the parameters of the long short-term memory network and the gated recurrent neural network using the audio sample set and minimizing the cross-entropy loss function; and training the long short-term memory network and the gated recurrent neural network using the audio sample set and an adaptive torque estimation optimization algorithm.
[0082] In this embodiment, the constructed LSTM network and GRU network can be pre-trained through the above-mentioned training method, thereby improving the adaptability of the entire detection model to the in-vehicle voice activity, and further improving the accuracy of voice activity detection.
[0083] It should be understood that although Figure 1 and Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0084] In some embodiments, Figure 4 As shown, a voice activity detection device is provided, comprising: an acoustic feature acquisition module 402, a first tensor acquisition module 404, a second tensor acquisition module 406, a tensor fusion module 408 and a voice activity detection module 410, wherein:
[0085] An acoustic feature acquisition module 402, used to acquire acoustic features of each audio frame of the audio sample;
[0086] A first tensor acquisition module 404 is used to obtain a first tensor according to the acoustic features and the pre-trained long short-term memory network;
[0087] A second tensor acquisition module 406, configured to obtain a second tensor according to the acoustic features and a pre-trained gated recurrent neural network;
[0088] A tensor fusion module 408 is used to fuse the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and
[0089] The voice activity detection module 410 is used to detect voice activity according to the fused tensor.
[0090] In some embodiments, the tensor fusion module 408 performs in-place addition processing on the first tensor and the second tensor to obtain a third tensor; performs global pooling processing on the third tensor to obtain a pooled output; performs convolution transformation processing on the pooled output through two grouped convolution layers to obtain a convolution output; obtains a fusion weight based on the convolution output and the soft attention weight allocation mechanism; performs weighted sum processing on the first tensor, the second tensor and the fusion weight to obtain a fused tensor.
[0091] In some embodiments, the tensor fusion module 408 obtains the global feature map of the third tensor, determines the height and width of the global feature map, and performs global pooling processing according to the height, width and the third tensor to obtain a pooling output.
[0092] In some embodiments, the tensor fusion module 408 inputs the convolution output as input to the normalized activation function layer; normalizes the convolution output based on the normalized activation function layer, the soft attention mechanism, and the exponential function; and obtains the fusion weight.
[0093] In some embodiments, the first tensor acquisition module 404 inputs the acoustic features into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and expands the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a first tensor.
[0094] In some embodiments, the second tensor acquisition module 406 inputs the acoustic features into the gated recurrent neural network to obtain an output tensor output by the gated recurrent neural network, and expands the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a second tensor.
[0095] In some embodiments, the voice activity detection module 410 performs dimension compression processing on the fused tensor; performs fully connected layer mapping and normalization processing on the fused tensor after dimension compression processing to obtain a probability for determining whether each audio frame is a voice frame; and performs voice activity detection based on the probability.
[0096] In some embodiments, the voice activity detection module 410 is also used to obtain vehicle noise, which includes at least one of the noise when the vehicle opens the window while driving on a road, the noise when the vehicle closes the window while driving on a 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; generate an audio sample set based on the vehicle noise; use the audio sample set to optimize the parameters of the long short-term memory network and the gated recurrent neural network according to the minimization of the cross-entropy loss function; and use the audio sample set and the adaptive torque estimation optimization algorithm to train the long short-term memory network and the gated recurrent neural network.
[0097] 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.
[0098] In some embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5As 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.
[0099] Those skilled in the art will understand that Figure 5 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.
[0100] 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: acquiring acoustic features of each audio frame of audio sampling data; obtaining a first tensor based on the acoustic features and a pre-trained long short-term memory network; obtaining a second tensor based on the acoustic features and a pre-trained gated recurrent neural network; fusing the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and detecting voice activity based on the fused tensor.
[0101] In some embodiments, when the processor executes a computer program to fuse the first tensor and the second tensor based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion, the following steps are specifically implemented: the first tensor and the second tensor are added in-place to obtain a third tensor; the third tensor is globally pooled to obtain a pooled output; the pooled output is subjected to convolution change processing of two grouped convolution layers to obtain a convolution output; according to the convolution output and the soft attention weight allocation mechanism, a fusion weight is obtained; the first tensor, the second tensor and the fusion weight are weighted summed to obtain a fused tensor.
[0102] In some embodiments, when the processor executes a computer program to perform global pooling processing on the third tensor to obtain a pooled output, the following steps are specifically implemented: obtaining a global feature map of the third tensor and determining the height and width of the global feature map; performing global pooling processing based on the height, width and the third tensor to obtain a pooled output.
[0103] In some embodiments, when the processor executes a computer program to obtain the fusion weight based on the convolution output and the soft attention weight allocation mechanism, the following steps are specifically implemented: the convolution output is input as the input to the normalized activation function layer; the convolution output is normalized based on the normalized activation function layer, the soft attention mechanism and the exponential function; and the fusion weight is obtained.
[0104] In some embodiments, when the processor executes a computer program to obtain the first tensor based on the acoustic features and a pre-trained long short-term memory network, the following steps are specifically implemented: the acoustic features are input into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and the output tensor is expanded according to a preset batch size, sequence length, and dimension of the hidden layer to obtain the first tensor.
[0105] In some embodiments, when the processor executes a computer program to obtain a second tensor based on acoustic features and a pre-trained gated recurrent neural network, the following steps are specifically implemented: inputting the acoustic features into the gated recurrent neural network to obtain an output tensor output by the gated recurrent neural network, and expanding the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a second tensor.
[0106] In some embodiments, when the processor executes a computer program to implement voice activity detection based on a fused tensor, the following steps are specifically implemented: dimensionally compressing the fused tensor; performing fully connected layer mapping and normalization on the fused tensor after dimension compression to obtain a probability for determining whether each audio frame is a voice frame; and performing voice activity detection based on the probability.
[0107] In some embodiments, when the processor executes the computer program, the following steps are also implemented: obtaining vehicle noise, the vehicle noise including at least one of the noise when the vehicle is driving on a road with the windows open, the noise when the vehicle is driving on a road with the windows closed, the noise when the vehicle is in a parking lot environment with the windows open, and the noise when the vehicle is in a parking lot environment with the windows closed; generating an audio sample set based on the vehicle noise; optimizing the parameters of the long short-term memory network and the gated recurrent neural network using the audio sample set and minimizing the cross-entropy loss function; and training the long short-term memory network and the gated recurrent neural network using the audio sample set and an adaptive torque estimation optimization algorithm.
[0108] 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 acoustic features of each audio frame of audio sampling data; obtaining a first tensor based on the acoustic features and a pre-trained long short-term memory network; obtaining a second tensor based on the acoustic features and a pre-trained gated recurrent neural network; fusing the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and detecting voice activity based on the fused tensor.
[0109] In some embodiments, when a computer program is executed by a processor to fuse the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion, the following steps are specifically implemented: the first tensor and the second tensor are added in-place to obtain a third tensor; the third tensor is globally pooled to obtain a pooled output; the pooled output is subjected to a convolution change process of two grouped convolution layers to obtain a convolution output; according to the convolution output and the soft attention weight allocation mechanism, a fusion weight is obtained; the first tensor, the second tensor and the fusion weight are weighted summed to obtain a fused tensor.
[0110] In some embodiments, the computer program is executed by the processor to perform global pooling processing on the third tensor to obtain the pooled output, and the following steps are specifically implemented: obtaining the global feature map of the third tensor, determining the height and width of the global feature map; performing global pooling processing based on the height, width and the third tensor to obtain the pooled output.
[0111] In some embodiments, when a computer program is executed by a processor to obtain a fusion weight based on the convolution output and the soft attention weight allocation mechanism, the following steps are specifically implemented: the convolution output is input as input to the normalized activation function layer; the convolution output is normalized based on the normalized activation function layer, the soft attention mechanism and the exponential function; and the fusion weight is obtained.
[0112] In some embodiments, when a computer program is executed by a processor to obtain a first tensor based on acoustic features and a pre-trained long short-term memory network, the following steps are specifically implemented: inputting the acoustic features into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and expanding the output tensor according to a preset batch size, sequence length, and hidden layer dimension to obtain a first tensor.
[0113] In some embodiments, when a computer program is executed by a processor to obtain a second tensor based on acoustic features and a pre-trained gated recurrent neural network, the following steps are specifically implemented: inputting the acoustic features into the gated recurrent neural network to obtain an output tensor of the gated recurrent neural network output, and expanding the output tensor according to a preset batch size, sequence length, and dimension of the hidden layer to obtain a second tensor.
[0114] In some embodiments, when a computer program is executed by a processor to implement voice activity detection based on a fused tensor, the following steps are specifically implemented: dimensionally compressing the fused tensor; performing fully connected layer mapping and normalization on the fused tensor after dimension compression to obtain a probability for determining whether each audio frame is a voice frame; and performing voice activity detection based on the probability.
[0115] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented: obtaining vehicle noise, the vehicle noise including at least one of the noise when the vehicle is driving on a road with the windows open, the noise when the vehicle is driving on a road with the windows closed, the noise when the vehicle is in a parking lot environment with the windows open, and the noise when the vehicle is in a parking lot environment with the windows closed; generating an audio sample set based on the vehicle noise; optimizing the parameters of the long short-term memory network and the gated recurrent neural network using the audio sample set and minimizing the cross-entropy loss function; and training the long short-term memory network and the gated recurrent neural network using the audio sample set and an adaptive torque estimation optimization algorithm.
[0116] Those skilled in the art can understand that all or part of the processes in the methods for implementing the above embodiments 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 methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present 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).
[0117] 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.
[0118] In addition, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the characters in this article generally indicate that the associated objects before and after are in an "or" relationship.
[0119] 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.
[0120] 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: Acquiring acoustic features of each audio frame of the audio sampling data; Obtaining a first tensor according to the acoustic features and a pre-trained long short-term memory network; Obtaining a second tensor according to the acoustic features and a pre-trained gated recurrent neural network; The first tensor and the second tensor are fused based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; as well as Voice activity is detected according to the fused tensor.
2. The method according to claim 1, characterized in that The first tensor and the second tensor are fused based on the soft attention weight allocation mechanism to obtain a fused tensor after feature fusion, including: Performing a co-local addition process on the first tensor and the second tensor to obtain a third tensor; Performing global pooling processing on the third tensor to obtain a pooled output; The pooled output is subjected to convolution transformation processing of two grouped convolution layers to obtain a convolution output; Obtaining a fusion weight according to the convolution output and the soft attention weight allocation mechanism; The first tensor, the second tensor, and the fusion weight are weighted summed to obtain the fusion tensor.
3. The method according to claim 2, characterized in that The performing global pooling processing on the third tensor to obtain a pooling output includes: Obtaining a global feature map of the third tensor, and determining a height and a width of the global feature map; Perform global pooling processing according to the height, the width, and the third tensor to obtain the pooling output.
4. The method according to claim 2, characterized in that: The step of obtaining a fusion weight according to the convolution output and the soft attention weight allocation mechanism includes: Input the convolution output as input to the normalized activation function layer; The convolution output is normalized based on the normalized activation function layer, the soft attention mechanism and the exponential function; and the fusion weight is obtained.
5. The method according to claim 1, characterized in that The first tensor is obtained according to the acoustic features and the pre-trained long short-term memory network, including: Inputting the acoustic features into the long short-term memory network to obtain an output tensor output by the long short-term memory network, and performing expansion processing on the output tensor according to a preset batch size, sequence length, and dimension of a hidden layer to obtain the first tensor; and / or The second tensor is obtained according to the acoustic features and the pre-trained gated recurrent neural network, including: The acoustic features are input into a gated recurrent neural network to obtain an output tensor output by the gated recurrent neural network, and the output tensor is expanded according to a preset batch size, sequence length, and dimension of a hidden layer to obtain the second tensor.
6. The method according to any one of claims 1 to 5, characterized in that: The detecting of voice activity according to the fused tensor comprises: Performing dimension compression processing on the fused tensor; Performing full connection layer mapping and normalization processing on the fusion tensor after dimension compression processing to obtain a probability for determining whether each of the audio frames is a speech frame; Voice activity detection is performed according to the probability.
7. The method according to any one of claims 1 to 5, characterized in that: Also includes: Acquire vehicle noise, where the vehicle noise includes at least one of noise when the vehicle is driving on a road with the windows open, noise when the vehicle is driving on a road with the windows closed, noise when the vehicle is in a parking lot with the windows open, and noise when the vehicle is in a parking lot with the windows closed; generating an audio sample set according to the vehicle noise; Utilizing the audio sample set and minimizing a cross entropy loss function, the parameters of the long short-term memory network and the gated recurrent neural network are optimized; The long short-term memory network and the gated recurrent neural network are trained using the audio sample set and an adaptive moment estimation optimization algorithm.
8. A voice activity detection device, characterized in that: The device comprises: An acoustic feature acquisition module, used to acquire acoustic features of each audio frame of the audio sample; A first tensor acquisition module, used to obtain a first tensor according to the acoustic features and a pre-trained long short-term memory network; A second tensor acquisition module, used to obtain a second tensor according to the acoustic features and a pre-trained gated recurrent neural network; A tensor fusion module, configured to fuse the first tensor and the second tensor based on a soft attention weight allocation mechanism to obtain a fused tensor after feature fusion; and A voice activity detection module is used to detect voice activity according to the fused tensor.
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
Method for image-text cross-mode sentiment classification based on compact bilinear fusion
CN107066583A
Voice endpoint detection method and device, readable storage medium and electronic equipment
CN111916061A
Voice endpoint detection method and device, electronic equipment and storage medium
CN113345423A
Voice emotion recognition method and device based on artificial intelligence, equipment and medium
CN115312033A
