Speech recognition method, device, server and storage medium
By matching the target scene on the terminal device and binding the speech recognition model identification, combining acoustics and language models, the accuracy of the speech recognition model in different scenarios is solved, and a more efficient speech recognition effect is achieved.
Patent Information
- Application Number
- CN202111569179.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2041-12-21
AI Technical Summary
The existing speech recognition model can only accurately identify the voice data in specific scenarios, and the recognition effect is poor in other scenarios, resulting in insufficient accuracy of speech recognition.
By obtaining and binding the recognition model identification of the corresponding speech recognition model in the target scenario matched by the terminal device, the device identification is used to obtain the appropriate speech recognition model for recognition, including binding of the acoustic model and the language model, combining feature extraction and recognition score processing, the most matching recognition result is selected.
It improves the accuracy of speech recognition in different scenarios, ensures that speech data can be effectively recognized by speech recognition models in corresponding scenarios, and improves the overall recognition effect.
Smart Images

Figure CN114299928B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a speech recognition method, device, server, and storage medium. Background Art
[0002] With the development of Internet technology, the application of ASR (Automatic Speech Recognition) technology is becoming more and more extensive, and speech recognition through speech recognition models has become a commonly used speech recognition method.
[0003] In related technologies, the speech recognition model is trained by corpus in a specific scenario. When speech recognition is performed based on the speech recognition model, the speech recognition model can only accurately recognize the speech data in the specific scenario, but the recognition effect in other scenarios is not ideal. Therefore, how to improve the accuracy of speech recognition has become an urgent problem that needs to be solved. Summary of the Invention
[0004] The embodiments of the present application provide a speech recognition method, device, server, and storage medium that can improve the accuracy of speech recognition. The technical solution is as follows:
[0005] According to one aspect of an embodiment of the present application, a speech recognition method is provided, the method comprising:
[0006] Based on the target scene matched by the terminal, obtaining a recognition model identifier of a speech recognition model corresponding to the target scene, and binding the device identifier of the terminal to the recognition model identifier, the speech recognition model being used to process speech data in the target scene;
[0007] In response to receiving a recognition request carrying the device identifier and voice data, obtaining a voice recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier;
[0008] The speech data is recognized based on the speech recognition model corresponding to the recognition model identifier to obtain a speech recognition result.
[0009] In a possible implementation, obtaining the recognition model identifier of the speech recognition model corresponding to the target scene includes:
[0010] Obtaining a first recognition model identifier of the speech recognition model corresponding to the target scene;
[0011] The recognition model identifier is obtained based on a numerical value having a target parameter as a base and a first recognition model identifier of the speech recognition model as an exponent.
[0012] In a possible implementation, the acquiring, based on the recognition model identifier bound to the device identifier, a speech recognition model corresponding to the recognition model identifier includes:
[0013] parsing the recognition model identifier based on the target parameter to obtain the first recognition model identifier;
[0014] Obtain the speech recognition model corresponding to the first recognition model identifier.
[0015] In a possible implementation, the terminal matches a plurality of target scenes, each of which corresponds to a speech recognition model; and obtaining a recognition model identifier of the speech recognition model corresponding to the target scene includes:
[0016] Obtaining a first recognition model identifier of the speech recognition model corresponding to each target scene;
[0017] For each of the speech recognition models, using a numerical value having a target parameter as a base and the first recognition model identifier of the speech recognition model as an exponent as a second recognition model identifier of the speech recognition model;
[0018] The sum of the second recognition model identifiers of the plurality of speech recognition models is used as the recognition model identifier.
[0019] In a possible implementation, the acquiring, based on the recognition model identifier bound to the device identifier, a speech recognition model corresponding to the recognition model identifier includes:
[0020] Determine, from the second recognition model identifiers of the plurality of speech recognition models, a second recognition model identifier that is closest to the recognition model identifier and is not greater than the recognition model identifier, and perform a logarithmic operation on the second recognition model identifier to obtain a first recognition model identifier;
[0021] From multiple second recognition model identifiers other than the second recognition model identifier, continue to determine another second recognition model identifier that is closest to the first difference and not greater than the first difference, perform logarithmic operation on the another second recognition model identifier, and obtain another first recognition model identifier, the first difference is the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0, and obtain the speech recognition model corresponding to each first recognition model identifier.
[0022] In one possible implementation, the speech recognition model includes an acoustic model, and obtaining a recognition model identifier of the speech recognition model corresponding to the target scene and binding the device identifier of the terminal to the recognition model identifier includes:
[0023] Determining, based on a sampling rate matched to the target scene, an acoustic model corresponding to the sampling rate, the acoustic model being used to process speech data at the sampling rate;
[0024] The device identifier is bound to the acoustic model identifier of the acoustic model.
[0025] In one possible implementation, the terminal matches a plurality of target scenarios, each target scenario corresponds to a speech recognition model, and each speech recognition model further includes at least one language model corresponding to the target scenario; and obtaining a recognition model identifier of the speech recognition model corresponding to the target scenario and binding the device identifier of the terminal to the recognition model identifier further includes:
[0026] generating a language model identifier corresponding to the target scenario based on the language model identifier of at least one language model matched to each target scenario;
[0027] The device identifier is bound to the language model identifier corresponding to each target scenario.
[0028] In a possible implementation, the acquiring, based on the recognition model identifier bound to the device identifier, a speech recognition model corresponding to the recognition model identifier includes:
[0029] Querying the acoustic model identifier and the language model identifier bound to the device identifier;
[0030] The acoustic model corresponding to the acoustic model identifier is obtained, and the language model corresponding to the language model identifier is obtained, so as to obtain the speech recognition model corresponding to the device identifier.
[0031] In one possible implementation, the terminal is matched with a plurality of target scenes, each target scene corresponds to a speech recognition model; and the speech recognition model corresponding to the recognition model identifier is used to recognize the speech data to obtain a speech recognition result, including:
[0032] Performing feature extraction on the speech data to obtain speech features;
[0033] Inputting the speech features into a speech recognition model corresponding to each target scene, respectively, to obtain a first recognition result and a recognition score corresponding to the speech data, wherein the recognition score is used to indicate the degree of match between the first recognition result and the speech data;
[0034] Among the multiple first recognition results, the first recognition result with the highest recognition score is used as the speech recognition result.
[0035] According to another aspect of an embodiment of the present application, a speech recognition device is provided, the device comprising:
[0036] A first acquisition module is configured to acquire, based on a target scene matched by a terminal, a recognition model identifier of a speech recognition model corresponding to the target scene, and bind a device identifier of the terminal to the recognition model identifier, wherein the speech recognition model is used to process speech data in the target scene;
[0037] a second acquisition module, configured to, in response to receiving a recognition request carrying the device identifier and voice data, acquire a voice recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier;
[0038] The recognition module is used to identify the speech recognition model corresponding to the recognition model, recognize the speech data, and obtain a speech recognition result.
[0039] In one possible implementation, the first acquisition module is used to obtain the first recognition model identifier of the speech recognition model corresponding to the target scene; and obtain the recognition model identifier based on a numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the exponent.
[0040] In a possible implementation, the second acquisition module is configured to parse the recognition model identifier based on the target parameter to obtain the first recognition model identifier; and obtain the speech recognition model corresponding to the first recognition model identifier.
[0041] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; the first acquisition module is used to obtain the first recognition model identifier of the speech recognition model corresponding to each target scene; for each speech recognition model, a numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the exponent is used as the second recognition model identifier of the speech recognition model; the sum of the second recognition model identifiers of multiple speech recognition models is used as the recognition model identifier.
[0042] In one possible implementation, the second acquisition module is used to determine the second recognition model identifier that is closest to and not greater than the recognition model identifier from the second recognition model identifiers of the multiple speech recognition models, perform a logarithmic operation on the second recognition model identifier, and obtain a first recognition model identifier; continue to determine another second recognition model identifier that is closest to and not greater than the first difference from the multiple second recognition model identifiers other than the second recognition model identifier, perform a logarithmic operation on the another second recognition model identifier, and obtain another first recognition model identifier, the first difference being the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0; obtain the speech recognition model corresponding to each first recognition model identifier.
[0043] In one possible implementation, the speech recognition model includes an acoustic model, and the first acquisition module is used to determine the acoustic model corresponding to the sampling rate based on the sampling rate matched by the target scene, and the acoustic model is used to process the speech data of the sampling rate; and the device identifier and the acoustic model identifier of the acoustic model are bound.
[0044] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model, and each speech recognition model also includes at least one language model corresponding to the target scene; the first acquisition module is also used to generate a language model identifier corresponding to the target scene based on the language model identifier of at least one language model corresponding to each target scene; and bind the device identifier to the language model identifier corresponding to each target scene.
[0045] In one possible implementation, the second acquisition module is used to query the acoustic model identifier and the language model identifier bound to the device identifier; obtain the acoustic model corresponding to the acoustic model identifier, and obtain the language model corresponding to the language model identifier, so as to obtain the speech recognition model corresponding to the device identifier.
[0046] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; the recognition module is used to extract features from the speech data to obtain speech features; the speech features are input into the speech recognition model corresponding to each target scene respectively to obtain a first recognition result and a recognition score corresponding to the speech data, and the recognition score is used to indicate the degree of matching between the first recognition result and the speech data; among multiple first recognition results, the first recognition result with the highest recognition score is used as the speech recognition result.
[0047] According to another aspect of an embodiment of the present application, a server is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the speech recognition method described in any one of the above possible implementation methods.
[0048] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the speech recognition method described in any of the above possible implementation methods.
[0049] According to another aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program code, and the computer program code is stored in a computer-readable storage medium. A processor of a server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the server performs the speech recognition method as described in any possible implementation method described above.
[0050] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0051] The technical solution provided in the embodiment of the present application first binds the device identifier of the electronic device with the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the electronic device. Therefore, when a recognition request sent by the electronic device is received, the speech recognition model corresponding to the bound recognition model identifier can be obtained through the device identifier, thereby realizing the selection of a speech recognition model suitable for the electronic device in different scenarios, so that the speech data can be recognized by the speech recognition model in the corresponding scenario, thereby improving the accuracy of speech recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0054] Figure 2 This is a flow chart of a speech recognition method provided by an embodiment of the present application;
[0055] Figure 3 This is a flow chart of a speech recognition method provided by an embodiment of the present application;
[0056] Figure 4 This is a flow chart of a speech recognition method provided by an embodiment of the present application;
[0057] Figure 5 This is a structural diagram of a speech recognition device provided in an embodiment of the present application;
[0058] Figure 6 This is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0060] It is understood that the terms "first," "second," and the like used herein may be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, without departing from the scope of this application, a first recognition model identifier may be referred to as a second recognition model identifier, and a second recognition model identifier may be referred to as a first recognition model identifier.
[0061] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.
[0062] It should be noted that the user data involved in this application (including but not limited to user device information, user personal information, etc.) are all information authorized by the user or fully authorized by all parties.
[0063] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application, see Figure 1 The implementation environment includes: a terminal 101 and a server 102, and the terminal 101 and the server 102 are connected via a wired or wireless network.
[0064] Optionally, the terminal 101 is any type of terminal such as a smartphone, a tablet computer, a smart wearable device, or a smart home device, and the smart home device is a smart speaker, a smart TV, a smart refrigerator, a smart air conditioner, a smart robot, a smart lamp, or a smart lock. The server 102 is at least one of a single server, a server cluster consisting of multiple servers, a cloud server, a cloud computing platform, and a virtualization center, which is not limited in this embodiment of the present application.
[0065] Optionally, the terminal 101 is installed with an application provided by the server 102, and the terminal 101 can implement functions such as data transmission and message interaction through the application. Optionally, the application is an application in the operating system of the terminal 101, or a third-party application.
[0066] In an embodiment of the present application, the terminal 101 collects voice data and sends a recognition request carrying the voice data to the server 102. The server 102 receives the recognition request, recognizes the voice data through a voice recognition model, and obtains a voice recognition result, so that the server can perform other operations based on the voice recognition result, for example, controlling the terminal 101 or sending the voice recognition result to the terminal 101, so that the terminal 101 provides corresponding services to the user.
[0067] The speech recognition method provided in the embodiment of the present application can be applied to a variety of scenarios. The application scenarios of the speech recognition method are introduced below, wherein the terminal is the terminal 101 in the above implementation environment, and the server is the server 102 in the above implementation environment.
[0068] For example, in a smart home scenario, taking the terminal as a smart speaker, the user inputs the voice data "play the next song" through the terminal, the terminal collects the voice data, and sends the voice data to the server. The server recognizes the voice data through the voice recognition method provided in the embodiment of the present application, and obtains the voice recognition result "play the next song", thereby controlling the terminal to execute the operation of playing the next song.
[0069] It should be noted that the embodiments of the present application are only described using smart home scenarios as an example, and do not limit the scenarios of the speech recognition method of the present application.
[0070] Figure 2 This is a flow chart of a speech recognition method provided by an embodiment of the present application. This embodiment of the present application is executed by a server, see Figure 2 , the method comprises the following steps:
[0071] 201. The server obtains the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the terminal, and binds the device identifier of the terminal to the recognition model identifier. The speech recognition model is used to process the speech data in the target scene.
[0072] The terminal is matched with a target scenario, which is the terminal's application scenario. For example, if the terminal is a smart speaker, the target scenario is the smart home scenario. If the terminal is a smartwatch, the target scenario is the smart wearable scenario. The device identifier of any terminal is used to uniquely identify the terminal. For example, the device identifier is the device ID (Identity).
[0073] The speech recognition model is obtained based on the corpus training in a specific scenario, and the speech recognition model is used to process the speech data in the scenario. In the embodiment of the present application, one scenario corresponds to one speech recognition model. The recognition model identifier of any speech recognition model is used to indicate the speech recognition model.
[0074] 202. In response to receiving the recognition request carrying the device identifier and voice data, the server obtains a voice recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier.
[0075] The voice data is audio stream data. In an embodiment of the present application, when a user wants a terminal to provide a certain service, the user inputs voice data through the terminal. The terminal collects the voice data and sends a recognition request containing the voice data and the device identifier to the server. In response to receiving the recognition request, the server obtains the voice recognition model corresponding to the recognition model identifier bound to the device identifier.
[0076] 203. The server recognizes the voice data based on the voice recognition model corresponding to the recognition model identifier to obtain a voice recognition result.
[0077] The speech recognition result is the text data corresponding to the speech data.
[0078] In an embodiment of the present application, since the device identifier of the electronic device is first bound to the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the electronic device, when a recognition request sent by the electronic device is received, the speech recognition model corresponding to the bound recognition model identifier can be obtained through the device identifier, thereby realizing the selection of a speech recognition model suitable for the electronic device in different scenarios, so that the voice data can be recognized by the voice recognition model in the corresponding scenario, thereby improving the accuracy of speech recognition.
[0079] Figure 3 This is a flow chart of a speech recognition method provided by an embodiment of the present application. This embodiment of the present application is executed by a server, see Figure 3 , the method comprises the following steps:
[0080] 301. The server determines a target scenario that matches the terminal.
[0081] Optionally, the terminal has a target application installed, and the terminal interacts with the server via the target application. Optionally, when the terminal interacts with the server for the first time via the target application, the server determines the target scenario that the terminal matches. For example, the terminal has the target application's SDK installed, and the terminal interacts with the server via the SDK.
[0082] Terminals have corresponding terminal types. For example, a smart blood glucose meter belongs to the medical type, and a smart TV belongs to the smart home type. Optionally, terminal types correspond to application scenarios. For example, a medical type corresponds to a medical scenario, and a smart home type corresponds to a smart home scenario. Optionally, when interacting with a server, the terminal sends terminal information to the server, which includes a device identifier and terminal type. The server stores the terminal information. The server obtains the terminal type from the terminal information and uses the application scenario corresponding to the terminal type as the target scenario for the terminal.
[0083] The terminal information may also include other information, such as the device model of the terminal, version information of the target application, and other information, which is not limited in this application.
[0084] It should be noted that the server can store the correspondence between terminal types and application scenarios to facilitate querying the application scenarios corresponding to the terminal types. The application scenarios corresponding to each terminal type can be set as needed, and this embodiment of the application does not limit this.
[0085] 302. The server obtains a first recognition model identifier of a speech recognition model corresponding to the target scenario, where the speech recognition model is used to process speech data in the target scenario.
[0086] The first recognition model identifier is used to uniquely identify the speech recognition model. In an embodiment of the present application, the server stores multiple speech recognition models, each of which is used to recognize speech data in a specific scenario. Optionally, for each speech recognition model, the server uses the position number of the speech recognition model as the first recognition model identifier of the speech recognition model.
[0087] Wherein, multiple speech recognition models are stored in a certain order, and each speech recognition model has its own storage location. Therefore, the location number of each speech recognition model is unique and can be used as the first recognition model identifier. For example, the location numbers of 16 speech recognition models are 0, 1, 2, 3, ..., 14 and 15 respectively. Then the first recognition model identifiers of the 16 speech recognition models are 0, 1, 2, 3, ..., 14 and 15 respectively.
[0088] 303. The server obtains the recognition model identifier based on a numerical value having the target parameter as a base and the first recognition model identifier of the speech recognition model as an exponent.
[0089] Among them, the target parameter is a positive integer greater than 1, and the target parameter can be set as needed, which is not limited in this application. For example, the target parameter is 2, 3, or 4.
[0090] In an embodiment of the present application, the first recognition model identifier of the speech recognition model is processed based on the target parameter, and the recognition model identifier is obtained based on the processed value, thereby enhancing the uniqueness of the recognition model identifier based on the first recognition model identifier.
[0091] For ease of distinction, in the embodiment of the present application, the numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the index is referred to as the first numerical value. Optionally, steps 302 to 304 are an implementation method in which the server obtains the recognition model identifier of the speech recognition model corresponding to the target scene when the terminal matches a target scene. Wherein, the number of speech recognition models corresponding to the terminal is 1, and the number of the first numerical value is 1, then the server directly uses the first numerical value as the recognition model identifier.
[0092] Optionally, when the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; the implementation method of the server obtaining the recognition model identifier of the speech recognition model corresponding to the target scene includes: the server obtains the first recognition model identifier of the speech recognition model corresponding to each target scene; for each speech recognition model, a numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the exponent is used as the second recognition model identifier of the speech recognition model; the sum of the second recognition model identifiers of multiple speech recognition models is used as the recognition model identifier.
[0093] For example, the multiple target scenarios matched by the terminal include medical scenarios and smart home scenarios, then the multiple speech recognition models corresponding to the terminal include model A corresponding to the medical scenario and model B corresponding to the smart home scenario. Taking the first recognition model identifier of model A as 0, the first recognition model identifier of model B as 2, and the target parameter as 2 as an example, the second recognition model identifier of model A is 1, the second recognition model identifier of model B is 4, and the recognition model identifier is 5.
[0094] In an embodiment of the present application, when the terminal matches multiple target scenarios, the terminal corresponds to multiple speech recognition models. Since the recognition model identifier is a numerical value obtained by processing multiple speech recognition models based on target parameters, that is, the sum of the second recognition model identifiers, multiple speech recognition models can be indicated by one recognition model identifier, thereby reducing the number of recognition model identifiers to be bound.
[0095] 304. The server binds the terminal's device identifier to the recognition model identifier.
[0096] By binding the terminal's device identifier and the recognition model identifier, an association relationship between the device identifier and the recognition model identifier is established. Optionally, the server stores the terminal's device identifier and the recognition model identifier in correspondence. In an embodiment of the present application, the server only needs to bind the terminal's device identifier to the recognition model identifier, without having to bind the device identifier to the first recognition model identifier of each speech recognition model, to simplify the binding operation.
[0097] In some embodiments, the speech recognition model includes an acoustic model, and the acoustic model has a unique acoustic model identifier. In one possible implementation, the server performs steps 302-304, including: the server obtains the acoustic model identifier of the acoustic model corresponding to the target scene, obtains the recognition model identifier based on a numerical value with the target parameter as the base and the acoustic model identifier of the acoustic model as the index, and binds the terminal's device identifier to the recognition model identifier. Alternatively, the server performs steps 302-304, which can also be replaced by the following steps: the server determines the acoustic model corresponding to the sampling rate based on the sampling rate matched by the target scene; and binds the device identifier to the acoustic model identifier of the acoustic model.
[0098] Optionally, the implementation method for the server to obtain the acoustic model identifier of the acoustic model corresponding to the target scene includes: the server determines the acoustic model corresponding to the sampling rate based on the sampling rate of the target scene match, and the acoustic model is used to process the voice data of the sampling rate. Among them, the sampling rate, that is, the sampling frequency, refers to the number of samples of the digital signal obtained by sampling the analog signal per unit time. For example, the sampling rate is 8000Hz (Hertz) or 16000Hz. The sampling rate of the target scene match can be set as needed, and the embodiment of the present application does not limit this. For example, the sampling rate of the outbound call scene match is 8000Hz, and the sampling rate of the smart home scene match is 16000Hz.
[0099] Each sampling rate corresponds to an acoustic model, and the acoustic model identifier of the acoustic model can uniquely identify the acoustic model. The server can then determine the acoustic model corresponding to the terminal and bind the device identifier and the acoustic model identifier.
[0100] In an embodiment of the present application, when the speech recognition model includes an acoustic model, since the target scene has a matching sampling rate, by binding the device identifier and the acoustic model identifier of the acoustic model corresponding to the sampling rate, there is no need to obtain the recognition model identifier of the acoustic model based on the target parameters, thereby saving processing time and improving processing efficiency.
[0101] It should be noted that a sampling rate matches at least one scene. This means that if the same sampling rate matches multiple scenes, then if the terminal matches one target scene, then it corresponds to one acoustic model; if the terminal matches multiple target scenes, then it corresponds to at least one acoustic model.
[0102] In other embodiments, the speech recognition model also includes a language model, and the language model has a unique language model identifier. In one possible implementation, the server performs steps 302-304 including: the server obtains the language model identifier of the language model corresponding to the target scenario, obtains the recognition model identifier based on a numerical value with the target parameter as the base and the language model identifier of the language model as the exponent, and binds the terminal's device identifier to the recognition model identifier. Alternatively, the server performs steps 302-304, which can also be replaced by the following steps: the server obtains the language model identifier of the language model corresponding to the target scenario, and binds the terminal's device identifier to the language model identifier.
[0103] Optionally, each target scene corresponds to at least one language model. When the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model, and each speech recognition model also includes at least one language model corresponding to the target scene. The implementation method of the server executing steps 302-304 can also be replaced by the following steps: the server generates a language model identifier corresponding to the target scene based on the language model identifier of at least one language model corresponding to each target scene; and binds the device identifier to the language model identifier corresponding to each target scene.
[0104] The server generates a language model identifier corresponding to each target scene based on the language model identifier of at least one language model corresponding to the target scene, and the implementation method includes: for each language model, the server determines a second numerical value with the target parameter as the base and the language model identifier of the language model as the exponent, and uses the sum of the second numerical values corresponding to multiple language models as the language model identifier corresponding to the target scene. This implementation method is similar to the implementation method in step 303, in which the server obtains the recognition model identifiers of the speech recognition models corresponding to multiple target scenes when the terminal matches multiple target scenes, and will not be repeated here.
[0105] In the embodiment of the present application, multiple target scenes are described by taking the same acoustic model as an example. Since a speech recognition model includes an acoustic model and a language model, each speech recognition model includes the same acoustic model and a different language model.
[0106] In the embodiment of the present application, by directly binding the device identifier to the language model identifier, there is no need to obtain the recognition model identifier based on the target parameter, which saves processing time and improves processing efficiency.
[0107] It should be noted that the server first executes steps 301 to 304 to bind the terminal's device identifier and recognition model identifier. After completing step 304, the server does not need to immediately execute step 305, but only executes step 305 when receiving the recognition request sent by the terminal.
[0108] 305. In response to receiving the recognition request carrying the device identifier and voice data, the server parses the recognition model identifier bound to the device identifier based on the target parameter to obtain a first recognition model identifier.
[0109] Upon receiving a recognition request from a terminal, the server queries the recognition model identifier bound to the device identifier of the terminal based on the device identifier of the terminal. Optionally, since the recognition model identifier is obtained based on the target parameters and the first recognition model identifier of the speech recognition model, the server parses the recognition model identifier to obtain the first recognition model identifier.
[0110] In some embodiments, if the terminal matches a target scene, the server performs step 305 in a manner including: performing a logarithmic operation on the target parameter as the base of the logarithm and the recognition model identifier as a true number to obtain a first recognition model identifier. Since the server directly uses the first value as the recognition model identifier when the terminal matches a target scene, the server can directly perform a logarithmic operation on the recognition model identifier to obtain the first recognition model identifier.
[0111] In other embodiments, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model, and step 305 can be replaced by the following steps: the server determines the second recognition model identifier that is closest to and not greater than the recognition model identifier from the second recognition model identifiers of the multiple speech recognition models, performs a logarithmic operation on the second recognition model identifier, and obtains a first recognition model identifier; from multiple second recognition model identifiers other than the second recognition model identifier, continues to determine another second recognition model identifier that is closest to and not greater than the first difference, performs a logarithmic operation on the other second recognition model identifier, and obtains another first recognition model identifier, where the first difference is the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0.
[0112] The multiple speech recognition models are speech recognition models stored in the server. The server stores a first recognition model identifier for each speech recognition model. Optionally, the server also stores a second recognition model identifier for each speech recognition model. Alternatively, upon receiving a recognition request from a terminal, the server uses, for each speech recognition model, a value obtained by using the target parameter as the base and the first recognition model identifier as the exponent as the second recognition model identifier.
[0113] Optionally, the server performs a logarithmic operation on the second recognition model identifier in an implementation manner including: the server performs a logarithmic operation with a target parameter as a base of the logarithm and the second recognition model identifier as a true number.
[0114] For example, the first recognition model identifiers of multiple speech recognition models are 0, 1, 2 and 3 respectively, and the target parameter is 2, then the second recognition model identifiers are 1, 2, 4 and 8 respectively. Taking the recognition model identifier 5 as an example, the second recognition model identifier 4 that is closest to 5 and not greater than 5 is determined from multiple second recognition model identifiers, and a logarithmic operation is performed on 4 to obtain 2. Then, the second recognition model identifier that is closest to the first difference 1 and not greater than the first difference is determined from the remaining second recognition model identifiers, that is, 1. A logarithmic operation is performed on 1 to obtain 0, then the multiple first recognition model identifiers are 0 and 2 respectively.
[0115] In an embodiment of the present application, since the recognition model identifier is obtained by processing the target parameters and the first recognition model identifier of the speech recognition model corresponding to each target scene when the terminal matches multiple target scenes, each first recognition model identifier is determined one by one from the second recognition model identifiers of multiple speech recognition models, thereby ensuring that no first recognition model identifier is missed, thereby improving the accuracy of the determined first recognition model identifier.
[0116] 306. The server obtains the speech recognition model corresponding to the first recognition model identifier.
[0117] The server stores multiple speech recognition models, and searches for a speech recognition model corresponding to a first recognition model identifier from the stored multiple speech recognition models. If multiple first recognition model identifiers are obtained through parsing, the server obtains the speech recognition model corresponding to each first recognition model identifier.
[0118] In some embodiments, steps 305-306 are an implementation method in which the server, in response to receiving a recognition request carrying a device identifier and voice data, obtains a voice recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier.
[0119] The embodiments of the present disclosure can also be implemented through other implementation methods to obtain the speech recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier. Accordingly, in other embodiments, the speech recognition model includes an acoustic model and a language model, and the server directly binds the terminal's device identifier to the acoustic model identifier and the language model identifier. Then, the server obtains the speech recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier. The implementation method includes: the server queries the acoustic model identifier and the language model identifier bound to the device identifier; obtains the acoustic model corresponding to the acoustic model identifier, and obtains the language model corresponding to the language model identifier, so as to obtain the speech recognition model corresponding to the device identifier.
[0120] In an embodiment of the present application, since the device identifier, acoustic model identifier and language model identifier are bound in advance, the bound acoustic model identifier and language model identifier can be directly queried, thereby saving the time of obtaining the speech recognition model corresponding to the device identifier.
[0121] Each speech recognition model stored in the server is a trained model. In some embodiments, the process of training the speech recognition model on the server includes: the server obtains multiple sample speech data in the training scenario, each sample speech data has a corresponding phoneme sequence label and text sequence label, and in the i-th iteration of training, the speech features of the multiple sample speech data are input into the speech recognition model determined by the i-1th iteration to obtain the parameter training results of the i-1th iteration, where i is a positive integer greater than 1; based on the parameter training results of the i-th iteration and the phoneme sequence labels and text sequence labels of the multiple sample speech data, the model parameters of the speech recognition model determined by the i-1th iteration are adjusted, and the i+1th iteration is performed based on the adjusted model parameters, and the above-mentioned iterative process of training is repeated until the training meets the target conditions and a trained speech recognition model is obtained.
[0122] The training scenario refers to the scenario corresponding to the speech recognition model to be trained, such as an outbound call scenario or an intelligent question-and-answer scenario, etc. The multiple sample speech data can be collected by the terminal or obtained by the server from a database, which is not limited in the present embodiment.
[0123] In some embodiments, the target condition for training is that the number of training iterations of the model reaches a target number, which is a pre-set number of training iterations, such as 1000; or the target condition for training is that the model loss value meets a target threshold condition, such as a model loss value less than 0.00001. The present disclosure does not limit the setting of the target condition.
[0124] It should be noted that the server can also train the speech recognition model for each scenario through other implementation methods, and the embodiments of the present application are not limited to this.
[0125] 307. The server recognizes the voice data based on the voice recognition model and obtains a voice recognition result.
[0126] In some embodiments, if a terminal matches a target scenario, the terminal corresponds to a speech recognition model, which includes an acoustic model and a language model. The server then directly recognizes the speech data based on the acoustic model and the language model to obtain a speech recognition result. The acoustic model is used to determine the phoneme sequence corresponding to the speech data, and the language model is used to determine the text sequence corresponding to the speech data.
[0127] In other embodiments, the terminal matches multiple target scenes, and each target scene corresponds to a speech recognition model; the implementation method of step 307 includes: the server extracts features from the speech data to obtain speech features; the speech features are input into the speech recognition model corresponding to each target scene respectively to obtain a first recognition result and a recognition score corresponding to the speech data, and the recognition score is used to indicate the degree of matching between the first recognition result and the speech data; among multiple first recognition results, the first recognition result with the highest recognition score is used as the speech recognition result.
[0128] The speech recognition model can be regarded as a decoder, which decodes speech features and outputs a first recognition result and a recognition score. The recognition score can be expressed in the form of probability.
[0129] In an embodiment of the present application, since the terminal matches multiple target scenes, the voice features are processed separately through multiple voice recognition models. The first recognition result with the highest recognition score is also the voice recognition result that best matches the voice data, so the accuracy of the determined voice recognition result is higher.
[0130] In some embodiments, after obtaining the voice recognition result, that is, after the server learns the content of the voice data collected by the terminal and uttered by the user, the server returns the voice recognition result to the terminal, and the terminal performs a corresponding operation based on the voice recognition result. Alternatively, after obtaining the voice recognition result, the server determines data to be returned to the terminal based on the voice recognition result, returns the data to the terminal, and the terminal performs a corresponding operation based on the data.
[0131] For example, in an intelligent question-and-answer scenario, the server obtains the voice recognition result of "How many sides does a triangle have?" The server determines the reply data "three sides" based on the voice recognition result, sends the reply data to the terminal, and the terminal displays the reply data "three sides", thereby realizing intelligent question-and-answer.
[0132] For another example, in a smart home scenario, the terminal is a smart speaker, and the voice recognition result obtained by the server is "play the previous song", then the server controls the terminal to play the most recently played song.
[0133] In an embodiment of the present application, since speech recognition models for corresponding scenarios can be assigned to different terminals, the speech recognition models can be trained based on the corpus for the corresponding scenarios. The iterative update processes of each speech recognition model are independent of each other. If a speech recognition model needs to be updated, it is only necessary to train the language model based on the corpus for the corresponding scenario, which will not affect other speech recognition models.
[0134] For example, see Figure 4 For the acoustic model corresponding to the target scenario, the server binds the terminal's device identifier to the acoustic model identifier corresponding to the acoustic model. For the language model corresponding to the target scenario, the server binds the terminal's device identifier to the recognition model identifier, where the recognition model identifier is obtained based on a numerical value with the target parameter as the base and the language model identifier of the language model as the exponent. The terminal collects voice data and sends a recognition request carrying the voice data and the device identifier to the server. The server receives the recognition request, determines the corresponding acoustic model identifier and recognition model identifier based on the device identifier, obtains the acoustic model corresponding to the acoustic model identifier, parses the recognition model identifier to obtain the language model identifier, and obtains the language model corresponding to the language model identifier, thereby recognizing the voice data based on the acoustic model and the language model to obtain a voice recognition result.
[0135] The technical solution provided in the embodiment of the present application first binds the device identifier of the electronic device with the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the electronic device. Therefore, when a recognition request sent by the electronic device is received, the speech recognition model corresponding to the bound recognition model identifier can be obtained through the device identifier, thereby realizing the selection of a speech recognition model suitable for the electronic device in different scenarios, so that the speech data can be recognized by the speech recognition model in the corresponding scenario, thereby improving the accuracy of speech recognition.
[0136] Figure 5 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present application, see Figure 5 , the device comprises:
[0137] The first acquisition module 501 is used to obtain the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the terminal, and bind the device identifier of the terminal to the recognition model identifier. The speech recognition model is used to process the speech data in the target scene;
[0138] A second acquisition module 502 is configured to, in response to receiving a recognition request carrying a device identifier and voice data, acquire a voice recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier;
[0139] The recognition module 503 is used to recognize the speech data based on the speech recognition model corresponding to the recognition model identifier to obtain a speech recognition result.
[0140] In one possible implementation, the first acquisition module 501 is used to obtain the first recognition model identifier of the speech recognition model corresponding to the target scene; and obtain the recognition model identifier based on a numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the exponent.
[0141] In a possible implementation, the second acquisition module 502 is configured to parse the recognition model identifier based on the target parameter to obtain the first recognition model identifier; and obtain the speech recognition model corresponding to the first recognition model identifier.
[0142] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; the first acquisition module 501 is used to obtain the first recognition model identifier of the speech recognition model corresponding to each target scene; for each speech recognition model, a numerical value with the target parameter as the base and the first recognition model identifier of the speech recognition model as the exponent is used as the second recognition model identifier of the speech recognition model; the sum of the second recognition model identifiers of multiple speech recognition models is used as the recognition model identifier.
[0143] In one possible implementation, the second acquisition module 502 is used to determine the second recognition model identifier that is closest to and not greater than the recognition model identifier from the second recognition model identifiers of multiple speech recognition models, perform a logarithmic operation on the second recognition model identifier, and obtain a first recognition model identifier; continue to determine another second recognition model identifier that is closest to and not greater than the first difference from multiple second recognition model identifiers other than the second recognition model identifier, perform a logarithmic operation on the other second recognition model identifier, and obtain another first recognition model identifier, where the first difference is the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0; obtain the speech recognition model corresponding to each first recognition model identifier.
[0144] In one possible implementation, the speech recognition model includes an acoustic model. The first acquisition module 501 is used to determine the acoustic model corresponding to the sampling rate based on the sampling rate matched by the target scene, and the acoustic model is used to process the speech data of the sampling rate; the device identifier and the acoustic model identifier of the acoustic model are bound.
[0145] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model, and each speech recognition model also includes at least one language model corresponding to the target scene; the first acquisition module 501 is also used to generate a language model identifier corresponding to the target scene based on the language model identifier of at least one language model corresponding to each target scene; and bind the device identifier to the language model identifier corresponding to each target scene.
[0146] In one possible implementation, the second acquisition module 502 is used to query the acoustic model identifier and language model identifier bound to the device identifier; obtain the acoustic model corresponding to the acoustic model identifier, and obtain the language model corresponding to the language model identifier to obtain the speech recognition model corresponding to the device identifier.
[0147] In one possible implementation, the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; the recognition module 503 is used to extract features from the speech data to obtain speech features; the speech features are input into the speech recognition model corresponding to each target scene respectively to obtain a first recognition result and a recognition score corresponding to the speech data, and the recognition score is used to indicate the degree of matching between the first recognition result and the speech data; among multiple first recognition results, the first recognition result with the highest recognition score is used as the speech recognition result.
[0148] The technical solution provided in the embodiment of the present application first binds the device identifier of the electronic device with the recognition model identifier of the speech recognition model corresponding to the target scene based on the target scene matched by the electronic device. Therefore, when a recognition request sent by the electronic device is received, the speech recognition model corresponding to the bound recognition model identifier can be obtained through the device identifier, thereby realizing the selection of a speech recognition model suitable for the electronic device in different scenarios, so that the speech data can be recognized by the speech recognition model in the corresponding scenario, thereby improving the accuracy of speech recognition.
[0149] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.
[0150] It should be noted that the speech recognition device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate speech recognition. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the detection device can be divided into different functional modules to complete all or part of the functions described above. In addition, the speech recognition device provided in the above embodiment and the speech recognition method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0151] Figure 6: is a schematic diagram of the structure of a server 600 provided in an embodiment of the present application. The server 600 may have relatively large differences due to different configurations or performances, and may include a processor (Central Processing Units, CPU) 601 and a memory 602, wherein the memory 602 is used to store at least one program code, and the at least one program code is loaded and executed by the processor 601 to implement the speech recognition method in the above embodiment. Of course, the server 600 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 600 may also include other components for implementing device functions, which will not be described in detail here.
[0152] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the server 600, and the server 600 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0153] In an exemplary embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium stores at least one program code, which is loaded and executed by a processor to implement the speech recognition method in the above embodiment. The computer-readable storage medium can be a memory. For example, the computer-readable storage medium can be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0154] In an exemplary embodiment, a computer program product is also provided, which includes a computer program code, the computer program code is stored in a computer-readable storage medium, the processor of the server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the server performs the speech recognition method as in the above embodiment.
[0155] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0156] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A speech recognition method, characterized in that: The method comprises: Based on the target scenario matched by the terminal, obtaining a recognition model identifier of a speech recognition model corresponding to the target scenario, and binding the device identifier of the terminal to the recognition model identifier, the speech recognition model being used to process speech data in the target scenario, where the target scenario matched by the terminal is an application scenario corresponding to the terminal type of the terminal; In response to receiving a recognition request carrying the device identifier and voice data, obtaining, based on a recognition model identifier bound to the device identifier, a voice recognition model corresponding to the recognition model identifier, the voice recognition model including an acoustic model and a language model, the acoustic model being used to determine a phoneme sequence corresponding to the voice data, and the language model being used to determine a text sequence corresponding to the voice data; Recognize the speech data based on the speech recognition model corresponding to the recognition model identifier to obtain a speech recognition result; In the case where the terminal matches multiple target scenes, each target scene corresponds to a speech recognition model; and obtaining the recognition model identifier of the speech recognition model corresponding to the target scene includes: Obtaining a first recognition model identifier of the speech recognition model corresponding to each target scene; For each of the speech recognition models, using a numerical value having a target parameter as a base and the first recognition model identifier of the speech recognition model as an exponent as a second recognition model identifier of the speech recognition model; taking the sum of the second recognition model identifiers of the plurality of speech recognition models as the recognition model identifier; The acquiring of the speech recognition model corresponding to the recognition model identifier based on the recognition model identifier bound to the device identifier includes: determining, from a plurality of second recognition model identifiers of the speech recognition models, a second recognition model identifier that is closest to and not greater than the recognition model identifier, performing a logarithmic operation on the second recognition model identifier to obtain a first recognition model identifier; continuing to determine, from a plurality of second recognition model identifiers other than the second recognition model identifier, another second recognition model identifier that is closest to and not greater than the first difference, performing a logarithmic operation on the another second recognition model identifier to obtain another first recognition model identifier, wherein the first difference is the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0; acquiring the speech recognition model corresponding to each first recognition model identifier; The method of identifying the speech data based on the speech recognition model corresponding to the recognition model identifier to obtain a speech recognition result includes: extracting features from the speech data to obtain speech features; inputting the speech features into the speech recognition model corresponding to each target scene to obtain a first recognition result and a recognition score corresponding to the speech data, wherein the recognition score is used to indicate the degree of matching between the first recognition result and the speech data; and taking the first recognition result with the highest recognition score among multiple first recognition results as the speech recognition result.
2. The method according to claim 1, characterized in that In a case where the terminal matches a target scene, obtaining a recognition model identifier of a speech recognition model corresponding to the target scene includes: Obtaining a first recognition model identifier of the speech recognition model corresponding to the target scene; The recognition model identifier is obtained based on a numerical value having a target parameter as a base and a first recognition model identifier of the speech recognition model as an exponent.
3. The method according to claim 2, characterized in that The acquiring, based on the recognition model identifier bound to the device identifier, a speech recognition model corresponding to the recognition model identifier, includes: parsing the recognition model identifier based on the target parameter to obtain the first recognition model identifier; Obtain the speech recognition model corresponding to the first recognition model identifier.
4. The method according to claim 1, wherein The speech recognition model includes an acoustic model, and obtaining a recognition model identifier of the speech recognition model corresponding to the target scene and binding the device identifier of the terminal to the recognition model identifier includes: Determining, based on a sampling rate matched to the target scene, an acoustic model corresponding to the sampling rate, the acoustic model being used to process speech data at the sampling rate; The device identifier is bound to the acoustic model identifier of the acoustic model.
5. The method according to claim 4, characterized in that The terminal is matched with a plurality of target scenes, each target scene corresponds to a speech recognition model, and each speech recognition model further includes at least one language model corresponding to the target scene; obtaining a recognition model identifier of the speech recognition model corresponding to the target scene and binding the device identifier of the terminal to the recognition model identifier further includes: generating a language model identifier corresponding to the target scenario based on the language model identifier of at least one language model corresponding to each target scenario; The device identifier is bound to the language model identifier corresponding to each target scenario.
6. The method according to claim 5, characterized in that The acquiring, based on the recognition model identifier bound to the device identifier, a speech recognition model corresponding to the recognition model identifier, includes: Querying the acoustic model identifier and the language model identifier bound to the device identifier; The acoustic model corresponding to the acoustic model identifier is obtained, and the language model corresponding to the language model identifier is obtained, so as to obtain the speech recognition model corresponding to the device identifier.
7. A speech recognition device, characterized in that: The device comprises: A first acquisition module is configured to acquire, based on a target scenario matched by a terminal, a recognition model identifier of a speech recognition model corresponding to the target scenario, and bind the device identifier of the terminal to the recognition model identifier, wherein the speech recognition model is configured to process speech data in the target scenario, where the target scenario matched by the terminal is an application scenario corresponding to the terminal type of the terminal; a second acquisition module, configured to, in response to receiving a recognition request carrying the device identifier and voice data, acquire, based on a recognition model identifier bound to the device identifier, a voice recognition model corresponding to the recognition model identifier, the voice recognition model including an acoustic model and a language model, the acoustic model being used to determine a phoneme sequence corresponding to the voice data, and the language model being used to determine a text sequence corresponding to the voice data; A recognition module, configured to recognize the speech data based on a speech recognition model corresponding to the recognition model identifier, and obtain a speech recognition result; The terminal is matched with a plurality of target scenes, each target scene corresponding to a speech recognition model; The first acquisition module is configured to: Obtaining a first recognition model identifier of the speech recognition model corresponding to each target scene; For each of the speech recognition models, using a numerical value having a target parameter as a base and the first recognition model identifier of the speech recognition model as an exponent as a second recognition model identifier of the speech recognition model; taking the sum of the second recognition model identifiers of the plurality of speech recognition models as the recognition model identifier; The second acquisition module is used to: determine the second recognition model identifier that is closest to and not greater than the recognition model identifier from the second recognition model identifiers of the multiple speech recognition models, perform a logarithmic operation on the second recognition model identifier, and obtain a first recognition model identifier; continue to determine another second recognition model identifier that is closest to and not greater than the first difference from the multiple second recognition model identifiers other than the second recognition model identifier, perform a logarithmic operation on the another second recognition model identifier, and obtain another first recognition model identifier, wherein the first difference is the difference between the recognition model identifier and the sum of the obtained second recognition model identifiers, until the first difference is 0; and obtain the speech recognition model corresponding to each first recognition model identifier; The recognition module is used to: extract features from the speech data to obtain speech features; input the speech features into the speech recognition model corresponding to each target scene respectively to obtain a first recognition result and a recognition score corresponding to the speech data, wherein the recognition score is used to indicate the degree of matching between the first recognition result and the speech data; and, among multiple first recognition results, use the first recognition result with the highest recognition score as the speech recognition result.
8. A server, characterized in that: The server includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the speech recognition method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the speech recognition method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Voice recognition method, voice recognition device and computer storage medium
CN110797014A
Semantic recognition method and device
CN111144132A