Speech recognition methods, systems, servers, and readable storage media

By configuring multiple decoder management systems and decoder queues, the problems of speech recognition accuracy and efficiency in different scenarios were solved, and efficient parallel processing of speech recognition was achieved.

CN114596860BActive Publication Date: 2025-10-28GUANGZHOU HUYA INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210248267.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2025-10-28
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

The existing speech recognition service architecture is difficult to adapt to the speech recognition accuracy requirements of different scenarios, and it is inefficient when handling concurrent requests.

Method used

By configuring multiple decoder management systems, each system corresponds to a speech recognition model, maintains a decoder queue, parses and calls the appropriate decoder to perform recognition based on speech recognition service requests, and supports parallel processing of multiple speech recognition models.

Benefits of technology

It improves the accuracy and efficiency of speech recognition, can meet the speech recognition needs in different scenarios, and can process multiple requests in the same scenario in parallel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114596860B_ABST
    Figure CN114596860B_ABST
Patent Text Reader

Abstract

The speech recognition method, system, server, and readable storage medium provided by this invention include: configuring multiple decoder management systems according to configuration files of various speech recognition models; each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file; obtaining a speech recognition service request, parsing the speech recognition service request, and obtaining the speech to be recognized and the speech recognition model identifier from the parsing result; determining the target decoder management system from the multiple decoder management systems according to the speech recognition model identifier, and calling the decoder from the decoder queue of the target decoder management system to recognize the speech to be recognized. This invention can meet the speech recognition needs in different scenarios and can also process multiple speech recognition requests in the same scenario in parallel, thereby improving the efficiency of speech recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech recognition technology, and more specifically, to a speech recognition method, system, server, and readable storage medium. Background Technology

[0002] With the development of artificial intelligence technology, speech recognition models can be applied to various speech recognition-related scenarios (such as meeting transcription, subtitle generation, and live streaming muting). In the existing speech service architecture, only one common recognition model is usually deployed to process audio data in different scenarios. On the one hand, this approach is difficult to adapt to the speech recognition accuracy requirements of different scenarios. On the other hand, this approach is difficult to adapt to concurrent speech recognition requests, which reduces speech recognition efficiency. Summary of the Invention

[0003] One objective of this invention is to provide a speech recognition method, system, server, and readable storage medium to solve the adaptability problem of speech recognition in different scenarios and improve the accuracy of speech recognition. This invention can be achieved as follows:

[0004] In a first aspect, the present invention provides a speech recognition method, the method comprising: configuring multiple decoder management systems according to configuration files of multiple speech recognition models; wherein each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file; obtaining a speech recognition service request, parsing the speech recognition service request, and obtaining the speech to be recognized and a speech recognition model identifier from the parsing result; determining a target decoder management system from the multiple decoder management systems according to the speech recognition model identifier, and calling a decoder from the decoder queue of the target decoder management system to recognize the speech to be recognized.

[0005] Secondly, the present invention provides a speech recognition system, comprising a model management module for configuring multiple decoder management systems according to configuration files of various speech recognition models; wherein each decoder management system corresponds to a speech recognition model; the decoder management system maintains a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration files; a scheduling module for obtaining a speech recognition service request, parsing the speech recognition service request, and obtaining the speech to be recognized and the speech recognition model identifier from the parsing result; determining a target decoder management system from the multiple decoder management systems according to the speech recognition model identifier, and retrieving a decoder from the decoder queue of the target decoder management system; and an interface module for calling the decoder to recognize the speech to be recognized.

[0006] Thirdly, the present invention provides a server including a processor and a memory, the memory storing a computer program executable by the processor, the processor being able to execute the computer program to implement the method described in the first aspect.

[0007] Fourthly, the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0008] The present invention provides a speech recognition method, system, server, and readable storage medium. The method includes: configuring multiple decoder management systems according to configuration files of multiple speech recognition models; wherein each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file; obtaining a speech recognition service request, parsing the speech recognition service request, and obtaining the speech to be recognized and the speech recognition model identifier from the parsing result; determining a target decoder management system from the multiple decoder management systems according to the speech recognition model identifier, and calling the decoder from the decoder queue of the target decoder management system to recognize the speech to be recognized.

[0009] Before performing speech recognition, this invention can configure different decoder management systems corresponding to different speech recognition methods. This is equivalent to deploying multiple speech recognition models simultaneously, which can meet the speech recognition needs in different scenarios. This avoids the problem of inaccurate recognition caused by using a common model for speech recognition. After receiving a speech recognition service request, the speech recognition service request is parsed, and the speech to be recognized and the speech recognition model identifier are obtained from the parsing result. Based on the speech recognition model identifier, the target decoder management system is determined from multiple decoder management systems, and the decoder to be recognized is called from the decoder queue of the target decoder management system to recognize the speech. Since a speech recognition model can have multiple decoders, this invention can achieve parallel processing for multiple speech recognition requests in the same scenario, thus improving the efficiency of speech recognition. Attached Figure Description

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 This is a schematic diagram illustrating the application environment of the speech recognition method provided in the embodiments of the present invention;

[0012] Figure 2 This is a schematic diagram of the server structure provided in an embodiment of the present invention;

[0013] Figure 3 A functional block diagram of a speech recognition system provided in an embodiment of the present invention;

[0014] Figure 4 A schematic flowchart illustrating the speech recognition method provided in an embodiment of the present invention;

[0015] Figure 5 A schematic flowchart illustrating one embodiment of step S402 provided in this invention;

[0016] Figure 6 A schematic flowchart illustrating another embodiment of step S402 provided for implementation of the present invention;

[0017] Figure 7 A schematic flowchart illustrating another speech recognition method provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0021] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0022] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0023] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0024] Speech recognition, also known as Automatic Speech Recognition (ASR), aims to convert the lexical content of human speech into computer-readable input. With the development of science and technology, speech recognition technology has been applied to people's lives, such as in human-computer interaction, speech-to-text conversion, transcription of audio files, real-time subtitle generation in live broadcasts, and even live audio muting. Speech recognition is an indispensable processing function in these scenarios.

[0025] Please see Figure 1 , Figure 1 This is a schematic diagram of the application environment of the speech recognition method provided in the embodiment of the present invention. The application environment includes a terminal 110, a server 120 and a network 130.

[0026] Terminal 110 can collect the speech to be recognized, generate a speech recognition request based on the speech, and send the speech recognition request to server 120. Server 120 performs speech recognition on the speech to be recognized using a deployed speech recognition model to obtain the text corresponding to the speech. Server 120 can then perform corresponding operations based on the obtained text. Alternatively, server 120 can also send the text to terminal 110, and terminal 110 can perform corresponding operations on the text.

[0027] For example, in a live streaming scenario, the broadcaster's client can capture what the broadcaster says in real time and transmit the captured audio to the live streaming server. The live streaming server then uses speech recognition to convert the broadcaster's speech into text and generate subtitles in real time, thus improving the user experience.

[0028] Among them, terminal 110 includes smartphones, tablets, laptops, desktop computers, etc. In addition, server 120 can be an independent physical device or a server cluster composed of multiple physical servers. For example, server 120 can be, but is not limited to, a live streaming server, a game server, a streaming media server, etc.

[0029] Please continue reading Figure 2Existing speech recognition technologies typically use a common recognition model to process speech signals collected in different scenarios. However, different scenarios have different environmental noise, signal noise floor, and different vertical domain vocabulary. If the same speech recognition model is used for all scenarios, it is difficult to obtain accurate recognition results and it is difficult to meet the diverse needs of users.

[0030] Therefore, this invention provides a speech recognition method that can adaptively call appropriate speech recognition models according to different application scenarios, thereby improving the accuracy of the recognition results.

[0031] First, we introduce the server that can be used to execute the speech recognition method in this embodiment of the invention. Please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. The server 120 includes:

[0032] like Figure 2 As shown, server 120 includes memory 121, processor 122, and communication interface 123. The memory 121, processor 122, and communication interface 123 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0033] The memory 121 can be used to store software programs and modules, such as the program instructions / modules corresponding to the voice recognition system 300 provided in this embodiment of the invention. These can be stored in the memory 121 in the form of software or firmware, or embedded in the operating system (OS) of the electronic device 200. The processor 122 executes various functional applications and data processing by executing the software programs and modules stored in the memory 121. The communication interface 123 can be used to communicate with other node devices for signaling or data.

[0034] The memory 121 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

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

[0036] Understandable. Figure 2 The structure shown is for illustrative purposes only; server 120 may also include more than [other components]. Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown. Figure 2 The components shown can be implemented using hardware, software, or a combination thereof.

[0037] The speech recognition system in this embodiment of the invention will be described next. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a functional block diagram of a speech recognition system provided in an embodiment of the present invention. This speech recognition system can be applied to… Figure 2 The corresponding speech recognition function is implemented in server 120.

[0038] The speech recognition system 300 may include a model management module 310, a scheduling module 320, and an interface module 330. The model management module 310, scheduling module 320, and interface module 330 can collaboratively perform the following functions:

[0039] The model management module 310 is used to configure multiple decoder management systems according to the configuration files of various speech recognition models; each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file.

[0040] The scheduling module 320 is used to obtain a speech recognition service request, parse the speech recognition service request, and obtain the speech to be recognized and the speech recognition model identifier from the parsing result; based on the speech recognition model identifier, it determines the target decoder management system from multiple decoder management systems, and retrieves the decoder from the decoder queue of the target decoder management system.

[0041] Interface module 330 is used to call the decoder to recognize the speech to be recognized.

[0042] The functions that can be implemented by the model management module 310, the scheduling module 320 and the interface module 330 will be introduced below.

[0043] The model management module 310 can configure multiple decoder management systems according to the configuration files of various speech recognition models. Each decoder management system corresponds to a speech recognition model. The decoder management system is used to maintain a decoder queue. The decoders in the decoder queue are generated by the decoder management system according to the configuration file.

[0044] In this embodiment of the invention, multiple speech recognition models can perform speech recognition for different speech recognition scenarios. The configuration file can be understood as a file generated after each speech recognition model is trained. Based on these configuration files, multiple speech recognition models can be deployed simultaneously on the server to meet the speech recognition needs in various scenarios.

[0045] In this embodiment of the invention, the decoder management system can be understood as a decoder factory, used to manage multiple decoders for each speech recognition model, including decoder production, dequeueing, enqueueing, and destruction. Each decoder factory is only responsible for producing decoders corresponding to one speech recognition model; therefore, the number of decoder factories corresponds to the number of models. Each decoder factory can produce specific decoders based on information such as the number of decoders, model path, whether onnx_mode is set, and whether dnn_vad is used, as set in the configuration file, and put the generated decoders into a decoder queue.

[0046] In other words, by configuring multiple decoder management systems, this embodiment is equivalent to deploying multiple speech recognition models simultaneously. When faced with speech recognition needs in different scenarios, the corresponding decoder relationship system can be obtained in parallel to complete speech recognition, which can improve speech recognition accuracy. On the other hand, since a decoder management system maintains multiple decoders, if multiple speech recognition requests in the same scenario need to be processed, this embodiment can process multiple requests in parallel based on the decoder queue of the speech recognition model corresponding to the scenario, thereby improving the efficiency of speech recognition.

[0047] When the scheduling module 320 needs to retrieve a decoder, it first determines the decoder factory corresponding to the speech recognition model based on the identifier of the speech recognition model, and then retrieves an idle decoder from the decoder queue.

[0048] The scheduling module 320 in this embodiment of the invention will be described next. The scheduling module 320 can be used for:

[0049] Obtain a speech recognition service request; parse the speech recognition service request and obtain the speech to be recognized and the speech recognition model identifier from the parsing result; based on the speech recognition model identifier, determine the target decoder management system from the various decoder management systems maintained by the model management module, and retrieve the decoder from the decoder queue of the target decoder management system.

[0050] In this embodiment of the invention, the scheduling module 320 can be multi-threaded and can process speech recognition service requests sent by different clients in parallel, thereby realizing speech recognition in different scenarios.

[0051] In an optional implementation, the scheduling module 320 can parse the received speech recognition service request, and the parsing result may include, but is not limited to, the client identifier (uuid) and the speech recognition model identifier (mid).

[0052] The aforementioned client identifier (UUID) can be used to distinguish different clients sending voice service requests. The UUID can be used to determine whether the client corresponding to the UUID has a dedicated decoder pre-configured. If so, the corresponding decoder of the client can be directly retrieved without having to determine it from the decoder factory. This not only obtains the appropriate decoder but also saves retrieval time.

[0053] In this embodiment of the invention, a mapping table (uuid-decoder-map) between UUID and decoder can be pre-configured. When the UUID is known, the decoder that matches the client corresponding to the UUID can be obtained by looking up the table.

[0054] For example, if a UUID can be found in the uuid-decoder-map, it means that the client corresponding to that UUID is not accessing the site for the first time, and the decoder can be used directly for decoding. If a UUID cannot be found in the uuid-decoder-map, it means that the client corresponding to that UUID is accessing the site for the first time, and the appropriate decoder can be matched based on the mid.

[0055] The aforementioned speech recognition model identifier (mid) can be used to distinguish between various speech recognition models maintained in the server. In other words, the speech recognition system architecture provided in this embodiment of the invention can integrate various speech recognition models into the same speech recognition service, providing convenience for model deployment.

[0056] Specifically, after sending a speech recognition service, the client can determine the speech recognition model suitable for the client's current scenario and notify the server of the speech recognition model to be used. The server can quickly and accurately determine the target speech recognition model from multiple speech recognition models based on the mid and by looking up a table.

[0057] In order to match a suitable speech recognition model, the scheduling module 320 can be specifically used to: determine the decoder queue corresponding to the target speech recognition model from a preset mapping table between speech recognition model identifiers and decoder queues based on the speech recognition model identifier; when it is determined that there is an idle decoder in the decoder queue, retrieve the decoder located at the head of the queue.

[0058] In this embodiment of the invention, the mapping table between speech recognition model identifiers and decoder queues can be pre-configured, maintaining the correspondence between speech recognition model identifiers and decoder queues. After obtaining the speech recognition model identifier, the corresponding decoder queue can be quickly and accurately determined by looking up the table, and then a decoder can be retrieved from the decoder queue for speech recognition, thereby improving the processing efficiency of speech recognition.

[0059] In one scenario, if there are idle decoders in the decoder queue obtained above, then an idle decoder can be retrieved. This can be done by retrieving the decoder at the head of the queue, or by randomly retrieving a decoder from the decoder queue. No specific restrictions are imposed here.

[0060] Understandably, after matching a suitable decoder for a client, in order to quickly determine the decoder that is compatible with the client when the client sends a voice service next time, the correspondence between the decoder determined in this speech recognition process and the client's identifier can be stored in a preset client identifier and decoder mapping table.

[0061] In another scenario, the decoder queue obtained above does not contain any idle decoders, that is, the decoder queue is empty. In this case, a waiting thread needs to be started to wait for other decoders to be released until it is determined that there are idle decoders in the decoder queue, then they can be directly retrieved.

[0062] In an optional implementation, to save waiting time for each client and quickly improve speech recognition efficiency, this embodiment of the invention can also pre-configure a mapping table between client identifiers and decoders. By configuring a dedicated decoder for each client, a suitable model can be quickly determined. Therefore, the scheduling module 320 can also be used for:

[0063] Obtain the client identifier corresponding to the speech recognition service request from the parsing results;

[0064] Based on the client identifier, determine whether there exists a decoder corresponding to the client identifier from the preset client identifier and decoder mapping table;

[0065] If it does not exist, then the step of determining the decoder queue corresponding to the target speech recognition model from the preset mapping table between speech recognition model identifiers and decoder queues is executed.

[0066] If present, then perform the step of speech recognition based on the decoder for the speech to be recognized.

[0067] As can be seen from the above implementation method, for a certain client, if it is sending a voice service request for the first time, a suitable model can be matched for the client through the voice recognition identifier provided by the client; if the client is not sending a voice service request for the first time, the model bound to the client can be directly retrieved. The whole process can quickly and accurately determine the voice recognition model that is suitable for the current scenario, ensuring recognition accuracy.

[0068] In an optional implementation, in order to promptly reclaim the decoder and prevent other clients from waiting too long for a suitable decoder, the scheduling module 320 can also be used to:

[0069] Obtain the speech block identifier from the parsing result; if the speech block identifier is determined to be a preset value, insert the decoder at the tail of the decoder queue, and delete the correspondence between the decoder and the client identifier in the preset client identifier and decoder mapping table.

[0070] The parsing result of the speech recognition service request may contain a speech block identifier, which can be used to indicate whether the current client is sending the last request; a preset value can be configured for the speech block identifier, which can indicate that the current client is sending the last request.

[0071] For example, if the parsed voice block identifier (pack_id) in a certain voice service request is -1, it means that the client corresponding to this voice service request is the last one to initiate a voice service request. Then, after the decoder decodes the voice to be recognized, the decoder needs to be reset and released. That is, the model management module 310 should reclaim the decoder and remove the UUID and decoder from the UUID-decoder.

[0072] In an optional embodiment, as can be seen from the above description of the scheduling module 320, the scheduling module 320 provided in this embodiment of the invention can be multi-threaded. Therefore, the scheduling module 320 is further used for:

[0073] When it is determined that there are multiple speech recognition service requests, multiple threads are started; based on the thread corresponding to each speech recognition service request, the steps of parsing the speech recognition service request are executed, and the speech to be recognized and the speech recognition model identifier are obtained from the parsing results.

[0074] The above implementation method enables parallel support for multiple speech recognition models, allowing the same speech recognition service to adaptively call the appropriate recognition model according to different application scenarios, thereby improving the accuracy of the recognition results.

[0075] It should be noted that since this scheduling module is implemented using multiple threads, locking is required before performing operations such as acquiring and releasing decoders to avoid data inconsistency. For example, if the decoder queue is empty, a condition lock is acquired to wait for other decoders to be released; similarly, when the scheduler module needs to release a decoder, it must first lock the corresponding decoder factory, then enqueue the decoder to the tail of the queue, and then notify the condition lock so that the waiting thread can acquire the decoder that was just released.

[0076] In an optional implementation, the speech recognition system provided in this embodiment of the invention can also support registering different configurations for different speech recognition models, such as whether silence detection is required, whether keyword retrieval is performed, and acoustic feature types. Therefore, the above parsing results can also include: acoustic feature type, whether a silence detection model is used, whether keyword retrieval is performed, and other parameters. Therefore, the scheduling module 320 can also be used for:

[0077] Detection parameters are obtained from the parsing results; the detection parameters include any one or a combination of the following: silence detection identifier, keyword retrieval identifier, and acoustic feature type detection identifier; the speech to be recognized is detected based on the pre-registered detection configuration data.

[0078] The above implementation methods can improve the flexibility of speech recognition services and meet various speech recognition needs.

[0079] The interface module 330 in this embodiment of the invention will be introduced next. The interface module 330 is used to call the decoder to perform speech recognition on the speech to be recognized. Figure 3 As can be seen from this, the interface module 330 may include a decoder interface unit and a model interface unit.

[0080] The decoder interface unit defines the decoding function, reset function, and rescoring function.

[0081] The decoding function takes a segment of speech to be recognized as input. First, features are extracted, and then the obtained features are fed into the speech recognition model for forward inference to obtain the posterior probability of each audio frame. Finally, prefix search is performed to obtain the decoding result of the speech to be recognized.

[0082] The reset function cleans up the historical cached data of the speech recognition model, including residual audio features and historical model outputs. Other global variables also need to be restored to the decoder's initial state to ensure the correctness of the decoder's next decoding.

[0083] The rescoring function rescores multiple decoded results to improve the accuracy of the decoding results.

[0084] The model interface unit can include model initialization functions, model retrieval functions, and functions for retrieving various special variables.

[0085] The initialization function loads the model path provided by the configuration file, initializes the speech recognition model, retrieves some necessary model configuration information from the speech recognition model, and initializes the corresponding global variables.

[0086] The model acquisition function returns a model pointer, while the special variable acquisition function returns the model's global variables for the decoder to use.

[0087] Optionally, during the matching process with the target decoder management system, it is possible that among the currently configured multiple decoder management systems, there is no decoder management system that matches the current speech recognition requirements. Therefore, in order to successfully complete speech recognition, the model management module 310 in this embodiment of the invention can also be used to:

[0088] If there is no target decoder management system corresponding to the speech recognition model identifier among multiple decoder management systems, then the configuration file of the speech recognition model corresponding to the speech recognition model identifier is obtained according to the speech recognition model identifier.

[0089] Based on the configuration file, generate the decoder queue corresponding to the speech recognition model identifier, and configure the target decoder management system corresponding to the speech recognition model identifier.

[0090] In other words, if no matching decoder management system exists, a configuration file corresponding to the speech recognition model identifier is obtained, and then a decoder management system and a decoder for the speech recognition model corresponding to the speech recognition model identifier are generated based on the configuration file. In this way, the decoder management system in this embodiment of the invention can be updated and the speech recognition service can be expanded in real time according to the speech recognition requirements.

[0091] Optionally, the configuration file can be pre-generated. For example, the speech recognition model corresponding to the speech recognition model identifier can be obtained through pre-training, and then the configuration file for that speech recognition model can be obtained. Alternatively, the configuration file can be generated in real time. For example, if the server has a model training function, it can perform model training in real time to obtain the speech recognition model corresponding to the speech recognition model identifier, and then obtain the configuration file corresponding to that speech recognition model.

[0092] The two implementation methods described above can not only solve real-time speech recognition requests, but also obtain a matching speech recognition model in real time according to the current speech recognition needs, further expanding the speech recognition business and meeting different speech recognition scenarios.

[0093] In summary, the speech recognition system provided by this embodiment of the invention includes a model management module for configuring multiple decoder management systems based on configuration files of various speech recognition models. Each decoder management system corresponds to a speech recognition model. The decoder management system maintains a decoder queue, where decoders are generated by the decoder management system according to configuration files. A scheduling module obtains speech recognition service requests, parses these requests, and obtains the speech to be recognized and the speech recognition model identifier from the parsing results. Based on the speech recognition model identifier, a target decoder management system is determined from the multiple decoder management systems, and a decoder is retrieved from the decoder queue of the target decoder management system. An interface module calls the decoder to recognize the speech to be recognized. This system architecture supports the parallel operation of multiple speech recognition models, enabling the same speech recognition service to adaptively call appropriate speech recognition models according to different application scenarios, thereby improving the accuracy of the recognition results.

[0094] Based on the same inventive concept, the following... Figure 2 The server 120 shown is the execution entity. This invention describes the speech recognition method provided in this embodiment. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 A schematic flowchart of the speech recognition method provided in the embodiments of the present invention:

[0095] S401 configures multiple decoder management systems based on configuration files for various speech recognition models.

[0096] Each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file.

[0097] In this embodiment of the invention, the voice service request can be multiple or a single request. If there are multiple voice recognition requests, the subsequent steps can be executed in parallel to achieve the effect of parallel operation of multiple voice recognition models.

[0098] To facilitate the determination of speech recognition models corresponding to different scenarios, on the one hand, there is a mapping relationship between the aforementioned decoder queue and the speech recognition models. Given the speech recognition model identifier, this mapping relationship allows for the rapid determination of the speech recognition model matching the current scenario, improving recognition efficiency. On the other hand, to more quickly determine the decoder matching the current scenario, the decoders in the aforementioned decoder queue can also have a mapping relationship with the client identifier. This way, even without knowing the speech recognition model identifier, the client identifier can be used to quickly determine the decoder matching the current scenario, further improving recognition efficiency.

[0099] S401, obtain the speech recognition service request, parse the speech recognition service request, and obtain the speech to be recognized and the speech recognition model identifier from the parsing result.

[0100] S403: Based on the speech recognition model identifier, determine the target decoder management system from multiple decoder management systems, and call the decoder from the decoder queue of the target decoder management system to recognize the speech to be recognized.

[0101] In an optional implementation, to avoid the inability to obtain a speech recognition model that matches the current speech recognition request, this embodiment of the invention also provides an implementation method, namely:

[0102] If there is no target decoder management system corresponding to the speech recognition model identifier among multiple decoder management systems, then the configuration file of the speech recognition model corresponding to the speech recognition model identifier is obtained according to the speech recognition model identifier.

[0103] Based on the configuration file, generate the decoder queue corresponding to the speech recognition model identifier, and configure the target decoder management system corresponding to the speech recognition model identifier.

[0104] Through the above implementation methods, the decoder management system in this embodiment of the invention can be updated in real time according to the speech recognition requirements, and the speech recognition services can be expanded to meet the diverse needs of users.

[0105] In an optional implementation, to quickly and accurately determine the target speech recognition model, this embodiment of the invention provides a possible implementation method for step S402 above. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 A schematic flowchart illustrating one embodiment of step S402 provided in this invention:

[0106] S402-3, Based on the speech recognition model identifier, determine the decoder queue corresponding to the target speech recognition model from the preset mapping table between speech recognition model identifiers and decoder queues;

[0107] It is understandable that, since each speech recognition model corresponds to a decoder management system, and the decoder management system maintains a decoder queue, in order to quickly locate the decoder management system corresponding to each speech recognition model, a mapping table between the speech recognition model identifier and the decoder queue can be established. By looking up the table, the decoder queue corresponding to the target speech recognition model can be obtained quickly and accurately, which can also be understood as obtaining the target decoder management system corresponding to the target speech recognition model.

[0108] S402-4, When it is determined that there is an idle decoder in the decoder queue, retrieve the decoder located at the head of the queue;

[0109] S402-5 performs speech recognition based on the decoder.

[0110] By using the table lookup method described above, the speech recognition model that is compatible with the current voice service request can be determined quickly and accurately, ensuring the accuracy of speech recognition.

[0111] In an optional implementation, a suitable decoder can be determined in advance based on the obtained client identifier for different clients. Therefore, before steps S403-3 above, this embodiment of the invention also provides a possible implementation method, please refer to [link to relevant documentation]. Figure 6 , Figure 6 A schematic flowchart illustrating another embodiment of step S402 provided for implementation of the present invention:

[0112] S402-1, Obtain the client identifier corresponding to the speech recognition service request from the parsing results;

[0113] S402-2, Based on the client identifier, determine from the preset client identifier and decoder mapping table whether there is a decoder corresponding to the client identifier;

[0114] If it does not exist, execute S402-3; if it exists, execute S402-5.

[0115] Through the above implementation method, for a certain client, if it is sending a voice service request for the first time, a suitable model can be matched for the client through the voice recognition identifier provided by the client; if the client is not sending a voice service request for the first time, the model bound to the client can be directly retrieved. The whole process can quickly and accurately determine the voice recognition model that is suitable for the current scenario, ensuring recognition accuracy.

[0116] In an optional implementation, after performing step S405-5, for each client, in order to facilitate the quick determination of the model that is compatible with it after it sends the next speech recognition service request, the method further includes: writing the correspondence between the decoder and the client identifier into a preset mapping table between the client identifier and the decoder.

[0117] In an optional implementation, to promptly reclaim the decoder, thereby reducing the waiting time for other clients to obtain a suitable decoder and improving speech recognition efficiency, this embodiment of the invention also provides a possible implementation method, please refer to [link to relevant documentation]. Figure 7 , Figure 7 A schematic flowchart of another speech recognition method provided in an embodiment of the present invention:

[0118] S404, obtain the speech block identifier from the parsing results.

[0119] S405, if the voice block identifier is determined to be a preset value, then insert the decoder at the end of the decoder queue and delete the correspondence between the decoder and the client identifier in the preset client identifier and decoder mapping table.

[0120] In an optional implementation, in order to support the parallel operation of multiple speech recognition models simultaneously, and to enable the same speech recognition service to adaptively call the appropriate recognition model according to different application scenarios, thereby improving the accuracy of the recognition results, the present invention also provides a feasible implementation method: when it is determined that there are multiple speech recognition service requests, multiple threads are enabled; based on the thread corresponding to each speech recognition service request, step S402 is executed.

[0121] In an optional implementation, in order to obtain detection parameters from the parsing results; the detection parameters include any one and combination of the following: silence detection identifier, keyword retrieval identifier, and acoustic feature type detection identifier; the speech to be recognized is detected based on pre-registered detection configuration data.

[0122] In summary, the speech recognition method provided by this invention first configures multiple decoder management systems based on configuration files of various speech recognition models. Since each decoder management system corresponds to a speech recognition model, it can meet the speech recognition needs in different scenarios. Moreover, the decoder management system maintains a decoder queue, which can quickly process multiple speech recognition requests in the same scenario, improving speech recognition efficiency. Upon receiving a speech recognition service request, the request is parsed, and the speech to be recognized and the speech recognition model identifier are obtained from the parsing result. Based on the speech recognition model identifier, the target decoder management system is determined from the multiple decoder management systems, and the decoder is called from the decoder queue of the target decoder management system to recognize the speech to be recognized. The speech recognition method provided by this invention not only meets the speech recognition requests in different scenarios and improves the accuracy of speech recognition, but also allows for parallel processing of multiple speech recognition requests in the same scenario, improving the efficiency of speech recognition.

[0123] This invention also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the speech recognition method as described in any of the foregoing embodiments. The readable storage medium may be, but is not limited to, various media capable of storing program code, such as a USB flash drive, portable hard drive, ROM, RAM, PROM, EPROM, EEPROM, magnetic disk, or optical disk.

[0124] It should be understood that the apparatus and methods disclosed in this invention can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked 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. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, 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.

[0125] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0126] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0127] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

Claims

1. A speech recognition method, characterized in that, The method includes: Multiple decoder management systems are configured based on configuration files for various speech recognition models; each decoder management system corresponds to one speech recognition model; each decoder management system maintains a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration files. Obtain a speech recognition service request, parse the speech recognition service request, and obtain the speech to be recognized and the speech recognition model identifier from the parsing result; Based on the speech recognition model identifier, a target decoder management system is determined from multiple decoder management systems, and a decoder is called from the decoder queue of the target decoder management system to recognize the speech to be recognized; if multiple speech recognition service requests in the same scenario need to be processed, the multiple decoders in the decoder queue of the speech recognition model corresponding to the same scenario process the multiple speech recognition service requests in parallel.

2. The speech recognition method according to claim 1, characterized in that, Based on the speech recognition model identifier, a target decoder management system is determined from multiple decoder management systems, and a decoder is invoked from the decoder queue of the target decoder management system to recognize the speech to be recognized, including: Based on the speech recognition model identifier, the decoder queue corresponding to the target speech recognition model is determined from a preset mapping table between speech recognition model identifiers and decoder queues. When it is determined that there is an idle decoder in the decoder queue, the decoder located at the head of the queue is retrieved; The decoder is used to perform speech recognition on the speech to be recognized.

3. The speech recognition method according to claim 2, characterized in that, Before determining a target decoder management system from multiple decoder management systems based on the speech recognition model identifier, and calling a decoder from the decoder queue of the target decoder management system to recognize the speech to be recognized, the method further includes: The client identifier corresponding to the speech recognition service request is obtained from the parsing result; Based on the client identifier, determine whether there exists a decoder corresponding to the client identifier from a preset mapping table between client identifiers and decoders; If it does not exist, then the step of determining the decoder queue corresponding to the target speech recognition model from the preset mapping table between speech recognition model identifiers and decoder queues is executed according to the speech recognition model identifier. If present, then perform the step of speech recognition based on the decoder for the speech to be recognized.

4. The speech recognition method according to claim 3, characterized in that, If present, after performing the step of performing speech recognition on the speech to be recognized based on the decoder, the method further includes: The speech block identifier is obtained from the parsing result; If the voice block identifier is determined to be a preset value, the decoder is inserted at the tail of the decoder queue, and the correspondence between the decoder and the client identifier is deleted in the preset client identifier and decoder mapping table.

5. The speech recognition method according to claim 1, characterized in that, Before obtaining a speech recognition service request, parsing the speech recognition service request, and obtaining the speech to be recognized and the speech recognition model identifier from the parsing result, the method further includes: When it is determined that there are multiple voice recognition service requests, multiple threads are enabled; Based on the thread corresponding to each speech recognition service request, the steps of parsing the speech recognition service request and obtaining the speech to be recognized and the speech recognition model identifier from the parsing result are executed.

6. The speech recognition method according to claim 1, characterized in that, The method further includes: Detection parameters are obtained from the analysis results; the detection parameters include any one or a combination of the following: silence detection identifier, keyword retrieval identifier, and acoustic feature type detection identifier; The speech to be recognized is detected based on pre-registered detection configuration data.

7. The speech recognition method according to claim 3, characterized in that, The method further includes: The correspondence between the decoder and the client identifier is written into the preset client identifier and decoder mapping table.

8. The speech recognition method according to claim 1, characterized in that, The method further includes: If there is no target decoder management system corresponding to the speech recognition model identifier among the multiple decoder management systems, then the configuration file of the speech recognition model corresponding to the speech recognition model identifier is obtained according to the speech recognition model identifier. Based on the configuration file, a decoder queue corresponding to the speech recognition model corresponding to the speech recognition model identifier is generated, and a target decoder management system corresponding to the speech recognition model corresponding to the speech recognition model identifier is configured.

9. A speech recognition system, characterized in that, include: The model management module is used to configure multiple decoder management systems according to configuration files of various speech recognition models; wherein, each decoder management system corresponds to a speech recognition model; the decoder management system is used to maintain a decoder queue; the decoders in the decoder queue are generated by the decoder management system according to the configuration file. The scheduling module is used to obtain a speech recognition service request, parse the speech recognition service request, and obtain the speech to be recognized and the speech recognition model identifier from the parsing result; based on the speech recognition model identifier, determine the target decoder management system from multiple decoder management systems, and retrieve the decoder from the decoder queue of the target decoder management system; The interface module is used to call the decoder to recognize the speech to be recognized; if multiple speech recognition service requests in the same scenario need to be processed, the multiple decoders in the decoder queue of the speech recognition model corresponding to the same scenario will process the multiple speech recognition service requests in parallel.

10. A server, characterized in that, It includes a processor and a memory, the memory storing a computer program that can be executed by the processor to implement the speech recognition method according to any one of claims 1-8.

11. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the speech recognition method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Voice recognition device and voice recognition program

    JP2010054685A