Speech recognition method and device, equipment and storage medium

By obtaining and processing the voice and domain tags of the customer service system and training the voice recognition model, the problem of inefficient speech recognition in the existing technology is solved, and efficient speech recognition and reliability improvement of the customer service system is achieved.

CN119107939AActive Publication Date: 2024-12-10PING AN TECH (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411178826.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-10
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The existing voice recognition methods cannot meet the voice recognition needs of customer service systems, resulting in inefficient speech recognition. The reason is that the general model lacks targetedness and cannot understand the current service field of the customer service system.

Method used

By obtaining the preset voice and preset domain tags sent by the customer service system, generating weight coefficients, extracting the embedded vectors of voice and domain tags, using the attention mechanism to reconstruct the embedded vectors, training the speech recognition model, and improving the recognition of the current voice and domain accuracy.

Benefits of technology

It reduces the recognition time in the current service field of the customer service system, improves the efficiency of speech recognition, and improves the reliability of speech recognition text, avoiding the impact of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107939A_ABST
    Figure CN119107939A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence and financial science and technology, and discloses a speech recognition method, device and equipment and a storage medium, and the method comprises the steps: splicing a first embedded vector and a second embedded vector, generating a third embedded vector, reconstructing the third embedded vector, and generating a fourth embedded vector; obtaining a predicted speech recognition text output by the speech recognition model based on the fourth embedded vector, and obtaining a first loss value and a second loss value between the predicted speech recognition text and a preset speech recognition text; generating a total loss value of the predicted speech recognition text according to the first loss value and the second loss value, and training a speech recognition model based on the total loss value; and obtaining a current voice and a current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining a current voice recognition text output by the trained voice recognition model. The voice recognition efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence and financial technology, and in particular to speech recognition methods, devices, equipment and storage media. Background Art

[0002] As an important achievement in the field of artificial intelligence, voice recognition technology has improved the naturalness and convenience of human-computer interaction, allowing users to complete operations such as information input and device control using only voice commands, greatly simplifying the operating process and improving operational efficiency.

[0003] However, the existing speech recognition methods cannot meet the speech recognition requirements of the customer service system, which is not conducive to improving the efficiency of speech recognition. The reason is that the existing speech recognition methods use general models, which lack specificity and do not understand the current service areas of the customer service system. Therefore, they cannot meet the speech recognition requirements of the customer service system. Therefore, the existing speech recognition methods cannot perform speech recognition on the speech of the customer service system, which is not conducive to improving the efficiency of speech recognition. Summary of the invention

[0004] The present invention provides a speech recognition method, device, computer equipment and storage medium to solve the technical problem that the existing speech recognition method cannot meet the speech recognition requirements of a customer service system and is not conducive to improving the efficiency of speech recognition.

[0005] In a first aspect, a speech recognition method is provided, comprising:

[0006] Obtaining a preset voice sent by the customer service system, obtaining a preset domain label and a preset voice recognition text corresponding to the preset voice, and obtaining a weight coefficient according to the preset domain label;

[0007] Obtaining a first embedding vector of the preset speech and a second embedding vector of the preset domain label;

[0008] Concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector;

[0009] Obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method;

[0010] Generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model;

[0011] The current voice and the current domain label sent by the customer service system are obtained, the current voice and the current domain label are input into the trained voice recognition model, and the current voice recognition text output by the trained voice recognition model is obtained.

[0012] Furthermore, the obtaining of the first embedding vector of the preset speech and the second embedding vector of the preset domain label includes:

[0013] Determining whether the preset domain tag is a target tag;

[0014] When the preset domain label is the target label, feature extraction is performed on the speech feature of the preset speech to obtain a first embedding vector, and feature extraction is performed on the semantic unit of the preset domain label to obtain a second embedding vector.

[0015] Further, the concatenating the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstructing the third embedding vector by using an attention mechanism to generate a fourth embedding vector includes:

[0016] Concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and input the third embedding vector into an encoder of a speech recognition model;

[0017] The third embedding vector is reconstructed by utilizing the attention mechanism of the encoder to generate a fourth embedding vector.

[0018] Further, the acquiring of the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and acquiring a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method, includes:

[0019] Obtaining a predicted speech recognition text output by a classifier of a speech recognition model based on the fourth embedding vector;

[0020] A first loss value between the predicted speech recognition text and the preset speech recognition text is obtained through a preset connection temporal classification loss function; a second loss value between the predicted speech recognition text and the preset speech recognition text is obtained through a preset cross entropy loss function.

[0021] Further, generating a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generating a total loss value of the predicted speech recognition text, training the speech recognition model based on the total loss value, and obtaining the trained speech recognition model includes:

[0022] Generate a total loss value of the predicted speech recognition text according to the first loss value, the second loss value, the weight coefficient, and a predefined total loss value generation model;

[0023] The speech recognition model is trained with the goal of reducing the total loss value. When the reduction in the total loss value is less than a preset range, the training of the speech recognition model is stopped and the trained speech recognition model is saved.

[0024] Further, the obtaining of the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model includes:

[0025] Acquire the current voice and the current domain label sent by the customer service system, perform feature extraction on the voice features of the current voice to obtain a fifth embedding vector, perform feature extraction on the semantic unit of the current domain label to obtain a sixth embedding vector;

[0026] The fifth embedding vector and the sixth embedding vector are input into the trained speech recognition model, and a current speech recognition text output by the trained speech recognition model based on the fifth embedding vector and the sixth embedding vector is obtained.

[0027] Furthermore, after obtaining the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model, the voice recognition method includes:

[0028] A dialog window of the customer service system is obtained, and the current speech recognition text is displayed through the dialog window.

[0029] In a second aspect, a speech recognition device is provided, comprising:

[0030] A first acquisition module is used to acquire a preset voice sent by a customer service system, acquire a preset domain label and a preset voice recognition text corresponding to the preset voice, and acquire a weight coefficient according to the preset domain label;

[0031] A second acquisition module, used to acquire a first embedding vector of the preset speech and a second embedding vector of the preset domain label;

[0032] A generation module, configured to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector by using an attention mechanism to generate a fourth embedding vector;

[0033] A third acquisition module is used to obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method;

[0034] A training module, configured to generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model;

[0035] The recognition module is used to obtain the current voice and the current domain label sent by the customer service system, input the current voice and the current domain label into the trained voice recognition model, and obtain the current voice recognition text output by the trained voice recognition model.

[0036] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned speech recognition method when executing the computer program.

[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned speech recognition method are implemented.

[0038] The present application provides a speech recognition method, apparatus, computer equipment and storage medium, which obtain a preset speech sent by a customer service system, obtain a preset domain label and a preset speech recognition text corresponding to the preset speech, and obtain a weight coefficient according to the preset domain label; obtain a first embedding vector of the preset speech and a second embedding vector of the preset domain label; concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector; obtain a predicted speech recognition text output by a speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method; generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, and generate a total loss value of the predicted speech recognition text based on the total loss value. value, train the speech recognition model, and obtain the trained speech recognition model; obtain the current speech and current domain label sent by the customer service system, input the current speech and the current domain label into the trained speech recognition model, and obtain the current speech recognition text output by the trained speech recognition model. The beneficial effects are in two aspects. On the one hand, the current speech and the current domain label sent by the customer service system are obtained, and the current speech and the current domain label are input into the trained speech recognition model, and the current speech recognition text output by the trained speech recognition model is obtained. Since the current domain label is provided, the current domain label is the label of the domain currently served by the customer service system, thereby reducing the recognition time of the domain currently served by the customer service system, which is beneficial to improving the efficiency of speech recognition; on the other hand, since the speech recognition model will not be affected by human intervention, it is beneficial to improve the reliability of the obtained current speech recognition text. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0040] Figure 1 is a schematic diagram of an application environment of a speech recognition method in an embodiment of the present invention;

[0041] Figure 2 A flow chart of a speech recognition method provided by an embodiment of the present invention;

[0042] Figure 3 yes Figure 1A schematic flow chart of a specific implementation of step S23;

[0043] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S25;

[0044] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26;

[0045] Figure 6 is a structural schematic diagram of a speech recognition device in one embodiment of the present invention;

[0046] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0047] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a speech recognition method according to an embodiment of the present invention. The speech recognition method provided by the embodiment of the present invention can be applied in the following embodiments: Figure 1 In an application environment, a client communicates with a server through a network.

[0050] The server obtains the preset voice sent by the customer service system through the client, obtains the preset field label and preset voice recognition text corresponding to the preset voice, and obtains the weight coefficient according to the preset field label;

[0051] Obtaining a first embedding vector of the preset speech and a second embedding vector of the preset domain label;

[0052] Concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector;

[0053] Obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method;

[0054] Generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model;

[0055] The current voice and the current domain label sent by the customer service system are obtained, the current voice and the current domain label are input into the trained voice recognition model, and the current voice recognition text output by the trained voice recognition model is obtained.

[0056] In the scheme implemented by the above-mentioned speech recognition method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, the current speech and the current domain label sent by the customer service system are obtained, and the current speech and the current domain label are input into the trained speech recognition model to obtain the current speech recognition text output by the trained speech recognition model. Since the current domain label is provided, the current domain label is the label of the domain currently served by the customer service system, thereby reducing the recognition time of the domain currently served by the customer service system, which is beneficial to improving the efficiency of speech recognition. On the other hand, since the speech recognition model will not be affected by human intervention, it is beneficial to improve the reliability of the current speech recognition text obtained.

[0057] The client may include but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.

[0058] The server can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.

[0059] See also Figure 2 , Figure 2 A flow chart of a speech recognition method provided by an embodiment of the present invention includes the following steps:

[0060] S21, obtaining a preset voice sent by the customer service system, obtaining a preset field label and a preset voice recognition text corresponding to the preset voice, and obtaining a weight coefficient according to the preset field label;

[0061] Among them, the preset voices are classified into different fields, and different fields have different focuses. The insurance field mainly focuses on whether customers agree to accept new insurance services, the financial field mainly focuses on whether customers agree to accept new financial services, and the technology field mainly focuses on whether customers agree to accept new technology products.

[0062] Exemplarily, the preset domain label is a label of the domain that the customer service system previously served.

[0063] For the sake of illustration, an example is given below:

[0064] For example, the customer service system previously served the insurance field. The insurance field label is set as the preset field label, the preset voice sent by the customer service system is obtained, the preset field label and preset voice recognition text corresponding to the preset voice are obtained, and the weight coefficient is obtained according to the preset field label.

[0065] For example, the customer service system previously served in the financial field. The financial field label is set as the preset field label, the preset voice sent by the customer service system is obtained, the preset field label and preset voice recognition text corresponding to the preset voice are obtained, and the weight coefficient is obtained according to the preset field label.

[0066] For example, the customer service system previously served in the field of science and technology. The science and technology field label is set as the preset field label, the preset voice sent by the customer service system is obtained, the preset field label and preset voice recognition text corresponding to the preset voice are obtained, and the weight coefficient is obtained according to the preset field label.

[0067] Exemplarily, the preset voice is the voice collected by the customer service system in the past time period.

[0068] Exemplarily, the current voice is the voice collected by the customer service system in the current time period.

[0069] Exemplarily, obtaining a preset voice sent by a customer service system, obtaining a preset domain label and a preset voice recognition text corresponding to the preset voice, and obtaining a weight coefficient according to the preset domain label include:

[0070] Obtaining a preset voice sent by the customer service system, obtaining a preset field label and a preset voice recognition text corresponding to the preset voice, and combining the preset voice, the preset field label corresponding to the preset voice, and the preset voice recognition text corresponding to the preset voice into a sample;

[0071] Counting the samples whose preset domain label is the target label to obtain a first quantity, and counting the samples whose domain label is not the target label to obtain a second quantity;

[0072] The first number and the second number are added to obtain the total number, the first number is divided by the total number to generate a sample ratio, and a weight coefficient corresponding to the sample ratio is obtained. There is a corresponding relationship between the sample ratio and the weight coefficient, and different sample ratios correspond to different weight coefficients.

[0073] S22, obtaining a first embedding vector of the preset speech and a second embedding vector of the preset domain label;

[0074] The step of obtaining the first embedding vector of the preset speech and the second embedding vector of the preset domain label includes:

[0075] Determining whether the preset domain tag is a target tag;

[0076] When the preset domain label is the target label, feature extraction is performed on the speech feature of the preset speech to obtain a first embedding vector, and feature extraction is performed on the semantic unit of the preset domain label to obtain a second embedding vector.

[0077] S23, concatenating the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstructing the third embedding vector by using an attention mechanism to generate a fourth embedding vector;

[0078] S24, obtaining a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtaining a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method;

[0079] The method of acquiring the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and acquiring the first loss value and the second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method, includes:

[0080] Obtaining a predicted speech recognition text output by a classifier of a speech recognition model based on the fourth embedding vector;

[0081] Obtaining a first loss value between the predicted speech recognition text and the preset speech recognition text through a preset connection temporal classification loss function;

[0082] A second loss value between the predicted speech recognition text and the preset speech recognition text is obtained through a preset cross entropy loss function.

[0083] Among them, the Connectionist Temporal Classification Loss (CTC Loss) does not require alignment of the input sequence and the output sequence, which simplifies the data preprocessing process.

[0084] Among them, the cross-entropy loss function is a loss function used to evaluate classification performance.

[0085] S25, generating a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generating a total loss value of the predicted speech recognition text, training the speech recognition model based on the total loss value, and acquiring the trained speech recognition model;

[0086] Exemplarily, the total loss value generation model is:

[0087] L = Lctc + λ × Lattention;

[0088] L is the total loss value, Lctc is the first loss value, Lattention is the second loss value, and λ is the weight coefficient.

[0089] Among them, the proportion of the second loss value in the total loss value can be increased by the weight coefficient.

[0090] Among them, the total loss value is used to describe the overall difference between the predicted speech recognition text and the preset speech recognition text. When the total loss value is larger, the overall difference between the predicted speech recognition text and the preset speech recognition text is larger. When the total loss value is smaller, the overall difference between the predicted speech recognition text and the preset speech recognition text is smaller.

[0091] S26, obtaining the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model.

[0092] Exemplarily, the current domain label is the label of the domain currently served by the customer service system.

[0093] For the sake of illustration, an example is given below:

[0094] For example, the field currently served by the customer service system is the insurance field. The insurance field label is set as the current field label, the current voice and the current field label sent by the customer service system are obtained, the current voice and the current field label are input into the trained speech recognition model, and the current speech recognition text output by the trained speech recognition model is obtained.

[0095] For example, the field currently served by the customer service system is the financial field. The financial field label is set as the current field label, the current voice and the current field label sent by the customer service system are obtained, the current voice and the current field label are input into the trained speech recognition model, and the current speech recognition text output by the trained speech recognition model is obtained.

[0096] For example, the field that the customer service system currently serves is the science and technology field. The science and technology field label is set as the current field label, the current voice and the current field label sent by the customer service system are obtained, the current voice and the current field label are input into the trained speech recognition model, and the current speech recognition text output by the trained speech recognition model is obtained.

[0097] Wherein, after obtaining the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model, the voice recognition method includes:

[0098] A dialog window of the customer service system is obtained, and the current speech recognition text is displayed through the dialog window.

[0099] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, the current voice and the current domain label sent by the customer service system are obtained, and the current voice and the current domain label are input into the trained voice recognition model to obtain the current voice recognition text output by the trained voice recognition model. Since the current domain label is provided, the current domain label is the label of the domain currently served by the customer service system, thereby reducing the recognition time of the domain currently served by the customer service system, which is beneficial to improving the efficiency of voice recognition. On the other hand, since the voice recognition model will not be affected by human intervention, it is beneficial to improve the reliability of the obtained current voice recognition text.

[0100] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows:

[0101] S31, concatenating the first embedding vector and the second embedding vector to generate a third embedding vector, and inputting the third embedding vector into an encoder of a speech recognition model;

[0102] S32: Reconstruct the third embedding vector by utilizing the attention mechanism of the encoder to generate a fourth embedding vector.

[0103] In the embodiment of the present invention, by introducing the attention mechanism, the speech recognition model can capture and utilize the key information in the third embedding vector to generate a fourth embedding vector.

[0104] See also Figure 4 , Figure 4 yes Figure 1 A specific implementation flow diagram of step S25 is described in detail as follows:

[0105] S41, generating a total loss value of the predicted speech recognition text according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value generation model;

[0106] S42, training the speech recognition model with the goal of reducing the total loss value, and when the reduction range of the total loss value is less than a preset range, stopping the training of the speech recognition model and saving the trained speech recognition model.

[0107] In the embodiment of the present invention, the trained speech recognition model is saved, and when needed, the trained speech recognition model is directly used without retraining, thus reducing the use cost.

[0108] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows:

[0109] S51, obtaining the current voice and the current domain label sent by the customer service system, performing feature extraction on the voice features of the current voice to obtain a fifth embedding vector, and performing feature extraction on the semantic unit of the current domain label to obtain a sixth embedding vector;

[0110] S52, input the fifth embedding vector and the sixth embedding vector into the trained speech recognition model, and obtain the current speech recognition text output by the trained speech recognition model based on the fifth embedding vector and the sixth embedding vector.

[0111] In the embodiment of the present invention, since the current domain label is provided, the current domain label is the label of the domain currently served by the customer service system, thereby reducing the recognition time of the domain currently served by the customer service system, which is conducive to improving the efficiency of speech recognition.

[0112] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a structure of a speech recognition device in one embodiment of the present invention. Figure 6 As shown, the speech recognition device includes a first acquisition module 101, a second acquisition module 102, a generation module 103, a third acquisition module 104, a training module 105, and a recognition module 106. The functional modules are described in detail as follows:

[0113] The first acquisition module 101 is used to acquire a preset voice sent by the customer service system, acquire a preset domain label and a preset voice recognition text corresponding to the preset voice, and acquire a weight coefficient according to the preset domain label;

[0114] A second acquisition module 102, configured to acquire a first embedding vector of the preset speech and a second embedding vector of the preset domain label;

[0115] A generating module 103 is used to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector by using an attention mechanism to generate a fourth embedding vector;

[0116] A third acquisition module 104 is used to obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method;

[0117] A training module 105 is used to generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model;

[0118] The recognition module 106 is used to obtain the current voice and the current domain label sent by the customer service system, input the current voice and the current domain label into the trained voice recognition model, and obtain the current voice recognition text output by the trained voice recognition model.

[0119] In one embodiment, the first acquisition module 101 includes:

[0120] A judging subunit, used to judge whether the preset domain tag is a target tag;

[0121] The first extraction subunit is used to perform feature extraction on the speech feature of the preset speech to obtain a first embedding vector, and perform feature extraction on the semantic unit of the preset domain label to obtain a second embedding vector when the preset domain label is the target label.

[0122] In one embodiment, the generating module 103 includes:

[0123] An input subunit, configured to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and input the third embedding vector into an encoder of a speech recognition model;

[0124] The reconstruction subunit is used to reconstruct the third embedding vector by utilizing the attention mechanism of the encoder to generate a fourth embedding vector.

[0125] In one embodiment, the third acquisition module 104 includes:

[0126] A first acquisition subunit, used for acquiring a predicted speech recognition text output by a classifier of a speech recognition model based on the fourth embedding vector;

[0127] A second acquisition subunit, used to acquire a first loss value between the predicted speech recognition text and the preset speech recognition text through a preset connection temporal classification loss function;

[0128] The third acquisition subunit acquires a second loss value between the predicted speech recognition text and the preset speech recognition text through a preset cross entropy loss function.

[0129] In one embodiment, the training module 105 includes:

[0130] A generating subunit, configured to generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, to generate a total loss value of the predicted speech recognition text;

[0131] The training subunit is used to train the speech recognition model with the goal of reducing the total loss value. When the reduction range of the total loss value is less than a preset range, the training of the speech recognition model is stopped and the trained speech recognition model is saved.

[0132] In one embodiment, the identification module 106 includes:

[0133] A second extraction subunit is used to obtain the current voice and the current domain label sent by the customer service system, perform feature extraction on the voice feature of the current voice to obtain a fifth embedding vector, and perform feature extraction on the semantic unit of the current domain label to obtain a sixth embedding vector;

[0134] The recognition subunit is used to input the fifth embedding vector and the sixth embedding vector into the trained speech recognition model, and obtain the current speech recognition text output by the trained speech recognition model based on the fifth embedding vector and the sixth embedding vector.

[0135] In one embodiment, the speech recognition device further includes:

[0136] The display module is used to obtain the dialogue window of the customer service system and display the current speech recognition text through the dialogue window.

[0137] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, the current voice and the current domain label sent by the customer service system are obtained, and the current voice and the current domain label are input into the trained voice recognition model to obtain the current voice recognition text output by the trained voice recognition model. Since the current domain label is provided, the current domain label is the label of the domain currently served by the customer service system, thereby reducing the recognition time of the domain currently served by the customer service system, which is beneficial to improving the efficiency of voice recognition. On the other hand, since the voice recognition model will not be affected by human intervention, it is beneficial to improve the reliability of the obtained current voice recognition text.

[0138] For the specific definition of the speech recognition device, please refer to the definition of the speech recognition method above, which will not be repeated here.

[0139] Each module in the above-mentioned speech recognition device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0140] See also Figure 7 , Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a server. The internal structure diagram thereof may be as shown in FIG. Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus.

[0141] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of a speech recognition method on the server side are implemented.

[0142] See also Figure 8 , Figure 8 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database through a network connection. When the computer program is executed by the processor, the functions or steps of a speech recognition method are implemented.

[0143] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.

[0144] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0145] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), 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 gates or transistor logic devices, discrete hardware components.

[0146] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0147] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0148] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A speech recognition method, characterized in that: include: Obtaining a preset voice sent by the customer service system, obtaining a preset domain label and a preset voice recognition text corresponding to the preset voice, and obtaining a weight coefficient according to the preset domain label; Obtaining a first embedding vector of the preset speech and a second embedding vector of the preset domain label; Concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector; Obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method; Generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model; The current voice and the current domain label sent by the customer service system are obtained, the current voice and the current domain label are input into the trained voice recognition model, and the current voice recognition text output by the trained voice recognition model is obtained.

2. The speech recognition method according to claim 1, characterized in that: The obtaining of the first embedding vector of the preset speech and the second embedding vector of the preset domain label includes: Determining whether the preset domain tag is a target tag; When the preset domain label is the target label, feature extraction is performed on the speech feature of the preset speech to obtain a first embedding vector, and feature extraction is performed on the semantic unit of the preset domain label to obtain a second embedding vector.

3. The speech recognition method according to claim 1, characterized in that: The step of concatenating the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstructing the third embedding vector by using an attention mechanism to generate a fourth embedding vector includes: Concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and input the third embedding vector into an encoder of a speech recognition model; The third embedding vector is reconstructed by utilizing the attention mechanism of the encoder to generate a fourth embedding vector.

4. The speech recognition method according to claim 1, characterized in that: The step of acquiring the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and acquiring the first loss value and the second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method, includes: Obtaining a predicted speech recognition text output by a classifier of a speech recognition model based on the fourth embedding vector; Obtaining a first loss value between the predicted speech recognition text and the preset speech recognition text through a preset connection temporal classification loss function; A second loss value between the predicted speech recognition text and the preset speech recognition text is obtained through a preset cross entropy loss function.

5. The speech recognition method according to claim 1, characterized in that: The generating a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generating a total loss value of the predicted speech recognition text, training the speech recognition model based on the total loss value, and obtaining the trained speech recognition model, comprises: Generate a total loss value of the predicted speech recognition text according to the first loss value, the second loss value, the weight coefficient, and a predefined total loss value generation model; The speech recognition model is trained with the goal of reducing the total loss value. When the reduction in the total loss value is less than a preset range, the training of the speech recognition model is stopped and the trained speech recognition model is saved.

6. The speech recognition method according to claim 1, characterized in that: The obtaining of the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model includes: Acquire the current voice and the current domain label sent by the customer service system, perform feature extraction on the voice features of the current voice to obtain a fifth embedding vector, perform feature extraction on the semantic unit of the current domain label to obtain a sixth embedding vector; The fifth embedding vector and the sixth embedding vector are input into the trained speech recognition model, and a current speech recognition text output by the trained speech recognition model based on the fifth embedding vector and the sixth embedding vector is obtained.

7. The speech recognition method according to any one of claims 1 to 6, characterized in that: After obtaining the current voice and the current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained voice recognition model, and obtaining the current voice recognition text output by the trained voice recognition model, the voice recognition method includes: A dialog window of the customer service system is obtained, and the current speech recognition text is displayed through the dialog window.

8. A speech recognition device, characterized in that: include: A first acquisition module is used to acquire a preset voice sent by a customer service system, acquire a preset domain label and a preset voice recognition text corresponding to the preset voice, and acquire a weight coefficient according to the preset domain label; A second acquisition module, used to acquire a first embedding vector of the preset speech and a second embedding vector of the preset domain label; A generation module, configured to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and reconstruct the third embedding vector by using an attention mechanism to generate a fourth embedding vector; A third acquisition module is used to obtain a predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain a first loss value and a second loss value between the predicted speech recognition text and the preset speech recognition text based on a predefined method; A training module, configured to generate a model according to the first loss value, the second loss value, the weight coefficient and a predefined total loss value, generate a total loss value of the predicted speech recognition text, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model; The recognition module is used to obtain the current voice and the current domain label sent by the customer service system, input the current voice and the current domain label into the trained voice recognition model, and obtain the current voice recognition text output by the trained voice recognition model.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the speech recognition method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the speech recognition method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Model training method and device, voice recognition method and device, storage medium and equipment

    CN110930996A

  • Multi-field adaptive end-to-end speech recognition method and system, and electronic device

    CN113436616A

  • Speech recognition method, speech recognition model training method, equipment and medium

    CN116612749A

  • Domain addition systems and methods for a language understanding system

    US20190034795A1

  • Speech recognition method, apparatus, electronic device and computer readable storage medium

    US20220310077A1