Voice activity detection method and apparatus, and electronic device and readable storage medium
By using neural network models in electronic devices to perform high-level feature extraction and timing modeling of audio signals, the problem of poor voice activity detection accuracy in low signal-to-noise ratio environments is solved, and higher robustness and discrimination are achieved.
Patent Information
- Application Number
- PCT/CN2024/079075
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2024-02-28
- Publication Date
- 2024-09-12
AI Technical Summary
In a low signal-to-noise ratio environment, the accuracy of voice activity detection by electronic equipment is poor, mainly due to the low discriminability of time domain features and frequency domain features, which cannot effectively distinguish voice signals and non-voice signals.
By obtaining the characteristics of audio signals and inputting them into the multi-layer network structure of the neural network model for high-level feature extraction and timing modeling, higher-dimensional feature matrices and eigenvalues are generated to improve the distinction between speech signals and non-speech signals. sex.
It improves the accuracy of speech activity detection, can accurately distinguish speech signals and non-speech signals in low signal-to-noise ratio environments, and enhances robustness and discrimination.
Smart Images

Figure CN2024079075_12092024_PF_FP_ABST
Abstract
Description
Voice activity detection method, device, electronic device and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 6, 2023, with application number 202310205479.1 and application name “Voice Activity Detection Method, Device, Electronic Device and Readable Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application belongs to the field of audio processing technology, and specifically relates to a voice activity detection method, device, electronic device and readable storage medium. Background Art
[0003] Electronic devices can perform voice activity detection on audio signals to distinguish voice signals from non-voice signals (such as noise, silence, etc.) from the audio signals. Electronic devices can then encode and transmit only the voice signals, reducing the amount of audio data to be transmitted and thereby improving the utilization of the transmission channel. In related technologies, electronic devices can extract features of audio signals (such as time domain features and frequency domain features) and distinguish voice signals from non-voice signals based on these features.
[0004] Because electronic devices are in a low signal-to-noise ratio environment, the time domain characteristics of the audio signal are greatly affected by noise. This may cause the electronic device to be unable to distinguish between speech signals and non-speech signals based on the characteristics, resulting in poor accuracy in voice activity detection by the electronic device.
[0005] Summary of the Invention
[0006] The purpose of the embodiments of the present application is to provide a voice activity detection method, apparatus, electronic device, and readable storage medium, which can solve the problem of poor accuracy in voice activity detection by electronic devices.
[0007] In a first aspect, an embodiment of the present application provides a voice activity detection method, the method comprising: obtaining target audio features of a target audio signal; inputting the target audio features into a first network layer of a target model to obtain a first feature map, the first feature map comprising N first channels, each first channel comprising a target feature matrix, each target feature matrix being obtained by performing high-level feature extraction on the target audio features by the first network layer, where N is a positive integer greater than 1; inputting the first feature map into a second network layer of the target model to obtain a second feature map, the second feature map comprising N second channels, each second channel corresponding to a first channel, each second channel comprising a target feature value, each target feature value being obtained by performing time series modeling on the corresponding target feature matrix by the second network layer, and each target feature value being used to characterize the contextual features of the corresponding target feature matrix; and outputting a voice activity detection category according to the second feature map.
[0008] In a second aspect, an embodiment of the present application provides a voice activity detection device, which includes: an acquisition module, a processing module, and an output module; the acquisition module is used to acquire target audio features of a target audio signal. The processing module is used to input the target audio features acquired by the acquisition module into the first network layer of the target model to obtain a first feature map, wherein the first feature map includes N first channels, each first channel includes a target feature matrix, and each target feature matrix is obtained by the first network layer performing high-level feature extraction on the target audio features, where N is a positive integer greater than 1; and the first feature map is input into the second network layer of the target model to obtain a second feature map, wherein the second feature map includes N second channels, each second channel corresponds to a first channel, and each second channel includes a target feature value, each target feature value is obtained by the second network layer performing time series modeling on the corresponding target feature matrix, and each target feature value is used to characterize the contextual features of the corresponding target feature matrix. The output module is used to output a voice activity detection category based on the second feature map obtained after input from the processing module.
[0009] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0010] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0011] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0012] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method described in the first aspect.
[0013] In an embodiment of the present application, the electronic device can first obtain the target audio features of the target audio signal, and then input the target audio features into the first network layer of the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices to obtain a first feature map (the first feature map includes N first channels, and each first channel includes a target feature matrix respectively). In this way, the electronic device can input the first feature map into the second network layer of the target model, so that the second network layer can perform time series modeling on each target feature matrix of the first feature map to obtain N target eigenvalues (each target eigenvalue is used to characterize the contextual features of the corresponding target feature matrix) to obtain a second feature map (the second feature map includes N second channels, and each second channel includes a target eigenvalue respectively). Therefore, the electronic device can output a voice activity detection category based on the second feature map. Since the electronic device can input the target audio features of the target audio signal into the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices of higher dimensions, that is, obtain N target feature matrices with higher robustness and discrimination, and enable the second network layer to perform time series modeling on the N target feature matrices to obtain N target feature values for characterizing the context features of the N target feature matrices, that is, obtain N target feature values with higher robustness and discrimination. In this way, the electronic device can accurately distinguish the target audio signal as a speech signal or a non-speech signal based on the N target feature values with higher robustness and discrimination, rather than distinguishing the target audio signal as a speech signal or a non-speech signal based on time domain features and frequency domain features with lower robustness and discrimination. In this way, the accuracy of voice activity detection by the electronic device can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG1 is a flow chart of a voice activity detection method according to an embodiment of the present application;
[0015] FIG2 is a second flowchart of the voice activity detection method provided in an embodiment of the present application;
[0016] FIG3 is a schematic diagram of a network structure of a target model provided in an embodiment of the present application;
[0017] FIG4 is a schematic diagram of the network structure of any residual network unit of the first residual network provided in an embodiment of the present application;
[0018] FIG5 is a second schematic diagram of the network structure of the target model provided in an embodiment of the present application;
[0019] FIG6 is a third flowchart of the voice activity detection method provided in an embodiment of the present application;
[0020] FIG7 is a third schematic diagram of the network structure of the target model provided in an embodiment of the present application;
[0021] FIG8 is a fourth flowchart of the voice activity detection method provided in an embodiment of the present application;
[0022] FIG9 is a fifth flowchart of the voice activity detection method provided in an embodiment of the present application;
[0023] FIG10 is a schematic diagram of the structure of a voice activity detection device provided in an embodiment of the present application;
[0024] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0025] FIG12 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0027] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0028] The following describes in detail the voice activity detection method, device, electronic device, and readable storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0029] Typically, electronic devices can perform voice activity detection (VAD) on audio signals to distinguish voice signals from non-voice (such as noise, silence, etc.) signals from the audio signals, so that the electronic devices can only encode and transmit the voice signals to reduce the amount of audio data to be transmitted, thereby improving the utilization rate of the transmission channel. In related technologies, electronic devices can extract the characteristics of the audio signal to be transmitted (such as time domain characteristics and frequency domain characteristics), and use a VAD algorithm to calculate an audio feature value based on the time domain characteristics and frequency domain characteristics, and distinguish the audio signal as a voice signal or a non-voice signal based on the size relationship between the audio feature value and the preset value. However, since the time domain characteristics and frequency domain characteristics of the audio signal are poorly distinguishable, and the VAD algorithm makes a stationary assumption on the noise, when the electronic device is in an environment with a low signal-to-noise ratio, the time domain characteristics of the audio signal are greatly affected by the noise, and the VAD algorithm cannot accurately calculate the audio feature value, which may cause the electronic device to be unable to distinguish between voice signals and non-voice signals based on the time domain characteristics and frequency domain characteristics of the audio signal. This may result in the electronic device being unable to distinguish whether the audio signal is a speech signal or a non-speech signal based on the time domain characteristics and frequency domain characteristics of the audio signal, thereby resulting in poor accuracy in voice activity detection by the electronic device.
[0030] However, in an embodiment of the present application, the electronic device may first obtain the audio features of the audio signal to be transmitted (e.g., filter bank (Fbank) features), and then input the Fbank features into the first network layer of the neural network model, so that the first network layer may perform high-level feature extraction on the Fbank features to obtain multiple feature matrices to obtain a feature graph (each channel in the channels included in the feature graph includes a feature matrix), and input the feature graph into the second network layer of the neural network model, so that the second network layer may perform time series modeling on the feature graph to obtain multiple eigenvalues (each eigenvalue is used to characterize the contextual features of the corresponding feature matrix) to obtain another feature graph (each channel in the channels included in the another feature graph includes an eigenvalue), so that the electronic device may output a voice activity detection category based on the another feature graph. It can be understood that since the electronic device can input the Fbank features of the audio signal to be transmitted into the neural network model, so that the first network layer can perform high-level feature extraction on the Fbank features to obtain multiple feature matrices of higher dimensions, that is, multiple feature matrices with higher robustness and discrimination, and the second network layer can perform time series modeling on the multiple feature matrices to obtain multiple eigenvalues for characterizing the contextual features of the multiple feature matrices, that is, multiple eigenvalues with higher robustness and discrimination, the electronic device can accurately distinguish the audio signal as a speech signal or a non-speech signal based on the multiple eigenvalues with higher robustness and discrimination, instead of using the VAD algorithm that makes a stationary assumption on the noise, and calculating based on the time domain features and frequency domain features with lower robustness and discrimination. In this way, the accuracy of voice activity detection by the electronic device can be improved.
[0031] Figure 1 shows a flow chart of a voice activity detection method provided by an embodiment of the present application. As shown in Figure 1 , the voice activity detection method provided by an embodiment of the present application may include the following steps 101 to 104 .
[0032] Step 101: The electronic device obtains a target audio feature of a target audio signal.
[0033] In one scenario, when an electronic device is to transmit an audio signal, the electronic device may determine a target audio signal from the audio signal and obtain a target audio feature of the target audio signal.
[0034] In another scenario, when an electronic device needs to perform speech recognition on an audio signal, the electronic device may determine a target audio signal from the audio signal and obtain a target audio feature of the target audio signal.
[0035] It can be understood that the target audio signal may be an audio signal in a certain audio signal to be transmitted (or an audio signal for which speech recognition is to be performed by an electronic device).
[0036] Optionally, in the embodiment of the present application, the target audio signal may include one frame of audio signal or multiple frames of audio signal.
[0037] In the embodiment of the present application, the target audio feature is used to characterize the audio feature of the target audio signal.
[0038] Optionally, in an embodiment of the present application, the target audio features may include at least one of the following: Fbank features, Mel Frequency Cepstrum Coefficients (MFCC), Perceptual Linear Predictive (PLP) features, Fast Fourier Transform (FFT) spectrum features, etc. It should be noted that those skilled in the art may set the features included in the target audio features as needed, and this application does not limit this.
[0039] Optionally, in an embodiment of the present application, if the target audio signal includes a frame of audio signal, the electronic device can directly extract the audio features of the frame of audio signal to obtain the target audio features, or can extract the audio features of the frame of audio signal and the audio signals adjacent to the frame of audio signal to obtain the target audio features.
[0040] It should be noted that the aforementioned "audio signal adjacent to the audio frame" can be understood as: h frames of audio signal preceding the audio frame in the aforementioned audio signal, and / or p frames of audio signal following the audio frame in the aforementioned audio signal. Both h and p are positive integers.
[0041] Step 102: The electronic device inputs the target audio features into the first network layer of the target model to obtain a first feature map.
[0042] In an embodiment of the present application, the above-mentioned target model may specifically be a neural network model.
[0043] Optionally, in an embodiment of the present application, the first network layer may include at least one of the following: a convolutional layer and a residual network layer. The number of the convolutional layers may be one or more, the number of the residual network layers may be one or more, and the convolutional layer may be a convolutional neural network (CNN) layer.
[0044] Furthermore, when there are multiple convolutional layers, the multiple convolutional layers can be interconnected, and the network hyper-parameters of the multiple convolutional layers can be the same or different. The network hyper-parameters of the convolutional layers can include at least one of the following: the size of the convolution kernel, the number of output channels generated by the convolution, the convolution step size, etc.
[0045] It should be noted that the above “multiple convolutional layers can be connected to each other” can be understood as: the output layer of each convolutional layer is connected to the input layer of the next convolutional layer.
[0046] Exemplarily, if multiple convolutional layers are connected to each other, the output layer of the first convolutional layer in the multiple convolutional layers is connected to the input layer of the second convolutional layer, the output layer of the second convolutional layer is connected to the input layer of the third convolutional layer, and so on.
[0047] It can be understood that the electronic device can perform high-level feature extraction on the target audio features through the convolution layer to obtain higher-dimensional audio features.
[0048] Furthermore, when there are multiple residual network layers, the multiple residual network layers can be interconnected, and the network hyperparameters of the residual network layers can be the same or different. The network hyperparameters of the residual network layer can be at least one of the following: the size of the convolution kernel, the number of output channels generated by the convolution, the stride of the convolution, the dimension of the output features, etc.
[0049] It can be understood that when the network layer of the target model gradually becomes deeper, the target model may experience network degradation during the training process of the target model, resulting in a decrease in the performance of the target model. Therefore, the electronic device can set a residual network layer in the target model so that the residual network layer can solve the problem of network degradation and gradient disappearance during the training process of the target model by establishing a "short-circuit connection" between the front layer (such as the convolution layer) and the back layer (such as the second network layer in the following embodiment), so as to improve the back propagation of the gradient during the training process, thereby improving the training efficiency of the model; and the electronic device can also perform high-level feature extraction on the above-mentioned higher-dimensional audio features through the residual network layer to obtain high-dimensional audio features.
[0050] Optionally, in an embodiment of the present application, the electronic device may use training speech to train the neural network model to obtain a target model.
[0051] Among them, the electronic device can first pre-process the training speech to obtain multiple framed signals, then perform feature extraction on each framed signal to obtain the feature parameters of each framed signal, and use a manual labeling method to obtain a label for each framed signal (the label indicates whether the corresponding framed signal is a speech signal or a non-speech signal). The electronic device can then input the multiple framed signals into a neural network model for training, and use the label of each framed signal as labeled data at the top layer of the neural network model for supervised training, and then update the model parameters of the neural network model through the backpropagation algorithm to obtain the target model.
[0052] In an embodiment of the present application, the above-mentioned first feature map includes N first channels, each of the N first channels includes a target feature matrix, and each of the N target feature matrices is obtained by: the first network layer performs high-level feature extraction on the target audio feature, and N is a positive integer greater than 1.
[0053] It can be understood that the first feature map feature map can be the audio features output by the above-mentioned first network layer, and the target feature matrix included in each first channel of the first feature map is obtained by performing high-level feature extraction on the target audio signal, that is, the target feature matrix included in the N first channels is the high-dimensional audio feature of the target audio signal, that is, the first feature map is the high-dimensional audio feature of the target audio signal.
[0054] The following is an example of the specific structure of the first network layer.
[0055] Optionally, in the embodiment of the present application, the first network layer includes: a CNN layer. Specifically, in conjunction with Figure 1 , as shown in Figure 2 , the step 102 can be implemented by the following steps 102a and 102b.
[0056] Step 102a: The electronic device inputs the target audio features into the CNN layer to obtain a third feature map.
[0057] It can be understood that in this embodiment, the above-mentioned convolutional layer is a CNN layer.
[0058] Furthermore, the CNN layer may be a convolutional layer, and the dimension of the convolutional layer may be at least one dimension.
[0059] Specifically, the CNN layer may be a two-dimensional convolutional layer (Convolutional Two-Dimensional-1, Conv2D-1). Parameters of the CNN layer include the size of the convolution kernel, the number of output channels generated by the convolution, and the convolution step size.
[0060] Specifically, the convolution kernel size of the CNN layer may be 3×3, the number of output channels generated by the convolution of the CNN layer may be 16, and the convolution step size of the CNN layer may be (1,1).
[0061] In an embodiment of the present application, the above-mentioned third feature map includes Q third channels, each of the Q third channels includes a first feature matrix, and each of the Q first feature matrices is obtained by: the CNN layer performs a convolution operation on the target audio feature, and Q is a positive integer greater than 1.
[0062] Furthermore, the elements in each of the Q first characteristic matrices are the same, or the elements in some of the first characteristic matrices are the same, or the elements in each of the first characteristic matrices are different.
[0063] Furthermore, after the electronic device inputs the target audio features into the CNN layer, the electronic device can obtain Q first feature matrices output by the CNN layer, so that the electronic device can respectively set each first feature matrix to correspond to a third channel, thereby obtaining a third feature map.
[0064] It is understood that the number Q of third channels included in the third feature map is the same as the number of output channels generated by the convolution of the CNN layer. For example, Q can be equal to 16.
[0065] For example, assuming that the dimension of the target audio feature is K×8×1 and the number of output channels generated by the convolution of the CNN layer is 16, after the target audio feature is input into the CNN layer, the CNN layer can perform a convolution operation on the K×8×1-dimensional audio feature, and output a K×8×1-dimensional audio feature from the output channel generated by the convolution of the CNN layer, thereby obtaining a K×8×16-dimensional audio feature. The electronic device can then set each K×8×1-dimensional audio feature to correspond to a third channel, thereby obtaining a third feature map.
[0066] Step 102b: The electronic device obtains a first characteristic map according to the third characteristic map.
[0067] Furthermore, the electronic device may directly perform feature extraction on the third feature map to obtain the first feature map. Alternatively, the electronic device may input the third feature map into a residual network layer to obtain the first feature map.
[0068] It can be seen that since the electronic device can input the target audio features into the CNN layer to increase the number of channels corresponding to the target audio features, a third feature map of higher dimension can be obtained, that is, a third feature map with higher robustness can be obtained, so that the electronic device can obtain a first feature map with higher robustness based on the third feature map, and thus can reduce the influence of noise on the first feature map when the electronic device is in an environment with low signal-to-noise ratio. In this way, the electronic device can accurately distinguish between speech signals and non-speech signals based on the first feature map.
[0069] Moreover, the CNN layer has the characteristics of weight sharing and local perception, that is, the CNN layer has the characteristics of translation invariance. Therefore, the robustness of the third feature map can be further improved, that is, the robustness of the first feature map can be further improved.
[0070] Optionally, in the embodiment of the present application, the first network layer further comprises: sequentially connecting at least one residual network layer. Specifically, the step 102b can be implemented by the following step 102b1.
[0071] Step 102b1: The electronic device inputs the third feature map into at least one residual network layer to obtain a first feature map.
[0072] In an embodiment of the present application, the above-mentioned first feature map is obtained by: at least one residual network layer sequentially operating on the third feature map; the network hyperparameters of each residual network layer in the at least one residual network layer are different.
[0073] It can be understood that the electronic device can input the third feature map into the first residual network layer in at least one residual network layer, so that the residual network unit included in the first residual network layer can process the third feature map in turn, and input the processed feature map into the second residual network layer, and so on, thereby obtaining N target feature matrices, and then the electronic device can set each target feature matrix to correspond to a first channel to obtain a first feature map.
[0074] It can be understood that the input layer of the first residual network layer in at least one residual network layer is connected to the output layer of the CNN layer, the output layer of the first residual network layer is connected to the input layer of the second residual network layer, the output layer of the second residual network layer is connected to the input layer of the third residual network layer, and so on.
[0075] For example, FIG3 shows a possible network structure diagram of the target model provided by an embodiment of the present application. Wherein, the target model may include a first network layer and a second network layer, as shown in FIG3 , the first network layer includes a CNN layer (e.g., a two-dimensional convolutional layer 11) and at least one residual network layer (e.g., a residual network layer 12, a residual network layer 13, a residual network layer 14, and a residual network layer 15), the output layer of the two-dimensional convolutional layer 11 is connected to the input layer of the residual network layer 12, the output layer of the residual network layer 12 is connected to the input layer of the residual network layer 13, the output layer of the residual network layer 13 is connected to the input layer of the residual network layer 14, and the output layer of the residual network layer 14 is connected to the input layer of the residual network layer 15, so that the electronic device can input the target audio feature into the two-dimensional convolutional layer 11 to obtain the first feature map output by the output layer of the residual network layer 15.
[0076] Furthermore, for each residual network layer in the at least one residual network layer, a residual network layer may specifically be a Squeeze-and-Excitation (SE)-Residual Networks (ResNet) layer. The residual network layer may include at least two interconnected residual network units.
[0077] The network hyperparameters of the residual network layer and other residual network layers may be different. The other residual network layers are residual network layers other than the residual network layer in at least one residual network layer. The network hyperparameters of the residual networks in the residual network units included in the residual network layer may be the same.
[0078] Exemplarily, assuming that the feature corresponding to the third feature map is H×W×16 (i.e., each third channel includes a first feature matrix (i.e., H×W)), at least one residual network layer includes four residual network layers, and each residual network layer includes two residual network units. Then, the network hyperparameters of each residual network layer in the four residual network layers are different, and the network hyperparameters of the residual network in the residual network unit included in each residual network layer are the same. Specifically, the network hyperparameters of the four residual network layers are shown in Table 1:
[0079] Table 1 Network hyperparameters of residual network layer
[0080] Among them, the input is connected to the output layer of the CCN layer, and the input feature is H×W×16.
[0081] The SE-ResNet-1 is the first residual network layer among the four residual network layers. The input layer of the SE-ResNet-1 is connected to the Input. The SE-ResNet-1 includes two residual network units. The two residual network units included in the SE-ResNet-1 are connected to each other. The size of the convolution kernel of the residual network in each residual network unit included in the SE-ResNet-1 is 3×3, and the number of output channels generated by the convolution is 16. The convolution step size of the residual network in each residual network unit included in the SE-ResNet-1 is (2,2) or (1,1). After processing by the SE-ResNet-1, the output feature is H×W×16.
[0082] The SE-ResNet-2 is the second residual network layer among the four residual network layers. The input layer of the SE-ResNet-2 is connected to the output layer of the SE-ResNet-1. The SE-ResNet-2 includes two residual network units. The residual network units included in the SE-ResNet-2 are connected to each other. The size of the convolution kernel of the residual network in each residual network unit included in the SE-ResNet-2 is 3×3, and the number of output channels generated by the convolution is 32. The convolution step size of the residual network in each residual network unit included in the SE-ResNet-2 is (2,2) or (1,1). After being processed by the SE-ResNet-2, the output feature is
[0083] The SE-ResNet-3 is the third residual network layer among the four residual network layers. The input layer of the SE-ResNet-3 is connected to the output layer of the SE-ResNet-2. The SE-ResNet-3 includes two residual network units. The two residual network units included in the SE-ResNet-3 are connected to each other. The size of the convolution kernel of the residual network in each residual network unit included in the SE-ResNet-3 is 3×3, and the number of output channels generated by the convolution is 64. The convolution step size of the residual network in each residual network unit included in the SE-ResNet-3 is (2,2) or (1,1). After being processed by the SE-ResNet-3, the output feature is
[0084] The SE-ResNet-4 is the fourth residual network layer among the four residual network layers. The input layer of the SE-ResNet-4 is connected to the output layer of the SE-ResNet-3. The SE-ResNet-4 includes two residual network units. The two residual network units included in the SE-ResNet-4 are connected to each other. The size of the convolution kernel of the residual network in each residual network unit included in the SE-ResNet-4 is 3×3, and the number of output channels generated by the convolution is 128. The convolution step size of the residual network in each residual network unit included in the SE-ResNet-4 is (2,2) or (1,1). After being processed by the SE-ResNet-4, the output feature is
[0085] It can be seen that at least one residual network layer can be set in the first network layer, which can avoid the problem of network degradation caused by the large number of network layers of the target model, thereby avoiding the performance degradation of the target model.
[0086] Of course, in order to further enhance the feature representation ability of the first feature map, an SE unit can be set in each residual network layer so that the features can be adjusted channel by channel. The following will take any residual network layer as an example for illustration.
[0087] Optionally, in the embodiment of the present application, the first residual network layer includes: a residual network and an SE unit; the first residual network layer is: any one of the at least one residual network layer. Specifically, the above step 102b1 can be implemented by the following steps 102b1a to 102b1d.
[0088] Step 102b1a: The electronic device inputs the fourth feature map into the residual network to obtain a fifth feature map.
[0089] In an embodiment of the present application, the first residual network layer includes at least two residual network units, and any residual network unit includes a residual network and an SE unit. The embodiment of the present application is illustrated by taking any residual network unit as an example.
[0090] In an embodiment of the present application, the fourth feature map is a feature map output by a residual network layer before the first residual network layer in at least one residual network layer, and the fifth feature map is obtained by the residual network operating on the fourth feature map.
[0091] The number of channels included in the fourth feature map may be the same as the number of channels included in the fifth feature map, and the channels of the fourth feature map may correspond one-to-one to the channels of the fifth feature map.
[0092] Exemplarily, when the first residual network layer is the first residual network layer in at least one residual network layer (e.g., SE-ResNet-1), the previous residual network layer of the SE-ResNet-1 is the above-mentioned Input. When the first residual network layer is the second residual network layer in at least one residual network layer (e.g., SE-ResNet-2), the previous residual network layer of the SE-ResNet-2 is the above-mentioned SE-ResNet-1.
[0093] Furthermore, the residual network includes at least two first convolutional layers, at least two batch normalization (BN) layers, and a rectified linear unit (ReLU) layer, so that the residual network can use the first algorithm to calculate the fifth feature map based on the fourth feature map.
[0094] Each first convolutional layer may specifically be a two-dimensional convolutional layer.
[0095] For example, FIG4 shows a schematic diagram of the network structure of any residual network unit of the first residual network. The first residual network includes a residual network and an SE unit. The residual network includes two first convolutional layers, two BN layers, and a ReLU layer. As shown in FIG4 , the output layer of the first first convolutional layer 16 of the two first convolutional layers can be connected to the input layer of the first BN layer 17 of the two BN layers, the output layer of the first BN layer 17 can be connected to the input layer of the ReLU layer 18, the output layer of the ReLU layer 18 can be connected to the input layer of the second first convolutional layer 19 of the two first convolutional layers, and the output layer of the second first convolutional layer 19 can be connected to the input layer of the second BN layer 20 of the two BN layers.
[0096] Specifically, the first algorithm may be: F=BN(Conv(ReLU(BN(Conv(X))))).
[0097] Here, X is the fourth feature map, and F is the fifth feature map.
[0098] In an embodiment of the present application, the core module of the residual network is the convolution kernel in the first convolutional layer, which enables the residual network to construct features by fusing spatial and channel information within the local receptive field of each layer.
[0099] Step 102b1b: The electronic device inputs the fifth feature map into the SE unit to obtain a first weight.
[0100] In an embodiment of the present application, the above-mentioned first weight includes: a second weight corresponding to each channel included in the fifth feature map, and each second weight is used to represent the weight of the corresponding channel for classifying the audio signal.
[0101] For example, if a second weight is higher, it can be considered that the features included in the channel corresponding to the second weight are more important for classifying the audio signal.
[0102] Optionally, in an embodiment of the present application, the fifth feature map includes Z fourth channels, each of the Z fourth channels includes a second feature matrix, and each of the Z second feature matrices is obtained by performing a residual network operation on the fourth feature map; the SE unit includes an interconnected first pooling layer and a fully connected layer; and Z is a positive integer greater than 1. Specifically, step 102b1b can be implemented by the following steps 102b1b1 and 102b1b2.
[0103] Step 102b1b1: The electronic device inputs the Z second eigenvalues into the first pooling layer to obtain Z first eigenvalues.
[0104] It can be understood that the fourth feature map also includes Z channels.
[0105] In the embodiment of the present application, each of the above Z first eigenvalues is obtained by the first pooling layer operating on a second characteristic matrix.
[0106] Further, in combination with FIG4 , the first pooling layer may specifically be a global average pooling layer 21 .
[0107] Furthermore, the first pooling layer may adopt a second algorithm to calculate Z first eigenvalues according to the Z second eigenmatrices.
[0108] It can be understood that each of the Z first eigenvalues is a channel descriptor of a fourth channel, and the first pooling layer can use the second algorithm to aggregate feature maps on the spatial dimension of the feature map, thereby generating a channel descriptor for each fourth channel.
[0109] In the case where a second characteristic matrix is H×W, the second algorithm may be specifically:
[0110] Among them, d c represents the first eigenvalue corresponding to the Cth fourth channel of the fifth feature map F; C = 1, 2, 3, ..., Z; F C Represents the feature of the Cth fourth channel of the fifth feature map F; F C(i, j) represents the element in the i-th row and j-th column of the second characteristic matrix included in the C-th fourth channel; i and j are both positive integers.
[0111] Furthermore, after obtaining the Z first eigenvalues, the electronic device may combine the Z first eigenvalues into one eigenvalue, and input the one eigenvalue into a fully connected layer.
[0112] For example, it is assumed that the Z first eigenvalues include d1, d2, ..., d z , then we get d1, d2, ..., d in the electronic device z Afterwards, the electronic device can convert d1, d2, ..., d z Merge into an eigenvalue D, which is D=(d1,d2,…,d z ), the D represents the channel descriptor after the information of all fourth channels of the fifth feature map F is aggregated.
[0113] Step 102b1b2: The electronic device inputs the Z first eigenvalues into the fully connected layer to obtain Z second weights.
[0114] In an embodiment of the present application, each of the Z second weights is obtained by operating a first eigenvalue by a fully connected layer, and the first weight includes Z second weights.
[0115] Furthermore, in conjunction with FIG4 , the fully connected layer may include: a first fully connected layer 22, a ReLU layer 23, a second fully connected layer 24, and a Sigmoid layer 25. The input layer of the first fully connected layer 22 is connected to the output layer of the first pooling layer (e.g., the global average pooling layer 21), the output layer of the first fully connected layer 22 is connected to the input layer of the ReLU layer 23, the output layer of the ReLU layer 23 is connected to the input layer of the second fully connected layer 24, and the output layer of the second fully connected layer 24 is connected to the input layer of the Sigmoid layer 25.
[0116] Furthermore, the fully connected layer may adopt a third algorithm to calculate Z second weights according to the Z first eigenvalues.
[0117] Specifically, the third algorithm may be: S=Sigmoid(ReLu(D×W1)×W2).
[0118] Here, W1 is the weight of the first fully connected layer. R is a constant, Z is the number of channels of the fifth feature map, r is the compression ratio of the SE unit, and the dimension of the channel descriptor D is reduced from 1×Z to 1×Z / r through the first fully connected layer. W2 is the weight of the second fully connected layer. The dimension of the channel descriptor D is restored from 1×Z / r to 1×Z through the second fully connected layer. S=(S1 S2 … S Z ), S is the first weight, S1, S2, ..., S Z is the Z second weight; Sigmoid() represents the Sigmoid activation function, which maps the variable to between (0,1).
[0119] It can be understood that the fully connected layer can use the third algorithm once for each first eigenvalue to calculate a second weight, thereby obtaining Z second weights.
[0120] Here, the first fully connected layer can convert Z fourth channels into Z / r fourth channels to reduce the amount of computation. The second fully connected layer can restore Z / r fourth channels to Z fourth channels because the fifth feature map input by the SE unit has C fourth channels.
[0121] It can be understood that the above processing process is designed as a bottleneck structure to make the SE unit have more nonlinearity, better fit the complex correlation between channels, while reducing the amount of calculation, and the normalized attention weight (second weight) of each fourth channel can be obtained through the Sigmoid activation function, which characterizes the weight of each fourth channel for classifying the audio signal.
[0122] It can be seen that since the electronic device can input Z second feature matrices into the first pooling layer and input the Z first eigenvalues output by the first pooling layer into the fully connected layer to obtain Z second weights for characterizing the weights of the Z fourth channels of the fifth feature map for classifying audio signals, the electronic device can amplify the features of the useful channels for classifying audio signals in the fourth feature map according to the Z second weights, and suppress the features of the useless channels for classifying audio signals in the fourth feature map. Therefore, the feature characterization ability of the obtained first feature map can be improved. In this way, the electronic device can accurately output the voice activity detection category based on the first feature map.
[0123] Step 102b1c: The electronic device generates a sixth feature map according to the fifth feature map and the first weight.
[0124] Furthermore, the electronic device can use a fourth algorithm to calculate a third characteristic matrix based on the second characteristic matrix included in each fourth channel and the second weight corresponding to each fourth channel. The electronic device can then respectively associate each third characteristic matrix with a fifth channel to obtain a sixth characteristic map. It will be understood that the sixth characteristic map includes Z fifth channels.
[0125] Specifically, the fourth algorithm may be:
[0126] in, is the third characteristic matrix corresponding to the Cth fourth channel, S C is the second weight corresponding to the Cth fourth channel, F C is the second characteristic matrix included in the Cth fourth channel.
[0127] In an embodiment of the present application, the electronic device can multiply the Z second weights by the second feature matrices included in the Z fourth channels respectively to obtain a recalibrated feature map (i.e., the sixth feature map), thereby amplifying the features of the useful (i.e., useful for classifying audio signals) fourth channels in the fifth feature map and suppressing the features of the useless (i.e., useless for classifying audio signals) fourth channels in the fifth feature map.
[0128] Step 102b1d: The electronic device obtains and outputs a seventh characteristic map based on the fourth characteristic map and the sixth characteristic map.
[0129] In an embodiment of the present application, the seventh feature map is a feature map input by a residual network layer next to the first residual network layer in at least one residual network layer.
[0130] Furthermore, for each of the Z fifth channels, the electronic device can add the third characteristic matrix included in a fifth channel and the characteristic matrix included in the corresponding channel of the fourth characteristic map to obtain a fourth characteristic matrix, thereby obtaining Z fourth characteristic matrices, and then the electronic device can respectively set each fourth characteristic matrix to a sixth corresponding value, and after activating the function through ReLU(), the seventh characteristic map can be obtained.
[0131] It can be seen that since the first residual network can also be set with an SE unit, the second weight corresponding to each channel of the fifth feature map can be obtained through the SE unit to determine the weight of each channel of the fifth feature map for classifying the audio signal, and then according to the weight of each channel of the fifth feature map, the features of the useful channels for classifying the audio signal in the fourth feature map can be amplified, and the features of the useless channels for classifying the audio signal in the fourth feature map can be suppressed. Therefore, the feature representation ability of the obtained first feature map can be improved. In this way, the electronic device can accurately output the voice activity detection category based on the first feature map.
[0132] Step 103: The electronic device inputs the first feature map into the second network layer of the target model to obtain a second feature map.
[0133] In an embodiment of the present application, the above-mentioned second feature map includes N second channels, each of the N second channels corresponds to a first channel, and each second channel includes a target eigenvalue. Each target eigenvalue of the N target eigenvalues is obtained by performing time series modeling on the corresponding target feature matrix by the second network layer, and each target eigenvalue is used to characterize the contextual features of the corresponding target feature matrix.
[0134] In an embodiment of the present application, the electronic device can input the first feature map into the second network layer so that the second network layer can perform time series modeling on the N target feature matrices, and obtain N target feature values for characterizing the context features of the N target feature matrices to obtain a second feature map. Therefore, compared with the time domain features (and / or frequency domain features) in the related art, the second feature map does not make a stationary assumption on the noise. Thus, in a non-stationary noise environment (such as an environment with a low signal-to-noise ratio), the second feature map still has high robustness and discriminability, that is, the electronic device can accurately output the voice activity detection category based on the second feature map.
[0135] Optionally, in an embodiment of the present application, the second network layer includes a long short-term memory (LSTM) layer. Specifically, step 103 can be implemented by the following step 103a.
[0136] Step 103a: The electronic device inputs the N third eigenvalues into the LSTM layer to obtain N target eigenvalues.
[0137] In the embodiment of the present application, the above-mentioned N third eigenvalues correspond one-to-one to the N target feature matrices, and each of the N third eigenvalues is obtained by performing feature aggregation processing on the corresponding target feature matrix.
[0138] In the embodiment of the present application, each of the above-mentioned N target eigenvalues is obtained by the LSTM layer operating on a third eigenvalue.
[0139] Furthermore, the number of LSTM layers can be set to 1, and the LSTM layer can be set to a unidirectional LSTM network, and the number of nodes in the output layer and hidden layer of the LSTM layer can be set to N (ie, N in the above embodiment).
[0140] Furthermore, the LSTM layer is used to perform time series modeling on the N third eigenvalues, so as to fully utilize the time sequence information implicit in the target audio features.
[0141] Furthermore, after obtaining N target feature values, the electronic device may respectively set a target feature value and a second channel to correspond to each other to generate a second feature map.
[0142] It can be seen that since the electronic device can perform time series modeling on the N third eigenvalues through the LSTM layer to obtain N target eigenvalues for characterizing the context features of the N target feature matrices to obtain the second feature map, instead of making a stationary assumption on the noise, the second feature map still has good robustness and distinguishability in a non-stationary noise environment (such as an environment with a low signal-to-noise ratio), that is, the electronic device can accurately output the voice activity detection category based on the second feature map.
[0143] Optionally, in the embodiment of the present application, the second network layer further includes: a second pooling layer. Specifically, before the above step 103a, the voice activity detection method provided in the embodiment of the present application may further include the following step 103b.
[0144] Step 103b: The electronic device inputs the N target feature matrices into the second pooling layer to obtain N third eigenvalues.
[0145] In the embodiment of the present application, each of the N third eigenvalues is obtained by performing feature aggregation processing on a target feature matrix by the second pooling layer.
[0146] It can be understood that each of the N first channels corresponds to a third eigenvalue.
[0147] For example, in combination with Figure 3, as shown in Figure 5, the target model can also include a second pooling layer 26 and an LSTM layer 27, the input layer of the second pooling layer 26 is connected to the output layer of the residual network layer 15, and the output layer of the second pooling layer 26 is connected to the input layer of the LSTM layer 27, so that the electronic device can input N target feature matrices into the second pooling layer 26.
[0148] Furthermore, the second pooling layer may specifically be an average pooling layer.
[0149] Furthermore, for each target feature matrix of the N target feature matrices, the electronic device can input a target feature matrix into the second pooling layer, so that the second pooling layer can adopt the fifth algorithm to calculate a third eigenvalue based on the one target feature matrix, thereby obtaining N third eigenvalues.
[0150] In the case where a target feature matrix is H×W, the fifth algorithm may be specifically:
[0151] Here, μ C Represents the third eigenvalue corresponding to the Cth first channel of the first feature map; C = 1, 2, 3, ..., N, X C represents the feature of the Cth channel of the first feature map; XC (i, j) represents the element in the i-th row and j-th column of the target feature matrix included in the C-th first channel.
[0152] Furthermore, after obtaining N third eigenvalues, the electronic device may combine the N third eigenvalues into one eigenvalue, and input the one eigenvalue into the LSTM layer.
[0153] For example, it is assumed that the N third eigenvalues include μ1, μ2, ..., μ z , then we get μ1,μ2,…,μ in the electronic device z Afterwards, the electronic device can convert μ1, μ2, …, μ z merged into an eigenvalue μ, which is μ=(μ1,μ2,…,μ z ), the μth μ represents the channel statistical descriptor after global average pooling of the first feature map.
[0154] It can be seen that since the electronic device can perform feature aggregation processing on the N target feature matrices through the second pooling layer to obtain N third eigenvalues, that is, obtain relatively simple N third eigenvalues, the electronic device can perform time series modeling on the relatively simple N third eigenvalues through the LSTM layer instead of performing time series modeling on the relatively complex N target feature matrices. Therefore, the computational amount of the LSTM layer can be reduced, and thus the power consumption of the electronic device can be reduced.
[0155] Step 104: The electronic device outputs a voice activity detection category based on the second feature map.
[0156] In the embodiment of the present application, the voice activity detection category is used to indicate whether the target audio signal is a speech signal or a non-speech signal.
[0157] Optionally, in an embodiment of the present application, the electronic device can calculate two eigenvalues based on the second feature map, one of the two eigenvalues is used to characterize the probability that the target audio signal is a speech signal, and the other eigenvalue is used to characterize the probability that the target audio signal is a non-speech signal, so that the electronic device can determine whether the target audio signal is a speech signal or a non-speech signal based on the two eigenvalues, and then determine the voice activity detection category.
[0158] In an embodiment of the present application, after the electronic device obtains the target audio features, the target audio features can be input into the target model to extract the features of the target audio signal through the first network layer and the second network layer, that is, the features of the target audio signal can be extracted layer by layer, so that the representation of the target audio features in the original feature space can be transformed into a new feature domain through multiple nonlinear mappings of the first network layer and the second network layer, so that the second feature map can have good robustness and distinguishability. At the same time, when the target audio signal is more complex, the powerful modeling ability of the deep neural network (i.e., the target model) can also be used to well describe the features of the target audio signal, so that it can better process various complex application environments, so that the electronic device can accurately determine whether the target audio signal is a speech signal or a non-speech signal based on the second feature map, so as to accurately output the voice activity detection category.
[0159] In the voice activity detection method provided in an embodiment of the present application, the electronic device can first obtain the target audio features of the target audio signal, and then input the target audio features into the first network layer of the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices to obtain a first feature map (the first feature map includes N first channels, each first channel includes a target feature matrix). In this way, the electronic device can input the first feature map into the second network layer of the target model, so that the second network layer can perform time series modeling on each target feature matrix of the first feature map to obtain N target eigenvalues (each target eigenvalue is used to characterize the contextual features of the corresponding target feature matrix) to obtain a second feature map (the second feature map includes N second channels, each second channel includes a target eigenvalue). The electronic device can then output a voice activity detection category based on the second feature map. Since the electronic device can input the target audio features of the target audio signal into the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices of higher dimensions, that is, obtain N target feature matrices with higher robustness and discrimination, and enable the second network layer to perform time series modeling on the N target feature matrices to obtain N target feature values for characterizing the context features of the N target feature matrices, that is, obtain N target feature values with higher robustness and discrimination. In this way, the electronic device can accurately distinguish the target audio signal as a speech signal or a non-speech signal based on the N target feature values with higher robustness and discrimination, rather than distinguishing the target audio signal as a speech signal or a non-speech signal based on time domain features and frequency domain features with lower robustness and discrimination. In this way, the accuracy of voice activity detection by the electronic device can be improved.
[0160] Of course, a linear layer may also be set in the target model to map the second feature map to other spaces, in which the electronic device can easily determine whether the target audio signal is a speech signal or a non-speech signal, as will be illustrated below.
[0161] Optionally, in the embodiment of the present application, the target model further includes a Linear layer. Specifically, in conjunction with FIG1 , as shown in FIG6 , the step 104 can be implemented through the following steps 104a to 104c.
[0162] Step 104a: The electronic device inputs the second feature map into the Linear layer to obtain a target feature vector.
[0163] In the embodiment of the present application, the target feature vector includes a first element and a second element.
[0164] Furthermore, the first element is used to represent the score of the target audio signal being a speech signal, and the second element is used to represent the score of the target audio signal being a non-speech signal.
[0165] In an embodiment of the present application, the Linear layer is used to map the N target feature values of the second feature map to a two-dimensional space.
[0166] Furthermore, the Linear layer may adopt the sixth algorithm to calculate the target feature vector based on the N target feature values.
[0167] The sixth algorithm may specifically be Y=A×X+B.
[0168] Here, A is the weight matrix, B is the bias matrix, and X is the N target eigenvalues.
[0169] Step 104b: The electronic device determines a first probability value according to the first element, and determines a second probability value according to the second element.
[0170] In the embodiment of the present application, the first probability value is: a probability value that the target audio signal is a speech signal, and the second probability value is: a probability value that the target audio signal is a non-speech signal.
[0171] Furthermore, the target model may further include a Softmax layer, so that the electronic device may input the target feature vector into the Softmax layer to obtain a first feature vector, where the first feature vector includes a first probability value and a second probability value.
[0172] For example, in combination with Figure 5, as shown in Figure 7, the target model can also include a Linear layer 28 and a Softmax layer 29. The input layer of the Linear layer 28 is connected to the output layer of the LSTM layer 29, and the output layer of the Linear layer 28 is connected to the input layer of the Softmax layer 29, so that the electronic device can input the second feature image into the Linear layer 28 to obtain the first feature vector output by the Softmax layer 29.
[0173] Step 104c: The electronic device outputs a voice activity detection category according to the target ratio.
[0174] In the embodiment of the present application, the above-mentioned target ratio is the ratio of the first probability value to the second probability value.
[0175] Furthermore, the electronic device may determine the voice activity detection category according to a magnitude relationship between the target ratio and a preset threshold.
[0176] In the embodiment of the present application, when the target ratio is greater than a preset threshold, the voice activity detection category is used to indicate that the target audio signal is a voice signal.
[0177] It can be understood that if the target ratio is greater than the preset threshold, it can be considered that the first probability value is much greater than the second probability value. Therefore, the voice activity detection category is used to indicate that the target audio signal is a voice signal.
[0178] In the embodiment of the present application, when the target ratio is less than or equal to a preset threshold, the voice activity detection category is used to indicate that the target audio signal is a non-speech signal.
[0179] It can be understood that if the target ratio is less than or equal to the preset threshold, it can be considered that the first probability value is much smaller than the second probability value. Therefore, the voice activity detection category is used to indicate that the target audio signal is a non-speech signal.
[0180] It can be seen that the electronic device can map the second feature map to a two-dimensional space (in which the electronic device can easily determine whether the target audio signal is a speech signal or a non-speech signal) through the Linear layer of the target model. Therefore, the electronic device can accurately determine the first probability value based on the first element and accurately determine the second probability value based on the second element, thereby improving the accuracy of the electronic device in determining whether the target audio signal is a speech signal or a non-speech signal. In this way, the accuracy of the electronic device in detecting voice activity can be improved.
[0181] The following is an example of how an electronic device acquires target audio features.
[0182] It should be noted that, in this embodiment, the target audio signal is a frame of audio signal in the above-mentioned audio signal. The electronic device can extract the audio features of the target audio signal and the audio signals adjacent to the target audio signal to obtain the target audio features, which will be described in detail below.
[0183] Optionally, in an embodiment of the present application, in combination with Figure 1, as shown in Figure 8, before the above step 101, the voice activity detection method provided in the embodiment of the present application may further include the following steps 201 and 202, and the above step 101 may be specifically implemented by the following step 101a.
[0184] Step 201: The electronic device performs audio signal preprocessing on a first audio signal to generate M frames of second audio signals.
[0185] It can be understood that the first audio signal may specifically be one of the above audio signals, that is, an audio signal to be transmitted by the electronic device.
[0186] In the embodiment of the present application, the M frames of the second audio signal include the target audio signal, and M is a positive integer.
[0187] It can be understood that the target audio signal is any one frame of the M frames of the second audio signal.
[0188] Furthermore, the electronic device may first perform pre-emphasis processing on the first audio signal, and then perform frame processing on the pre-emphasized first audio signal to obtain M frames of third audio signals, so that the electronic device may perform windowing processing on the M frames of third audio signals to perform audio signal preprocessing on the first audio signal to generate M frames of second audio signals.
[0189] Specifically, the electronic device may use the seventh algorithm to perform pre-emphasis processing on the first audio signal.
[0190] Specifically, the seventh algorithm may be: y(n)=x(n)-a×x(n-1).
[0191] Here, y(n) is the first audio signal after pre-emphasis processing, x(n) is the n-th frame audio signal in the first audio signal, and a is a constant.
[0192] Exemplarily, a may be greater than 0.9 and less than 1.0. For example, a may be 0.97.
[0193] Specifically, the electronic device may perform windowing processing on the M frames of the third audio signal using a Hamming window to generate M frames of the second audio signal.
[0194] Step 202: The electronic device extracts features from the M frames of second audio signals to obtain M first audio features corresponding to the M frames of second audio signals.
[0195] Furthermore, the first audio feature may include at least one of the following: Fbank feature, MFCC, PLP feature, and FFT spectrum feature.
[0196] Furthermore, when the first audio feature includes an Fbank feature, for each frame of the second audio signal in the M frames of the second audio signal, the electronic device can first use a fast Fourier transform algorithm to transform the frame of the second audio signal to obtain a signal spectrum corresponding to the frame of the second audio signal, and then calculate the frequency energy of each frequency point of the signal spectrum, perform Mel filtering on the calculated frequency point capacity, and take the logarithm of the subband capacity obtained by Mel filtering, so as to obtain a first audio feature corresponding to the frame of the second audio signal, and so on, to obtain M first audio features.
[0197] Step 101a: The electronic device generates target audio features according to X first audio features among the M first audio features.
[0198] In this embodiment of the present application, the X first audio features include: a first audio feature corresponding to the target audio signal, and Y first audio features, where Y is a positive integer less than X; the Y first audio features include at least one of the following: i frames of audio signals preceding the target audio signal in M frames of second audio signals, and j frames of audio signals following the target audio signal in M frames of second audio signals, where i is a positive integer, j is an integer greater than or equal to 0, and X is a positive integer less than or equal to M.
[0199] It can be understood that when j is 0, the Y first audio features include the first i frames of audio signals of the target audio signal in the M frames of the second audio signal.
[0200] Furthermore, the electronic device may perform splicing processing on the X first audio features to obtain the target audio feature.
[0201] For example, it is assumed that the X first audio features include 8 audio features, for example, the first audio feature Fb corresponding to the target audio signal t (m), the first audio feature Fb corresponding to the next frame of the target audio signal t+1 (m), the first audio feature Fb corresponding to the first 7 frames of audio signals of the target audio signal t-1 (m)~Fb t-7 (m), so that the electronic device can t (m), Fb t+1 (m) and Fb t-1 (m)~Fb t-7 (m) Perform frame splicing processing to obtain the target audio features.
[0202] It can be seen that since the electronic device can divide the first audio signal into M frames of second audio signals and extract M first audio features of the M frames of second audio signals respectively, the electronic device can generate a target audio feature based on the first audio feature corresponding to the target audio signal and the first audio feature corresponding to the previous i frames of audio signals of the target audio signal (and / or the next j frames of audio signals of the target audio signal), that is, the target audio feature is combined with the context information of the target audio signal. Therefore, the electronic device can accurately determine whether the target audio signal is a speech signal or a non-speech signal based on the target audio feature.
[0203] It should be noted that after the electronic device generates the target audio features and executes the above steps 101 to 104 to determine whether the target audio signal is a speech signal or a non-speech signal, the electronic device can again execute steps 201, 202 and 101a for the next frame audio signal of the target audio signal to generate the audio features of the next frame audio signal, and again execute the above steps 101 to 104 to determine whether the next frame audio signal is a speech signal or a non-speech signal, and so on, to determine whether each frame audio signal in the M frames of the second audio signal is a speech signal or a non-speech signal.
[0204] Of course, after outputting the voice activity detection category, the electronic device may also perform different operations according to the different voice activity detection categories to reduce the amount of transmitted audio data or save energy consumption of the electronic device, as will be explained below with examples.
[0205] Optionally, in the embodiment of the present application, in combination with FIG1 , as shown in FIG9 , after the above step 104 , the voice activity detection method provided in the embodiment of the present application may further include the following steps 301 and 302 .
[0206] Step 301: When the voice activity detection category indicates that the target audio signal is a voice signal, the electronic device performs a first operation.
[0207] In an embodiment of the present application, the first operation includes at least one of the following: encoding the target audio signal using a first encoding mode, and inputting the target audio signal into a speech recognition engine.
[0208] Furthermore, the number of coding bits corresponding to the first coding mode is greater than the number of coding bits corresponding to other coding modes (eg, the second coding mode in the following embodiment).
[0209] Furthermore, when the electronic device wants to transmit the above-mentioned audio signal, when the voice activity detection category is used to indicate that the target audio signal is a voice signal, the electronic device can encode the target audio signal using the first encoding mode through the encoder and transmit the encoded target audio signal.
[0210] Furthermore, when the electronic device is to perform speech recognition on the aforementioned audio signal, if the voice activity detection category is used to indicate that the target audio signal is a speech signal, the electronic device may input the target audio signal into a speech recognition engine for speech recognition.
[0211] It can be seen that, since the electronic device can encode the target audio signal using the first encoding mode with a larger corresponding encoding bit number when the voice activity detection category is used to indicate that the target audio signal is a voice signal, the audio quality of the target audio signal can be improved; and / or, when the voice activity detection category is used to indicate that the target audio signal is a voice signal, voice recognition is performed on the target audio signal, thereby reducing the computational complexity of the electronic device, thereby improving the performance of the electronic device.
[0212] Step 302: When the voice activity detection category indicates that the target audio signal is a non-speech signal, the electronic device performs a second operation.
[0213] In an embodiment of the present application, the second operation includes at least one of the following: encoding the target audio signal using the second encoding mode and not inputting the target audio signal into the speech recognition engine. The number of encoding bits corresponding to the first encoding mode is greater than the number of encoding bits corresponding to the second encoding mode.
[0214] Furthermore, when an electronic device wants to transmit one of the above-mentioned audio signals, when the voice activity detection category is used to indicate that the target audio signal is a non-voice signal, the electronic device can control the encoder to start the discontinuous transmission (DTX) mode (i.e., the second encoding mode) to reduce the corresponding number of encoding bits.
[0215] Furthermore, when the electronic device is to perform speech recognition on the above-mentioned audio signal, if the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, the electronic device may not input the target audio signal into the speech recognition engine and discard the target audio signal.
[0216] It can be seen that, since the electronic device can encode the target audio signal using the second encoding mode with a smaller corresponding encoding bit number when the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, the transmitted audio data stream can be reduced; and / or, when the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, the target audio signal is discarded, thereby reducing the amount of calculation of the electronic device, thereby improving the performance of the electronic device.
[0217] The voice activity detection method provided in the embodiment of the present application can be executed by a voice activity detection device. In the embodiment of the present application, the voice activity detection device performing the voice activity detection method is taken as an example to illustrate the voice activity detection device provided in the embodiment of the present application.
[0218] FIG10 shows a possible structural diagram of a voice activity detection device involved in an embodiment of the present application. As shown in FIG10 , the voice activity detection device 50 may include: an acquisition module 51 , a processing module 52 , and an output module 53 .
[0219] Among them, the acquisition module 51 is used to obtain the target audio features of the target audio signal. The processing module 52 is used to input the target audio features obtained by the acquisition module 51 into the first network layer of the target model to obtain a first feature map, which includes N first channels, each first channel includes a target feature matrix, and each target feature matrix is obtained by the first network layer performing high-level feature extraction on the target audio features, where N is a positive integer greater than 1; and input the first feature map into the second network layer of the target model to obtain a second feature map, which includes N second channels, each second channel corresponds to a first channel, and each second channel includes a target feature value, each target feature value is obtained by the second network layer performing time series modeling on the corresponding target feature matrix, and each target feature value is used to characterize the contextual features of the corresponding target feature matrix. The output module 53 is used to output the voice activity detection category based on the second feature map obtained after the input of the processing module 52.
[0220] In one possible implementation, the processing module 52 is further configured to perform audio signal preprocessing on the first audio signal to generate M frames of second audio signals, wherein the M frames of second audio signals include the target audio signal, where M is a positive integer; and to perform feature extraction on the M frames of second audio signals to obtain M first audio features corresponding to the M frames of second audio signals. The acquisition module 51 is specifically configured to generate target audio features based on X first audio features among the M first audio features processed by the processing module 52, where X is a positive integer less than or equal to M. The X first audio features include: the first audio feature of the target audio signal, Y first audio features, where Y is a positive integer less than X; and the Y first audio features include at least one of the following: the i frames of audio signals preceding the target audio signal in the M frames of second audio signals, and the j frames of audio signals following the target audio signal in the M frames of second audio signals, where i is a positive integer and j is an integer greater than or equal to 0.
[0221] In one possible implementation, the first network layer includes a CNN layer. The processing module 52 is specifically configured to input the target audio feature into the CNN layer to obtain a third feature map, where the third feature map includes Q third channels, each third channel includes a first feature matrix, and each first feature matrix is obtained by performing a convolution operation on the target audio feature by the CNN layer, where Q is a positive integer greater than 1; and obtain the first feature map based on the third feature map.
[0222] In one possible implementation, the first network layer further includes at least one sequentially connected residual network layer. The processing module 52 is specifically configured to input the third feature map into the at least one residual network layer to obtain a first feature map. The first feature map is obtained by sequentially computing the third feature map through the at least one residual network layer; each residual network layer has different network hyperparameters.
[0223] In one possible implementation, the first residual network layer includes: a residual network and an SE unit; the first residual network layer is: any one of at least one residual network layer. The above-mentioned processing module 52 is specifically used to input the fourth feature map into the residual network to obtain a fifth feature map, and the fourth feature map is: the feature map output by the previous residual network layer of the first residual network layer in the at least one residual network layer; and input the fifth feature map into the SE unit to obtain a first weight, and the first weight includes: the second weight corresponding to each channel included in the fifth feature map, each second weight is used to represent the weight of the corresponding channel for classifying the audio signal; then generate a sixth feature map based on the fifth feature map and the first weight; and, based on the fourth feature map and the sixth feature map, obtain and output a seventh feature map, and the seventh feature map is: the feature map input by the next residual network layer of the first residual network layer in the at least one residual network layer.
[0224] In one possible implementation, the fifth feature map includes Z fourth channels, each fourth channel includes a second feature matrix, and each second feature matrix is obtained by the residual network operating on the fourth feature map; the SE unit includes a first pooling layer and a fully connected layer connected to each other; and Z is a positive integer greater than 1. The processing module 52 is specifically configured to input the Z second feature matrices into the first pooling layer to obtain Z first eigenvalues, each first eigenvalue being obtained by the first pooling layer operating on a second feature matrix; and input the Z first eigenvalues into the fully connected layer to obtain Z second weights, each second weight being obtained by the fully connected layer operating on a first eigenvalue, and the first weight including Z second weights.
[0225] In one possible implementation, the second network layer includes an LSTM layer. The processing module 52 is specifically configured to input the N third eigenvalues into the LSTM layer to obtain N target eigenvalues, each of which is obtained by performing time series modeling on a third eigenvalue by the LSTM layer. The N third eigenvalues correspond one-to-one to N target feature matrices, and each third eigenvalue is obtained by performing feature aggregation processing on the corresponding target feature matrix.
[0226] In one possible implementation, the second network layer further includes a second pooling layer. The processing module 52 is further configured to input the N target feature matrices into the second pooling layer to obtain N third eigenvalues, each of which is obtained by performing feature aggregation processing on a target feature matrix by the second pooling layer.
[0227] In a possible implementation, the target model further includes a Linear layer. The output module 53 includes a first processing submodule and a first output submodule. The first processing submodule is configured to input the second feature map into the Linear layer to obtain a target feature vector, which includes a first element and a second element. The first output submodule is configured to determine a first probability value based on the first element and a second probability value based on the second element, wherein the first probability value is the probability value that the target audio signal is a speech signal and the second probability value is the probability value that the target audio signal is a non-speech signal; and output a speech activity detection category based on a target ratio. The target ratio is the ratio of the first probability value to the second probability value; when the target ratio is greater than a preset threshold, the speech activity detection category is used to indicate that the target audio signal is a speech signal; when the target ratio is less than or equal to the preset threshold, the speech activity detection category is used to indicate that the target audio signal is a non-speech signal.
[0228] In a possible implementation, the voice activity detection device provided by the embodiment of the present application may further include: an execution module. The execution module is configured to perform a first operation when the voice activity detection category is used to indicate that the target audio signal is a voice signal; and to perform a second operation when the voice activity detection category is used to indicate that the target audio signal is a non-voice signal. The first operation includes at least one of the following: encoding the target audio signal using a first encoding mode and inputting the target audio signal into a voice recognition engine; the second operation includes at least one of the following: encoding the target audio signal using a second encoding mode and not inputting the target audio signal into the voice recognition engine; the number of encoding bits corresponding to the first encoding mode is greater than the number of encoding bits corresponding to the second encoding mode.
[0229] The voice activity detection device provided in the embodiments of the present application can input the target audio features of the target audio signal into the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices of higher dimensions, that is, obtain N target feature matrices with higher robustness and discrimination, and the second network layer can perform time series modeling on the N target feature matrices to obtain N target feature values for characterizing the context features of the N target feature matrices, that is, obtain N target feature values with higher robustness and discrimination. In this way, the voice activity detection device can accurately distinguish the target audio signal as a speech signal or a non-speech signal based on the N target feature values with higher robustness and discrimination, rather than distinguishing the target audio signal as a speech signal or a non-speech signal based on time domain features and frequency domain features with lower robustness and discrimination. In this way, the accuracy of voice activity detection performed by the voice activity detection device can be improved.
[0230] The voice activity detection device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.
[0231] The voice activity detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0232] The voice activity detection device provided in the embodiment of the present application can implement each process implemented in the method embodiments of Figures 1 to 9. To avoid repetition, they are not described here.
[0233] Optionally, in an embodiment of the present application, as shown in Figure 11, the embodiment of the present application further provides an electronic device 60, including a processor 61 and a memory 62, and the memory 62 stores a program or instruction that can be run on the processor 61. When the program or instruction is executed by the processor 61, the various process steps of the above-mentioned voice activity detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0234] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0235] FIG12 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0236] The electronic device 700 includes but is not limited to components such as a radio frequency unit 701 , a network module 702 , an audio output unit 703 , an input unit 704 , a sensor 705 , a display unit 706 , a user input unit 707 , an interface unit 708 , a memory 709 , and a processor 710 .
[0237] Those skilled in the art will appreciate that the electronic device 700 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 710 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG12 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.
[0238] Among them, the processor 710 is used to obtain the target audio features of the target audio signal; input the target audio features into the first network layer of the target model to obtain a first feature map, the first feature map includes N first channels, each first channel includes a target feature matrix, each target feature matrix is: the first network layer performs high-level feature extraction on the target audio features, N is a positive integer greater than 1; input the first feature map into the second network layer of the target model to obtain a second feature map, the second feature map includes N second channels, each second channel corresponds to a first channel, each second channel includes a target feature value, each target feature value is: the second network layer performs time series modeling on the corresponding target feature matrix, each target feature value is used to characterize the contextual features of the corresponding target feature matrix; according to the second feature map, the voice activity detection category is output.
[0239] The electronic device provided by the embodiment of the present application can input the target audio features of the target audio signal into the target model, so that the first network layer can perform high-level feature extraction on the target audio features to obtain N target feature matrices of higher dimensions, that is, obtain N target feature matrices with higher robustness and discrimination, and enable the second network layer to perform time series modeling on the N target feature matrices to obtain N target feature values for characterizing the context features of the N target feature matrices, that is, obtain N target feature values with higher robustness and discrimination. In this way, the electronic device can accurately distinguish the target audio signal as a speech signal or a non-speech signal based on the N target feature values with higher robustness and discrimination, rather than distinguishing the target audio signal as a speech signal or a non-speech signal based on time domain features and frequency domain features with lower robustness and discrimination. In this way, the accuracy of voice activity detection by the electronic device can be improved.
[0240] Optionally, in an embodiment of the present application, the processor 710 is further used to perform audio signal preprocessing on the first audio signal to generate M frames of second audio signals, where the M frames of second audio signals include the target audio signal, and M is a positive integer; and perform feature extraction on the M frames of second audio signals respectively to obtain M first audio features that correspond one-to-one to the M frames of second audio signals.
[0241] The processor 710 is specifically configured to generate a target audio feature according to X first audio features among the M first audio features, where X is a positive integer less than or equal to M.
[0242] The X first audio features include: a first audio feature of a target audio signal, and Y first audio features, where Y is a positive integer less than X; the Y first audio features include at least one of the following: i frames of audio signals preceding the target audio signal in M frames of second audio signals, and j frames of audio signals following the target audio signal in M frames of second audio signals, where i is a positive integer and j is an integer greater than or equal to 0.
[0243] It can be seen that since the electronic device can divide the first audio signal into M frames of second audio signals and extract M first audio features of the M frames of second audio signals respectively, the electronic device can generate a target audio feature based on the first audio feature corresponding to the target audio signal and the first audio feature corresponding to the previous i frames of audio signals of the target audio signal (and / or the next j frames of audio signals of the target audio signal), that is, the target audio feature is combined with the context information of the target audio signal. Therefore, the electronic device can accurately determine whether the target audio signal is a speech signal or a non-speech signal based on the target audio feature.
[0244] Optionally, in an embodiment of the present application, the above-mentioned first network layer includes: a CNN layer.
[0245] Processor 710 is specifically used to input the target audio feature into the CNN layer to obtain a third feature map, where the third feature map includes Q third channels, each third channel includes a first feature matrix, and each first feature matrix is obtained by: the CNN layer performs a convolution operation on the target audio feature, where Q is a positive integer greater than 1; based on the third feature map, a first feature map is obtained.
[0246] It can be seen that since the electronic device can input the target audio features into the CNN layer to increase the number of channels corresponding to the target audio features, a third feature map of higher dimension can be obtained, that is, a third feature map with higher robustness can be obtained, so that the electronic device can obtain a first feature map with higher robustness based on the third feature map, and thus can reduce the influence of noise on the first feature map when the electronic device is in an environment with low signal-to-noise ratio. In this way, the electronic device can accurately distinguish between speech signals and non-speech signals based on the first feature map.
[0247] Optionally, in an embodiment of the present application, the first network layer further includes: at least one residual network layer connected in sequence.
[0248] The processor 710 is specifically configured to input the third feature map into at least one residual network layer to obtain a first feature map.
[0249] The first feature map is obtained by sequentially operating the third feature map by at least one residual network layer; and the network hyperparameters of each residual network layer are different.
[0250] It can be seen that at least one residual network layer can be set in the first network layer, which can avoid the problem of network degradation caused by the large number of network layers of the target model, thereby avoiding the performance degradation of the target model.
[0251] Optionally, in an embodiment of the present application, the first residual network layer includes: a residual network and an SE unit; the first residual network layer is: any one of at least one residual network layer.
[0252] Processor 710 is specifically configured to
[0253] The fourth feature map is input into the residual network to obtain a fifth feature map, which is: a feature map output by the previous residual network layer of the first residual network layer in at least one residual network layer; the fifth feature map is then input into the SE unit to obtain a first weight, which includes: a second weight corresponding to each channel included in the fifth feature map, each second weight being used to characterize the weight of the corresponding channel for classifying the audio signal; and a sixth feature map is generated based on the fifth feature map and the first weight; and a seventh feature map is obtained and output based on the fourth feature map and the sixth feature map, which is: a feature map input by the next residual network layer of the first residual network layer in at least one residual network layer.
[0254] It can be seen that since the first residual network can also be set with an SE unit, the second weight corresponding to each channel of the fifth feature map can be obtained through the SE unit to determine the weight of each channel of the fifth feature map for classifying the audio signal, and then according to the weight of each channel of the fifth feature map, the features of the useful channels for classifying the audio signal in the fourth feature map can be amplified, and the features of the useless channels for classifying the audio signal in the fourth feature map can be suppressed. Therefore, the feature representation ability of the obtained first feature map can be improved. In this way, the electronic device can accurately output the voice activity detection category based on the first feature map.
[0255] Optionally, in an embodiment of the present application, the fifth feature image includes Z fourth channels, each fourth channel includes a second feature matrix, and each second feature matrix is obtained by: the residual network operates on the fourth feature image; the SE unit includes: a first pooling layer and a fully connected layer connected to each other; Z is a positive integer greater than 1.
[0256] Processor 710 is specifically used to input Z second feature matrices into the first pooling layer to obtain Z first eigenvalues, where each first eigenvalue is obtained by the first pooling layer operating on a second feature matrix; input the Z first eigenvalues into the fully connected layer to obtain Z second weights, where each second weight is obtained by the fully connected layer operating on a first eigenvalue, and the first weight includes Z second weights.
[0257] It can be seen that since the electronic device can input Z second feature matrices into the first pooling layer and input the Z first eigenvalues output by the first pooling layer into the fully connected layer to obtain Z second weights for characterizing the weights of the Z fourth channels of the fifth feature map for classifying audio signals, the electronic device can amplify the features of the useful channels for classifying audio signals in the fourth feature map according to the Z second weights, and suppress the features of the useless channels for classifying audio signals in the fourth feature map. Therefore, the feature characterization ability of the obtained first feature map can be improved. In this way, the electronic device can accurately output the voice activity detection category based on the first feature map.
[0258] Optionally, in an embodiment of the present application, the second network layer includes: an LSTM layer.
[0259] The processor 710 is specifically configured to input the N third eigenvalues into the LSTM layer to obtain N target eigenvalues, where each target eigenvalue is obtained by performing time series modeling on a third eigenvalue by the LSTM layer.
[0260] The N third eigenvalues correspond to the N target feature matrices one-to-one, and each third eigenvalue is obtained by performing feature aggregation processing on the corresponding target feature matrix.
[0261] It can be seen that since the electronic device can perform time series modeling on the N third eigenvalues through the LSTM layer to obtain N target eigenvalues for characterizing the context features of the N target feature matrices to obtain the second feature map, instead of making a stationary assumption on the noise, the second feature map still has good robustness and distinguishability in a non-stationary noise environment (such as an environment with a low signal-to-noise ratio), that is, the electronic device can accurately output the voice activity detection category based on the second feature map.
[0262] Optionally, in an embodiment of the present application, the second network layer further includes: a second pooling layer.
[0263] The processor 710 is further configured to input the N target feature matrices into the second pooling layer to obtain N third eigenvalues, where each third eigenvalue is obtained by performing feature aggregation processing on a target feature matrix by the second pooling layer.
[0264] It can be seen that since the electronic device can perform feature aggregation processing on the N target feature matrices through the second pooling layer to obtain N third eigenvalues, that is, obtain relatively simple N third eigenvalues, the electronic device can perform time series modeling on the relatively simple N third eigenvalues through the LSTM layer instead of performing time series modeling on the relatively complex N target feature matrices. Therefore, the computational amount of the LSTM layer can be reduced, and thus the power consumption of the electronic device can be reduced.
[0265] Optionally, in an embodiment of the present application, the above-mentioned target model also includes: a linear layer.
[0266] Processor 710 is specifically configured to input the second feature map into the Linear layer to obtain a target feature vector, the target feature vector including a first element and a second element; determine a first probability value based on the first element, and determine a second probability value based on the second element, the first probability value being the probability value that the target audio signal is a speech signal, and the second probability value being the probability value that the target audio signal is a non-speech signal; and output a voice activity detection category based on the target ratio.
[0267] The target ratio is the ratio of the first probability value to the second probability value. When the target ratio is greater than a preset threshold, the voice activity detection category indicates that the target audio signal is a voice signal. When the target ratio is less than or equal to the preset threshold, the voice activity detection category indicates that the target audio signal is a non-speech signal.
[0268] It can be seen that the electronic device can map the second feature map to a two-dimensional space (in which the electronic device can easily determine whether the target audio signal is a speech signal or a non-speech signal) through the Linear layer of the target model. Therefore, the electronic device can accurately determine the first probability value based on the first element and accurately determine the second probability value based on the second element, thereby improving the accuracy of the electronic device in determining whether the target audio signal is a speech signal or a non-speech signal. In this way, the accuracy of the electronic device in detecting voice activity can be improved.
[0269] Optionally, in an embodiment of the present application, the processor 710 is further configured to perform a first operation when the voice activity detection category is used to indicate that the target audio signal is a voice signal; and perform a second operation when the voice activity detection category is used to indicate that the target audio signal is a non-speech signal.
[0270] Among them, the above-mentioned first operation includes at least one of the following: encoding the target audio signal using a first encoding mode and inputting the target audio signal into the speech recognition engine; the above-mentioned second operation includes at least one of the following: encoding the target audio signal using a second encoding mode and not inputting the target audio signal into the speech recognition engine; the number of encoding bits corresponding to the first encoding mode is greater than the number of encoding bits corresponding to the second encoding mode.
[0271] It can be seen that, since the electronic device can encode the target audio signal using the first encoding mode with a larger corresponding encoding bit number when the voice activity detection category is used to indicate that the target audio signal is a voice signal, the audio quality of the target audio signal can be improved; and / or, when the voice activity detection category is used to indicate that the target audio signal is a voice signal, voice recognition is performed on the target audio signal, thereby reducing the computational complexity of the electronic device, thereby improving the performance of the electronic device.
[0272] It can be seen that, since the electronic device can encode the target audio signal using the second encoding mode with a smaller corresponding encoding bit number when the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, the transmitted audio data stream can be reduced; and / or, when the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, the target audio signal is discarded, thereby reducing the amount of calculation of the electronic device, thereby improving the performance of the electronic device.
[0273] It should be understood that in an embodiment of the present application, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0274] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be random access memory (RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0275] Processor 710 may include one or more processing units. Optionally, processor 710 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 710.
[0276] An embodiment of the present application further provides a readable storage medium having a program or instruction stored thereon. When the program or instruction is executed by a processor, the various processes of the above-mentioned voice activity detection method embodiment are implemented and can achieve the same technical effect. To avoid repetition, they are not described here.
[0277] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0278] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned voice activity detection method embodiment, and can achieve the same technical effect. To avoid repetition, it is not repeated here.
[0279] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0280] An embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-mentioned voice activity detection method embodiment, and can achieve the same technical effects. To avoid repetition, it is not described here.
[0281] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0282] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0283] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for detecting voice activity, the method comprising: include: Acquire target audio features of a target audio signal; Input the target audio feature into the first network layer of the target model to obtain a first feature map, wherein the first feature map includes N first channels, each of the first channels includes a target feature matrix, and each target feature matrix is obtained by performing high-level feature extraction on the target audio feature by the first network layer, where N is a positive integer greater than 1; Inputting the first feature map into the second network layer of the target model to obtain a second feature map, wherein the second feature map includes N second channels, each second channel corresponds to a first channel, each second channel includes a target eigenvalue, and each target eigenvalue is obtained by performing time series modeling on the corresponding target feature matrix by the second network layer, and each target eigenvalue is used to characterize the contextual features of the corresponding target feature matrix; According to the second feature map, a voice activity detection category is output.
2. The method according to claim 1, in, Before acquiring the target audio feature of the target audio signal, the method includes: Performing audio signal preprocessing on the first audio signal to generate M frames of second audio signals, wherein the M frames of second audio signals include the target audio signal, and M is a positive integer; Extract features of the M frames of second audio signals respectively to obtain M first audio features corresponding to the M frames of second audio signals; The step of acquiring the target audio feature of the target audio signal includes: Generate the target audio feature according to X first audio features among the M first audio features, where X is a positive integer less than or equal to M; The X first audio features include: the first audio feature of the target audio signal and Y first audio features, where Y is a positive integer less than X; The Y first audio features include at least one of the following: the first i frames of audio signals of the target audio signal in the M frames of second audio signals, and the last j frames of audio signals of the target audio signal in the M frames of second audio signals, where i is a positive integer and j is an integer greater than or equal to 0.
3. The method according to claim 1, in, The first network layer includes: a convolutional neural network (CNN) layer; The step of inputting the target audio feature into a first network layer of a target model to obtain a first feature map includes: Input the target audio feature into the CNN layer to obtain a third feature map, wherein the third feature map includes Q third channels, each third channel includes a first feature matrix, and each first feature matrix is obtained by performing a convolution operation on the target audio feature by the CNN layer, where Q is a positive integer greater than 1; The first feature map is obtained according to the third feature map.
4. The method according to claim 3, in, The first network layer further includes: at least one residual network layer connected in sequence; The step of obtaining the first characteristic map according to the third characteristic map includes: Inputting the third feature map into the at least one residual network layer to obtain the first feature map; Among them, the first feature map is obtained by: the at least one residual network layer sequentially operates on the third feature map; and the network hyperparameters of each residual network layer are different.
5. The method according to claim 4, in, The first residual network layer includes: a residual network and a compression and excitation SE unit; the first residual network layer is: any one of the at least one residual network layer; Inputting the third feature map into the at least one residual network layer to obtain the first feature map includes: Inputting a fourth feature map into the residual network to obtain a fifth feature map, wherein the fourth feature map is a feature map output by a residual network layer before the first residual network layer in the at least one residual network layer; Inputting the fifth feature map into the SE unit to obtain a first weight, wherein the first weight includes: a second weight corresponding to each channel included in the fifth feature map, each second weight being used to represent a weight of the corresponding channel for classifying the audio signal; Generate a sixth feature map according to the fifth feature map and the first weight; According to the fourth feature map and the sixth feature map, a seventh feature map is obtained and output, where the seventh feature map is: a feature map input by a residual network layer next to the first residual network layer in the at least one residual network layer.
6. The method according to claim 5, in, The fifth feature map includes Z fourth channels, each of which includes a second feature matrix, and each second feature matrix is obtained by: the residual network operates on the fourth feature map; The SE unit includes: a first pooling layer and a fully connected layer connected to each other; Z is a positive integer greater than 1; The step of inputting the fifth feature map into the SE unit to obtain a first weight value includes: Inputting Z second feature matrices into the first pooling layer to obtain Z first eigenvalues, each of which is obtained by the first pooling layer operating on a second feature matrix; The Z first eigenvalues are input into the fully connected layer to obtain Z second weights, each second weight is obtained by: the fully connected layer operates on a first eigenvalue, and the first weight includes the Z second weights.
7. The method according to claim 1, in, The second network layer includes: a long short-term memory network LSTM layer; The step of inputting the first feature map into the second network layer of the target model to obtain a second feature map includes: Inputting N third eigenvalues into the LSTM layer to obtain N target eigenvalues, each target eigenvalue being obtained by performing time series modeling on a third eigenvalue by the LSTM layer; Therein, the N third eigenvalues correspond one-to-one to the N target feature matrices, and each third eigenvalue is obtained by performing feature aggregation processing on the corresponding target feature matrix.
8. The method according to claim 7, in, The second network layer also includes: a second pooling layer; Before inputting the N third eigenvalues into the LSTM layer to obtain N target eigenvalues, the method further includes: The N target feature matrices are input into the second pooling layer to obtain the N third eigenvalues, each of which is obtained by the second pooling layer performing feature aggregation processing on a target feature matrix.
9. The method according to claim 1, in, The target model also includes: a linear layer; Outputting a voice activity detection category according to the second feature map includes: Inputting the second feature map into the Linear layer to obtain a target feature vector, wherein the target feature vector includes a first element and a second element; Determine a first probability value according to the first element, and determine a second probability value according to the second element, the first probability value being: a probability value that the target audio signal is a speech signal, and the second probability value being: a probability value that the target audio signal is a non-speech signal; outputting the voice activity detection category according to the target ratio; Wherein, the target ratio is the ratio of the first probability value to the second probability value; When the target ratio is greater than a preset threshold, the voice activity detection category is used to indicate that the target audio signal is a speech signal; when the target ratio is less than or equal to the preset threshold, the voice activity detection category is used to indicate that the target audio signal is a non-speech signal.
10. The method according to claim 1, in, After outputting the voice activity detection category according to the second feature map, the method further includes: In a case where the voice activity detection category is used to indicate that the target audio signal is a voice signal, performing a first operation; In a case where the voice activity detection category is used to indicate that the target audio signal is a non-speech signal, performing a second operation; The first operation includes at least one of the following: encoding the target audio signal using a first encoding mode and inputting the target audio signal into a speech recognition engine; the second operation includes at least one of the following: encoding the target audio signal using a second encoding mode and not inputting the target audio signal into a speech recognition engine; The number of coding bits corresponding to the first coding mode is greater than the number of coding bits corresponding to the second coding mode.
11. A voice activity detection device, the voice activity detection device include: Acquisition module, processing module and output module; The acquisition module is used to acquire the target audio feature of the target audio signal; The processing module is used to input the target audio features acquired by the acquisition module into the first network layer of the target model to obtain a first feature map, wherein the first feature map includes N first channels, each of which includes a target feature matrix, and each target feature matrix is obtained by performing high-level feature extraction on the target audio features by the first network layer, where N is a positive integer greater than 1; and input the first feature map into the second network layer of the target model to obtain a second feature map, wherein the second feature map includes N second channels, each of which corresponds to a first channel, and each of which includes a target eigenvalue, and each target eigenvalue is obtained by performing time series modeling on the corresponding target feature matrix by the second network layer, and each target eigenvalue is used to characterize the corresponding target feature matrix. Contextual features of the array; The output module is used to output a voice activity detection category according to the second feature map obtained after being input by the processing module.
12. The voice activity detection device according to claim 11, in, The first network layer includes: a CNN layer; The processing module is specifically used to input the target audio feature into the CNN layer to obtain a third feature map, wherein the third feature map includes Q third channels, each third channel includes a first feature matrix, and each first feature matrix is obtained by: the CNN layer performing a convolution operation on the target audio feature, Q is a positive integer greater than 1; and the first feature map is obtained based on the third feature map.
13. The voice activity detection device according to claim 11, in, The second network layer includes: an LSTM layer; The processing module is specifically used to input N third eigenvalues into the LSTM layer to obtain N target eigenvalues, each target eigenvalue being obtained by performing time series modeling on a third eigenvalue by the LSTM layer; Therein, the N third eigenvalues correspond one-to-one to the N target feature matrices, and each third eigenvalue is obtained by performing feature aggregation processing on the corresponding target feature matrix.
14. The voice activity detection device according to claim 11, in, The target model also includes: a Linear layer; The output module includes: a first processing submodule and a first output submodule; The first processing submodule is used to input the second feature map into the Linear layer to obtain a target feature vector, where the target feature vector includes a first element and a second element; The first output submodule is used to determine a first probability value according to the first element, and to determine a second probability value according to the second element, wherein the first probability value is a probability value that the target audio signal is a speech signal, and the second probability value is a probability value that the target audio signal is a non-speech signal; and output the voice activity detection category according to the target ratio; Wherein, the target ratio is the ratio of the first probability value to the second probability value; When the target ratio is greater than a preset threshold, the voice activity detection category is used to indicate that the target audio signal is a speech signal; when the target ratio is less than or equal to the preset threshold, the voice activity detection category is used to indicate that the target audio signal is a non-speech signal.
15. An electronic device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the voice activity detection method according to any one of claims 1 to 10 are implemented.
16. A readable storage medium storing a program or an instruction, wherein the program or the instruction, when executed by a processor, implements the steps of the voice activity detection method according to any one of claims 1 to 10.
17. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the voice activity detection method according to any one of claims 1 to 10.
18. A computer program product, wherein the computer program product is stored in a non-volatile storage medium, and wherein the computer program product is executed by at least one processor to implement the steps of the voice activity detection method according to any one of claims 1 to 10.
19. An electronic device, comprising: the electronic device being configured to perform the steps of the voice activity detection method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Voice activity detection
CN107851443A
Speaker-related end-to-end voice endpoint detection method and device
CN110136749A
User attribute identification method and device
CN113362852A
Voice activation detection method and device, electronic equipment and storage medium
CN114333912A
Voice activity detection method and device, electronic equipment and readable storage medium
CN116312494A
