Voice interaction method, device, computer-readable storage medium, and electronic device
By utilizing preset speech recognition models and cached and reused recognition data in voice interaction technology, the efficiency and delay problems in multi-channel speech recognition scenarios are solved, and low resource consumption and efficient voice interaction are achieved.
Patent Information
- Application Number
- CN202110279812.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-16
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-03-16
AI Technical Summary
Existing voice interaction technology has low efficiency and large delay in multi-channel speech recognition scenarios, and cannot meet users' requirements for efficiency and personalization.
The audio signal is recognized through the preset speech recognition model, and the stored recognition data is extracted and reused from the cache, which reduces the processing of the entire amount of data by the speech recognition model and improves processing efficiency.
In multi-channel voice interaction scenarios, low resource consumption and low processing delay are achieved, improving the efficiency and personalization of voice interaction.
Smart Images

Figure CN113066489B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a voice interaction method, device, computer-readable storage medium, and electronic device. Background Art
[0002] With the continuous advancement of artificial intelligence technology, human-computer interaction has also made great progress. Intelligent voice interaction technology can be applied to various devices such as automobiles, robots, home appliances, central control systems, access control systems, ATM machines, etc.
[0003] For example, in existing in-vehicle voice interaction scenarios, the voice interaction system usually only receives one voice signal, and the voice signal is processed and then fed back to the user. With the development of artificial intelligence technology, the voice interaction system is moving towards a more efficient, intelligent and personalized direction. Summary of the invention
[0004] Embodiments of the present disclosure provide a voice interaction method, device, computer-readable storage medium, and electronic device.
[0005] An embodiment of the present disclosure provides a voice interaction method, which includes: obtaining at least one audio signal; using a preset voice recognition model to recognize the at least one audio signal, and obtaining a first type of recognition result through the voice recognition model; determining the stored recognition data about the at least one audio signal from a cache; generating a second type of recognition result based on the stored recognition data; using the voice recognition model, processing the first type of recognition result and the second type of recognition result to obtain sentence recognition results corresponding to the at least one audio signal; performing semantic analysis on each sentence recognition result to obtain at least one analysis result; based on the at least one analysis result, generating an instruction for controlling a voice interaction device to perform a corresponding function.
[0006] According to another aspect of an embodiment of the present disclosure, a voice interaction device is provided, which includes: an acquisition module for acquiring at least one audio signal; a recognition module for recognizing at least one audio signal using a preset voice recognition model, and obtaining a first type of recognition result through the voice recognition model; a determination module for determining stored recognition data about at least one audio signal from a cache; a first generation module for generating a second type of recognition result based on the stored recognition data; a processing module for processing the first type of recognition result and the second type of recognition result using the voice recognition model, and obtaining sentence recognition results corresponding to the at least one audio signal; a parsing module for performing semantic parsing on each sentence recognition result, and obtaining at least one parsing result; and a second generation module for generating instructions for controlling the voice interaction device to perform a corresponding function based on at least one parsing result.
[0007] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, which stores a computer program for executing the above-mentioned voice interaction method.
[0008] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; and a processor for reading executable instructions from the memory and executing the instructions to implement the above-mentioned voice interaction method.
[0009] Based on the voice interaction method, device, computer-readable storage medium and electronic device provided by the above embodiments of the present disclosure, at least one audio signal is recognized by using a preset voice recognition model. During the recognition process, the stored recognition data is extracted from the cache to generate a part of the recognition results, and the other part of the recognition results is generated by the voice recognition model, thereby effectively reusing the stored recognition data. There is no need for the voice recognition model to process the full amount of data, which improves the efficiency of processing at least one audio signal and helps to meet the requirements of low resource consumption and low processing delay in multi-channel voice interaction scenarios.
[0010] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0012] Figure 1 is a system diagram to which the present disclosure is applicable.
[0013] Figure 2 It is a flowchart of a voice interaction method provided by an exemplary embodiment of the present disclosure.
[0014] Figure 3 It is a flowchart of a voice interaction method provided by another exemplary embodiment of the present disclosure.
[0015] Figure 4 It is a flowchart of a voice interaction method provided by another exemplary embodiment of the present disclosure.
[0016] Figure 5 It is a flowchart of a voice interaction method provided by another exemplary embodiment of the present disclosure.
[0017] Figure 6 It is a flowchart of a voice interaction method provided by another exemplary embodiment of the present disclosure.
[0018] Figure 7 It is a schematic diagram of an application scenario of the voice interaction method of an embodiment of the present disclosure.
[0019] Figure 8 It is a structural diagram of a voice interaction device provided by an exemplary embodiment of the present disclosure.
[0020] Fig. 9 It is a structural diagram of a voice interaction device provided by another exemplary embodiment of the present disclosure.
[0021] Fig.10 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0023] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0024] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0025] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0026] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0027] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0028] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0029] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0030] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0031] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0032] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0033] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0034] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0035] Application Overview
[0036] Current voice interaction technology can usually only process one voice signal at a time. In order to meet the requirements of multi-user and personalized voice recognition, voice interaction technology needs to be applied to multi-channel voice recognition scenarios. At present, the voice recognition model needs to process the entire amount of voice signal data, resulting in low voice recognition efficiency and large interaction delay. Especially in the scenario of multi-channel voice recognition, it cannot meet the user's requirements for efficient and personalized voice interaction systems.
[0037] Exemplary Systems
[0038] Figure 1 An exemplary system architecture 100 is shown to which the voice interaction method or voice interaction device according to the embodiments of the present disclosure can be applied.
[0039] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0040] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as voice recognition applications, multimedia applications, search applications, web browser applications, shopping applications, instant messaging tools, etc.
[0041] The terminal device 101 can be various electronic devices, including but not limited to mobile terminals such as vehicle-mounted terminals, mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, smart home appliances, etc.
[0042] The server 103 may be a server that provides various services, such as a background voice recognition server that recognizes the audio signal uploaded by the terminal device 101. The background voice recognition server may process the received audio, obtain instructions for controlling the voice interaction device, and feed back to the terminal device.
[0043] It should be noted that the voice interaction method provided in the embodiment of the present disclosure can be executed by the server 103 or by the terminal device 101. Accordingly, the voice interaction device can be set in the server 103 or in the terminal device 101.
[0044] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided as required. When the audio signal does not need to be acquired remotely, the above system architecture may not include a network but only a server or a terminal device.
[0045] Exemplary Methods
[0046] Figure 2 is a flow chart of a voice interaction method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices (such as Figure 1 On the terminal device 101 or server 103 shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0047] Step 201: Acquire at least one audio signal.
[0048] In this embodiment, the electronic device can obtain at least one audio signal locally or remotely. As an example, when this embodiment is applied to a vehicle-mounted voice recognition scenario, the at least one audio signal can be a voice signal of at least one passenger in the vehicle collected by at least one microphone installed in the vehicle.
[0049] Step 202: Use a preset speech recognition model to recognize at least one audio signal, and obtain a first type of recognition result through the speech recognition model.
[0050] In this embodiment, the electronic device can use a preset speech recognition model to recognize at least one audio signal, and obtain a first type of recognition result through the speech recognition model. The speech recognition model can be a model pre-trained using a large number of speech signal samples. The speech recognition model is used to recognize the input audio signal and obtain a sentence recognition result.
[0051] Typically, a speech recognition model may include multiple sub-models, such as an acoustic sub-model (for dividing audio signals into syllables), a language sub-model (for converting individual syllables into words), and a decoding network (for selecting the best combination from multiple words to obtain a sentence).
[0052] During the recognition process of the above-mentioned speech recognition model, the electronic device will usually first search the cache for the recognition data corresponding to the current processing stage. If the corresponding recognition data does not exist in the cache, the above-mentioned speech recognition model is used for recognition, and the obtained recognition data is used as the first type of recognition result.
[0053] Step 203: Determine the stored identification data about at least one audio signal from the cache.
[0054] In this embodiment, the electronic device can determine the stored recognition data about at least one audio signal from the cache. Usually, during the recognition process of the above-mentioned speech recognition model, the electronic device usually first searches the cache for the recognition data corresponding to the current processing stage, and extracts the recognition data if the corresponding recognition data exists in the cache.
[0055] Step 204: Generate a second type of recognition result based on the stored recognition data.
[0056] In this embodiment, the electronic device can generate a second type of recognition result based on the stored recognition data extracted in step 203. As an example, the stored recognition data can be used as the second type of recognition result, or the stored recognition data can be processed in a certain manner (for example, scaling the data by a certain proportion, normalizing the data, etc.) to obtain the second type of recognition result.
[0057] It should be noted that the above-mentioned first category recognition results and second category recognition results are usually intermediate results obtained during the processing of the speech recognition model, such as the probability score of a syllable, the probability score of a word, etc.
[0058] Step 205: Process the first type of recognition results and the second type of recognition results using the speech recognition model to obtain sentence recognition results corresponding to at least one audio signal.
[0059] In this embodiment, the electronic device can use the speech recognition model to process the first category recognition results and the second category recognition results to obtain sentence recognition results corresponding to at least one audio signal. Generally, since the first category recognition results and the second category recognition results are intermediate results obtained by the speech recognition model, the speech recognition model needs to further process the first category recognition results and the second category recognition results. As an example, the first category recognition results and the second category recognition results may include a probability score for each syllable and a probability score for each word obtained after the audio signal is recognized. For an audio signal, the speech recognition model can use a path search algorithm (such as a Viterbi algorithm) to determine an optimal path from multiple recognized words corresponding to the audio signal, thereby obtaining a sentence as a sentence recognition result.
[0060] Step 206: perform semantic analysis on each sentence recognition result to obtain at least one analysis result.
[0061] In this embodiment, the electronic device can perform semantic analysis on each sentence recognition result to obtain at least one analysis result. Each of the at least one analysis result corresponds to an audio signal. Generally, the analysis result can be structured data. For example, the sentence recognition result is "The air conditioning temperature is set to 25 degrees", and the analysis result is "Domain = vehicle control, Intent = air conditioning temperature setting, Slot = <temperature value = 25>".
[0062] It should be noted that the method for parsing a sentence may adopt existing technologies, such as using a rule engine, a neural network engine, etc.
[0063] Step 207: Based on at least one analysis result, generate an instruction for controlling the voice interaction device to perform a corresponding function.
[0064] In this embodiment, the electronic device can generate instructions for controlling the voice interaction device to perform corresponding functions based on at least one analysis result. The above-mentioned voice interaction device can be the above-mentioned electronic device for executing the voice interaction method disclosed in the present invention, or it can be an electronic device connected to the above-mentioned electronic device for communication. As an example, when the voice interaction device is a car air conditioner, if the analysis result is "domain = car control, intention = air conditioning temperature setting, slot = <temperature value = 25>", an instruction for controlling the car air conditioner to be set to 25 degrees Celsius can be generated.
[0065] The method provided by the above-mentioned embodiments of the present disclosure recognizes at least one audio signal by utilizing a preset speech recognition model. During the recognition process, the stored recognition data is extracted from the cache to generate a part of the recognition results, and the other part of the recognition results is generated by the speech recognition model, thereby effectively reusing the stored recognition data. There is no need for the speech recognition model to process the full amount of data, thereby improving the efficiency of processing at least one audio signal, and helping to meet the requirements of low resource consumption and low processing delay in scenarios of multi-channel voice interaction.
[0066] In some optional implementations, the electronic device may also store the recognition data obtained by the speech recognition model during the recognition process into a cache. Specifically, when the recognition data corresponding to a certain recognition step does not exist in the cache, the speech recognition model is required to perform the recognition step and obtain the recognition data and store it in the cache, so that the stored recognition data can be reused by other recognition steps.
[0067] This implementation method can realize the reuse of recognition data by storing the recognition data obtained by the speech recognition model during the recognition process into a cache, so that the recognition data in the cache is continuously updated, and more stored recognition data is used in the model recognition process, thereby further improving the efficiency of speech recognition.
[0068] In some optional implementations, the above step 201 may be performed as follows:
[0069] First, an initial audio signal collected by an audio collection device is received.
[0070] The number of audio acquisition devices may be at least one, so as to acquire at least one initial audio signal. The initial audio signal may be a signal obtained by the audio acquisition device acquiring the voice of at least one user. For example, the audio acquisition device may include multiple audio acquisition devices, each of which is installed near a seat in the vehicle to acquire the voice of the passenger in the corresponding seat. At this time, the acquired audio signal generally includes mixed voice signals of multiple users.
[0071] Then, the initial audio signal is processed by sound source separation to obtain at least one audio signal.
[0072] Among them, the method of sound source separation can adopt existing technology, for example, the existing blind source separation (BSS) algorithm is used to separate the voice signals of multiple users, and the at least one audio signal obtained corresponds to one user. In the scenario of in-vehicle voice interaction, the sound source separation process can also correspond each audio signal obtained to the corresponding audio acquisition device. Since each audio acquisition device is installed near the corresponding seat, each audio signal obtained can correspond to the corresponding seat. It is the current existing technology to separate the voice signals of multiple users through sound source separation technology and establish a corresponding relationship with the audio acquisition device, which will not be repeated here.
[0073] This implementation method can separate the voices of multiple users by performing sound source separation on the initial audio signal, so that each subsequent voice recognition result corresponds to the corresponding user, which helps to improve the accuracy of voice interaction among multiple users.
[0074] In some optional implementations, such as Figure 3 As shown, step 202 may include the following sub-steps:
[0075] Step 2021: Determine the speech recognition instances corresponding to at least one audio signal.
[0076] Among them, the speech recognition instance can be constructed through code, and each speech recognition instance corresponds to one audio signal and is used to recognize the audio signal.
[0077] Step 2022, executing each determined speech recognition instance in parallel.
[0078] As an example, a multi-threaded approach may be used to implement parallel execution of various speech recognition instances; or, various speech recognition instances may be executed by different CPUs, thereby implementing parallel execution.
[0079] Step 2023: Use the speech recognition model through each speech recognition instance to recognize the corresponding audio signal.
[0080] Specifically, each speech recognition instance can call the speech recognition model in parallel to recognize the corresponding speech signal, thereby realizing parallel recognition of the audio signal. Usually, when recognizing at least one audio signal, the speech recognition model can be loaded into the memory first, and each speech recognition instance shares the speech recognition model. It should be noted that each speech recognition instance can share the above cache when performing speech recognition, thereby improving the recognition efficiency of each speech recognition instance.
[0081] This implementation method can realize simultaneous recognition of the voices of multiple users by constructing a speech recognition instance corresponding to each audio signal and executing each speech recognition instance in parallel. At the same time, each speech recognition instance shares a speech recognition model to recognize the speech signal, and shares the same cache to store and call the recognition data, thereby realizing parallel speech recognition of at least one audio signal and sharing the resources required for recognition, thereby improving the speech recognition efficiency in multi-user voice interaction scenarios. Since the shared cache stores the recognized data, it can be directly called during the recognition process without occupying more memory resources for repeated recognition, thereby greatly saving memory resources.
[0082] In some optional implementations, such as Figure 4 As shown, step 206 may include the following sub-steps:
[0083] Step 2061, determining the semantic parsing instances corresponding to the respective sentence recognition results.
[0084] Among them, the semantic parsing instance can be constructed through code, and each semantic parsing instance corresponds to the sentence recognition result of one audio signal, which is used to perform structured parsing on the sentence recognition result.
[0085] Step 2062, executing each determined semantic parsing instance in parallel.
[0086] As an example, a multi-threaded approach may be used to implement parallel execution of various semantic parsing instances; or, various semantic parsing instances may be executed by different CPUs, thereby implementing parallel execution.
[0087] Step 2063: semantically parse the corresponding sentence recognition results through each semantic parsing instance.
[0088] Specifically, each semantic parsing instance can call pre-set rule engine, neural network engine and other modules in parallel to achieve parallel parsing of sentence recognition results.
[0089] This implementation method can realize the simultaneous recognition and analysis of the voices of multiple users by constructing a semantic parsing instance corresponding to each sentence recognition result and executing each semantic parsing instance in parallel, thereby building multiple links that can perform voice interaction simultaneously. At the same time, each semantic parsing instance shares a set of semantic resources, thereby improving the speech recognition efficiency in multi-user voice interaction scenarios.
[0090] Further references Figure 5 , shows a flow chart of another embodiment of the voice interaction method, in this embodiment. Figure 5 As shown in the above Figure 2 Based on the illustrated embodiment, step 202 may include the following steps:
[0091] Step 2024: Determine, using the acoustic sub-model included in the speech recognition model, a syllable set corresponding to at least one audio signal and a first probability score corresponding to each syllable in the syllable set.
[0092] The acoustic sub-model is used to perform syllable segmentation on the input audio signal. As an example, the acoustic sub-model may include but is not limited to a hidden Markov model (HMM), a Gaussian mixture model (GMM), etc. The first probability score is used to characterize the probability that the syllable is correctly segmented.
[0093] Step 2025: Determine the word sets corresponding to at least one audio signal using the language sub-model included in the speech recognition model.
[0094] The language sub-model is used to determine a word set based on the above syllable set. As an example, the language sub-model may include but is not limited to an n-gram language model, a neural network language model, and the like.
[0095] Step 2026: for a word in the word set, determine whether there is a second probability score corresponding to the word in the cache; if not, use the language sub-model to determine the second probability score corresponding to the word.
[0096] The second probability score is used to characterize the probability of the recognized word appearing. For example, the probability of "air conditioner" appearing after "open" is the second probability score corresponding to the word "air conditioner".
[0097] When it is necessary to determine the probability score of a certain word, the electronic device first searches the cache for the second probability score of the current word, and when it does not exist, the second probability score of the word is calculated using the language sub-model. In this embodiment, since the data processing amount of the language sub-model is large, the cache is used to store the second probability score generated by the language sub-model.
[0098] Step 2027: Determine a first type of recognition result based on the first probability score and the second probability score determined by the language sub-model.
[0099] As an example, each first probability score and each second probability score may be determined as a first type of recognition result.
[0100] Since the language sub-model has a large amount of data to process, the above Figure 5 The method provided in the corresponding embodiment uses a cache specifically for storing the second probability score generated by the language sub-model, thereby making the role of the cache more targeted, that is, the cache is targetedly applied to processes with large data processing volume and frequent data access, giving full play to the role of using the cache in saving computing resources, reducing redundant data in the cache, and thereby improving the efficiency of speech recognition.
[0101] Further references Figure 6 , shows a flow chart of another embodiment of the voice interaction method, in this embodiment. Figure 6 As shown in the above Figure 5 Based on the illustrated embodiment, step 203 may include the following steps:
[0102] Step 2031: for a word in the word set, determine whether there is a second probability score corresponding to the word in the cache; if so, determine the second probability score in the cache as the second probability score language sub-model of the word.
[0103] As an example, when you need to calculate the probability of "air conditioning" appearing after "turn on", before the calculation, first go to the cache to find out whether the second probability score corresponding to "air conditioning" that has been calculated has been stored before. If so, it is directly used without repeated calculation.
[0104] Step 2032: Determine a second type of recognition result based on the first probability score and the second probability score determined from the cache.
[0105] As an example, each first probability score and the second probability score determined in the cache may be determined as a second type of recognition result.
[0106] Above Figure 6The method provided in the corresponding embodiment, when determining the second probability score corresponding to a word, first searches the second probability score from the cache and determines the second probability score found as the second probability score of the word, thereby more specifically reducing the amount of computation of the language sub-model with a large amount of computation and reducing the memory resources occupied by the recognition process of the language sub-model, thereby further improving the efficiency of speech recognition.
[0107] In some optional implementations, based on the above Figure 5 or Figure 6 In the corresponding embodiment, the above step 205 may be performed as follows:
[0108] First, according to the first probability score and the second probability score respectively included in the first category recognition result and the second category recognition result, a target path of the word set is determined in a decoding network included in the speech recognition model.
[0109] The decoding network is a network constructed based on the above word set. Based on the network, an optimal path of a word combination can be found in the network according to the first probability score and the second probability score. The path is the target path. It should be noted that the method of determining the optimal path according to the probability score corresponding to the syllable and the probability score corresponding to the word is an existing technology and will not be repeated here.
[0110] Then, based on the target path, a sentence recognition result corresponding to at least one audio signal is generated.
[0111] Specifically, a sentence composed of words corresponding to the target path may be determined as a sentence recognition result.
[0112] This implementation method uses the first probability score and the second probability score calculated by the language sub-model and the second probability score extracted from the cache to search for the target path in the decoding network, and then generates a sentence recognition result. This makes full use of the second probability score stored in the cache during decoding, and improves the efficiency of generating sentence recognition results.
[0113] Continue to see Figure 7 , which shows a schematic diagram of an application scenario of the voice interaction method of this embodiment. Figure 7 In the application scenario, the voice interaction method is applied to the in-vehicle voice interaction system. Figure 7As shown, the multiple audio signals correspond to an interaction chain respectively, including the main driver interaction chain 701 (used for the driver to interact with the vehicle voice interaction system), the co-driver interaction chain 702 (used for the passenger in the co-driver seat to interact with the vehicle voice interaction system), and other interaction chains 703 (used for the passengers in other seats to interact with the vehicle voice interaction system). The decoding resource 704 includes a speech recognition model 7041 and a cache 7042, and the semantic resource 705 includes a rule engine 7051 and a neural network engine 7052 for parsing sentence recognition results. Figure 7 It can be seen that in the main driver interaction chain 701, the electronic device generates a speech recognition instance A for the main driver's voice signal and a speech recognition instance B for the co-driver's voice. Each speech recognition instance shares a set of decoding resources 704 and is executed in parallel to obtain sentence recognition results C and D. Then, the electronic device constructs semantic instance E and semantic instance F. Semantic instance E and semantic instance F share a set of semantic resources, and parses sentence recognition results C and sentence recognition results D respectively to obtain structured parsing results G and parsing results H. Then, the electronic device generates instructions I (for example, for turning on the air conditioner) and instruction J (for example, for closing the car window) based on parsing results G and parsing results H, and the in-vehicle voice interaction device executes corresponding functions K and H based on instructions I and J. The execution process of other interactive chains 703 is similar and will not be repeated here.
[0114] Exemplary Devices
[0115] Figure 8 is a schematic diagram of the structure of a voice interaction device provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as Figure 8 As shown, the voice interaction device includes: an acquisition module 801, which is used to acquire at least one audio signal; a recognition module 802, which is used to recognize at least one audio signal by using a preset voice recognition model, and obtain a first type of recognition result through the voice recognition model; a determination module 803, which is used to determine the stored recognition data about at least one audio signal from the cache; a first generation module 804, which is used to generate a second type of recognition result based on the stored recognition data; a processing module 805, which is used to process the first type of recognition result and the second type of recognition result by using the voice recognition model, and obtain sentence recognition results corresponding to at least one audio signal respectively; a parsing module 806, which is used to perform semantic parsing on each sentence recognition result respectively, and obtain at least one parsing result; a second generation module 807, which is used to generate instructions for controlling the voice interaction device to perform corresponding functions based on at least one parsing result.
[0116] In this embodiment, the acquisition module 801 can acquire at least one audio signal locally or remotely. As an example, when this embodiment is applied to a vehicle-mounted speech recognition scenario, the at least one audio signal can be a speech signal of at least one passenger in the vehicle collected by at least one microphone installed in the vehicle.
[0117] In this embodiment, the recognition module 802 can use a preset speech recognition model to recognize at least one audio signal, and obtain a first type of recognition result through the speech recognition model. The speech recognition model can be a model pre-trained using a large number of speech signal samples. The speech recognition model is used to recognize the input audio signal and obtain a sentence recognition result.
[0118] Typically, a speech recognition model may include multiple sub-models, such as an acoustic sub-model (for dividing audio signals into syllables), a language sub-model (for converting individual syllables into words), and a decoding network (for selecting the best combination from multiple words to obtain a sentence).
[0119] During the recognition process of the above-mentioned speech recognition model, the recognition module 802 will usually first search the cache for the recognition data corresponding to the current processing stage. If the corresponding recognition data does not exist in the cache, the above-mentioned speech recognition model is used for recognition, and the obtained recognition data is used as the first type of recognition result.
[0120] In this embodiment, the determination module 803 can determine the stored recognition data about at least one audio signal from the cache. Usually, during the recognition process of the above-mentioned speech recognition model, the determination module 803 usually first searches the cache for the recognition data corresponding to the current processing stage, and if the corresponding recognition data exists in the cache, the recognition data is extracted.
[0121] In this embodiment, the first generation module 804 can generate a second type of recognition result based on the extracted stored recognition data. As an example, the stored recognition data can be used as the second type of recognition result, or the stored recognition data can be processed in a certain manner (for example, scaling the data by a certain proportion, normalizing the data, etc.) to obtain the second type of recognition result.
[0122] It should be noted that the above-mentioned first category recognition results and second category recognition results are usually intermediate results obtained during the processing of the speech recognition model, such as the probability score of a syllable, the probability score of a word, etc.
[0123] In this embodiment, the processing module 805 can use the speech recognition model to process the first type of recognition results and the second type of recognition results to obtain sentence recognition results corresponding to at least one audio signal. Generally, since the first type of recognition results and the second type of recognition results are intermediate results obtained by the speech recognition model, the speech recognition model needs to further process the first type of recognition results and the second type of recognition results. As an example, the first type of recognition results and the second type of recognition results may include a probability score for each syllable and a probability score for each word obtained after the audio signal is recognized. For an audio signal, the speech recognition model can use a path search algorithm (such as a Viterbi algorithm) to determine an optimal path from multiple recognized words corresponding to the audio signal, thereby obtaining a sentence as a sentence recognition result.
[0124] In this embodiment, the parsing module 806 can perform semantic parsing on each sentence recognition result to obtain at least one parsing result. Each of the at least one parsing result corresponds to an audio signal. Generally, the parsing result can be structured data. For example, the sentence recognition result is "the air conditioning temperature is set to 25 degrees", and the parsing result is "domain = vehicle control, intention = air conditioning temperature setting, slot = <temperature value = 25>".
[0125] It should be noted that the method for parsing a sentence may adopt existing technologies, such as using a rule engine, a neural network engine, etc.
[0126] In this embodiment, the second generation module 807 can generate instructions for controlling the voice interaction device to perform corresponding functions based on at least one analysis result. The above-mentioned voice interaction device can be an electronic device provided with the above-mentioned voice interaction device, or it can be an electronic device connected to the above-mentioned electronic device for communication. As an example, when the voice interaction device is a car air conditioner, if the analysis result is "domain = car control, intention = air conditioning temperature setting, slot = <temperature value = 25>", an instruction for controlling the car air conditioner to be set to 25 degrees Celsius can be generated.
[0127] Reference Fig. 9 , Fig. 9 It is a structural diagram of a voice interaction device provided by another exemplary embodiment of the present disclosure.
[0128] In some optional implementations, the device further includes: a storage module 808, configured to store recognition data obtained by the speech recognition model during the recognition process into a cache.
[0129] In some optional implementations, the acquisition module 801 includes: a receiving unit 8011, used to receive an initial audio signal collected by an audio collection device; a processing unit 8012, used to perform sound source separation processing on the initial audio signal to obtain at least one audio signal.
[0130] In some optional implementations, the recognition module 802 includes: a first determination unit 8021, used to determine the speech recognition instances corresponding to at least one audio signal; a first execution unit 8022, used to execute the determined speech recognition instances in parallel; and a recognition unit 8023, used to recognize the corresponding audio signal using the speech recognition model through each speech recognition instance.
[0131] In some optional implementations, the parsing module 806 includes: a second determination unit 8061, used to determine the semantic parsing instances corresponding to each sentence recognition result obtained; a second execution unit 8062, used to execute the determined semantic parsing instances in parallel; and a parsing unit 8063, used to perform semantic parsing on the corresponding sentence recognition results through each semantic parsing instance.
[0132] In some optional implementations, the recognition module 802 includes: a third determination unit 8024, which is used to determine, by using the acoustic sub-model included in the speech recognition model, a syllable set corresponding to at least one audio signal and a first probability score corresponding to the syllables in the syllable set; a fourth determination unit 8025, which is used to determine, by using the language sub-model included in the speech recognition model, a word set corresponding to at least one audio signal; a fifth determination unit 8026, which is used to determine, for a word in the word set, whether there is a second probability score corresponding to the word in the cache, and if not, determine the second probability score corresponding to the word by using the language sub-model; a sixth determination unit 8027, which is used to determine a first category of recognition results based on the first probability score and the second probability score determined by the language sub-model.
[0133] In some optional implementations, the determination module 803 includes: a seventh determination unit 8031, used to determine, for a word in the word set, whether there is a second probability score corresponding to the word in the cache; if so, determining the second probability score in the cache as the second probability score language sub-model of the word; an eighth determination unit 8032, used to determine a second category of recognition results based on the first probability score and the second probability score determined from the cache.
[0134] In some optional implementations, the processing module 805 includes: a ninth determination unit 8051, used to determine the target path of the word set in the decoding network included in the speech recognition model according to the first probability score and the second probability score respectively included in the first category recognition result and the second category recognition result; a generation unit 8052, used to generate sentence recognition results corresponding to at least one audio signal based on the target path.
[0135] The voice interaction device provided by the above-mentioned embodiment of the present disclosure recognizes at least one audio signal by utilizing a preset voice recognition model. During the recognition process, part of the recognition results are generated by extracting the stored recognition data from the cache, and the other part of the recognition results are generated by the voice recognition model, thereby effectively reusing the stored recognition data. There is no need for the voice recognition model to process the entire data, thereby improving the efficiency of processing at least one audio signal, and helping to meet the requirements of low resource consumption and low processing delay in multi-channel voice interaction scenarios.
[0136] Exemplary Electronic Devices
[0137] Below, reference Fig.10 To describe an electronic device according to an embodiment of the present disclosure. The electronic device may be as follows Figure 1 Any one or both of the terminal device 101 and the server 103 shown, or a stand-alone device independent of them, the stand-alone device can communicate with the terminal device 101 and the server 103 to receive the collected input signals from them.
[0138] Fig.10 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.
[0139] like Fig.10 As shown, the electronic device 1000 includes one or more processors 1001 and a memory 1002 .
[0140] The processor 1001 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1000 to perform desired functions.
[0141] The memory 1002 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1001 may run the program instructions to implement the voice interaction method of each embodiment of the present disclosure above and / or other desired functions. Various contents such as recognition data may also be stored in the computer-readable storage medium.
[0142] In one example, the electronic device 1000 may further include: an input device 1003 and an output device 1004 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0143] For example, when the electronic device is a terminal device 101 or a server 103, the input device 1003 may be a device such as a microphone for inputting audio signals. When the electronic device is a stand-alone device, the input device 1003 may be a communication network connector for receiving input audio signals from the terminal device 101 and the server 103.
[0144] The output device 1004 can output various information to the outside, including instructions for the voice interaction device to perform corresponding functions, etc. The output device 1004 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0145] Of course, to simplify, Fig.10 Only some of the components related to the present disclosure in the electronic device 1000 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 1000 may also include any other appropriate components.
[0146] Exemplary computer program products and computer-readable storage media
[0147] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the voice interaction method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0148] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0149] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the voice interaction method according to various embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0150] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0151] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0152] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0153] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0154] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0155] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0156] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0157] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A voice interaction method, comprising: Acquire at least one audio signal, where the at least one audio signal is obtained by performing sound source separation on an initial audio signal, and the at least one audio signal corresponds to one user respectively; Using a preset speech recognition model to recognize the at least one audio signal, and obtaining a first type of recognition result through the speech recognition model; Determining stored recognition data about the at least one audio signal from a cache, wherein the cache stores recognition data obtained by the speech recognition model during a recognition process; generating a second type of recognition result based on the stored recognition data about the at least one audio signal; Using the speech recognition model, processing the first category recognition results and the second category recognition results to obtain sentence recognition results corresponding to the at least one audio signal, wherein the sentence recognition results are obtained based on an optimal path determined by the speech recognition model from a plurality of words recognized corresponding to the at least one audio signal; Performing semantic analysis on each sentence recognition result to obtain at least one analysis result; Based on the at least one analysis result, an instruction for controlling the voice interaction device to perform a corresponding function is generated.
2. The method according to claim 1, wherein: The step of obtaining at least one audio signal comprises: Receiving an initial audio signal collected by an audio collection device; The initial audio signal is subjected to sound source separation processing to obtain the at least one audio signal.
3. The method according to claim 1, wherein: The step of recognizing the at least one audio signal by using a preset speech recognition model and obtaining a first type of recognition result by using the speech recognition model includes: Determine the speech recognition instances corresponding to the at least one audio signal respectively; Execute the determined speech recognition instances in parallel; The speech recognition model is used respectively through each speech recognition instance to recognize the corresponding audio signal.
4. The method according to claim 3, wherein: The semantic analysis of each sentence recognition result is performed respectively to obtain at least one analysis result, including: Determine the semantic parsing instances corresponding to the obtained sentence recognition results; Execute the determined semantic parsing instances in parallel; Semantic analysis is performed on the corresponding sentence recognition results through each semantic analysis instance.
5. The method according to claim 1, wherein: The step of recognizing the at least one audio signal by using a preset speech recognition model and obtaining a first type of recognition result by using the speech recognition model includes: Determine, by using the acoustic sub-model included in the speech recognition model, the syllable sets corresponding to the at least one audio signal and the first probability scores corresponding to the syllables in the syllable sets; Determine the word sets corresponding to the at least one audio signal respectively using the language sub-model included in the speech recognition model; For a word in the word set, determining whether there is a second probability score corresponding to the word in the cache, and if not, determining the second probability score corresponding to the word using the language sub-model; A first type of recognition result is determined based on the first probability score and a second probability score determined by the language sub-model.
6. The method according to claim 5, wherein: The step of determining the stored identification data about the at least one audio signal from the cache includes: For a word in the word set, determining whether there is a second probability score corresponding to the word in the cache, and if so, determining the second probability score in the cache as the second probability score language sub-model of the word; A second type of recognition result is determined based on the first probability score and a second probability score determined from the cache.
7. The method according to claim 6, wherein: The using of the speech recognition model to process the first type of recognition results and the second type of recognition results to obtain sentence recognition results corresponding to the at least one audio signal respectively includes: Determining a target path of the word set in a decoding network included in the speech recognition model according to the first probability score and the second probability score respectively included in the first category recognition result and the second category recognition result; Based on the target path, sentence recognition results corresponding to the at least one audio signal are generated.
8. A voice interaction device, comprising: An acquisition module, configured to acquire at least one audio signal, wherein the at least one audio signal is obtained by performing sound source separation on an initial audio signal, and the at least one audio signal corresponds to one user respectively; A recognition module, used to recognize the at least one audio signal using a preset speech recognition model, and obtain a first type of recognition result through the speech recognition model; A determination module, configured to determine stored recognition data about the at least one audio signal from a cache, wherein the cache stores recognition data obtained by the speech recognition model during a recognition process; A first generating module, configured to generate a second type of recognition result based on the stored recognition data about the at least one audio signal; a processing module, configured to process the first category recognition results and the second category recognition results by using the speech recognition model to obtain sentence recognition results corresponding to the at least one audio signal, wherein the sentence recognition results are obtained based on an optimal path determined by the speech recognition model from a plurality of words recognized corresponding to the at least one audio signal; A parsing module, used to perform semantic parsing on each sentence recognition result to obtain at least one parsing result; The second generating module is used to generate instructions for controlling the voice interaction device to perform a corresponding function based on the at least one analysis result.
9. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 7.
10. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Voice recognition method, device, user equipment and storage medium
CN108510990A
Speech recognition method, device and equipment
CN108573706A
Vehicle-mounted speech control method and system based on deep learning
CN110415697A
Voice recognition method, device and system, electronic device and storage medium
CN110473531A
