Vehicle-mounted voice activation detection method, device, equipment and storage medium
By using a pre-defined classification model with convolutional layers, multi-head attention layers, and long short-term memory networks in an in-vehicle environment, combined with historical audio information, the problem of insufficient accuracy in voice activation detection in an in-vehicle environment is solved, achieving higher detection stability and immediacy.
Patent Information
- Application Number
- CN202411201672.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Traditional voice activation detection solutions struggle to adapt to rapidly changing in-vehicle environments, leading to misjudgments and insufficient accuracy.
A pre-defined classification model consisting of convolutional layers, multi-head attention layers, long short-term memory networks, and linear classification layers is adopted. Speech blocks are classified by combining historical audio information. The convolutional layers are converted into spectrograms, multi-head attention layers extract features, long short-term memory networks are used for long-term dependency modeling, and linear classification layers are used for final classification.
It improves the accuracy and stability of voice activation detection in vehicle environments, reduces false detections and missed detections, adapts to environmental changes, and ensures the timeliness and continuity of detection.
Smart Images

Figure CN119170059B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of voice activation detection technology, and in particular relates to a vehicle-mounted voice activation detection method, device, equipment and storage medium. Background Technology
[0002] Voice Activity Detection (VAD) refers to the detection of speech segments within an audio stream. In in-vehicle environments, real-time detection of the in-vehicle audio stream is required, which places higher demands on the accuracy of the detection.
[0003] Traditional speech activation detection schemes primarily determine the energy difference between speech and noise signals in an audio stream, and then classify speech segments and noise segments based on energy thresholds. However, in in-vehicle environments, background audio changes frequently, making these traditional schemes ill-suited for such rapid environmental shifts and prone to misjudgments. Therefore, improving the accuracy of speech activation detection in in-vehicle environments is a pressing issue that needs to be addressed. Summary of the Invention
[0004] The embodiments of this application provide a method, apparatus, device, and storage medium for in-vehicle voice activation detection, thereby improving the accuracy of voice activation detection in an in-vehicle environment to at least a certain extent.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to a first aspect of the embodiments of this application, an in-vehicle voice activation detection method is provided, comprising:
[0007] Determine the current audio block and the previous audio block based on the in-vehicle audio stream;
[0008] Obtain the historical audio information corresponding to the previous audio block;
[0009] The current audio block and the historical audio information are input into a preset classification model to obtain the category of the current audio block output by the preset classification model. The category of the current audio block includes: speech beginning, speech middle, speech ending and non-speech segment.
[0010] In some embodiments of this application, based on the foregoing scheme, the preset model includes a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The step of inputting the current audio block and the historical audio information into the preset classification model to obtain the category of the current audio block output by the preset classification model includes:
[0011] The current audio block is input into the convolutional layer to obtain the current spectrogram;
[0012] The current spectrogram is input into the multi-head attention layer to obtain the current attention vector;
[0013] The current attention vector and the historical audio information are input into the long short-term memory network to obtain the current output value and current state of the long short-term memory network;
[0014] The current output value is input into the linear classification layer to obtain the category of the current audio block.
[0015] In some embodiments of this application, based on the foregoing scheme, the step of inputting the current spectrogram into the multi-head attention layer to obtain the current attention vector includes:
[0016] The current spectrogram is input into the multi-head attention layer, so that the multi-head attention layer can extract features from the current spectrogram, perform pre-classification based on the extracted features, and output the current attention vector corresponding to the pre-classification result.
[0017] In some embodiments of this application, based on the foregoing scheme, obtaining the historical audio information corresponding to the previous audio block includes:
[0018] The previous output value and previous state obtained by the Long Short-Term Memory Network based on the previous audio block are determined as the historical audio information corresponding to the previous audio block.
[0019] In some embodiments of this application, based on the foregoing scheme, before determining the current audio block and the previous audio block according to the in-vehicle audio stream, the method further includes:
[0020] The convolutional layer is trained using sample audio blocks to obtain sample spectrograms;
[0021] After the convolutional layer is trained, the multi-head attention layer and the long short-term memory network are trained using the sample spectrogram to obtain the preset classification model.
[0022] In some embodiments of this application, based on the aforementioned scheme, the objective function of the convolutional layer is the mean squared error loss function.
[0023] In some embodiments of this application, based on the foregoing scheme, training the multi-head attention layer and the long short-term memory network using the sample spectrogram includes:
[0024] In the objective function controlling the multi-head attention layer and the long short-term memory network, the weights of the beginning and end of the speech segment are greater than the weights of the middle and non-speech segments.
[0025] According to a second aspect of the embodiments of this application, an in-vehicle voice activation detection device is provided, comprising:
[0026] The current audio block acquisition module is used to determine the current audio block and the previous audio block based on the in-vehicle audio stream;
[0027] The historical audio block acquisition module is used to acquire the historical audio information corresponding to the previous audio block;
[0028] The current audio block classification module is used to input the current audio block and the historical audio information into a preset classification model to obtain the category of the current audio block output by the preset classification model. The categories of the current audio block include: speech beginning, speech middle, speech ending and non-speech segment.
[0029] In some embodiments of this application, based on the foregoing scheme, the preset model includes a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The current audio block classification module is further configured to input the current audio block into the convolutional layer to obtain the current spectrogram; input the current spectrogram into the multi-head attention layer to obtain the current attention vector; input the current attention vector and the historical audio information into the long short-term memory network to obtain the current output value and current state of the long short-term memory network; and input the current output value into the linear classification layer to obtain the category of the current audio block.
[0030] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module is further configured to input the current spectrogram to the multi-head attention layer, so that the multi-head attention layer can extract features from the current spectrogram, perform pre-classification based on the extracted features, and output the current attention vector corresponding to the pre-classification result.
[0031] In some embodiments of this application, based on the aforementioned scheme, the historical audio block acquisition module is further configured to determine the previous output value and previous state obtained by the Long Short-Term Memory Network based on the previous audio block as the historical audio information corresponding to the previous audio block.
[0032] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module is further configured to train the convolutional layer using sample audio blocks to obtain a sample spectrogram; after the convolutional layer is trained, the multi-head attention layer and the long short-term memory network are trained using the sample spectrogram to obtain the preset classification model.
[0033] In some embodiments of this application, based on the aforementioned scheme, the objective function of the convolutional layer is the mean squared error loss function.
[0034] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module is further configured to control the weights of the speech beginning and the speech ending in the objective function of the multi-head attention layer and the long short-term memory network to be greater than the weights of the speech middle segment and the non-speech segment.
[0035] According to a third aspect of the embodiments of this application, an in-vehicle voice activation detection device is provided, including a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, it implements the steps of the method described in any of the first aspects above.
[0036] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein computer program instructions are stored therein, and when executed by a processor, the computer program instructions cause the processor to perform the steps of the method as described in any of the first aspects above.
[0037] In this application, the current audio block and the previous audio block are determined based on the in-vehicle audio stream; historical audio information corresponding to the previous audio block is obtained; the current audio block and the historical audio information are input into a preset classification model to obtain the category of the current audio block output by the preset classification model. The category of the current audio block includes: the beginning of speech, the middle of speech, the end of speech, and non-speech segments. By adding historical audio information to the preset classification model based on the current audio block, the preset classification model can more accurately classify the current audio block based on the historical audio information, improving the stability and accuracy of voice activation detection in an in-vehicle environment.
[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0040] Figure 1 A flowchart illustrating an in-vehicle voice activation detection method in one embodiment is shown;
[0041] Figure 2 A schematic diagram of the speech beginning, speech middle, speech ending and non-speech segments in an in-vehicle audio stream is shown in one embodiment;
[0042] Figure 3 A detailed schematic diagram of an in-vehicle voice activation detection method in one embodiment is shown;
[0043] Figure 4 A block diagram of an in-vehicle voice activation detection device in one embodiment is shown;
[0044] Figure 5 A schematic diagram of the structure of an in-vehicle voice activation detection device in one embodiment is shown. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0046] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0047] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0048] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0049] Figure 1 A flowchart illustrating an embodiment of an in-vehicle voice activation detection method is shown. Figure 1 As shown, the in-vehicle voice activation detection method may include the following steps 101 to 103.
[0050] In step 101, the current audio block and the previous audio block are determined based on the in-vehicle audio stream.
[0051] As is understandable, in-vehicle audio stream refers to the audio stream captured by devices such as in-vehicle microphones. An audio block can be an in-vehicle audio stream of a certain duration, for example, an in-vehicle audio stream with a duration of 50ms to 200ms.
[0052] In the implementation process, the audio block that needs to be classified can be used as the current audio block, and the previously classified audio block can be used as the previous audio block.
[0053] In step 102, the historical audio information corresponding to the previous audio block is obtained.
[0054] Understandably, historical audio information includes compressed information of all historical audio blocks since the vehicle's infotainment system was turned on, and this information can help classify the current audio block.
[0055] In step 103, the current audio block and historical audio information are input into a preset classification model to obtain the category of the current audio block output by the preset classification model. The categories of the current audio block include: speech beginning, speech middle, speech end and non-speech segment.
[0056] Figure 2 A schematic diagram illustrating the speech beginning, speech middle, speech ending, and non-speech segments in an in-vehicle audio stream is shown in one embodiment. For example... Figure 2 As shown, the beginning of a speech segment is an audio block with no speech in the first part and speech in the second part; the end of a speech segment is an audio block with speech in the first part and no speech in the second part. Accurate modeling of the beginning and end of a speech segment can greatly improve the smoothness and real-time performance of downstream applications.
[0057] In some embodiments, the preset model may include a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The current audio block and historical audio information are input into the preset classification model to obtain the category of the current audio block output by the preset classification model. This includes: inputting the current audio block into the convolutional layer to obtain the current spectrogram; inputting the current spectrogram into the multi-head attention layer to obtain the current attention vector; inputting the current attention vector and historical audio information into the long short-term memory network to obtain the current output value and current state of the long short-term memory network; and inputting the current output value into the linear classification layer to obtain the category of the current audio block.
[0058] The convolutional layer is used to simulate the Fourier transform. The current audio block is a time-domain signal, which can be transformed into the current spectrogram in the frequency domain after being processed by the convolutional layer, so as to better represent the characteristics of the current audio block.
[0059] The multi-head attention layer is used to extract features from the current spectrogram, perform pre-classification based on the extracted features, and output the current attention vector corresponding to the pre-classification result.
[0060] Understandably, the beginning, middle, and end of a speech segment, as well as non-speech segments, each have their own characteristics. For example, the beginning of a speech segment may have no speech in the first part but speech in the second; the middle segment may only have speech; the end of a speech segment may have speech in the first part but no speech in the second; and non-speech segments may have no speech. A multi-head attention layer can pre-classify the features extracted from the current spectrogram, determining whether they belong to the beginning, middle, end, or non-speech segment category, and outputting the corresponding current attention vector. By introducing a multi-layer attention mechanism, the beginning and end of a speech segment can be located more accurately, improving detection accuracy.
[0061] Long Short-Term Memory (LSTM) networks are used to link information from all historical audio blocks. They compress the information from the current audio block and historical audio blocks, and the output serves as the historical audio block information needed for the calculation of the next audio block. By utilizing LTM networks to model the long-term dependencies of in-vehicle audio streams, even in high-noise and high-speed in-vehicle scenarios, this approach can accurately distinguish speech segments (including the beginning, middle, and end of speech) and non-speech segments, improving the anti-interference capability of detection in in-vehicle environments. Furthermore, this scheme can adapt to environmental changes, adaptively adjusting classification results based on environmental variations, thus improving the stability and accuracy of detection in in-vehicle environments.
[0062] In some embodiments, obtaining historical audio information corresponding to the previous audio block includes: determining the previous output value and previous state obtained by the Long Short-Term Memory network based on the previous audio block as the historical audio information corresponding to the previous audio block.
[0063] Figure 3 A detailed schematic diagram of an in-vehicle voice activation detection method in one embodiment is shown. For example... Figure 3 As shown, the Long Short-Term Memory (LSTM) network obtains the previous output value h(t-1) and the previous state c(t-1) based on the previous audio block t-1. The previous output value h(t-1) and the previous state c(t-1) are used as historical audio information input to the LSTM network. The LSTM network has two outputs: the current output value h(t) and the current state c(t). The current output value h(t) is input to the linear classification layer for classification. The current output value h(t) and the current state c(t) will be used as the next historical audio information input to the LSTM network to assist in the classification of the next audio block.
[0064] In some embodiments, before obtaining the current audio block and the previous audio block from the in-vehicle audio stream, the in-vehicle voice activation detection method further includes: training a convolutional layer using sample audio blocks to obtain a sample spectrogram; and after the convolutional layer is trained, training a multi-head attention layer and a long short-term memory network using the sample spectrogram to obtain a preset classification model.
[0065] During training, sample audio blocks can be input into convolutional layers, with the output of the Fourier operator of the sample audio serving as the label for the convolutional layers. The mean squared error loss function is used as the objective function for training. When the objective function converges, the training of the convolutional layers is complete, and a sample spectrogram is obtained. This spectrogram is then used to train a multi-head attention layer and a long short-term memory network, fully utilizing the selectivity of the attention mechanism and the temporal memory characteristics of the long short-term memory network to achieve category detection of the sample audio blocks.
[0066] During the training of multi-head attention layers and long short-term memory networks, the weights of the beginning and end of speech segments in the objective function of multi-head attention layers and long short-term memory networks can be controlled to be greater than the weights of the middle and non-speech segments.
[0067] Understandably, there are more audio blocks representing the middle and non-speech segments than those representing the beginning and end of speech segments. Therefore, during the training of multi-head attention layers and long short-term memory networks, the sample size of audio blocks representing the beginning and end of speech segments is smaller than that of audio blocks representing the middle and non-speech segments. Consequently, when constructing the objective function, it is necessary to adjust the weights to give greater weight to the beginning and end of speech segments to ensure significant feedback for their detection during training.
[0068] This embodiment does not impose any restrictions on the specific values of the weights. In some embodiments, the weights of the middle segment of the speech and the non-speech segment can both be set to 0.2, and the weights of the beginning and end of the speech can both be set to 0.3.
[0069] By using a pre-defined classification model to detect the beginning of a speech segment, the start of the speech segment can be detected in advance, reducing glitches between speech and non-speech segments and avoiding affecting subsequent speech processing functions. By using a pre-defined classification model to detect the end of a speech segment, the detection of the end of the speech segment can be delayed, ensuring the integrity of the entire speech segment and avoiding fragmentation of the speech segment. By adjusting the weights of the objective function, the probability of false detection is significantly reduced, making the detection results more reliable.
[0070] The in-vehicle voice activation detection method in this application determines the current audio block and the previous audio block based on the in-vehicle audio stream; obtains the historical audio information corresponding to the previous audio block; and inputs the current audio block and the historical audio information into a preset classification model to obtain the category of the current audio block output by the preset classification model. The category of the current audio block includes: the beginning of a voice segment, the middle segment of a voice segment, the end of a voice segment, and a non-voice segment. By adding historical audio information to the preset classification model based on the current audio block, the preset classification model can more accurately classify the current audio block based on the historical audio information, improving the stability and accuracy of voice activation detection in an in-vehicle environment. Simultaneously, this application ensures the immediacy and continuity of detection by processing the real-time audio stream, and reduces the probability of false triggers and missed detections through accurate detection of the beginning and end of a voice segment.
[0071] The following describes an embodiment of the apparatus described in this application, which can be used to execute the in-vehicle voice activation detection method described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the in-vehicle voice activation detection method described above in this application.
[0072] Figure 4 A block diagram of an in-vehicle voice activation detection device in one embodiment is shown. Figure 4 As shown in the figure, the in-vehicle voice activation detection device of this application embodiment includes: a current audio block acquisition module 401, a historical audio block acquisition module 402, and a current audio block classification module 403. The current audio block acquisition module 401 is used to determine the current audio block and the previous audio block based on the in-vehicle audio stream. The historical audio block acquisition module 402 is used to acquire the historical audio information corresponding to the previous audio block. The current audio block classification module 403 is used to input the current audio block and the historical audio information into a preset classification model to obtain the category of the current audio block output by the preset classification model. The category of the current audio block includes: the beginning of the voice, the middle of the voice, the end of the voice, and the non-voice segment.
[0073] In some embodiments of this application, based on the foregoing scheme, the preset model includes a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The current audio block classification module 403 is further configured to input the current audio block into the convolutional layer to obtain the current spectrogram; input the current spectrogram into the multi-head attention layer to obtain the current attention vector; input the current attention vector and the historical audio information into the long short-term memory network to obtain the current output value and current state of the long short-term memory network; and input the current output value into the linear classification layer to obtain the category of the current audio block.
[0074] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module 403 is further configured to input the current spectrogram to the multi-head attention layer, so that the multi-head attention layer can extract features from the current spectrogram, perform pre-classification based on the extracted features, and output the current attention vector corresponding to the pre-classification result.
[0075] In some embodiments of this application, based on the foregoing scheme, the historical audio block acquisition module 402 is further configured to determine the previous output value and previous state obtained by the long short-term memory network based on the previous audio block as the historical audio information corresponding to the previous audio block.
[0076] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module 403 is further configured to train the convolutional layer using sample audio blocks to obtain a sample spectrogram; after the convolutional layer is trained, the multi-head attention layer and the long short-term memory network are trained using the sample spectrogram to obtain the preset classification model.
[0077] In some embodiments of this application, based on the aforementioned scheme, the objective function of the convolutional layer is the mean squared error loss function.
[0078] In some embodiments of this application, based on the foregoing scheme, the current audio block classification module 403 is further configured to control the weights of the speech beginning and the speech ending in the objective function of the multi-head attention layer and the long short-term memory network to be greater than the weights of the speech middle segment and the non-speech segment.
[0079] Based on the same inventive concept, this application also provides an in-vehicle voice activation detection device, see reference. Figure 5 The diagram shows a structural schematic of an in-vehicle voice activation detection device according to an embodiment of this application. The in-vehicle voice activation detection device includes one or more memories 504, one or more processors 502, and at least one computer program (computer program instruction) stored in the memory 504 and executable on the processor 502. When the processor 502 executes the computer program, it implements the method described above.
[0080] Among them, Figure 5In this document, a bus architecture (represented by bus 500) is used. Bus 500 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 502 and memory represented by memory 504. Bus 500 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 505 provides an interface between bus 500 and receiver 501 and transmitter 503. Receiver 501 and transmitter 503 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 502 is responsible for managing bus 500 and general processing, while memory 504 can be used to store data used by processor 502 during operation.
[0081] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the method described above.
[0082] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and embodiments are within the scope and spirit of this application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0084] The units described as separate components may or may not be physically separate. Similarly, the components of the control device may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0085] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer program instructions, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0086] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for detecting in-vehicle voice activation, characterized in that, include: Determine the current audio block and the previous audio block based on the in-vehicle audio stream; Obtain the historical audio information corresponding to the previous audio block; The current audio block and the historical audio information are input into a preset classification model to obtain the category of the current audio block output by the preset classification model. The category of the current audio block includes: speech beginning, speech middle, speech ending, and non-speech segment. The preset classification model includes a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The process of inputting the current audio block and the historical audio information into the preset classification model to obtain the category of the current audio block output by the preset classification model includes: The current audio block is input into the convolutional layer to obtain the current spectrogram; The current spectrogram is input into the multi-head attention layer to obtain the current attention vector; The current attention vector and the historical audio information are input into the long short-term memory network to obtain the current output value and current state of the long short-term memory network; The current output value is input into the linear classification layer to obtain the category of the current audio block.
2. The in-vehicle voice activation detection method according to claim 1, characterized in that, The step of inputting the current spectrogram into the multi-head attention layer to obtain the current attention vector includes: The current spectrogram is input into the multi-head attention layer, so that the multi-head attention layer can extract features from the current spectrogram, perform pre-classification based on the extracted features, and output the current attention vector corresponding to the pre-classification result.
3. The in-vehicle voice activation detection method according to claim 1, characterized in that, The step of obtaining the historical audio information corresponding to the previous audio block includes: The previous output value and previous state obtained by the Long Short-Term Memory Network based on the previous audio block are determined as the historical audio information corresponding to the previous audio block.
4. The in-vehicle voice activation detection method according to claim 1, characterized in that, Before determining the current audio block and the previous audio block based on the in-vehicle audio stream, the method further includes: The convolutional layer is trained using sample audio blocks to obtain sample spectrograms; After the convolutional layer is trained, the multi-head attention layer and the long short-term memory network are trained using the sample spectrogram to obtain the preset classification model.
5. The in-vehicle voice activation detection method according to claim 4, characterized in that, The objective function of the convolutional layer is the mean squared error loss function.
6. The in-vehicle voice activation detection method according to claim 4, characterized in that, The step of training the multi-head attention layer and the long short-term memory network using the sample spectrogram includes: In the objective function controlling the multi-head attention layer and the long short-term memory network, the weights of the beginning and end of the speech segment are greater than the weights of the middle and non-speech segments.
7. A vehicle-mounted voice activation detection device, characterized in that, include: The current audio block acquisition module is used to determine the current audio block and the previous audio block based on the in-vehicle audio stream; The historical audio block acquisition module is used to acquire the historical audio information corresponding to the previous audio block; The current audio block classification module is used to input the current audio block and the historical audio information into a preset classification model to obtain the category of the current audio block output by the preset classification model. The categories of the current audio block include: speech beginning, speech middle, speech ending, and non-speech segment. The preset classification model includes a convolutional layer, a multi-head attention layer, a long short-term memory network, and a linear classification layer connected in sequence. The current audio block classification module is also used for: The current audio block is input into the convolutional layer to obtain the current spectrogram; The current spectrogram is input into the multi-head attention layer to obtain the current attention vector; The current attention vector and the historical audio information are input into the long short-term memory network to obtain the current output value and current state of the long short-term memory network; The current output value is input into the linear classification layer to obtain the category of the current audio block.
8. A vehicle-mounted voice activation detection device, comprising a processor and a memory, characterized in that, The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, it implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and apparatus for detecting speech tail point
CN108877779A
Voice interaction processing method and device, electronic equipment and storage medium
CN112382291A