Instruction voice recognition method, device, equipment and storage medium

CN117636864BActive Publication Date: 2026-11-03CHENGDU TD TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211001392.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2026-11-03
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

In existing technologies, instruction speech recognition has a high error rate and low efficiency in noisy environments or when there is a lot of noise, mainly because non-instruction text and environmental noise affect the recognition results.

Method used

By obtaining the initial instruction text vector of the instruction speech, a preset mask value is used to mask the initial vectors that do not belong to the target vector set, retaining only the vectors of the text in the preset instruction set, reducing the impact of non-instruction text on the recognition results, and simplifying the dictionary search process.

Benefits of technology

It improves the accuracy and efficiency of command speech recognition, avoids interference from non-command text on the recognition results, and reduces the complexity of candidate text sequence search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117636864B_ABST
    Figure CN117636864B_ABST
Patent Text Reader

Abstract

The application provides a command speech recognition method and device, equipment and storage medium. The method comprises the following steps: obtaining an initial command text vector of a command speech after acoustic feature extraction; the initial command text vector comprises initial vectors of each isolated character in a command text corresponding to the command speech; obtaining a target vector set corresponding to a preset command set; the target vector set is composed of word vectors corresponding to each isolated character in the preset dictionary in the preset command set; performing a mask operation on the initial vectors in the initial command text vector which do not belong to the target vector set by using a preset mask value, so as to obtain a target command text vector; and converting the target command text vector into a target command text, so as to recognize a target command corresponding to the command speech. The application improves the accuracy and efficiency of command recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to artificial intelligence technology, and more particularly to a method, apparatus, device, and storage medium for command speech recognition. Background Technology

[0002] With the continuous development of artificial intelligence algorithms, more and more edge devices are using speech recognition algorithms to solve human-computer interaction problems in scenarios where it is inconvenient to use traditional input devices such as keyboards or mice. Command speech recognition is one such speech recognition scenario. Edge devices only need to recognize the text corresponding to the command to respond to the user's command.

[0003] In existing technologies, command-based speech recognition uses the same method as speech recognition in other scenarios: after extracting the feature vector of the speech, it searches for the corresponding text in a dictionary to obtain the recognition result. However, in noisy environments, with excessive noise, or when the speech signal is weak, non-command text can affect the recognition results, leading to a high error rate. Furthermore, each recognition operation requires searching all possible text sequences in the dictionary, resulting in low efficiency. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for command speech recognition, in order to solve the problem that non-command text affects the command speech recognition results in the prior art, thereby leading to high error rate and low efficiency in command speech recognition.

[0005] According to a first aspect of this application, a method for command speech recognition is provided, comprising:

[0006] Obtain the initial command text vector after acoustic feature extraction of the command speech; the initial command text vector includes the initial vectors of each isolated character in the command text corresponding to the command speech;

[0007] Obtain the target vector set corresponding to the preset instruction set; the target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary.

[0008] A preset mask value is used to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set, so as to obtain the target instruction text vector;

[0009] The target instruction text vector is converted into target instruction text in order to identify the target instruction corresponding to the instruction speech.

[0010] According to a second aspect of this application, a command voice recognition device is provided, comprising:

[0011] The first acquisition module is used to acquire the initial instruction text vector after acoustic feature extraction of the instruction speech; the initial instruction text vector includes the initial vector of each isolated character in the instruction text;

[0012] The second acquisition module is used to acquire the target vector set corresponding to the preset instruction set; the target vector set is composed of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary.

[0013] The masking module is used to perform a masking operation on the initial vectors in the initial instruction text vector that do not belong to the target vector set using a preset mask value, so as to obtain the target instruction text vector.

[0014] The conversion module is used to convert the target instruction text vector into the target instruction text in order to identify the target instruction corresponding to the instruction speech.

[0015] According to a third aspect of this application, an electronic device is provided, comprising: a processor, and a memory communicatively connected to the processor;

[0016] The memory stores computer-executed instructions;

[0017] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.

[0018] According to a fourth aspect of this application, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, are used to implement the method as described in the first aspect.

[0019] The instruction speech recognition method, apparatus, device, and storage medium provided in this application obtain an initial instruction text vector after acoustic feature extraction of the instruction speech; the initial instruction text vector includes the initial vectors of each isolated character in the instruction text; obtain a target vector set corresponding to a preset instruction set; the target vector set consists of word vectors corresponding to each isolated character in the preset instruction set in a preset dictionary; perform a masking operation on the initial vectors in the initial instruction text vector that do not belong to the target vector set using a preset mask value to obtain the target instruction text vector; convert the target instruction text vector into target instruction text to identify the target instruction corresponding to the instruction speech; since the target instruction text vector is not included in the provided text, the method, apparatus, device, and storage medium are described in the original text. The target vector set consists of word vectors corresponding to isolated characters in a preset dictionary within a preset instruction set. Therefore, by using a preset mask value to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set, we can mask the initial vectors of all characters in the initial instruction text that are not in the preset instruction set. During the process of converting the target instruction text vector into the target instruction text, only the unmasked initial vectors can affect the speech recognition result, thus avoiding the influence of non-instruction text on the recognition result. At the same time, it can reduce the complexity of searching for all candidate character sequences corresponding to the instruction text vector in the dictionary, thereby improving the accuracy and efficiency of instruction recognition. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0021] Figure 1 This is a network architecture diagram corresponding to the instruction speech recognition method provided in the embodiments of this application;

[0022] Figure 2 This is a schematic flowchart of the instruction speech recognition method provided in Embodiment 1 of this application;

[0023] Figure 3 This is a schematic flowchart of the instruction speech recognition method provided in Embodiment 2 of this application;

[0024] Figure 4 This is a schematic flowchart of the instruction speech recognition method provided in Embodiment 3 of this application;

[0025] Figure 5 This is a schematic flowchart of the instruction speech recognition method provided in Embodiment 4 of this application;

[0026] Figure 6 This is a schematic flowchart of the instruction speech recognition method provided in Embodiment 5 of this application;

[0027] Figure 7This is a schematic diagram of the command voice recognition device according to Embodiment Six of this application;

[0028] Figure 8 This is a block diagram of an electronic device provided according to Embodiment 7 of this application.

[0029] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0030] The prior art involved in this application will be described in detail and analyzed below.

[0031] Speech recognition, also known as Automatic Speech Recognition (ASR) or computer speech recognition, involves receiving a user's voice command and then using an acoustic feature extraction model to extract acoustic features from the command speech. This extracts the corresponding command text vector, which includes the feature vectors of each isolated character within the command text. The acoustic feature extraction process is as follows: First, the speech waveform is segmented into many small segments. Then, discrete Fourier transform, Mel-filter, and discrete cosine transform are used to transform one or more frames of the waveform into a multi-dimensional vector. This multi-dimensional vector is the feature vector of an isolated character in the command text. Next, based on the feature vectors of each isolated character, a dictionary is searched for all candidate character sequences corresponding to the command text vector. The candidate character sequence with the highest confidence level is identified as the recognized command. The dictionary contains the mapping relationship between feature vectors and characters.

[0032] In command-based speech recognition, simply recognizing the text corresponding to the command is sufficient to respond to the user's instructions. However, current technologies employ the same methods as other speech recognition scenarios. When recognizing command speech, feature vectors from non-command text or environmental noise can influence the reliability of candidate text sequences. This can result in the highest-reliability candidate text sequence not including the command text, thus affecting the recognition results and leading to a high error rate. Furthermore, feature vectors from non-command text or environmental noise increase the complexity of the command text vector, making the process of searching for all candidate text sequences corresponding to the command text vector in the dictionary more complex, further reducing recognition efficiency.

[0033] In response to the problem that non-command text affects the results of command speech recognition in existing technologies, leading to high error rates and low efficiency, the inventors, through creative research, have found that to improve the accuracy and efficiency of command speech recognition, it is necessary to reduce the influence of non-command text on the results. Therefore, a masking operation can be performed on the feature vectors corresponding to non-command text to reduce its impact on the command speech recognition results. Thus, the inventors propose the following technical solution: obtaining an initial command text vector after acoustic feature extraction of the command speech; the initial command text vector includes the initial vectors of each isolated character in the command text; obtaining a target vector set corresponding to a preset command set; the target vector set consists of word vectors corresponding to each isolated character in the preset command set in a preset dictionary; using a preset mask value to mask the initial vectors in the initial command text vector that do not belong to the target vector set to obtain the target command text vector; converting the target command text vector into target command text to identify the target command corresponding to the command speech. Since the target vector set consists of word vectors corresponding to isolated characters in the preset dictionary, using a preset mask value to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set can mask the initial vectors of all characters in the initial instruction text that are not in the preset instruction set. During the process of converting the target instruction text vector into the target instruction text, only the unmasked initial vectors can affect the speech recognition result, avoiding the influence of non-instruction text on the recognition result. At the same time, it can reduce the complexity of searching for all candidate character sequences corresponding to the instruction text vector in the dictionary, thereby improving the accuracy and efficiency of instruction recognition.

[0034] The command speech recognition method, apparatus, device, and storage medium provided in this application aim to solve the above-mentioned technical problems of the prior art. The technical solutions of this application and how they solve the aforementioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0035] The network architecture of the command speech recognition method provided in the embodiments of this application will be described below. When the following description refers to the accompanying drawings, unless otherwise indicated, the same data in different drawings represent the same or similar elements.

[0036] Figure 1 This paper illustrates the network architecture corresponding to an application scenario of the instruction speech recognition method provided in this application embodiment, such as... Figure 1 As shown, the network architecture corresponding to the command speech recognition method provided in this application embodiment includes: an electronic device 10. The electronic device 10 includes a receiving device 101, an acoustic feature extraction device 102, and a command speech recognition device 103.

[0037] The execution subject of the command speech recognition method provided in this application embodiment is the command speech recognition device 103.

[0038] The receiving device 101 can receive the command voice issued by the user and send the command voice to the acoustic feature extraction device 102. The command voice is in the form of sound waves.

[0039] The acoustic feature extraction device 102 is equipped with an acoustic feature extraction model, which can extract features from the command speech to obtain an initial command text vector, and then send the initial command text vector to the command speech recognition device 103. The initial command text vector includes the initial vectors of each isolated character in the command text corresponding to the command speech.

[0040] The command speech recognition device 103 can acquire the target vector set corresponding to the preset command set. The target vector set is composed of the word vectors corresponding to each isolated character in the preset command set in the preset dictionary.

[0041] The command speech recognition device 103 uses a preset mask value to mask the initial vectors in the initial command text vector that do not belong to the target vector set, so as to obtain the target command text vector; the target command text vector is converted into target command text to identify the target command corresponding to the command speech.

[0042] After the command voice recognition device 103 recognizes the target command, the electronic device 10 can execute the target command in response to the command voice issued by the user.

[0043] The aforementioned electronic device is a smart device. Users send voice commands to the smart device according to their needs. Upon receiving the voice commands and recognizing the target command within them, the smart device can execute the target command to respond to the user's voice commands, thus achieving human-computer interaction. Exemplary examples include, but are not limited to, smartphones, tablets, smartwatches, smart bracelets, smart home devices, smart driving devices, and smart law enforcement devices. Optionally, the aforementioned electronic device may be a law enforcement recorder, etc. The aforementioned receiving device may include a microphone configured to receive external audio signals.

[0044] The embodiments of this application will now be described with reference to the accompanying drawings. The embodiments described below do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0045] Example 1

[0046] Figure 2This is a flowchart illustrating the instruction speech recognition method according to Embodiment 1 of this application, as shown below. Figure 2 As shown, the executing entity of this application is a command voice recognition device, which can be located in an electronic device. The command voice recognition method provided in this embodiment includes steps 201 to 204.

[0047] Step 201: Obtain the initial command text vector after acoustic feature extraction of the command speech; the initial command text vector includes the initial vectors of each isolated character in the command text corresponding to the command speech.

[0048] In this embodiment, the command voice is the command voice issued by the user, and the corresponding command text includes the target command that the user wants the electronic device to execute. The electronic device may be equipped with a receiving device and an acoustic feature extraction device. The receiving device is used to receive the command voice issued by the user, and the acoustic feature extraction device is used to extract features from the command voice to obtain an initial command text vector. The electronic device can also receive initial command text vectors issued by other devices through the receiving device.

[0049] The initial instruction text vector can be a vector group consisting of multiple vectors, where each vector in the vector group can be the initial vector of an isolated character in the instruction text corresponding to the instruction speech.

[0050] Step 202: Obtain the target vector set corresponding to the preset instruction set; the target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary.

[0051] In this embodiment, the electronic device may store a target vector set corresponding to a preset instruction set. When the instruction speech recognition method is executed, the stored target vector set can be directly read. The electronic device may also receive target vector sets sent by other devices through a receiving device.

[0052] The target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary. The preset dictionary can be a pronunciation dictionary corresponding to the acoustic feature extraction model. The preset dictionary includes the correspondence between each initial vector extracted by the acoustic feature extraction model and the characters.

[0053] Step 203: Use a preset mask value to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set, so as to obtain the target instruction text vector.

[0054] In this embodiment, the preset mask value can be a preset vector, and the dimension of the preset vector is the same as the dimension of the initial vector. The preset vector can be a vector whose corresponding text does not exist in the preset dictionary, or it can be a vector that is pre-set not to be searched in the preset dictionary when converting the target instruction text vector into target instruction text. For example, when the initial vector is a 128-dimensional vector, the preset mask value can be a 128-dimensional preset vector.

[0055] Step 204: Convert the target instruction text vector into target instruction text to identify the target instruction corresponding to the instruction speech.

[0056] In this embodiment, all candidate text sequences corresponding to the target instruction text vector can be searched in a preset dictionary, and the candidate text sequence with the highest confidence can be determined as the target instruction text, and the instruction in the target instruction text can be determined as the target instruction corresponding to the instruction voice.

[0057] The instruction speech recognition method provided in this embodiment obtains an initial instruction text vector after acoustic feature extraction of the instruction speech; the initial instruction text vector includes the initial vectors of each isolated character in the instruction text corresponding to the instruction speech; obtains a target vector set corresponding to a preset instruction set; the target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in a preset dictionary; performs a masking operation on the initial vectors in the initial instruction text vector that do not belong to the target vector set using a preset mask value to obtain the target instruction text vector; converts the target instruction text vector into target instruction text to identify the target instruction corresponding to the instruction speech; since the target vector set... The initial vectors are composed of word vectors corresponding to isolated characters in a preset dictionary within a preset instruction set. Therefore, by using a preset mask value to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set, the initial vectors of all characters in the initial instruction text that are not in the preset instruction set can be masked. During the process of converting the target instruction text vector into the target instruction text, only the unmasked initial vectors can affect the speech recognition result, thus avoiding the influence of non-instruction text on the recognition result. At the same time, it can reduce the complexity of searching for all candidate character sequences corresponding to the instruction text vector in the dictionary, thereby improving the accuracy and efficiency of instruction recognition.

[0058] As an optional implementation, step 203 involves using a preset mask value to mask the initial vectors in the initial instruction text vector that do not belong to the target vector set, in order to obtain the target instruction text vector. This refinement results in step 203 being refined into the following scheme.

[0059] Modify all element values ​​in the initial vector that do not belong to the target vector set to the preset mask value to complete the masking operation and obtain the target instruction text vector.

[0060] In this embodiment, since the values ​​of each dimension in the initial vector can be understood as the association attributes between the corresponding characters in the initial vector, for initial vectors that do not belong to the target vector set, to ensure that they do not affect the target instruction text during the subsequent conversion of the target instruction text vector into the target instruction text, all element values ​​of the initial vectors that do not belong to the target vector set can be modified to a preset mask value. In this embodiment, the preset mask value can be 0 or a value that has no association attributes with other characters in the preset dictionary.

[0061] In this embodiment, the target instruction text vector is obtained by modifying all element values ​​in the initial vector that does not belong to the target vector set to preset mask values ​​to complete the masking operation. Since modifying all elements in the initial vector that does not belong to the target vector set to preset mask values ​​masks the association between the initial vector that does not belong to the target vector set and other vectors, the non-instruction text can be avoided from affecting the recognition result during the process of converting the target instruction text vector into target instruction text.

[0062] Example 2

[0063] Figure 3 This is a flowchart illustrating the instruction speech recognition method according to Embodiment 2 of this application, as shown below. Figure 3 As shown, the instruction speech recognition method provided in this embodiment, based on any of the above embodiments, further includes steps 301 to 303.

[0064] Step 301: Obtain each isolated character from the preset instruction set.

[0065] In this embodiment, the preset instruction set can be a set of instructions that the electronic device can execute, or a set of operation names that the electronic device can perform in response to voice commands issued by the user. The preset instruction set can be different for different electronic devices.

[0066] In this embodiment, all isolated characters in the preset instruction set can be determined based on the instruction name or operation name in the preset instruction set.

[0067] Step 302: Determine the word vector corresponding to each isolated character in the preset dictionary.

[0068] In this embodiment, the preset dictionary can be a commonly used speech recognition dictionary. The preset dictionary stores the mapping relationship between characters and word vectors. Therefore, the word vector corresponding to each isolated character can be queried in the preset dictionary.

[0069] Step 303: Determine the set of word vectors as the target vector set.

[0070] In this embodiment, the set of word vectors corresponding to each isolated character in the preset instruction set can be directly determined as the target vector set.

[0071] The instruction speech recognition method provided in this embodiment obtains each isolated character in a preset instruction set; determines the word vector corresponding to each isolated character in a preset dictionary; and determines the set of word vectors as the target vector set. Since the set of word vectors of each isolated character in the preset instruction set is determined as the target vector set, it can ensure that the initial vector belonging to the target vector set is definitely the instruction character, thereby ensuring that the initial vector corresponding to the instruction character will not be masked during subsequent masking.

[0072] Example 3

[0073] Figure 4 This is a flowchart illustrating the instruction speech recognition method according to Embodiment 3 of this application, as shown below. Figure 4 As shown, the instruction speech recognition method provided in this embodiment is based on any of the above embodiments. Step 201 involves obtaining the initial text vector of the instruction speech after acoustic feature extraction, and then includes step 401.

[0074] Step 401: Determine whether the number of instructions in the voice command is greater than one.

[0075] In this embodiment, after obtaining the initial text vector, it can be determined sequentially whether there are pause features in each initial vector of the initial text vector. The pause feature is a feature that can reflect whether the speech is paused. For example, it can be one or more preset dimensions in the initial vector, such as the dimension that reflects the amplitude of the sound wave and the dimension that reflects the time interval between the peaks and troughs of the sound wave.

[0076] In this embodiment, during the process of determining whether each initial vector has a pause feature, if the number of initial vectors with pause features is greater than one, it can be determined that the number of instructions in the instruction speech is greater than one.

[0077] If it is determined that the number of instructions in the voice command is greater than one, then in step 204, the target instruction text vector is converted into target instruction text to identify the target instruction corresponding to the voice command and refine it. Then, step 204 refinement includes steps 402 to 403.

[0078] In this embodiment, if the number of instructions in the instruction voice is greater than one, since these multiple instructions are in one instruction voice, it may be impossible to distinguish multiple instructions when recognizing the target instruction corresponding to the instruction voice.

[0079] Step 402: Obtain at least one sentence segmentation identifier corresponding to the target instruction text vector after the number of determined instructions is greater than one.

[0080] In this embodiment, after determining that the number of instructions is greater than one, at least one sentence segmentation identifier corresponding to the target instruction text vector is obtained. The sentence segmentation identifier can be used to distinguish multiple instructions. The sentence segmentation identifier can correspond to the initial vector in the initial instruction text vector, and can also correspond to the initial vector in the target instruction text vector, or the initial vector after masking in the target instruction text vector, after a masking operation. The sentence segmentation identifier can be determined by the following scheme: sequentially determining whether there are pause features in each initial vector in the initial text vector, and generating a sentence segmentation identifier corresponding to the initial vector with pause features.

[0081] Step 403: Convert the target instruction text vector into at least two target instruction texts based on at least one sentence segmentation identifier, so as to identify at least two target instructions corresponding to the instruction speech.

[0082] In this embodiment, after searching for the candidate text sequence with the highest confidence in the target instruction text vector in the preset dictionary, the candidate text sequence with the highest confidence can be split into at least two groups of target text sequences according to the initial vector where the sentence segmentation mark is located, or the text corresponding to the initial vector after the mask where the sentence segmentation mark is located. The instructions in the at least two groups of target text sequences are determined as at least two target instruction texts, so as to determine at least two target instructions corresponding to the instruction speech.

[0083] The instruction speech recognition method provided in this embodiment determines whether the number of instructions in the instruction speech is greater than one. If it is determined that the number of instructions in the instruction speech is greater than one, the target instruction text vector is converted into target instruction text to identify the target instruction corresponding to the instruction speech. This includes: obtaining at least one sentence segmentation identifier corresponding to the target instruction text vector after determining that the number of instructions is greater than one; converting the target instruction text vector into at least two target instruction texts according to the at least one sentence segmentation identifier to identify at least two target instructions corresponding to the instruction speech. Since converting the target instruction text vector into at least two target instruction texts according to the sentence segmentation identifier after determining that the number of instructions in the instruction speech is greater than one can distinguish multiple instructions in one instruction speech, so as to distinguish multiple instructions when multiple instructions are input continuously.

[0084] Example 4

[0085] Figure 5 This is a flowchart illustrating the instruction speech recognition method according to Embodiment 4 of this application, as shown below. Figure 5 As shown, the instruction speech recognition method provided in this embodiment is based on any of the above embodiments, and the step 401, which is to determine whether the number of instructions in the instruction speech is greater than one, is refined. The refinement includes steps 501 to 502.

[0086] Step 501: Determine whether each initial vector has a pause feature. The pause feature indicates that the element value of the initial vector in the preset dimension is a pause value.

[0087] In this embodiment, the pause feature can be the amplitude of the speech waveform corresponding to the initial vector, or the interval time with the previous peak, etc. During the process of transforming the framed speech waveform into the initial vector, the amplitude features and time intervals of the speech waveform are transformed into element values ​​of one or more preset dimensions in the initial vector. Therefore, the presence of a pause feature in the initial vector can be determined by the element values ​​of the initial vector in the preset dimensions. For example, if the element value of the initial vector in the preset dimension is a pause value, then it is determined that the initial vector has a pause feature. The pause value can be a preset range value, where the range of pause values ​​is the range of possible element values ​​at preset positions in the waveform of the command speech with a pause after transformation into the initial vector. The range of pause values ​​can be obtained by training an acoustic feature extraction model.

[0088] Step 502: If it is determined that at least one initial vector has a pause feature, then it is determined that the number of instructions in the instruction speech is greater than one.

[0089] In this embodiment, if at least one initial vector exhibits a pause feature, then the user's spoken command contains a pause. Therefore, it can be determined that the number of commands in the spoken command is greater than one. A number of commands greater than one means that there is a pause in the user's spoken command. Since the user paused when issuing the command, the user's spoken command is recognized based on the condition that the number of commands is greater than one.

[0090] The command speech recognition method provided in this embodiment determines whether each initial vector has a pause feature. The pause feature indicates that the element value of the initial vector in a preset dimension is a pause value. If at least one initial vector is determined to have a pause feature, it is determined that the number of commands in the command speech is greater than one. Since the pauses in the initial vectors reflect the pause features when the user issues the command speech, the pauses in the command speech can be accurately determined, thereby determining that the number of commands in the command speech is greater than one. Then, the command speech is recognized using a recognition method for commands with more than one command, so as to distinguish multiple continuously input commands.

[0091] As an optional implementation, based on any of the above embodiments, the instruction speech recognition method provided in this embodiment further includes the following steps if it is determined that the initial vector has pause features.

[0092] Generate pause markers; determine the pause markers as the sentence segmentation markers corresponding to the target instruction text vector; the pause markers correspond to the initial vectors with pause features, or to the initial vectors with pause features after masking.

[0093] In this embodiment, if it is determined that the initial vector has pause features, a pause identifier corresponding to the initial vector can be generated. This pause identifier can be used to distinguish whether the initial vector has pause features. Since the masking operation masks the initial vector, any pause features that may exist in the masked initial vector are concealed, but the masking operation does not change the pause features corresponding to the initial vector. It can be understood that if an initial vector has a corresponding pause identifier before masking, then after masking, the pause identifier corresponding to this masked initial vector will be consistent with the corresponding pause identifier before masking. Therefore, the pause identifier can be determined as the sentence segmentation identifier corresponding to the target instruction text.

[0094] The instruction speech recognition method provided in this embodiment generates pause markers; determines the pause markers as sentence segmentation markers corresponding to the target instruction text vector; the pause markers correspond to the initial vectors with pause features, or to the initial vectors with pause features after masking; since the pause markers correspond to the initial vectors with pause features, or to the initial vectors with pause features after masking, the masking operation can ensure that the pause features of the initial vectors are not obscured, thus ensuring that multiple continuously input instructions can be distinguished during speech recognition.

[0095] Example 5

[0096] Figure 6 This is a flowchart illustrating the instruction speech recognition method according to Embodiment Six of this application, as shown below. Figure 6 As shown, the instruction speech recognition method provided in this embodiment is based on any of the above embodiments. In step 404, the target instruction text vector is converted into at least two target instruction texts according to at least one sentence segmentation identifier in order to identify at least two target instructions corresponding to the instruction speech. The refinement includes steps 601 to 603.

[0097] Step 601: Determine the position of the initial vector with pause features or the initial vector with pause features in the target instruction text vector based on at least one sentence segmentation identifier.

[0098] In this embodiment, for ease of description, the initial vector with pause features corresponding to the sentence segmentation identifier, or the initial vector with pause features after masking, is simply referred to as the vector corresponding to the sentence segmentation identifier. The position of the vector corresponding to the sentence segmentation identifier in the target text vector can be determined based on the sentence segmentation identifier. The position of the vector corresponding to the sentence segmentation identifier in the target text vector can be the order of the vector corresponding to the sentence segmentation identifier in the target instruction text vector. For example, if the target instruction text vector is a vector group composed of multiple initial vectors, then the position of the vector corresponding to the sentence segmentation identifier in the target instruction text vector can be that the vector corresponding to the sentence segmentation identifier is the nth vector in the vector group.

[0099] Step 602: Split the target instruction text vector into at least two sub-vectors based on the position.

[0100] In this embodiment, when there is only one sentence segmentation identifier, the vector corresponding to the sentence segmentation identifier and the vector between the target instruction text vector and the vector corresponding to the sentence segmentation identifier can be defined as a sub-vector, and the vector after the vector corresponding to the sentence segmentation identifier can be defined as a sub-vector. When there are multiple sentence segmentation identifiers, the vector corresponding to each sentence segmentation identifier and the vector between the vector corresponding to each sentence segmentation identifier and the vector corresponding to the previous sentence segmentation identifier can be defined as a single vector.

[0101] Step 603: Convert at least two subvectors into at least two target instruction texts to identify at least two target instructions corresponding to the instruction speech.

[0102] In this embodiment, candidate text sequences corresponding to each sub-vector can be searched in a preset dictionary, and the candidate text sequence with the highest confidence among the candidate text sequences corresponding to each sub-vector is determined as the target text sequence corresponding to each sub-vector. The target text sequences corresponding to each sub-vector are then used to determine the target instruction text corresponding to each sub-vector. The instructions in the target instruction text corresponding to each sub-vector are then determined as target instructions, thereby identifying at least two target instructions.

[0103] In this embodiment, it is understood that the solution can be independent of the masking operation step. That is, when using the solution of this embodiment for instruction speech recognition, the masking operation can be omitted. Therefore, in the solution with the masking operation, the initial vectors in the sub-vectors may all be masked during the masking process; thus, at least two target instructions may contain a target instruction that is not present. In the solution without the masking operation, at least two target instructions do not contain a target instruction that is not present.

[0104] The instruction speech recognition method provided in this embodiment determines the position of the initial vector with pause features in the target instruction text vector based on at least one sentence segmentation identifier or a mask; it then splits the target instruction text vector into at least two sub-vectors based on the position; and finally converts the at least two sub-vectors into at least two target instruction texts to identify at least two target instructions corresponding to the instruction speech. Since the target instruction text vector is split before converting the vector into text, it can avoid mutual interference between instructions during the conversion process, thereby enabling more accurate identification of multiple target instructions.

[0105] Example 6

[0106] Figure 7 This is a schematic diagram of the command voice recognition device structure provided in Embodiment 7 of this application, as shown below. Figure 7 As shown, the instruction voice recognition device 70 provided in this embodiment includes a first acquisition module 71, a second acquisition module 72, a mask module 73, and a conversion module 74.

[0107] The first acquisition module 71 is used to acquire the initial instruction text vector after acoustic feature extraction of the instruction speech; the initial instruction text vector includes the initial vector of each isolated character in the instruction text;

[0108] The second acquisition module 72 is used to acquire the target vector set corresponding to the preset instruction set; the target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary.

[0109] Masking module 73 is used to perform masking operation on the initial vectors in the initial instruction text vector that do not belong to the target vector set using a preset mask value, so as to obtain the target instruction text vector;

[0110] The conversion module 74 is used to convert the target instruction text vector into target instruction text in order to identify the target instruction corresponding to the instruction speech.

[0111] As an optional implementation, the masking module 73 is specifically used to modify all element values ​​in the initial vector that do not belong to the target vector set to preset mask values ​​in order to complete the masking operation and obtain the target instruction text vector.

[0112] As an optional implementation, the instruction speech recognition device 70 further includes a third determining module, which is used to: acquire each isolated character in a preset instruction set; determine the word vector corresponding to each isolated character in a preset dictionary; and determine the set of word vectors as the target vector set.

[0113] As an optional implementation, the command speech recognition device 70 further includes a judgment module, which is used to determine whether the number of commands in the command speech is greater than one; if it is determined that the number of commands in the command speech is greater than one, the conversion module 74 is specifically used to obtain at least one sentence segmentation identifier corresponding to the target command text vector after determining that the number of commands is greater than one; and convert the target command text vector into at least two target command texts according to at least one sentence segmentation identifier, so as to identify at least two target commands corresponding to the command speech.

[0114] As an optional implementation, the determination module is specifically used to determine whether each initial vector has a pause feature, where the pause feature indicates that the element value of the initial vector in a preset dimension is a pause value; if it is determined that at least one initial vector has a pause feature, then it is determined that the number of instructions in the instruction speech is greater than one.

[0115] As an optional implementation, if it is determined that the initial vector has a pause feature, the judgment module is further used to generate a pause identifier; determine the pause identifier as the sentence segmentation identifier corresponding to the target instruction text vector; the pause identifier corresponds to the initial vector with the pause feature, or corresponds to the initial vector with the pause feature after masking.

[0116] As an optional implementation, the conversion module 74 is further configured to: determine the position of the initial vector with pause features or the initial vector with pause features in the target instruction text vector based on at least one sentence segmentation identifier; split the target instruction text vector into at least two sub-vectors based on the position; and convert the at least two sub-vectors into at least two target instruction texts to identify at least two target instructions corresponding to the instruction speech.

[0117] The command speech recognition device provided in this embodiment can execute the command speech recognition method provided in any of the above embodiments. The specific implementation method and principle are similar, and will not be described again here.

[0118] Example 7

[0119] Figure 8 This is a block diagram of an electronic device provided according to Embodiment 8 of this application, such as Figure 8 As shown, the electronic device 80 provided in this embodiment includes a memory 81 and a processor 82.

[0120] The memory 81 and the processor 82 are communicatively connected.

[0121] Memory 81 stores computer-executed instructions.

[0122] The processor 82 executes computer execution instructions stored in the memory 81 to implement the instruction speech recognition method provided in any of the above embodiments.

[0123] In an exemplary embodiment, the electronic device 80 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-described instruction speech recognition method.

[0124] Memory 81 is configured to store various types of data to support the operation of electronic device 80, examples of which include instructions for any application or method operating on electronic device 80. Memory 81 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0125] As an optional implementation, the electronic device 80 also includes a transceiver for receiving data. Exemplarily, the transceiver can be used to receive user commands via voice. The memory 81, processor 82, and transceiver are connected via a bus.

[0126] Embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the instruction-based speech recognition method provided in any of the above embodiments. Exemplarily, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), magnetic tape, floppy disk, or optical data storage device, etc.

[0127] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0128] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0129] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0130] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for command speech recognition, characterized in that, include: Obtain the initial command text vector after acoustic feature extraction of the command speech; the initial command text vector includes the initial vectors of each isolated character in the command text corresponding to the command speech; Obtain the target vector set corresponding to the preset instruction set; the target vector set consists of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary. The initial vectors in the initial instruction text vector that do not belong to the target vector set are masked using a preset mask value to obtain the target instruction text vector; the preset mask value is a vector that is pre-set to not be searched in a preset dictionary when converting the target instruction text vector into target instruction text; The target instruction text vector is converted into target instruction text in order to identify the target instruction corresponding to the instruction speech.

2. The method according to claim 1, characterized in that, The step of masking the initial vectors in the initial instruction text vector that do not belong to the target vector set with a preset mask value to obtain the target instruction text vector includes: Modify all element values ​​in the initial vector that does not belong to the target vector set to preset mask values ​​to complete the masking operation and obtain the target instruction text vector.

3. The method according to claim 1, characterized in that, Before obtaining the target vector set corresponding to the preset instruction set, the method further includes: Retrieves isolated characters from a preset instruction set; Determine the word vector corresponding to each isolated character in the preset dictionary; The set of word vectors is determined as the target vector set.

4. The method according to claim 1, characterized in that, After obtaining the initial instruction text vector after acoustic feature extraction, the process further includes: Determine whether the number of instructions in the spoken command is greater than one; If it is determined that the number of instructions in the command speech is greater than one, then the step of converting the target instruction text vector into target instruction text to identify the target instruction corresponding to the command speech includes: Obtain at least one sentence segmentation identifier corresponding to the target instruction text vector after the number of determined instructions is greater than one; The target instruction text vector is converted into at least two target instruction texts based on at least one sentence segmentation identifier, so as to identify at least two target instructions corresponding to the instruction speech.

5. The method according to claim 4, characterized in that, Determining whether the number of instructions in the command voice is greater than one includes: Determine whether each of the initial vectors has a pause feature, wherein the pause feature indicates that the element value of the initial vector in a preset dimension is a pause value; If at least one of the initial vectors is determined to have a pause feature, then the number of instructions in the instruction speech is determined to be greater than one.

6. The method according to claim 5, characterized in that, If it is determined that the initial vector exhibits a pause characteristic, then the method further includes: Generate a pause identifier; determine the pause identifier as the sentence segmentation identifier corresponding to the target instruction text vector; the pause identifier corresponds to an initial vector with pause features, or corresponds to an initial vector with pause features after masking.

7. The method according to claim 4, characterized in that, The step of converting the target instruction text vector into at least two target instruction texts based on at least one sentence segmentation identifier, in order to identify at least two target instructions corresponding to the instruction speech, includes: The position of the initial vector with pause features in the target instruction text vector is determined based on at least one sentence segmentation identifier, after which the initial vector with pause features is located in the target instruction text vector. The target instruction text vector is split into at least two sub-vectors based on the location; The at least two subvectors are converted into at least two target instruction texts to identify at least two target instructions corresponding to the instruction speech.

8. A voice recognition device for commands, characterized in that, include: The first acquisition module is used to acquire the initial instruction text vector after acoustic feature extraction of the instruction speech; The initial instruction text vector includes the initial vectors of each isolated character in the instruction text; The second acquisition module is used to acquire the target vector set corresponding to the preset instruction set; the target vector set is composed of the word vectors corresponding to each isolated character in the preset instruction set in the preset dictionary. The masking module is used to perform a masking operation on the initial vectors in the initial instruction text vector that do not belong to the target vector set using a preset mask value, so as to obtain the target instruction text vector; the preset mask value is a vector that is pre-set to not be searched in a preset dictionary when converting the target instruction text vector into target instruction text; The conversion module is used to convert the target instruction text vector into the target instruction text in order to identify the target instruction corresponding to the instruction speech.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Voice detection method, electronic equipment and computer storage medium

    CN114822511A

  • Voice command recognition method, electronic device and non-transitory computer-readable storage medium

    WO2022147692A1