Instruction word recognition method, device, electronic device and storage medium

By using pre -trained phonetic identification model recognition and predictive phonetic pronuncin sequence, combined with the instruction collection to determine the target instruction phonetic sequence, solve the problem of high training cost of instruction words in the existing technology, and achieve high -efficiency instruction recognition identification Essence

CN115101064BActive Publication Date: 2025-01-24ANKER INNOVATIONS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210858697.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-01-24
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

In the prior art, the training cost of the instruction word recognition model is relatively high, and a large number of people need to record the instruction word corpus to train the model, which is time-consuming and labor-intensive.

Method used

By obtaining the set of speech and instruction words to be recognized, using a pre-trained phoneme recognition model to identify the phonemes of the speech to be recognized, predicting the phoneme sequence, and determining the phoneme sequence of the target instruction word based on the instruction word set, thereby identifying the instruction word corresponding to the speech to be recognized. .

Benefits of technology

The cost of model training has been reduced, the needs of recording phonetic liberals for each application scenario are avoided, and the efficiency of instruction recognition is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115101064B_ABST
    Figure CN115101064B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for recognizing instruction words, which belongs to the field of speech recognition technology. The present application obtains a speech to be recognized and an instruction word set, wherein the instruction word set includes at least one instruction word and an instruction word phoneme sequence converted from the text content corresponding to the instruction word; inputs the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs the target phoneme corresponding to the speech to be recognized; predicts the target phoneme sequence corresponding to the target phoneme; determines the target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set, and uses the instruction word corresponding to the target instruction word phoneme sequence as the target instruction word corresponding to the speech to be recognized.
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 in particular to a command word recognition method, device, electronic device and storage medium. Background Art

[0002] With the advancement of machine learning technology and the rapid popularization of mobile Internet, speech recognition technology, also known as automatic speech recognition (ASR), has been widely used in various fields of society. Its goal is to allow machines to convert speech signals into text through recognition and understanding. It is an important branch of the development of modern artificial intelligence. For example, setting up speech recognition function on smart electronic products allows users to interact with products through simple command words.

[0003] At present, in the process of command word recognition, the speech is generally input into the speech recognition model to directly recognize the text corresponding to the speech to obtain the corresponding command word. Before recognition by this method, it is necessary to find a large number of people to record the corresponding corpus of the command words, and then use these corpuses to train the speech recognition model until the model converges. Finally, the trained speech recognition model is used to realize the recognition of these command words.

[0004] However, different products require different command words according to their application scenarios. Therefore, each product needs to find someone to record a large amount of command word materials in advance in order to train a model suitable for the scenario through these corpora, which is time-consuming and labor-intensive, and the model training cost is high. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a command word recognition method, device, electronic device and storage medium to solve the problem of high model training cost. The specific technical solution is as follows:

[0006] In a first aspect, a method for recognizing instruction words is provided, the method comprising:

[0007] Acquire a speech to be recognized and a set of command words, wherein the set of command words includes at least one command word and a phoneme sequence of the command word converted from text content corresponding to the command word;

[0008] Inputting the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs the target phoneme corresponding to the speech to be recognized;

[0009] Predicting a target phoneme sequence corresponding to the target phoneme;

[0010] A target instruction word phoneme sequence corresponding to the target phoneme sequence is determined according to the instruction word set, and the instruction word corresponding to the target instruction word phoneme sequence is used as the target instruction word corresponding to the speech to be recognized.

[0011] In a possible implementation, the phoneme recognition model includes a speech processing model and a natural language processing model.

[0012] The step of inputting the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized includes:

[0013] Inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized;

[0014] The first phoneme is input into the natural language processing model so that the natural language processing model predicts a second phoneme corresponding to the first phoneme, and the first phoneme and the second phoneme are used as the target phonemes.

[0015] In a possible implementation, the method further includes:

[0016] Acquire a sample speech and a sample text corresponding to the sample speech, and determine a sample phoneme corresponding to the sample text;

[0017] The sample speech is used as a model input, and the sample phonemes are used as labels to train a speech processing deep learning model to obtain the speech processing model.

[0018] In a possible implementation, the method further includes:

[0019] For each sample phoneme, the sample phoneme is used as a model input, and the next sample phoneme corresponding to the sample phoneme is used as a label to train a natural language processing deep learning model to obtain the natural language processing model.

[0020] In a possible implementation manner, inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized includes:

[0021] Convert the speech to be recognized into a frequency spectrum by short-time Fourier transform, and determine a Mel-spectrogram corresponding to the frequency spectrum;

[0022] The mel-spectrogram is input into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

[0023] In a possible implementation, determining the target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set includes:

[0024] For any instruction word phoneme sequence in the instruction word phoneme sequence set, determining the probability that the target phoneme sequence is the instruction word phoneme sequence;

[0025] An instruction word phoneme sequence whose probability is not less than a preset threshold is determined as a candidate instruction word phoneme sequence, and the target instruction word phoneme sequence is determined in the candidate instruction word phoneme sequence.

[0026] In a possible implementation, determining the target instruction word corresponding to the to-be-recognized speech in the candidate instruction word phoneme sequence includes:

[0027] For each candidate instruction word phoneme sequence, the number of times the candidate instruction word phoneme sequence is used is determined, and the candidate instruction word phoneme sequence with the largest number of times used is determined as the target instruction word phoneme sequence.

[0028] In a second aspect, a device for recognizing instruction words is provided, the device comprising:

[0029] An acquisition module, used to acquire a speech to be recognized and a set of instruction words, wherein the set of instruction words includes at least one instruction word and an instruction word phoneme sequence converted from text content corresponding to the instruction word;

[0030] An input module, used for inputting the speech to be recognized into a pre-trained phoneme recognition model, so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized;

[0031] A prediction module, used to predict a target phoneme sequence corresponding to the target phoneme;

[0032] The determination module is also used to determine the target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set, and use the instruction word corresponding to the target instruction word phoneme sequence as the target instruction word corresponding to the speech to be recognized.

[0033] In a possible implementation, the phoneme recognition model includes a speech processing model and a natural language processing model.

[0034] The input module is specifically used for:

[0035] Inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized;

[0036] The first phoneme is input into the natural language processing model so that the natural language processing model predicts a second phoneme corresponding to the first phoneme, and the first phoneme and the second phoneme are used as the target phonemes.

[0037] In a possible implementation, the device further includes a speech processing model training module, which is used to:

[0038] Acquire a sample speech and a sample text corresponding to the sample speech, and determine a sample phoneme corresponding to the sample text;

[0039] The sample speech is used as a model input, and the sample phonemes are used as labels to train a speech processing deep learning model to obtain the speech processing model.

[0040] In a possible implementation, the method further includes a natural language processing model training module, which is used to:

[0041] For each sample phoneme, the sample phoneme is used as a model input, and the next sample phoneme corresponding to the sample phoneme is used as a label to train a natural language processing deep learning model to obtain the natural language processing model.

[0042] In a possible implementation manner, the input module is further used for:

[0043] Convert the speech to be recognized into a frequency spectrum by short-time Fourier transform, and determine a Mel-spectrogram corresponding to the frequency spectrum;

[0044] The mel-spectrogram is input into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

[0045] In a possible implementation manner, the determining module is specifically configured to:

[0046] For any instruction word phoneme sequence in the instruction word phoneme sequence set, determining the probability that the target phoneme sequence is the instruction word phoneme sequence;

[0047] An instruction word phoneme sequence whose probability is not less than a preset threshold is determined as a candidate instruction word phoneme sequence, and the target instruction word phoneme sequence is determined in the candidate instruction word phoneme sequence.

[0048] In a possible implementation manner, the determining module is further configured to:

[0049] For each candidate instruction word phoneme sequence, the number of times the candidate instruction word phoneme sequence is used is determined, and the candidate instruction word phoneme sequence with the largest number of times used is determined as the target instruction word phoneme sequence.

[0050] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0051] Memory, used to store computer programs;

[0052] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0053] In a fourth aspect, a computer-readable storage medium is provided, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0054] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the instruction word recognition methods described above.

[0055] Beneficial effects of the embodiments of the present application:

[0056] The embodiments of the present application provide a method, device, electronic device and storage medium for command word recognition. In the present application, first, a speech to be recognized and a set of command words are obtained, wherein the command word set includes at least one command word and a command word phoneme sequence converted from the text content corresponding to the command word; then, the speech to be recognized is input into a pre-trained phoneme recognition model so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized; then, a target phoneme sequence corresponding to the target phoneme is predicted; finally, a target command word phoneme sequence corresponding to the target phoneme sequence is determined according to the command word set, and the command word corresponding to the target command word phoneme sequence is used as the target command word corresponding to the speech to be recognized.

[0057] That is, through this application, when facing instruction words of different application scenarios, it is only necessary to convert the text content corresponding to the instruction word to obtain the instruction word phoneme sequence, then identify the phonemes of the speech to be recognized through the pre-trained phoneme recognition model, and determine the phoneme sequence corresponding to the phoneme, and finally, by comparing the phoneme sequence with the instruction word phoneme sequence corresponding to the application scenario, determine the instruction word corresponding to the speech to be recognized. Therefore, there is no need to record voice corpus for each scenario for model training, reducing the cost of model training.

[0058] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0060] Figure 1 A flowchart of a method for recognizing command words provided in an embodiment of the present application;

[0061] Figure 2 A flowchart of a command word recognition method provided by another embodiment of the present application;

[0062] Figure 3 A flowchart of a command word recognition method provided by another embodiment of the present application;

[0063] Figure 4 A flowchart of a command word recognition method provided by another embodiment of the present application;

[0064] Figure 5 A schematic diagram of the structure of a command word recognition device provided in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] 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 creative work are within the scope of protection of this application.

[0067] At present, before the speech recognition model recognizes the corresponding instruction words by inputting the speech, it is necessary to find a large number of people to record the corresponding corpus of the instruction words, and then use these corpus to train the speech recognition model until the model converges, and finally, use the trained speech recognition model to realize the recognition of these instruction words. However, different products require different instruction words according to their different application scenarios, so each product needs to find people to record a large amount of instruction word materials to train the model suitable for the scenario through these corpus, which is time-consuming and laborious, and the model training cost is high. For this reason, the embodiment of the present application provides a method for recognizing instruction words.

[0068] The following will describe in detail a method for recognizing command words provided by an embodiment of the present application in combination with a specific implementation method. Figure 1 As shown, the specific steps are as follows:

[0069] S101, obtaining a speech to be recognized and a set of instruction words, wherein the set of instruction words includes at least one instruction word and an instruction word phoneme sequence converted from text content corresponding to the instruction word.

[0070] In the embodiment of the present application, for the instruction words in each application scenario, the instruction words are converted into corresponding instruction word phoneme sequences according to the text content corresponding to the instruction words. For example, when the instruction words are in English, the English text corresponding to the instruction words is converted into a phonetic symbol sequence, and then the phonetic symbol sequence is converted into a phoneme sequence; when the instruction words are in Chinese, the Chinese text corresponding to the instruction words is converted into a pinyin sequence, and then the pinyin sequence is converted into a phoneme sequence. The instruction word set is composed of all instruction word phoneme sequences in the scenario.

[0071] Specifically, the device with speech recognition will store the corresponding instruction words in advance, and the phoneme sequence of the instruction words corresponding to the device can be obtained by converting the text content corresponding to these instruction words. When applied, the speech signal can be detected in real time to obtain the speech to be recognized.

[0072] S102: input the speech to be recognized into a pre-trained phoneme recognition model, so that the phoneme recognition model outputs target phonemes corresponding to the speech to be recognized.

[0073] S103: predict a target phoneme sequence corresponding to the target phoneme.

[0074] The following is a unified description of S102-S103:

[0075] In an embodiment of the present application, the speech to be recognized can be input into a pre-trained phoneme recognition model, which can then output the target phonemes corresponding to the speech to be recognized, and then, using a greedy search algorithm or a beam search algorithm, predict the corresponding target phoneme sequence based on the target phonemes.

[0076] S104, determining a target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set, and taking the instruction word corresponding to the target instruction word phoneme sequence as the target instruction word corresponding to the speech to be recognized.

[0077] As one embodiment, the specific implementation of determining the target instruction word phoneme sequence corresponding to the target phoneme sequence based on the instruction word set may include: determining the probability that the target phoneme sequence is the instruction word phoneme sequence for any instruction word phoneme sequence in the instruction word phoneme sequence set; determining the instruction word phoneme sequence whose probability is not less than a preset threshold as a candidate instruction word phoneme sequence, and determining the target instruction word phoneme sequence among the candidate instruction word phoneme sequences.

[0078] As an implementation method, the target instruction word phoneme sequence corresponding to the to-be-recognized speech can be determined in the candidate instruction word phoneme sequence by the following steps: for each candidate instruction word phoneme sequence, the usage time corresponding to the candidate instruction word phoneme sequence is determined, and the candidate instruction word phoneme sequence with the latest usage time is determined as the target instruction word phoneme sequence. The candidate instruction word phoneme sequence with the latest usage time is the candidate instruction word phoneme sequence used most recently. This allows the target instruction word to be quickly determined based on the user's recent usage.

[0079] As another implementation, the target instruction word phoneme sequence corresponding to the to-be-recognized speech may be determined from the candidate instruction word phoneme sequence by the following steps, including: for each candidate instruction word phoneme sequence, determining the number of times the candidate instruction word phoneme sequence is used, and determining the candidate instruction word phoneme sequence with the most times of use as the target instruction word phoneme sequence. Thus, the target instruction word is quickly determined according to the user's historical cumulative usage.

[0080] In the embodiment of the present application, when facing the instruction words of different application scenarios, it is only necessary to convert the text content corresponding to the instruction words to obtain the instruction word phoneme sequence, then identify the phonemes of the speech to be recognized through the pre-trained phoneme recognition model, and determine the phoneme sequence corresponding to the phonemes, and finally, by comparing the phoneme sequence with the instruction word phoneme sequence corresponding to the application scenario, determine the instruction word corresponding to the speech to be recognized. Therefore, there is no need to record voice corpus for each scenario for model training, reducing the cost of model training.

[0081] In another embodiment of the present application, Figure 2 As shown, the S102 may include the following steps:

[0082] S201, inputting the speech to be recognized into the speech processing model, so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

[0083] S202: Input the first phoneme into the natural language processing model so that the natural language processing model predicts the second phoneme corresponding to the first phoneme, and uses the first phoneme and the second phoneme as the target phonemes.

[0084] In an embodiment of the present application, the phoneme recognition model includes a speech processing model and a natural language processing model. Specifically, the speech to be recognized is input into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized. Furthermore, the first phoneme is input into the natural language processing model so that the natural language processing model predicts a second phoneme corresponding to the first phoneme, and uses the combination of the first phoneme and the second phoneme as a target phoneme, and the first phoneme in the target phoneme is before the second phoneme.

[0085] As an implementation method, Figure 3 As shown, the S201 may include the following steps:

[0086] S301, converting the speech to be recognized into a spectrum by short-time Fourier transform, and determining a Mel-spectrogram corresponding to the spectrum;

[0087] S302: Input the mel-spectrogram into the speech processing model, so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

[0088] In an embodiment of the present application, by reintegrating the speech processing model and the natural language processing model to obtain the corresponding first phoneme and the second phoneme, and using the first phoneme and the second phoneme as target phonemes, the accuracy of subsequent determination of the target phoneme sequence can be improved, thereby further improving the recognition effect of the command word.

[0089] In another embodiment of the present application, Figure 4 As shown, the method may further include the following steps:

[0090] S401, obtaining a sample speech and a sample text corresponding to the sample speech, and determining a sample phoneme corresponding to the sample text.

[0091] S402, using the sample speech as a model input, and using the sample phonemes as labels to train a speech processing deep learning model to obtain the speech processing model.

[0092] In an embodiment of the present application, a sample speech and a sample text corresponding to the sample speech can be obtained, and then the sample text is converted to obtain a sample phoneme. For example, when the sample text is in English, the English text corresponding to the sample text is converted into a phonetic sequence, and then the phonetic sequence is converted into a phoneme sequence; when the sample text is in Chinese, the Chinese text corresponding to the sample text is converted into a pinyin sequence, and then the pinyin sequence is converted into a phoneme sequence. Then, the sample speech is used as a model input, and the sample phonemes are used as labels to train a speech processing deep learning model to obtain a speech processing model.

[0093] In the embodiment of the present application, since the speech processing model only needs to recognize phonemes and does not need to directly recognize command words, a unified sample can be used to pre-train the model for different command words in different application scenarios. There is no need to collect corresponding samples for different command words, thereby saving model training costs.

[0094] In another embodiment of the present application, the method may further include the following steps:

[0095] For each sample phoneme, the sample phoneme is used as a model input, and the next sample phoneme corresponding to the sample phoneme is used as a label to train a natural language processing deep learning model to obtain the natural language processing model.

[0096] In the embodiment of the present application, for each sample phoneme, when the sample phoneme is used as the model input, the next sample phoneme corresponding to the phoneme is used as a label to train the natural language processing deep learning model to obtain the natural language processing model. Thus, the natural language processing model is used to predict the next phoneme based on the phoneme output by the speech processing model to improve the accuracy of the subsequent determination of the target phoneme sequence, thereby further improving the recognition effect of the instruction word.

[0097] Based on the same technical concept, the present application also provides a command word recognition device, such as Figure 5 As shown, the device comprises:

[0098] An acquisition module 501 is used to acquire a speech to be recognized and a set of instruction words, wherein the set of instruction words includes at least one instruction word and an instruction word phoneme sequence converted from text content corresponding to the instruction word;

[0099] An input module 502 is used to input the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized;

[0100] A prediction module 503, used to predict a target phoneme sequence corresponding to the target phoneme;

[0101] The determination module 504 is further configured to determine a target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set, and use the instruction word corresponding to the target instruction word phoneme sequence as the target instruction word corresponding to the speech to be recognized.

[0102] In a possible implementation, the phoneme recognition model includes a speech processing model and a natural language processing model.

[0103] The input module is specifically used for:

[0104] Inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized;

[0105] The first phoneme is input into the natural language processing model so that the natural language processing model predicts a second phoneme corresponding to the first phoneme, and the first phoneme and the second phoneme are used as the target phonemes.

[0106] In a possible implementation, the device further includes a speech processing model training module, which is used to:

[0107] Acquire a sample speech and a sample text corresponding to the sample speech, and determine a sample phoneme corresponding to the sample text;

[0108] The sample speech is used as a model input, and the sample phonemes are used as labels to train a speech processing deep learning model to obtain the speech processing model.

[0109] In a possible implementation, the method further includes a natural language processing model training module, which is used to:

[0110] For each sample phoneme, the sample phoneme is used as a model input, and the next sample phoneme corresponding to the sample phoneme is used as a label to train a natural language processing deep learning model to obtain the natural language processing model.

[0111] In a possible implementation manner, the input module is further used for:

[0112] Convert the speech to be recognized into a frequency spectrum by short-time Fourier transform, and determine a Mel-spectrogram corresponding to the frequency spectrum;

[0113] The mel-spectrogram is input into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

[0114] In a possible implementation manner, the determining module is specifically configured to:

[0115] For any instruction word phoneme sequence in the instruction word phoneme sequence set, determining the probability that the target phoneme sequence is the instruction word phoneme sequence;

[0116] An instruction word phoneme sequence whose probability is not less than a preset threshold is determined as a candidate instruction word phoneme sequence, and the target instruction word phoneme sequence is determined in the candidate instruction word phoneme sequence.

[0117] In a possible implementation manner, the determining module is further configured to:

[0118] For each candidate instruction word phoneme sequence, the number of times the candidate instruction word phoneme sequence is used is determined, and the candidate instruction word phoneme sequence with the largest number of times used is determined as the target instruction word phoneme sequence.

[0119] In the embodiment of the present application, when facing the instruction words of different application scenarios, it is only necessary to convert the text content corresponding to the instruction words to obtain the instruction word phoneme sequence, then identify the phonemes of the speech to be recognized through the pre-trained phoneme recognition model, and determine the phoneme sequence corresponding to the phonemes, and finally, by comparing the phoneme sequence with the instruction word phoneme sequence corresponding to the application scenario, determine the instruction word corresponding to the speech to be recognized. Therefore, there is no need to record voice corpus for each scenario for model training, reducing the cost of model training.

[0120] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0121] Memory 113, used for storing computer programs;

[0122] The processor 111 is used to execute the program stored in the memory 113 to implement the following steps:

[0123] Acquire a speech to be recognized and a set of command words, wherein the set of command words includes at least one command word and a phoneme sequence of the command word converted from text content corresponding to the command word;

[0124] Inputting the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs the target phoneme corresponding to the speech to be recognized;

[0125] Predicting a target phoneme sequence corresponding to the target phoneme;

[0126] A target instruction word phoneme sequence corresponding to the target phoneme sequence is determined according to the instruction word set, and the instruction word corresponding to the target instruction word phoneme sequence is used as the target instruction word corresponding to the speech to be recognized.

[0127] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0128] The communication interface is used for communication between the above electronic device and other devices.

[0129] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0130] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0131] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned instruction word recognition methods are implemented.

[0132] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any instruction word recognition method in the above-mentioned embodiments.

[0133] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. 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 described in 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 (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 DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0134] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0135] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A method for recognizing instruction words, characterized in that: The method comprises: Acquire a speech to be recognized and a set of command words, wherein the command word set includes at least one command word for different application scenarios and a command word phoneme sequence converted from text content corresponding to the command word; Inputting the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized, wherein at least one instruction word in different application scenarios corresponds to the same phoneme recognition model; Predicting a target phoneme sequence corresponding to the target phoneme; A target instruction word phoneme sequence corresponding to the target phoneme sequence is determined according to the instruction word set, and the instruction word corresponding to the target instruction word phoneme sequence is used as the target instruction word corresponding to the speech to be recognized.

2. The method according to claim 1, characterized in that The phoneme recognition model includes a speech processing model and a natural language processing model. The step of inputting the speech to be recognized into a pre-trained phoneme recognition model so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized includes: Inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized; The first phoneme is input into the natural language processing model so that the natural language processing model predicts a second phoneme corresponding to the first phoneme, and the first phoneme and the second phoneme are used as the target phonemes.

3. The method according to claim 2, characterized in that The method further comprises: Acquire a sample speech and a sample text corresponding to the sample speech, and determine a sample phoneme corresponding to the sample text; The sample speech is used as a model input, and the sample phonemes are used as labels to train a speech processing deep learning model to obtain the speech processing model.

4. The method according to claim 3, characterized in that The method further comprises: For each sample phoneme, the sample phoneme is used as a model input, and the next sample phoneme corresponding to the sample phoneme is used as a label to train a natural language processing deep learning model to obtain the natural language processing model.

5. The method according to claim 2, characterized in that: The step of inputting the speech to be recognized into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized includes: Convert the speech to be recognized into a frequency spectrum by short-time Fourier transform, and determine a Mel-spectrogram corresponding to the frequency spectrum; The mel-spectrogram is input into the speech processing model so that the speech processing model outputs a first phoneme corresponding to the speech to be recognized.

6. The method according to claim 1, characterized in that The step of determining the target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set includes: For any instruction word phoneme sequence in the instruction word phoneme sequence set, determining the probability that the target phoneme sequence is the instruction word phoneme sequence; An instruction word phoneme sequence whose probability is not less than a preset threshold is determined as a candidate instruction word phoneme sequence, and the target instruction word phoneme sequence is determined in the candidate instruction word phoneme sequence.

7. The method according to claim 6, characterized in that The step of determining the target instruction word corresponding to the to-be-recognized speech in the candidate instruction word phoneme sequence comprises: For each candidate instruction word phoneme sequence, the number of times the candidate instruction word phoneme sequence is used is determined, and the candidate instruction word phoneme sequence with the largest number of times used is determined as the target instruction word phoneme sequence.

8. A command word recognition device, characterized in that: The device comprises: An acquisition module, used to acquire a speech to be recognized and a set of instruction words, wherein the set of instruction words includes at least one instruction word for different application scenarios and an instruction word phoneme sequence converted from text content corresponding to the instruction word; An input module, used for inputting the speech to be recognized into a pre-trained phoneme recognition model, so that the phoneme recognition model outputs a target phoneme corresponding to the speech to be recognized, wherein at least one instruction word in different application scenarios corresponds to the same phoneme recognition model; A prediction module, used to predict a target phoneme sequence corresponding to the target phoneme; The determination module is also used to determine the target instruction word phoneme sequence corresponding to the target phoneme sequence according to the instruction word set, and use the instruction word corresponding to the target instruction word phoneme sequence as the target instruction word corresponding to the speech to be recognized.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for speech recognition of contacts

    CN108986790A