Speech recognition method, apparatus, device, and storage medium

By obtaining embedding vectors from the speech recognition model trained for the customer service system and utilizing an attention mechanism, the problem of low speech recognition efficiency in the customer service system is solved, achieving efficient and reliable speech recognition text generation.

CN119107939BActive Publication Date: 2026-05-01PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2024-08-26
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing speech recognition methods cannot meet the speech recognition needs of customer service systems, resulting in low efficiency. This is because general models lack specificity.

Method used

By acquiring the preset voice and domain labels of the customer service system, an embedding vector is generated and reconstructed using an attention mechanism. The speech recognition model is then trained by combining weight coefficients and loss values ​​to generate the current speech recognition text.

Benefits of technology

It improved the efficiency of voice recognition in the customer service system, reduced recognition time, and enhanced the reliability of voice-recognized text, avoiding the impact of human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107939B_ABST
    Figure CN119107939B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence and the field of financial technology, and discloses a speech recognition method, device and equipment and a storage medium, the method comprising: splicing a first embedding vector and a second embedding vector to generate a third embedding vector, reconstructing the third embedding vector to generate a fourth embedding vector; obtaining a predicted speech recognition text output by a speech recognition model based on the fourth embedding vector, 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, training the speech recognition model based on the total loss value; obtaining a current speech and a current field label sent by a customer service system, inputting the current speech and the current field label into the trained speech recognition model, and obtaining a current speech recognition text output by the trained speech recognition model. The present application is beneficial to improving the efficiency of speech recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Speech recognition methods, devices, equipment and storage media Technical Field

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

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

[0003] However, existing speech recognition methods cannot meet the speech recognition needs of customer service systems, hindering the improvement of speech recognition efficiency. This is because existing speech recognition methods use general models, which lack specificity and understanding of the current service domain of the customer service system. Therefore, they cannot meet the speech recognition requirements of customer service systems, thus limiting their efficiency. Summary of the Invention

[0004] This invention provides a speech recognition method, apparatus, computer device, and storage medium to solve the technical problem that existing speech recognition methods cannot meet the speech recognition needs of customer service systems and are not conducive to improving the efficiency of speech recognition.

[0005] Firstly, a speech recognition method is provided, including:

[0006] Obtain a preset voice message sent by the customer service system, obtain a preset domain label and a preset voice recognition text corresponding to the preset voice message, and obtain a weight coefficient based on the preset domain label;

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

[0008] The first embedding vector and the second embedding vector are concatenated to generate a third embedding vector. The third embedding vector is then reconstructed using an attention mechanism to generate a fourth embedding vector.

[0009] Obtain the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain 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;

[0010] The total loss value of the predicted speech recognition text is generated based on the first loss value, the second loss value, the weight coefficients, and the predefined total loss value generation model. The speech recognition model is trained based on the total loss value to obtain the trained speech recognition model.

[0011] Obtain the current voice and current domain label sent by the customer service system, input the current voice and current domain label into the trained speech recognition model, and obtain the current speech recognition text output by the trained speech recognition model.

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

[0013] Determine whether the preset domain label is the target label;

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

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

[0016] The first embedding vector and the second embedding vector are concatenated to generate a third embedding vector, which is then input into the encoder of the speech recognition model.

[0017] The third embedding vector is reconstructed using the encoder's attention mechanism to generate a fourth embedding vector.

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

[0019] Obtain the predicted speech recognition text output by the classifier of the 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 by using 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 by using a preset cross-entropy loss function.

[0021] Further, the step of generating a total loss value for the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficients, and a predefined total loss value generation model, and training the speech recognition model based on the total loss value to obtain the trained speech recognition model includes:

[0022] The total loss value of the predicted speech recognition text is generated based on the first loss value, the second loss value, the weight coefficients, and the 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 step of obtaining the current voice and current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained speech recognition model, and obtaining the current speech recognition text output by the trained speech recognition model includes:

[0025] The system obtains the current voice and current domain tag sent by the customer service system, extracts features from the voice features of the current voice to obtain the fifth embedding vector, and extracts features from the semantic units of the current domain tag to obtain the sixth embedding vector.

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

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

[0028] Obtain the dialogue window of the customer service system and display the current speech recognition text through the dialogue window.

[0029] Secondly, a voice recognition device is provided, comprising:

[0030] The first acquisition module is used to acquire a preset voice message sent by the customer service system, acquire a preset domain label and a preset voice recognition text corresponding to the preset voice message, and acquire a weight coefficient based on the preset domain label.

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

[0032] The generation module is used to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and to reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector.

[0033] The third acquisition module is used to acquire the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and to acquire 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.

[0034] The training module is used to generate a model based on the first loss value, the second loss value, the weight coefficients and the predefined total loss value, generate the 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 current domain label sent by the customer service system, input the current voice 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.

[0036] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described speech recognition method.

[0037] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described speech recognition method.

[0038] This application provides a speech recognition method, apparatus, computer device, and storage medium. The method involves acquiring a preset speech sent by a customer service system, acquiring a preset domain label and a preset speech recognition text corresponding to the preset speech, and acquiring weight coefficients based on the preset domain label; acquiring a first embedding vector of the preset speech and a second embedding vector of the preset domain label; concatenating the first and second embedding vectors to generate a third embedding vector, and reconstructing the third embedding vector using an attention mechanism to generate a fourth embedding vector; acquiring a predicted speech recognition text output by a 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; generating a total loss value for the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficients, and a predefined total loss value generation model; and then, based on the total loss value... The process involves training the speech recognition model to obtain the trained speech recognition model; obtaining the current speech and current domain label sent by the customer service system; inputting the current speech and current domain label into the trained speech recognition model to obtain the current speech recognition text output by the trained speech recognition model. This process has two beneficial effects: First, by obtaining the current speech and current domain label sent by the customer service system and inputting them into the trained speech recognition model to obtain the current speech recognition text output by the trained speech recognition model, the presence of the current domain label (which corresponds to the domain currently served by the customer service system) reduces the recognition time for the current domain, thus improving speech recognition efficiency. Second, because the speech recognition model is not affected by human intervention, the reliability of the obtained current speech recognition text is improved. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

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

[0041] Figure 2 is a flowchart of a speech recognition method provided in an embodiment of the present invention;

[0042] Figure 3 is a flowchart illustrating a specific implementation of step S23 in Figure 1;

[0043] Figure 4 is a flowchart illustrating a specific implementation of step S25 in Figure 1;

[0044] Figure 5 is a flowchart illustrating a specific implementation of step S26 in Figure 1;

[0045] Figure 6 is a structural schematic diagram of a speech recognition device according to an embodiment of the present invention;

[0046] Figure 7 is a structural schematic diagram of a computer device according to an embodiment of the present invention;

[0047] Figure 8 is another structural schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] Please refer to Figure 1. Figure 1 is a schematic diagram of an application environment of the speech recognition method in one embodiment of the present invention. The speech recognition method provided in this embodiment of the present invention can be applied in the application environment shown in Figure 1, wherein the client communicates with the server through the network.

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

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

[0052] The first embedding vector and the second embedding vector are concatenated to generate a third embedding vector. The third embedding vector is then reconstructed using an attention mechanism to generate a fourth embedding vector.

[0053] Obtain the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain 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;

[0054] The total loss value of the predicted speech recognition text is generated based on the first loss value, the second loss value, the weight coefficients, and the predefined total loss value generation model. The speech recognition model is trained based on the total loss value to obtain the trained speech recognition model.

[0055] Obtain the current voice and current domain label sent by the customer service system, input the current voice and current domain label into the trained speech recognition model, and obtain the current speech recognition text output by the trained speech recognition model.

[0056] The beneficial effects of the above-mentioned speech recognition methods, devices, equipment, and media are twofold. Firstly, by acquiring the current speech and current domain label sent by the customer service system, and inputting the current speech and current domain label into the trained speech recognition model, the current speech recognition text output by the trained speech recognition model is obtained. Since the current domain label is present, which is the label of the domain currently served by the customer service system, the recognition time of the domain currently served by the customer service system is reduced, which is conducive to improving the efficiency of speech recognition. Secondly, since the speech recognition model is not affected by human intervention, it is conducive to improving the reliability of the acquired current speech recognition text.

[0057] The client can include, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0058] The server can be implemented using a separate task database or a task database cluster consisting of multiple task databases. The invention will be described in detail below through specific embodiments.

[0059] Please refer to Figure 2, which is a flowchart illustrating a speech recognition method according to an embodiment of the present invention, including the following steps:

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

[0061] The preset voice prompts are categorized by domain, with different domains focusing on different aspects. In the insurance domain, the focus is on whether the customer agrees to accept new insurance services; in the financial domain, the focus is on whether the customer agrees to accept new financial services; and in the technology domain, the focus is on whether the customer agrees to accept new technology products.

[0062] For example, the preset domain label is the label of the domain previously served by the customer service system.

[0063] For ease of explanation, the following example is provided:

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

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

[0066] For example, if the customer service system previously served the technology sector, the technology sector label is set as a preset sector label. The preset voice message sent by the customer service system is obtained, and the preset sector label and preset voice recognition text corresponding to the preset voice message are obtained. Based on the preset sector label, the weight coefficient is obtained.

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

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

[0069] For example, a preset voice message sent by a customer service system is obtained, a preset domain label and a preset voice recognition text corresponding to the preset voice message are obtained, and a weighting coefficient is obtained based on the preset domain label, including:

[0070] Obtain a preset voice message sent by the customer service system, obtain a preset domain label and a preset voice recognition text corresponding to the preset voice message, and combine the preset voice message, the preset domain label and the preset voice recognition text corresponding to the preset voice message into a sample;

[0071] The samples whose preset domain label is the target label are counted to obtain a first number, and the samples whose domain label is not the target label are counted to obtain a second number;

[0072] The first quantity and the second quantity are added together to obtain the total quantity. The first quantity is then divided by the total quantity to generate the sample percentage. The weight coefficient corresponding to the sample percentage is then obtained. There is a corresponding relationship between the sample percentage and the weight coefficient; different sample percentages correspond to different weight coefficients.

[0073] S22, obtain the first embedding vector of the preset speech and the 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] Determine whether the preset domain label is the target label;

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

[0077] S23, the first embedding vector and the second embedding vector are concatenated to generate a third embedding vector, and the third embedding vector is reconstructed using an attention mechanism to generate a fourth embedding vector;

[0078] S24, obtain the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtain 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;

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

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

[0081] A first loss value between the predicted speech recognition text and the preset speech recognition text is obtained by using a preset connection time classification loss function;

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

[0083] Among them, the Connectionist Temporal Classification Loss (CTC Loss) function simplifies the data preprocessing process by eliminating the need to align the input and output sequences.

[0084] The cross-entropy loss function is a loss function used to evaluate classification performance.

[0085] S25, generate the total loss value of the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficient and the predefined total loss value generation model, train the speech recognition model based on the total loss value, and obtain the trained speech recognition model;

[0086] For example, 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] The weighting coefficient can be used to increase the proportion of the second loss value in the total loss value.

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

[0091] S26, obtain the current voice and current domain label sent by the customer service system, input the current voice 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.

[0092] For example, the current domain label is the label of the domain that the customer service system is currently serving.

[0093] For ease of explanation, the following example is provided:

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

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

[0096] For example, if the customer service system is currently serving the technology field, the technology field tag is set as the current field tag. The current voice and the current field tag sent by the customer service system are obtained. The current voice and the current field tag are input into the trained speech recognition model to obtain the current speech recognition text output by the trained speech recognition model.

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

[0098] Obtain the dialogue window of the customer service system and display the current speech recognition text through the dialogue window.

[0099] In this embodiment of the invention, the beneficial effects are twofold. Firstly, by acquiring the current voice and current domain label sent by the customer service system, and inputting the current voice and current domain label into the trained speech recognition model, the current speech recognition text output by the trained speech recognition model is obtained. Since the current domain label is present, which is the label of the domain currently served by the customer service system, the recognition time of the domain currently served by the customer service system is reduced, which is conducive to improving the efficiency of speech recognition. Secondly, since the speech recognition model is not affected by human intervention, it is conducive to improving the reliability of the acquired current speech recognition text.

[0100] Please refer to Figure 3, which is a schematic flowchart of a specific implementation of step S23 in Figure 1, as detailed below:

[0101] S31, the first embedding vector and the second embedding vector are concatenated to generate a third embedding vector, and the third embedding vector is input into the encoder of the speech recognition model;

[0102] S32, using the attention mechanism of the encoder, the third embedding vector is reconstructed to generate the fourth embedding vector.

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

[0104] Please refer to Figure 4, which is a schematic flowchart of a specific implementation of step S25 in Figure 1, as detailed below:

[0105] S41, Generate the total loss value of the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficient, and the predefined total loss value generation model;

[0106] S42, with the goal of reducing the total loss value, train the speech recognition model. When the reduction of the total loss value is less than a preset range, stop training the speech recognition model and save the trained speech recognition model.

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

[0108] Please refer to Figure 5, which is a schematic flowchart of a specific implementation of step S26 in Figure 1, as detailed below:

[0109] S51, obtain the current voice and current domain label sent by the customer service system, extract features from the voice features of the current voice to obtain the fifth embedding vector, and extract features from the semantic units of the current domain label to obtain the 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 this embodiment of the invention, since the current domain label is present, which is the label of the domain currently served by the customer service system, the recognition time of the domain currently served by the customer service system is reduced, which is beneficial to improving the efficiency of speech recognition.

[0112] Please refer to Figure 6, which is a structural schematic diagram of a speech recognition device according to an embodiment of the present invention. As shown in Figure 6, 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. Detailed descriptions of each functional module are 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 based on the preset domain label;

[0114] The second acquisition module 102 is used to acquire the first embedding vector of the preset speech and the second embedding vector of the preset domain label;

[0115] The generation module 103 is used to concatenate the first embedding vector and the second embedding vector to generate a third embedding vector, and to reconstruct the third embedding vector using an attention mechanism to generate a fourth embedding vector.

[0116] The third acquisition module 104 is used to acquire the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and to acquire 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.

[0117] Training module 105 is used to generate a model based on the first loss value, the second loss value, the weight coefficients and the predefined total loss value, generate the 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 current domain label sent by the customer service system, input the current voice and the current domain label into the trained speech recognition model, and obtain the current voice recognition text output by the trained speech recognition model.

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

[0120] The judgment subunit is used to determine whether the preset domain label is a target label;

[0121] The first extraction subunit is used to extract features from the speech features of the preset speech when the preset domain label is the target label, to obtain a first embedding vector, and to extract features from the semantic units of the preset domain label to obtain a second embedding vector.

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

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

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

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

[0126] The first acquisition subunit is used to acquire the predicted speech recognition text output by the classifier of the speech recognition model based on the fourth embedding vector;

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

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

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

[0130] A generation subunit is used to generate the total loss value of the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficients, and a predefined total loss value generation model.

[0131] The training subunit is used to train the speech recognition model with the goal of reducing the total loss value. When the reduction 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] The second extraction subunit is used to obtain the current voice and current domain label sent by the customer service system, extract the voice features of the current voice to obtain the fifth embedding vector, and extract the semantic units of the current domain label to obtain the 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 to 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 voice 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 this embodiment of the invention, the beneficial effects are twofold. Firstly, by acquiring the current voice and current domain label sent by the customer service system, and inputting the current voice and current domain label into the trained speech recognition model, the current speech recognition text output by the trained speech recognition model is obtained. Since the current domain label is present, which is the label of the domain currently served by the customer service system, the recognition time of the domain currently served by the customer service system is reduced, which is conducive to improving the efficiency of speech recognition. Secondly, since the speech recognition model is not affected by human intervention, it is conducive to improving the reliability of the acquired current speech recognition text.

[0138] For specific limitations on speech recognition devices, please refer to the limitations on speech recognition methods mentioned above, which will not be repeated here.

[0139] Each module in the aforementioned speech recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0140] Please refer to Figure 7, which is a structural schematic diagram of a computer device according to one embodiment of the present invention. In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 7. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus.

[0141] The processor of this computer device provides computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface of the computer device is used for communication with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a speech recognition method on the server side.

[0142] Please refer to Figure 8, which is another structural schematic diagram of a computer device according to one embodiment of the present invention. In one embodiment, a computer device is provided, which can be a client, and its internal structure diagram is shown in Figure 8. The computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a speech recognition method.

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

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

[0145] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), graphics processing units (GPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0146] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, 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 terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated subsamples, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other subsamples, wholes, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes the element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

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

[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. 。

Claims

1. A speech recognition method, characterized in that, include: The system obtains a preset voice message sent by the customer service system, obtains a preset domain label and a preset voice recognition text corresponding to the preset voice message, and obtains a weight coefficient based on the preset domain label. The preset domain label includes labels for different domains served by the customer service system, and the weight coefficient is related to the proportion of the preset domain label in all domain labels. Obtain the first embedding vector of the preset speech and the second embedding vector of the preset domain label; The first and second embedding vectors are concatenated to generate a third embedding vector. An attention mechanism is used to reconstruct the third embedding vector to generate a fourth embedding vector. The predicted speech recognition text output by the speech recognition model based on the fourth embedding vector is obtained. A first loss value and a second loss value are obtained between the predicted speech recognition text and the preset speech recognition text, based on a predefined method. A model is generated using the first loss value, the second loss value, the weight coefficients, and a predefined total loss value to generate the total loss value of the predicted speech recognition text. The speech recognition model is trained based on the total loss value to obtain the trained speech recognition model. The current speech and current domain label sent by the customer service system are obtained. The current speech and 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.

2. The speech recognition method according to claim 1, characterized in that, The step of obtaining the first embedding vector of the preset speech and the second embedding vector of the preset domain label includes: determining whether the preset domain label is a target label; when the preset domain label is the target label, performing feature extraction on the speech features of the preset speech to obtain the first embedding vector, and performing feature extraction on the semantic units of the preset domain label to obtain the 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 using an attention mechanism to generate a fourth embedding vector includes: concatenating the first embedding vector and the second embedding vector to generate a third embedding vector, inputting the third embedding vector into the encoder of the speech recognition model; and reconstructing the third embedding vector using 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 obtaining the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and obtaining 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 the predicted speech recognition text output by the classifier of the speech recognition model based on the fourth embedding vector; obtaining the first loss value between the predicted speech recognition text and the preset speech recognition text through a preset connection temporal classification loss function; and obtaining the second loss value between the predicted speech recognition text and the preset speech recognition text through a preset cross-entropy loss function.

5. The speech recognition method according to claim 1, characterized in that, The step of generating a total loss value for the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficients, and a predefined total loss value generation model, training the speech recognition model based on the total loss value, and obtaining the trained speech recognition model includes: generating a total loss value for the predicted speech recognition text based on the first loss value, the second loss value, the weight coefficients, and a predefined total loss value generation model; training the speech recognition model with the goal of reducing the total loss value; stopping the training of the speech recognition model when the reduction in the total loss value is less than a preset range; and saving the trained speech recognition model.

6. The speech recognition method according to claim 1, characterized in that, The step of obtaining the current voice and current domain label sent by the customer service system, inputting the current voice and the current domain label into the trained speech recognition model, and obtaining the current speech recognition text output by the trained speech recognition model includes: obtaining the current voice and current domain label sent by the customer service system; extracting features from the voice features of the current voice to obtain a fifth embedding vector; extracting features from the semantic units of the current domain label to obtain a sixth embedding vector; and inputting the fifth embedding vector and the sixth embedding vector into the trained speech recognition model to obtain the current speech recognition text output by the trained speech recognition model based on the fifth embedding vector and the sixth embedding vector.

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

8. A voice recognition device, characterized in that, include: The first acquisition module 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 based on the preset domain label. The preset domain label includes labels of different domains served by the customer service system, and the weight coefficient is related to the proportion of the preset domain label in all domain labels. The second acquisition module is used to acquire the first embedding vector of the preset speech and the second embedding vector of the preset domain label; The generation module 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 using an attention mechanism to generate a fourth embedding vector; the third acquisition module is used to acquire the predicted speech recognition text output by the speech recognition model based on the fourth embedding vector, and acquire 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. The training module is used to generate a model based on the first loss value, the second loss value, the weight coefficients and the predefined total loss value, generate the 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 current domain label sent by the customer service system, input the current voice 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.

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, it implements the steps of the speech recognition method as described in any one of claims 1 to 7.

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

Citation Information

Patent Citations

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

    CN113436616A