Method, device, electronic device and storage medium for voice command recognition

By using the acoustic model and decoding map to verify the phoneme sequence in the voice command recognition system, the problem of high false wake-up rate in the voice command recognition system is solved, and the effect of direct user interaction and low false wake-up is achieved.

CN115132196BActive Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210551539.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2024-09-10
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

The false wake-up rate of the voice command recognition system increases exponentially when the number of commands increases, making it unacceptable for users of devices that operate 24 hours a day. The existing solution increases system complexity and is not in line with users' direct interaction habits.

Method used

By using the acoustic model and decoding map in the voice command recognition model, the phoneme sequence and timestamp of the voice signal are obtained, and based on the acoustic hidden layer representation vector, it is verified whether the phoneme sequence is used to trigger the command, improving the reliability of command triggering and avoiding prefixing. Voice wake-up model reduces false wake-up rate.

Benefits of technology

It suppresses false wake-ups without significantly increasing system complexity, enables users to interact directly with the device, reduces the number of false wake-ups, and is suitable for 24-hour deployment and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115132196B
    Figure CN115132196B
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for voice command recognition, which relates to the field of speech recognition of artificial intelligence. In this method, a voice signal is input into an acoustic model to obtain a first phoneme recognition result corresponding to each voice frame in the voice signal, and a first acoustic hidden layer representation vector of each voice frame output by the encoder in the acoustic model, and then the first phoneme recognition result is input into a decoding graph to obtain a phoneme sequence corresponding to the voice signal and a first timestamp of the voice frame corresponding to the phoneme sequence, and finally, according to the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector, it is determined whether the phoneme sequence is used to trigger the instruction. The voice command recognition model of the embodiment of the present application does not require a pre-voice wake-up model, such as a KWS system, which can help suppress false wake-ups without significantly increasing the complexity of the system, and can enable users to interact directly with the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech recognition technology, and more specifically, to a method, apparatus, device and storage medium for speech command recognition. Background Art

[0002] In recent years, with the vigorous development of deep learning, end-to-end (E2E) automatic speech recognition (ASR) technology has been widely favored for its simplified architecture and excellent performance. At present, the E2E ASR neural network structure has been introduced in the keyword spotting (KWS) task, which has improved the keyword spotting performance.

[0003] Compared with the ASR task, the Speech Command Recognition (SCR) task has a fixed target instruction set and a relatively limited search space. In order to limit the recognition results to the target instruction set, a decoder can be connected after the acoustic model to further optimize the task objectives. For example, an attention bias mechanism can be added after the acoustic model to guide the recognition results to be biased towards given keywords. However, as the number of instructions in the task increases, the number of false alarms (FA) also increases exponentially, which is unacceptable to users for 24-hour operation devices.

[0004] Existing solutions usually place a 24-hour KWS system in front of the SCR system. The system only detects one keyword, which can effectively suppress false wake-ups. However, placing a 24-hour KWS system in front of the SCR system significantly increases the complexity of the system, and users cannot directly interact with the device. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device and storage medium for voice command recognition, which can help suppress false wake-ups without significantly increasing the complexity of the system, and the user can interact directly with the device.

[0006] In a first aspect, a method for voice command recognition is provided, comprising:

[0007] Acquire a speech signal, where the speech signal includes a plurality of speech frames;

[0008] Inputting the speech signal into an acoustic model, obtaining a first phoneme recognition result corresponding to each speech frame in the speech signal, and a first acoustic hidden layer representation vector of each speech frame output by an encoder in the acoustic model, wherein the first phoneme recognition result includes a probability distribution of each speech frame in a phoneme space, and the acoustic model is obtained by training the speech signal sample and the actual phonemes of each speech frame in the speech signal sample;

[0009] Inputting the first phoneme recognition result into a decoding graph to obtain a phoneme sequence corresponding to the speech signal and a first timestamp corresponding to the phoneme sequence;

[0010] Whether the phoneme sequence is used to trigger an instruction is determined based on the vector portion corresponding to the first timestamp in the first acoustic hidden layer representation vector.

[0011] In a second aspect, a device for voice command recognition is provided, comprising:

[0012] An acquisition unit, configured to acquire a speech signal, wherein the speech signal includes a plurality of speech frames;

[0013] An acoustic model, used for inputting the speech signal, obtaining a first phoneme recognition result corresponding to each speech frame in the speech signal, and a first acoustic hidden layer representation vector of each speech frame output by an encoder in the acoustic model, wherein the first phoneme recognition result includes a probability distribution of each speech frame in a phoneme space, and the acoustic model is obtained by training the speech signal sample and the actual phonemes of each speech frame in the speech signal sample;

[0014] A decoding graph, used to input the first phoneme recognition result, obtain a phoneme sequence corresponding to the speech signal, and a first timestamp corresponding to the phoneme sequence;

[0015] A verification module is used to determine whether the phoneme sequence is used to trigger an instruction based on the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector.

[0016] In a third aspect, the present application provides an electronic device, including:

[0017] a processor adapted to implement computer instructions; and,

[0018] The memory stores computer instructions, where the computer instructions are suitable for being loaded by the processor and executing the method of the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the method of the first aspect above.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the first aspect above.

[0021] Based on the above technical solution, the embodiment of the present application can obtain the phoneme sequence and the first timestamp corresponding to the phoneme sequence through the voice command recognition model (i.e., the acoustic model and the decoding graph), and further verify whether the phoneme sequence is used to trigger the instruction according to the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector of each voice frame output by the encoder of the acoustic model. On the basis of the traditional voice command recognition model, the embodiment of the present application further verifies the phoneme sequence trigger instruction according to the acoustic hidden layer representation vector corresponding to the phoneme sequence of the trigger instruction, which can improve the reliability of the instruction triggering. The voice command recognition model of the embodiment of the present application does not require a pre-speech wake-up model, such as a KWS system, which can be beneficial to suppress false wake-ups without significantly increasing the complexity of the system, and can enable users to interact directly with the device. For example, the voice command recognition system of the embodiment of the present application can occupy less storage and computing resources. For another example, the voice command recognition system of the embodiment of the present application can reduce the number of false wake-ups, so that it can be deployed and operated 24 hours a day. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of an application scenario involved in an embodiment of the present application;

[0023] Figure 2 It is a schematic structural diagram of a Transducer model;

[0024] Figure 3 is a schematic flow chart of a method for voice command recognition according to an embodiment of the present application;

[0025] Figure 4 A schematic diagram of a network architecture for voice command recognition provided in an embodiment of the present application;

[0026] Figure 5 For application Figure 4 A schematic diagram of the process of performing voice command recognition using the network architecture shown;

[0027] Figure 6 A schematic flow chart of a verification method of a trigger instruction provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of a forced alignment process provided in an embodiment of the present application;

[0029] Figure 8 A schematic flow chart of another method for verifying a trigger instruction provided in an embodiment of the present application;

[0030] Fig. 9 A schematic flow chart of another method for verifying a trigger instruction provided in an embodiment of the present application;

[0031] Fig.10 It is the ROC curve corresponding to the clean test set;

[0032] Fig.11 It is the ROC curve corresponding to the noisy test set;

[0033] Fig.12 A schematic block diagram of a device for voice command recognition provided by an embodiment of the present application;

[0034] Fig.13 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 without making creative work are within the scope of protection of this application.

[0036] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based only on A, and B can also be determined based on A and / or other information.

[0037] In the description of the present application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more than two. In addition, "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0038] It should also be understood that the first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects, without any distinction of order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0039] It should also be understood that the specific features, structures or characteristics related to the embodiments in the specification are included in at least one embodiment of the present application. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0040] In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0041] The solution provided in this application may involve artificial intelligence technology.

[0042] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0043] It should be understood that artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0044] The embodiments of the present application may involve speech technology in artificial intelligence technology. The key technologies of speech technology include automatic speech recognition technology (ASR), speech synthesis technology and voiceprint recognition technology. Enabling computers to listen, see, speak and feel is the development direction of human-computer interaction in the future, among which speech has become one of the most promising human-computer interaction methods in the future.

[0045] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.

[0046] The embodiments of the present application may also involve machine learning (ML) in artificial intelligence technology. ML is a multi-disciplinary cross-discipline involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching.

[0047] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0048] Figure 1 A schematic diagram of an application scenario involved in an embodiment of the present application.

[0049] like Figure 1 As shown, it includes a collection device 101 and a computing device 102. The collection device 101 is used to collect voice data when the user speaks, such as original voice. The computing device 102 is used to process the voice data collected by the sound collection device 101, such as performing ASR, SCR, etc.

[0050] Exemplarily, the acquisition device 101 may be a microphone, a microphone array, a pickup, or other device with a voice acquisition function.

[0051] Exemplarily, the computing device 101 may be a user device, such as a mobile phone, a computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, a wearable terminal, an aircraft, a mobile Internet device (MID), or other terminal devices with voice processing capabilities.

[0052] Exemplarily, the computing device 102 may be a server. The server may be one or more servers. When there are multiple servers, there are at least two servers for providing different services, and / or there are at least two servers for providing the same service, such as providing the same service in a load balancing manner, which is not limited in the embodiments of the present application. A neural network model may be provided in the server, and the server provides support for the training and application process of the neural network model. A speech processing device may also be provided in the server, for performing ASR or SCR on speech, and the server provides support for the application process of the speech processing device.

[0053] The above-mentioned server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can also become a node of the blockchain.

[0054] In some embodiments, the acquisition device 101 and the computing device 102 may be implemented as the same hardware device. For example, the computing device 102 is a user device, and the acquisition device 101 is a microphone built into the user device.

[0055] In some embodiments, the acquisition device 101 and the computing device 102 may be implemented as different hardware devices. For example, the acquisition device 101 is a microphone installed on the steering wheel of a vehicle, and the computing device 102 may be an in-vehicle smart device; for another example, the acquisition device 101 is a microphone installed on a smart home device (such as a smart TV, set-top box, air conditioner, etc.), and the computing device 102 may be a home computing center, such as a mobile phone, TV, router, etc., or a cloud server, etc.; for another example, the acquisition device 101 may be a microphone installed on a personal wearable device (such as a smart bracelet, smart watch, smart headset, smart glasses, etc.), and the computing device 102 may be a portable device, such as a mobile phone.

[0056] When the acquisition device 101 and the computing device 102 are implemented as different hardware devices, the acquisition device 101 can be connected to the computing device 102 through a network. The network can be an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, call network and other wireless or wired networks, etc., without limitation.

[0057] The following describes the related technologies involved in the embodiments of the present application.

[0058] Transducer model: The Transducer model is a streaming E2EASR framework that can directly convert the input audio stream features into text results in real time. Compared with traditional speech recognition models, it has certain advantages in resource consumption and accuracy. The Transducer model framework is also introduced into the KWS task as an acoustic model.

[0059] For a given input sequence x=(x1,x2,…,x t )∈X * ,Transducer model output sequence y=(y1,y2,…,y u )∈Y * .

[0060] Among them, X * represents the set of all input sequences, Y* represents the set of all output sequences, x t ∈X,y u ∈Y are real vectors, X and Y represent the input and output spaces respectively.

[0061] For example, the Transducer model is used for phoneme recognition. The input sequence x is a feature vector sequence, such as a filter bank (FilterBank, FBank) feature, or a Mel Frequency Cepstrum Coefficient (MFCC) feature. t represents the feature vector at time t; the output sequence y is the phoneme sequence, y u Represents the phoneme at step u.

[0062] The output space can also be called a phoneme space, which includes multiple phonemes. Optionally, the phoneme space also includes a null output. Due to the introduction of the null output, the output sequence can have the same length as the input sequence.

[0063] Figure 2 A schematic structure diagram of a Transducer model is shown. Figure 2 As shown, the Transducer model includes an encoder (Encoder) 21, a predictor (Predictor) 22 and a joint network (JointNetwork) 23.

[0064] The encoder 21 may be a recursive neural network, such as a long short-term memory (LSTM) network, a feedforward sequential memory network (FSMN), etc. The encoder 21 may receive an audio feature input at time t (inputfeaturex t ), output acoustic hidden layer representation

[0065] The predictor 22 may be a recurrent neural network, such as LSTM, or a convolutional neural network (CNN). The predictor 22 may receive a non-empty output label (Transduceroutputy u-1 ), the output is the text hidden layer representation

[0066] The joint network 23 can be a fully connected neural network, such as a linear layer plus an activation unit, for converting the acoustic hidden layer representation and text hidden layer representation After linear transformation and summation, the output hidden unit represents z.

[0067] Finally, the output of the joint network 23 can be passed through a softmax function to convert it into a probability distribution.

[0068] Tiny Transducer Model: In SCR or KWS tasks, small model parameters and high real-time performance are usually required due to the need for actual deployment of equipment. Compared with the traditional Transducer framework, Tiny Transducer can meet these requirements well.

[0069] Based on Transducer, Tiny Transducer reduces the model size and optimizes the inference speed, making it more suitable for streaming deployment applications on end-side devices. Compared with the traditional Transducer framework, Tiny Transducer uses FSMN on the encoder side to improve the inference speed of the model. On the decoder side, a single-layer CNN with a small convolution kernel is used to greatly reduce the complexity of the model. In addition, for tasks such as SCR that have little dependence on contextual information, the problem of overfitting of contextual information on the decoder side is alleviated. Studies have shown that Tiny Transducer, as an acoustic model, can maintain comparable recognition performance while significantly reducing the model size and inference time.

[0070] An SCR solution uses the Transducer model to replace the traditional stacked recurrent neural network (RNN) or CNN module as the acoustic model to improve the accuracy of command recognition. However, as the number of commands in a task increases, the number of false wake-ups also increases exponentially, which is unacceptable to users for 24-hour operation devices.

[0071] A solution to suppress false wakeups is to place a 24-hour KWS system in front of the SCR system. The system only detects one keyword, which can effectively suppress false wakeups. When the KWS system detects a specific keyword, it runs in a limited time window to avoid obvious false wakeups for users. However, placing a 24-hour KWS system in front of the SCR system significantly increases the complexity of the system and does not conform to the user's habit of directly interacting with the device.

[0072] In view of this, the embodiments of the present application provide a method, apparatus, device and storage medium for voice command recognition, which can help suppress false wake-ups without significantly increasing the complexity of the system, and the user can interact directly with the device.

[0073] Specifically, by inputting a speech signal into an acoustic model, a first phoneme recognition result corresponding to each speech frame in the speech signal and a first acoustic hidden layer representation vector of each speech frame output by the encoder in the acoustic model are obtained, and then the first phoneme recognition result is input into a decoding graph to obtain a phoneme sequence corresponding to the speech signal and a first timestamp of the speech frame corresponding to the phoneme sequence. Finally, based on the vector part of the first acoustic hidden layer representation vector corresponding to the first timestamp, it is determined whether the phoneme sequence is used to trigger an instruction.

[0074] The first phoneme recognition result includes the probability distribution of each speech frame in the phoneme space.

[0075] The acoustic model is obtained by training the speech signal samples and the actual phonemes of each speech frame in the speech signal samples. Exemplarily, the acoustic model can be a Transducer model or a Tiny Transducer model, which is not limited.

[0076] Therefore, after obtaining the phoneme sequence and the first timestamp corresponding to the phoneme sequence through the voice command recognition model (i.e., the acoustic model and the decoding graph), the embodiment of the present application further verifies whether the phoneme sequence is used to trigger the instruction based on the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector of each speech frame output by the encoder of the acoustic model.

[0077] The embodiment of the present application can further verify the phoneme sequence triggering instruction based on the acoustic latent layer representation vector corresponding to the phoneme sequence of the triggering instruction on the basis of the traditional voice command recognition model, which helps to improve the reliability of the instruction triggering. The voice command recognition model of the embodiment of the present application does not require a pre-voice wake-up model, such as a KWS system, which can help suppress false wake-ups without significantly increasing the complexity of the system, and enable users to interact directly with the device.

[0078] For example, the voice command recognition system of the embodiment of the present application can occupy relatively small storage and computing resources.

[0079] For another example, the voice command recognition system of the embodiment of the present application can reduce the number of false wake-ups, thereby enabling 24-hour deployment and operation.

[0080] The embodiments of the present application can be applied to voice command recognition systems in various voice interaction scenarios. For example, in a car-mounted scenario, the driver cannot free his hands to operate the device while driving the vehicle, and can use voice to control the in-vehicle playback device, navigation device, etc., to improve the safety and convenience of operation. The in-vehicle voice command recognition system does not require a pre-set voice wake-up model, such as the KWS system, and can directly recognize user commands, thereby improving the user experience.

[0081] The solution provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0082] Figure 3 3 is a schematic flow chart of a method 300 for voice command recognition provided in an embodiment of the present application. The method 300 can be executed by any electronic device with data processing capability. For example, the electronic device can be implemented as Figure 1 The computing device 102 is not limited in this application.

[0083] In some embodiments, the electronic device may include (e.g., deploy) a machine learning model, which can be used to perform the method 300 for voice command recognition. In some embodiments, the machine learning model may be a deep learning model, a neural network model, or other models, without limitation. In some embodiments, the machine learning model may be a voice command recognition system, a command word recognition system, or other systems, without limitation.

[0084] Figure 4 1 is a schematic diagram of a network architecture for voice command recognition provided by an embodiment of the present application, which includes a Transducer Decoder 41, a Share Encoder 42, a Joint Network 43, a Transformer Decoder 44 and a Phone Predictor 45. The network architecture integrates the Transducer model and the Transformer model. Among them, the Transducer Decoder 41, the Transformer Decoder 44 and the Phone Predictor 45 share the Share Encoder 42 to increase the coupling degree of the system.

[0085] In some embodiments, in the process of training the network architecture, multi-task learning can be applied to jointly optimize the Transducer loss, the Transformer loss, and the cross-entropy (CE) loss of the phoneme discriminator. Among them, the Transducer loss can be obtained based on the output of the joint network 43 and the real text label of the speech signal sample, the Transformer loss can be obtained based on the output of the Transformer decoder and the real text label of the speech signal sample, and the cross-entropy (CE) loss of the phoneme discriminator can be obtained based on the output of the phoneme discriminator 45 and the phonemes of each speech frame of the speech signal sample.

[0086] For example, the target loss L of multi-task learning can be specifically expressed as follows:

[0087] L=αLTransducer +βL CE +γL Transformer (1)

[0088] Among them, L Transducer Represents the Transducer loss, for example, it can be RNN-T loss, L CE represents the CE loss of the phoneme discriminator, L Transformer Represents Transformer loss, α, β, and γ are adjustable hyperparameters.

[0089] As a specific example, α, β, and γ can be set to 1.0, 0.8, and 0.5, respectively, which is not limited in this application.

[0090] The following will be combined Figure 4 The steps in method 300 are described with reference to the network architecture in FIG.

[0091] It should be understood that Figure 4 An example of a network architecture for voice command recognition is shown, which is only intended to help those skilled in the art understand and implement the embodiments of the present application, but does not limit the scope of the embodiments of the present application. Those skilled in the art can make equivalent transformations or modifications based on the examples given here, and such transformations or modifications should still fall within the protection scope of the embodiments of the present application.

[0092] like Figure 3 As shown, the method 300 for voice command recognition may include steps 310 to 340 .

[0093] 310, acquiring a speech signal, where the speech signal includes a plurality of speech frames.

[0094] Specifically, the speech signal may include a plurality of speech frames obtained by segmenting the original speech. Exemplarily, the electronic device may include a preprocessing part for segmenting the original speech to obtain the speech signal.

[0095] 320, input the speech signal into the acoustic model to obtain the first phoneme recognition result corresponding to each speech frame in the speech signal, and the first acoustic hidden layer representation vector of each speech frame output by the encoder in the acoustic model.

[0096] The acoustic model is obtained by training the speech signal samples and the actual phonemes of each speech frame in the speech signal samples.

[0097] As an example, an acoustic model may include Figure 4 The encoder output in the acoustic model may be, for example, the output of the shared encoder 42.

[0098] Among them, the Transducer decoder 41 and the joint network 43 are respectively Figure 2 The predictor 22 and the joint network 23 are similar, and can be referred to Figure 2 The function description of the shared encoder 42 in the acoustic model can be described with Figure 2 The encoder 21 in is similar to that in Figure 2 Related description in .

[0099] As another example, the acoustic model may be a Transducer model or a TinyTransducer model, without limitation.

[0100] Figure 5 For application Figure 4 Schematic diagram of the process of voice command recognition using the network architecture shown.

[0101] See also Figure 5 , (a) stage is the Transducer detection stage, in which the preliminary trigger text and trigger timestamp (starting point is t0) can be obtained through streaming detection.

[0102] In stage (a), the feature extraction of the speech frame at time t of the speech signal can be performed to obtain the audio feature x of the speech frame. t , and then the audio feature x t Input to the shared encoder 42, and the historical non-empty output y of the model u-1 Input into Transducer decoder 41. The shared encoder 42 outputs the acoustic hidden layer representation Transducer decoder 41 outputs the text hidden layer representation The acoustic hidden layer representation output by the shared encoder 42 is an example of the first acoustic hidden layer representation vector mentioned above.

[0103] The joint network 43 can input the acoustic hidden layer representation and text hidden layer representation Output the first phoneme recognition result, which can be expressed as y t The first phoneme recognition result includes the probability distribution of each speech frame in the phoneme space.

[0104] A phone is the smallest phonetic unit divided according to the natural attributes of a language. Analyzed based on the pronunciation actions in a syllable, one action constitutes one phone. Exemplarily, phones are divided into two major categories: vowels and consonants. For example, the Chinese syllable "ā" has only one phone, "ài" has two phones, and "dài" has three phones.

[0105] A phone is the smallest unit or the smallest phonetic segment that constitutes a syllable, and it is the smallest linear phonetic unit divided from the perspective of phonetic quality. Phones are physical phenomena that actually exist. The phonetic symbols of the International Phonetic Alphabet (developed by the International Phonetic Association to uniformly mark the phonetic sounds of various countries. Also known as the "International Phonetic Alphabet" or the "Universal Phonetic Alphabet") correspond one-to-one with the phones of all human languages.

[0106] In the embodiments of the present application, for each speech frame in the speech signal, the acoustic model can identify the phone corresponding to the speech frame to obtain a first phone recognition result, and the first phone recognition result includes the probability distribution of each speech frame in the speech signal in the phone space.

[0107] The phone space can include multiple phones and a null output (indicating that there is no user pronunciation in the corresponding speech frame). In other words, the first phone recognition result includes the probabilities that the phones of each speech frame in the speech signal belong to each pre-set phone and the null output.

[0108] For example, the phone space can contain 212 phones and a null output. That is to say, for an input speech frame, the acoustic model can output the probabilities of the 212 phones and the null output corresponding to the speech frame respectively.

[0109] 330, input the first phone recognition result into the decoding graph to obtain the phone sequence corresponding to the speech signal and the first timestamp corresponding to the phone sequence.

[0110] Specifically, after inputting the first phone recognition result into the decoding graph, the decoding graph can determine whether the first phone recognition result corresponds to a certain phone or the null output according to the probabilities of each phone and the null output in the phone space in the first phone recognition result, and can further determine the corresponding text according to the determined phone.

[0111] In the embodiments of the present application, the first timestamp corresponding to the text can be further obtained. As an example, the frame number of the speech frame corresponding to the text can be used as the first timestamp.

[0112] When there are multiple voice frames, the first timestamp may include frame numbers corresponding to the multiple voice frames. At this time, the starting point of the first timestamp may be the frame number of the first voice frame among the multiple voice frames, and the end point of the first timestamp may be the frame number of the last voice frame among the multiple voice frames.

[0113] When the phoneme recognition result corresponds to a null output, it is determined that the speech frame corresponding to the phoneme recognition result does not contain the user's pronunciation, and there is no corresponding text at this time.

[0114] Exemplarily, the text output by the decoding graph can be called a phoneme sequence (Transducerphonesequence). The phoneme sequence is the keyword in the input audio feature, which can be used as a preliminary trigger instruction text, that is, a candidate trigger text. In the following step 340, the phoneme sequence can be further verified to confirm whether it can trigger the instruction. Correspondingly, the first timestamp can also be called a preliminary trigger timestamp.

[0115] Continue to see Figure 5 In stage (a), the first phoneme recognition result output by the Transducer model can be input into a weighted finite state machine (WFST) decoder (an example of a decoding diagram) 46. The WFST decoder 46 outputs a phoneme sequence corresponding to the speech signal (i.e., a preliminary trigger instruction text) and a first timestamp corresponding to the phoneme sequence (starting point is t0).

[0116] In one example, the decoding graph may include two separate WFST units: a phoneme dictionary (L) and an instruction set model (G), wherein the instruction set model (G) may be a grammar consisting of a predefined instruction set. Exemplarily, the decoding graph LG may be as follows:

[0117] LG=min(det(L·G)) (2)

[0118] Here, min and det represent the minimization and determinization of WFST, respectively.

[0119] As an example, the decoding process of the decoding graph can be implemented through a token-passing algorithm, which is not limited in this application.

[0120] In some embodiments, the recognition results corresponding to the frames whose posterior output is non-empty in the first phoneme recognition results can be input into the decoding graph. For example, only the frames whose maximum posterior output by the Transducer model is non-empty can be decoded to obtain the above-mentioned phoneme sequence and the first timestamp to save decoding time.

[0121] 340. Determine whether the phoneme sequence is used to trigger an instruction based on the vector portion corresponding to the first timestamp in the first acoustic hidden layer representation vector.

[0122] Specifically, after obtaining the phoneme sequence and the first timestamp corresponding to the phoneme sequence through the voice command recognition model (i.e., the acoustic model and the decoding graph), the embodiment of the present application can further verify whether the phoneme sequence is used to trigger the instruction based on the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector of each speech frame output by the encoder of the acoustic model.

[0123] Therefore, the embodiment of the present application can further verify the phoneme sequence triggering instruction based on the acoustic hidden layer representation vector corresponding to the phoneme sequence of the triggering instruction on the basis of the traditional voice command recognition model, thereby improving the reliability of the instruction triggering. The voice command recognition model of the embodiment of the present application does not require a pre-speech wake-up model, such as a KWS system, which can help suppress false wake-ups without significantly increasing the complexity of the system, and enable users to interact directly with the device.

[0124] For example, the voice command recognition system of the embodiment of the present application can occupy relatively small storage and computing resources.

[0125] For another example, the voice command recognition system of the embodiment of the present application can reduce the number of false wake-ups, thereby enabling 24-hour deployment and operation.

[0126] In some embodiments, whether the phoneme sequence is used to trigger the instruction can be further verified in the following four ways.

[0127] Method 1: Use the phoneme sequence to forcibly align the corresponding output of the phoneme discriminator to obtain a first confidence level, and verify whether the phoneme sequence is used to trigger the instruction based on the first confidence level.

[0128] See also Figure 6 The process corresponding to method 1 may include steps 601 to 604.

[0129] 601. Obtain a second timestamp according to a first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp.

[0130] Due to the delayed emission of Transducer, the timestamp obtained by the Transducer model is usually inaccurate. Therefore, the starting point t0 of the initial trigger timestamp (i.e., the first timestamp) needs to be advanced by t d , the second timestamp is obtained, and its starting point is (t0+t d ). As a possible implementation method, the starting point of the first timestamp can be manually advanced by 15 frames.

[0131] Optionally, the end point of the first timestamp is the same as the end point of the second timestamp.

[0132] 602. Input at least part of the first acoustic hidden layer representation vector into a phoneme discriminator to obtain a second phoneme recognition result corresponding to a second timestamp output by the phoneme discriminator.

[0133] Continue to see Figure 5 , (b) is the Force Alignment stage, which uses the trigger text in stage (a) to force align the trigger segment (such as the vector part corresponding to the second timestamp) in the acoustic hidden layer representation vector at the output of the phoneme discriminator to obtain the first confidence S1. Optionally, in stage (b), a more accurate trigger timestamp (starting point is t r ).

[0134] As an implementation method, in stage (b), the acoustic hidden layer representation vector output by the shared encoder 42 can be The second phoneme recognition result is input into the phoneme discriminator 45, and then the output of the phoneme discriminator 45 is intercepted according to the second timestamp to obtain the second phoneme recognition result.

[0135] As another implementation ( Figure 5 (not shown), the acoustic hidden layer representation vector output by the shared encoder 42 can be intercepted according to the second timestamp The intercepted vector portion is then input into the phoneme discriminator to obtain the above-mentioned second phoneme recognition result, which is not limited in this application.

[0136] 603 , aligning the second phoneme recognition result with the phoneme sequence to obtain a first confidence level, wherein the first confidence level is used to represent an alignment score between the second phoneme recognition result and the phoneme sequence.

[0137] Optionally, when the second phoneme recognition result is aligned with the phoneme sequence, a third timestamp can also be obtained, the starting point of which is the speech frame corresponding to the first phoneme in the second phoneme recognition result that is aligned with the phoneme sequence. The third timestamp is a more accurate trigger timestamp than the first timestamp.

[0138] Continue to see Figure 5 The alignment module 47 may align the second phoneme recognition result and the phoneme sequence, and output a first confidence level, such as the first confidence level S1 output in stage (b). Optionally, the alignment module 47 may also output a third timestamp, such as a more accurate trigger timestamp (starting point t r ).

[0139] As a possible implementation, a linear decoding graph can be obtained according to the phoneme sequence, wherein a first symbol is added before the phoneme sequence in the linear decoding graph, and the first symbol is used to absorb the output that does not correspond to the phoneme sequence in the second phoneme recognition result. Then, the second phoneme recognition result is input into the linear decoding graph, and the second phoneme recognition result and the phoneme sequence are aligned to obtain the first confidence and the third timestamp.

[0140] Figure 7 A schematic diagram of the forced alignment process is shown. Taking the aligned text abc as an example, the frame-level posterior phoneme sequence 49 is Figure 5 The output of the phoneme discriminator 45 in (i.e., an example of the second phoneme recognition result), t0 is the starting point of the trigger timestamp obtained in stage (a), t d is the number of frames taken in advance. d It is estimated, so additional noise may be introduced into the a posteriori phoneme sequence 49. Based on this, the symbol (g) initially added to the linear decoding graph dynamically generated according to the phoneme sequence output in stage (a) can absorb these noise frames (i.e., the output that does not belong to the phoneme sequence in the a posteriori phoneme sequence 49), thereby filtering out some false triggering situations. Among them, the symbol (g) is an example of the above-mentioned first symbol.

[0141] After the linear decoding graph is obtained, the a posteriori phoneme sequence 49 can be input into the linear decoding graph, and Viterbi decoding can be performed to achieve forced alignment, and finally the first confidence S1 and a more accurate trigger starting point t can be output. r .

[0142] As an example, the first confidence level may be an aligned average score of each frame within the third timestamp, or a root mean square, etc., without limitation.

[0143] 604 : Determine, based on the first confidence level, whether the phoneme sequence is used to trigger an instruction.

[0144] Exemplarily, the first confidence level may be compared with a preset threshold to determine whether the phoneme sequence triggers an instruction. For example, when the first confidence level is greater than or equal to the threshold, the instruction may be determined to be triggered; when the first confidence level is less than the threshold, the instruction may be determined not to be triggered.

[0145] Therefore, the embodiment of the present application further cascades a forced alignment module based on a frame-level phoneme discriminator on the basis of the traditional instruction recognition model, and uses the phoneme sequence to force the corresponding output of the phoneme discriminator to align, so as to obtain a more accurate instruction trigger timestamp and confidence level. The phoneme sequence trigger instruction can be further verified according to the confidence level to improve the reliability of the trigger instruction.

[0146] Method 2: Use the accurate trigger timestamp to intercept the acoustic hidden layer representation vector of the shared acoustic encoder as the input of the Transformer decoder, obtain the decoded text containing the trigger text and its second confidence, and jointly verify whether the phoneme sequence is used to trigger the instruction based on the first confidence and the second confidence in Method 1.

[0147] In some embodiments, the voice command recognition system corresponding to method 2 can be called a three-stage system, a three-stage voice command recognition system, or a two-stage verification system, without limitation.

[0148] See also Figure 8 The process corresponding to method 2 can further include steps 801 to 803 based on the above method 1.

[0149] 801. In the first acoustic hidden layer representation vector, extract a second acoustic hidden layer representation vector corresponding to a third timestamp.

[0150] Continue to see Figure 5 , stage (c) is the Transformer stage, which uses the more accurate trigger timestamp (i.e., the third timestamp) of stage (b) to intercept the trigger segment of the acoustic hidden layer representation vector of the shared acoustic encoder (an example of the second acoustic hidden layer representation vector) as the input of the Transformer decoder 44.

[0151] 802. Input the second acoustic hidden layer representation vector into a decoder to obtain a first decoding result matching the phoneme sequence and a second confidence level of the first decoding result.

[0152] Exemplarily, the decoder comprises a Transformer decoder.

[0153] Continue to see Figure 5 , we can use the starting point of the output of stage (b) as t r The trigger timestamp of the shared acoustic encoder is intercepted as the input of the Transformer decoder 44, and the Transformer decoder 44 can obtain at least one beam of the decoded text and the confidence of each decoded text through autoregressive beam search. Optionally, beam search can be performed through beam search 48.

[0154] After the search is completed, the candidate beam list can be searched to see if there is a candidate sequence containing the decoded text of the trigger text (an example of the first decoding result matching the phoneme sequence). If it exists, the confidence S2 (an example of the second confidence) of the decoded text can be obtained and output.

[0155] In some embodiments, the length of the decoding sequence of the decoder may be determined according to the length of the phoneme sequence.

[0156] For example, the start symbol can be set <sos>As the input of the Transformer decoder 44, the decoding results are then generated one by one in an autoregressive manner. Because the purpose of the embodiment of the present application is to detect whether a trigger is indeed triggered according to a predetermined trigger text, it is not necessary to decode until the beam search is performed as in a general beam search. <eos>Based on this, the embodiment of the present application can limit the length of the decoding sequence according to the length of the initially triggered phoneme sequence to save decoding time.

[0157] 803 : Determine, based on at least one of the first confidence level and the second confidence level, whether the phoneme sequence is used to trigger an instruction.

[0158] Exemplarily, the first confidence level may be compared with a preset first threshold, or the second confidence level may be compared with a preset second threshold, or the first confidence level may be compared with the preset first threshold and the second confidence level may be compared with the preset second threshold to determine whether the phoneme sequence triggers an instruction.

[0159] For example, when the first confidence level is greater than or equal to a first threshold, and the second confidence level is greater than or equal to a second threshold, a trigger instruction may be determined.

[0160] For another example, when the first confidence level is less than the first threshold and the second confidence level is less than the second threshold, and one of the conditions is satisfied, it can be determined that the instruction is not triggered. Figure 5 When the confidence of any one of the stages (b) and (c) does not reach the trigger threshold, the speech sequence in stage (a) can be considered to be a false trigger.

[0161] For another example, when the first confidence is less than the first threshold, it can be determined that the instruction is not triggered, and the process of calculating the second confidence does not need to be performed; when the first confidence is greater than or equal to the first threshold, the second confidence can be further calculated, and whether the phoneme sequence triggers the instruction is determined based on the second confidence. Figure 5 In the process, stage (b) and stage (c) can be combined for cascade judgment. When it is determined that the phoneme sequence cannot trigger the instruction based on the first confidence level, there is no need to further calculate the second confidence level. In this way, there is no need to calculate two confidence levels for each input sample before deciding whether to trigger the instruction, thereby saving verification time.

[0162] For another example, it may be determined whether the phoneme sequence is used to trigger the instruction only according to the second confidence level. Figure 5 The alignment module 47 may output the third timestamp without outputting the first confidence level. If the second confidence level is less than the second threshold, it may be determined that the instruction is not triggered; if the second confidence level is greater than or equal to the second threshold, it may be determined that the instruction is triggered.

[0163] Therefore, the embodiment of the present application further cascades a forced alignment module based on a frame-level phoneme discriminator and a Transformer verification framework on the basis of a traditional instruction recognition model, utilizes the forced alignment module to obtain a more accurate trigger timestamp and a first confidence level, utilizes the Transformer verification framework to decode the hidden state of the shared acoustic encoder to capture the accurate trigger timestamp, obtains the decoded text containing the trigger text and its second confidence level, and then verifies the phoneme sequence trigger instruction according to at least one of the first confidence level and the second confidence level, thereby improving the reliability of the trigger instruction.

[0164] Method 3: Use the preliminary trigger timestamp to push forward the timestamp corresponding to several frames (such as the second timestamp mentioned above) to intercept the acoustic hidden layer representation vector of the shared acoustic encoder as the input of the Transformer decoder, obtain the decoded text containing the trigger text and its third confidence, and verify whether the phoneme sequence is used to trigger the instruction based on the third confidence.

[0165] In some embodiments, the voice command recognition system corresponding to method 3 can be called a two-stage system, a two-stage voice command recognition system, or a one-stage verification system, without limitation.

[0166] See also Fig. 9 The process corresponding to method 3 may include steps 901 to 903.

[0167] 901. Obtain a second timestamp according to a first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp.

[0168] Specifically, for step 901, reference may be made to the description of step 601, which will not be repeated here.

[0169] 902. Extract, from the first acoustic hidden layer representation vector, a third acoustic hidden layer representation vector corresponding to the second timestamp.

[0170] 903, input the third acoustic hidden layer representation vector into a decoder to obtain a second decoding result matching the phoneme sequence and a third confidence level of the second decoding result.

[0171] Steps 902 and 903 can refer to Figure 8 The description of 801 and 802 will not be repeated here.

[0172] It should be noted that Figure 8 The difference is that in 902, the vector portion corresponding to the second timestamp is intercepted from the first acoustic hidden layer representation vector, rather than the vector portion corresponding to the third timestamp. Accordingly, in 903, the vector portion corresponding to the second timestamp is input to the encoder, rather than the vector portion corresponding to the third timestamp.

[0173] 904 : Determine, based on the third confidence level, whether the phoneme sequence is used to trigger an instruction.

[0174] Exemplarily, the third confidence level can be compared with a preset threshold to determine whether the phoneme sequence triggers an instruction. For example, when the third confidence level is greater than or equal to the threshold, the instruction can be determined to be triggered; when the third confidence level is less than the threshold, the instruction can be determined not to be triggered.

[0175] Therefore, the embodiment of the present application further cascades the Transformer verification framework on the basis of the traditional instruction recognition model, and uses the Transformer verification framework to decode the hidden state of the shared acoustic encoder by intercepting the timestamp corresponding to the initial trigger timestamp for several frames, so as to obtain the decoded text containing the trigger text and its third confidence level, and then verify the phoneme sequence trigger instruction according to the third confidence level, so as to improve the reliability of the trigger instruction.

[0176] Method 4: Use the phoneme sequence to force alignment of the corresponding output of the phoneme discriminator to obtain the first confidence level, use the initial trigger timestamp to push forward the timestamp corresponding to several frames to intercept the acoustic hidden layer representation vector of the shared acoustic encoder as the input of the Transformer decoder, obtain the decoded text containing the trigger text and its third confidence level, and jointly verify whether the phoneme sequence is used to trigger the instruction based on the first confidence level and the third confidence level.

[0177] Specifically, the process of obtaining the first confidence level can refer to method 1, and the process of obtaining the third confidence level can refer to method 3, which will not be described in detail here.

[0178] Therefore, the embodiment of the present application further cascades a forced alignment module based on a frame-level phoneme discriminator and a Transformer verification framework on the basis of a traditional instruction recognition model, uses the forced alignment module to obtain a first confidence level, and uses the Transformer verification framework to decode the hidden state of the shared acoustic encoder by intercepting the timestamp corresponding to a preliminary trigger timestamp that is pushed forward by several frames, so as to obtain a decoded text containing the trigger text and its third confidence level, and then jointly verifies the phoneme sequence trigger instruction according to the first confidence level and the third confidence level, thereby improving the reliability of the trigger instruction.

[0179] It should be noted that in the embodiment of the present application, the voice command recognition system can adjust different thresholds according to the specific application scenario, so as to flexibly fine-tune the command wake-up rate and false wake-up.

[0180] The solution of the embodiment of the present application can be experimentally tested using a real corpus. The voice command recognition model in the experiment is trained on a set of 23,000 hours of Mandarin ASR corpus collected from in-vehicle voice assistant products. During model training, a development set can be randomly obtained from the training set.

[0181] Table 1 shows the comparison of accuracy and number of false awakening FAs per hour among different frameworks.

[0182] Table 1

[0183]

[0184] The clean test set (cleanset) is the command voice collected when the real car is driving on the highway; the noisy test set (noisyset) is the same source command recorded when driving in a downtown area. The false wakeup test set is an 84-hour human voice test set, and the command set contains 29 commands.

[0185] As shown in Table 1, compared with a separate tinyTransducer recognition system with the same configuration (Experiment S0), the two-stage verification method (Experiment S3) of the embodiment of the present application can significantly reduce the number of false wake-ups from 1.47 times / hour to 0.13 times / hour, a relative reduction of 91.15%. At the same time, the accuracy of instruction recognition is controlled within 2%, which is basically at the same level as the basic system (Experiment S0).

[0186] In addition, through the ablation test of Experiment S3 (three-stage voice command recognition system) and Experiment S1 (two-stage voice command recognition system), it can be proved that the timestamp obtained by forced alignment is more accurate than the original timestamp output by the Transducer model, and the accurate timestamp is more helpful for the verification of the third stage (i.e., stage (c)). In other words, the three-stage voice command recognition system and the two-stage voice command recognition system can better suppress false awakenings when the accuracy is equivalent. For example, the number of false awakenings per hour is reduced by 43.47% compared with the two-stage voice command recognition system.

[0187] In addition, the embodiment of the present application also conducted a performance comparison with the Transducer+MLD solution (experiment S4), and the acoustic model used was consistent with the framework of the system provided in the embodiment of the present application, which was a tinyTransducer model with the same configuration. The solution corresponding to Experiment S4 was mainly based on statistical methods for multi-stage verification, while the solution provided in the embodiment of the present application focused on the neural network method for verification. The experimental results show that when the recognition performance is equivalent, the three-stage verification framework proposed in the embodiment of the present application can obtain lower false wake-up performance.

[0188] Fig.10 is the receiver operating characteristic (ROC) curve corresponding to the clean test set. Fig.11 It is the ROC curve corresponding to the noisy test set. Fig.10 and Fig.11 The horizontal axis is the number of false awakenings per hour (FAperhour), and the vertical axis is the false rejection rate (false rejection rate). The false rejection rate represents the ratio of the number of erroneous instructions recognized to the total number of instructions. Fig.10 and Fig.11 In the example of CaTT-KWS, the three-stage system (experiment S3) provided in the present application is provided. The ROC curve can take multiple thresholds, and the result of each threshold is plotted in the corresponding point in the graph, and finally can be connected into a curve, which can more comprehensively reflect the performance of the command word recognition system.

[0189] Depend on Fig.10 and Fig.11 It can be seen that at a high point in the number of false awakenings per hour (FAperhour), CaTT-KWS is comparable to the basic Transducer+WFST solution and the Transducer+MLD solution. When it is necessary to further reduce false awakenings (for example, when FAperhour is less than 0.1), the recognition performance of the basic Transducer+WFST solution and the Transducer+MLD solution will drop sharply, while CaTT-KWS can still maintain a high recognition rate.

[0190] Furthermore, the error between the timestamps obtained in the forced alignment stage and the transducer stage and the actual voice endpoint can be statistically analyzed, as shown in Table 2. Table 2 shows the average error between the starting point of the timestamp obtained by the transducer model and the starting point of the timestamp obtained by the forced alignment module and the real starting point, where the real time point is manually marked.

[0191] Table 2

[0192] stage Clean set(s) Noisyset(s) Transducer Detection 0.29 0.44 Force alignment 0.11 0.23

[0193] It can be seen from Table 2 that the starting point of the timestamp obtained by the forced alignment module is more accurate. This more accurate starting point can be used as the input of the Transformer stage to improve the performance of the instruction word recognition system.

[0194] The specific implementation modes of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above implementation modes. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific implementation modes can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different implementation modes of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0195] It should also be understood that in the various method embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. It should be understood that these sequence numbers can be interchanged where appropriate, so that the embodiments of the present application described can be implemented in an order other than those shown or described.

[0196] The above describes the method embodiment of the present application in detail. Figure 12 to Figure 13 , describing an apparatus embodiment of the present application.

[0197] Fig.12 6 is a schematic block diagram of a device 600 for voice command recognition according to an embodiment of the present application. Fig.12 As shown, the apparatus 600 for voice command recognition may include an acquisition unit 610 , an acoustic model 620 , a decoding graph 630 , and a verification module 640 .

[0198] An acquisition unit 610 is configured to acquire a speech signal, where the speech signal includes a plurality of speech frames;

[0199] An acoustic model 620, which is used to input the speech signal, obtain a first phoneme recognition result corresponding to each speech frame in the speech signal, and a first acoustic hidden layer representation vector of each speech frame output by an encoder in the acoustic model, wherein the first phoneme recognition result includes a probability distribution of each speech frame in a phoneme space, and the acoustic model is obtained by training the speech signal sample and the actual phonemes of each speech frame in the speech signal sample;

[0200] A decoding diagram 630 is used to input the first phoneme recognition result to obtain a phoneme sequence corresponding to the speech signal and a first timestamp corresponding to the phoneme sequence;

[0201] The verification module 640 is used to determine whether the phoneme sequence is used to trigger an instruction based on the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector.

[0202] Optionally, the verification module 640 is specifically used for:

[0203] Acquire a second timestamp according to the first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp;

[0204] Inputting at least part of the first acoustic hidden layer representation vector into a phoneme discriminator, and obtaining a second phoneme recognition result corresponding to the second timestamp output by the phoneme discriminator;

[0205] Aligning the second phoneme recognition result with the phoneme sequence to obtain a first confidence level, wherein the first confidence level is used to represent an alignment score between the second phoneme recognition result and the phoneme sequence;

[0206] According to the first confidence, it is determined whether the phoneme sequence is used to trigger an instruction.

[0207] Optionally, the verification module 640 is specifically used for:

[0208] According to the phoneme sequence, a linear decoding graph is obtained, wherein a first symbol is added before the phoneme sequence in the linear decoding graph, and the first symbol is used to absorb the output of the second phoneme recognition result that does not correspond to the phoneme sequence;

[0209] The second phoneme recognition result is input into the linear decoding graph, and the second phoneme recognition result and the phoneme sequence are aligned.

[0210] Optionally, the verification module 640 is specifically used for:

[0211] When the second phoneme recognition result is aligned with the phoneme sequence, obtaining a third timestamp, wherein the starting point of the third timestamp is a speech frame corresponding to the first phoneme in the second phoneme recognition result that is aligned with the phoneme sequence;

[0212] In the first acoustic hidden layer representation vector, intercepting the second acoustic hidden layer representation vector corresponding to the third timestamp;

[0213] Inputting the second acoustic hidden layer representation vector into a decoder to obtain a first decoding result matching the phoneme sequence and a second confidence level of the first decoding result;

[0214] According to at least one of the first confidence and the second confidence, it is determined whether the phoneme sequence is used to trigger an instruction.

[0215] Optionally, the verification module 640 is specifically used for:

[0216] The length of the decoding sequence of the decoder is determined according to the length of the phoneme sequence.

[0217] Optionally, the decoder includes a Transformer decoder.

[0218] Optionally, a training unit is also included, for:

[0219] Multi-task joint learning is performed according to a first loss of the acoustic model, a second loss of the phoneme discriminator, and a third loss of the decoder to jointly train the acoustic model, the phoneme discriminator, and the decoder.

[0220] Optionally, the verification module 640 is specifically used for:

[0221] Acquire a second timestamp according to the first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp;

[0222] In the first acoustic hidden layer representation vector, intercepting a third acoustic hidden layer representation vector corresponding to the second timestamp;

[0223] Inputting the third acoustic hidden layer representation vector into a decoder to obtain a second decoding result matching the phoneme sequence and a third confidence level of the second decoding result;

[0224] According to the third confidence level, it is determined whether the phoneme sequence is used to trigger an instruction.

[0225] Optionally, the phoneme space includes multiple phonemes and an empty output.

[0226] The decoding graph 630 is specifically used for:

[0227] The recognition results corresponding to the frames with a posteriori non-empty output in the first phoneme recognition results are input into the decoding graph to obtain the phoneme sequence and the first timestamp.

[0228] Optionally, the encoder includes a feed-forward sequential memory network FSMN.

[0229] Optionally, the decoding graph includes a phoneme dictionary and an instruction set model.

[0230] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, it will not be repeated here. Specifically, in this embodiment, the device 600 for voice command recognition may correspond to the corresponding subject of the method 300 for executing the embodiment of the present application, and the aforementioned and other operations and / or functions of each module in the device 600 are respectively for implementing the various methods above, or the corresponding processes in each method, and for the sake of brevity, they will not be repeated here.

[0231] The above describes the device and system of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0232] like Fig.13 It is a schematic block diagram of an electronic device 800 provided in an embodiment of the present application.

[0233] like Fig.13 As shown, the electronic device 800 may include:

[0234] The memory 810 and the processor 820, the memory 810 is used to store the computer program and transmit the program code to the processor 820. In other words, the processor 820 can call and run the computer program from the memory 810 to implement the method in the embodiment of the present application.

[0235] For example, the processor 820 may be configured to execute the steps in the above method 300 or 400 according to the instructions in the computer program.

[0236] In some embodiments of the present application, the processor 820 may include but is not limited to:

[0237] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0238] In some embodiments of the present application, the memory 810 includes but is not limited to:

[0239] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0240] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 810 and executed by the processor 820 to complete the coding method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 800.

[0241] Optional, such as Fig.13 As shown, the electronic device 800 may further include:

[0242] The transceiver 830 may be connected to the processor 820 or the memory 810 .

[0243] The processor 820 may control the transceiver 830 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include an antenna, and the number of antennas may be one or more.

[0244] It should be understood that the various components in the electronic device 800 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0245] According to one aspect of the present application, a communication device is provided, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that the encoder executes the method of the above method embodiment.

[0246] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0247] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the above method embodiment.

[0248] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0249] It is understandable that in the specific implementation of this application, user information and other related data may be involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0250] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0251] In the several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0252] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0253] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.< / eos> < / sos>

Claims

1. A method for voice command recognition, characterized in that: include: Acquire a speech signal, where the speech signal includes a plurality of speech frames; Inputting the speech signal into an acoustic model, obtaining a first phoneme recognition result corresponding to each speech frame in the speech signal, and a first acoustic hidden layer representation vector of each speech frame output by an encoder in the acoustic model, wherein the first phoneme recognition result includes a probability distribution of each speech frame in a phoneme space, and the acoustic model is obtained by training the speech signal sample and the actual phonemes of each speech frame in the speech signal sample; Inputting the first phoneme recognition result into a decoding graph to obtain a phoneme sequence corresponding to the speech signal and a first timestamp corresponding to the phoneme sequence; The phoneme sequence is verified according to the vector portion corresponding to the first timestamp in the first acoustic hidden layer representation vector and the neural network model to determine whether the phoneme sequence is used to trigger an instruction.

2. The method according to claim 1, characterized in that The verifying the phoneme sequence according to the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector and the neural network model to determine whether the phoneme sequence is used to trigger an instruction includes: Acquire a second timestamp according to the first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp; Inputting at least part of the first acoustic hidden layer representation vector into a phoneme discriminator, and obtaining a second phoneme recognition result corresponding to the second timestamp output by the phoneme discriminator; Aligning the second phoneme recognition result with the phoneme sequence to obtain a first confidence level, wherein the first confidence level is used to represent an alignment score between the second phoneme recognition result and the phoneme sequence; According to the first confidence, it is determined whether the phoneme sequence is used to trigger an instruction.

3. The method according to claim 2, characterized in that The aligning the second phoneme recognition result with the phoneme sequence includes: According to the phoneme sequence, a linear decoding graph is obtained, wherein a first symbol is added before the phoneme sequence in the linear decoding graph, and the first symbol is used to absorb the output of the second phoneme recognition result that does not correspond to the phoneme sequence; The second phoneme recognition result is input into the linear decoding graph, and the second phoneme recognition result and the phoneme sequence are aligned.

4. The method according to claim 2, characterized in that: Also includes: When the second phoneme recognition result is aligned with the phoneme sequence, obtaining a third timestamp, wherein the starting point of the third timestamp is a speech frame corresponding to the first phoneme in the second phoneme recognition result that is aligned with the phoneme sequence; In the first acoustic hidden layer representation vector, intercepting the second acoustic hidden layer representation vector corresponding to the third timestamp; Inputting the second acoustic hidden layer representation vector into a decoder to obtain a first decoding result matching the phoneme sequence and a second confidence level of the first decoding result; Wherein, determining whether the phoneme sequence is used to trigger an instruction according to the first confidence level includes: According to at least one of the first confidence and the second confidence, it is determined whether the phoneme sequence is used to trigger an instruction.

5. The method according to claim 4, characterized in that Also includes: The length of the decoding sequence of the decoder is determined according to the length of the phoneme sequence.

6. The method according to claim 4, characterized in that The decoder includes a Transformer decoder.

7. The method according to claim 4, characterized in that Also includes: Multi-task joint learning is performed according to a first loss of the acoustic model, a second loss of the phoneme discriminator, and a third loss of the decoder to jointly train the acoustic model, the phoneme discriminator, and the decoder.

8. The method according to claim 1, characterized in that: The verifying the phoneme sequence according to the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector and the neural network model to determine whether the phoneme sequence is used to trigger an instruction includes: Acquire a second timestamp according to the first timestamp, where a starting point of the second timestamp is before a starting point of the first timestamp; In the first acoustic hidden layer representation vector, intercepting a third acoustic hidden layer representation vector corresponding to the second timestamp; Inputting the third acoustic hidden layer representation vector into a decoder to obtain a second decoding result matching the phoneme sequence and a third confidence level of the second decoding result; According to the third confidence level, it is determined whether the phoneme sequence is used to trigger an instruction.

9. The method according to any one of claims 1 to 7, characterized in that: The phoneme space includes a plurality of phonemes and a null output; The step of inputting the first phoneme recognition result into a decoding graph to obtain a phoneme sequence corresponding to the speech signal and a first timestamp corresponding to the phoneme sequence includes: The recognition results corresponding to the frames with a posteriori non-empty output in the first phoneme recognition results are input into the decoding graph to obtain the phoneme sequence and the first timestamp.

10. The method according to any one of claims 1 to 7, characterized in that: The encoder includes a feed-forward sequential memory network FSMN.

11. The method according to any one of claims 1 to 7, characterized in that: The decoding graph includes a phoneme dictionary and an instruction set model.

12. A device for voice command recognition, characterized in that: include: An acquisition unit, configured to acquire a speech signal, wherein the speech signal includes a plurality of speech frames; An acoustic model, used for inputting the speech signal, obtaining a first phoneme recognition result corresponding to each speech frame in the speech signal, and a first acoustic hidden layer representation vector of each speech frame output by an encoder in the acoustic model, wherein the first phoneme recognition result includes a probability distribution of each speech frame in a phoneme space, and the acoustic model is obtained by training the speech signal sample and the actual phonemes of each speech frame in the speech signal sample; A decoding graph, used to input the first phoneme recognition result, obtain a phoneme sequence corresponding to the speech signal, and a first timestamp corresponding to the phoneme sequence; A verification module is used to verify the phoneme sequence according to the vector part corresponding to the first timestamp in the first acoustic hidden layer representation vector and the neural network model to determine whether the phoneme sequence is used to trigger an instruction.

13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the processor executes the method according to any one of claims 1 to 11.

14. A computer storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for executing the method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises a computer program code, and when the computer program code is executed by an electronic device, the electronic device executes the method according to any one of claims 1 to 11.