Voice processing method and apparatus, and electronic device and storage medium
By using user voice commands to recognize and understand semantics in the smart cockpit and match them with hot vocabulary, the problem of low matching accuracy of voice commands is solved, and a higher success rate and user experience of voice command matching is achieved.
Patent Information
- Application Number
- PCT/CN2023/123679
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-10
- Filing Date
- 2023-10-10
- Publication Date
- 2025-02-13
AI Technical Summary
In the vehicle's smart cockpit visible and speaking mode, the semantic recognition matching accuracy of user voice commands is low, resulting in the inability to execute voice commands and affecting the user experience.
By obtaining user voice commands, performing speech recognition and semantic understanding, obtaining semantic understanding text, and matching them with hot words in the hot word library, determining the target hot words and standard control command names to perform corresponding command operations.
It improves the matching success rate of voice commands, improves the user's voice function experience, and ensures that voice commands can be executed accurately.
Smart Images

Figure CN2023123679_13022025_PF_FP_ABST
Abstract
Description
Voice processing method, device, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 10, 2023, with application number 202311013794.0, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a speech processing method, apparatus, electronic device, and storage medium. Background Art
[0003] Currently, many vehicles' smart cockpits feature a "see and speak" feature. When the smart cockpit's system is in "see and speak" mode, users can simply speak the names of controls displayed on the screen without touching the screen, and the corresponding commands will be executed through voice interaction.
[0004] When the vehicle is in see-and-speak mode, semantic recognition is performed on the user's voice commands, and the recognition results are matched with the name of a control in the interface. If the match is successful, the command of the corresponding control on the interface can be executed through voice operation.
[0005] In the related technology, it can be seen that when the voice is recognized and matched with the name of the control on the interface, there may be problems such as missing or failing to recognize the pronunciation or characters during semantic recognition due to the user's non-standard pronunciation or too fast speaking speed, or low matching accuracy, resulting in the inability to execute the voice command, affecting the user's voice function experience.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a voice processing method, device, electronic device, and storage medium, which can improve the matching success rate of voice commands and enhance the user's voice function experience.
[0008] The present application discloses a speech processing method, which includes:
[0009] Get user voice commands;
[0010] Recognizing the voice command to obtain a voice text corresponding to the voice command;
[0011] Performing semantic understanding on the speech text to obtain semantically understood text;
[0012] Matching the semantically understood text with hot words in a hot word library, wherein the hot words include a standard control instruction name, a segmented text after segmentation processing of the standard control instruction name, and a segmentation combination of the segmented text;
[0013] In response to the successful matching of the semantic understanding text with the hot words in the hot word library, a target hot word matching the semantic understanding text is determined, and a standard control instruction name corresponding to the target hot word is determined; the standard control instruction name is the original name of the control instruction that can directly trigger the execution of the control instruction.
[0014] The present application also discloses a speech processing device, comprising:
[0015] A first acquisition module is configured to acquire user voice commands;
[0016] A recognition module, configured to recognize the voice command and obtain a voice text corresponding to the voice command;
[0017] A semantic understanding module, configured to perform semantic understanding on the speech text to obtain a semantically understood text;
[0018] A matching module is configured to match the semantically understood text with hot words in a hot word library, wherein the hot words include a standard control instruction name, a segmented text after segmentation processing of the standard control instruction name, and a segmentation combination of the segmented text;
[0019] a determination module configured to determine, in response to a successful match between the semantically understood text and a hot word in a hot word library, a target hot word that matches the semantically understood text, and a standard control instruction name corresponding to the target hot word; the standard control instruction name is an original name of a control instruction that can directly trigger the execution of a control instruction;
[0020] The execution module is configured to execute corresponding instruction operations based on the standard control instruction name.
[0021] An embodiment of the present application further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above-mentioned speech processing method when executed by the processor.
[0022] An embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the speech processing method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1 is a flowchart of a speech processing method according to an embodiment of the present invention;
[0024] FIG2 is a flowchart of another speech processing method provided in an embodiment of the present application;
[0025] FIG3 is a schematic diagram of a process of obtaining hot words by processing a standard control instruction name according to an embodiment of the present application;
[0026] FIG4 is a schematic diagram of a speech processing process according to an embodiment of the present application;
[0027] FIG5 is a schematic diagram of another speech processing process according to an embodiment of the present application;
[0028] FIG6 is a structural block diagram of a speech processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The present application is described in detail below with reference to the accompanying drawings and specific embodiments. The embodiments described are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of this application.
[0030] In order to help those skilled in the art better understand the technical solutions of this application, the following explains the relevant concepts:
[0031] Automatic Speech Recognition (ASR) is a speech technology that converts natural speech signals into machine-readable text. It is an important method for converting speech signals into text. It has the ability to convert sound signals into textual data.
[0032] Natural Language Understanding (NLU) is an artificial intelligence-based technology that enables computers to understand and interpret the meaning and intent of human natural language.
[0033] Voice Service Provider (VSP), voice service provider.
[0034] It can be seen in the relevant technology that when the voice is recognized and matched with the name of the control on the interface, there may be problems such as missing or not recognizing the pronunciation or characters during semantic recognition due to the user's non-standard pronunciation or too fast speaking speed, or low matching accuracy, resulting in the inability to execute the voice command, affecting the user's voice function experience.
[0035] Therefore, the present application intends to provide a speech processing method and a corresponding speech processing device, an electronic device, and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0036] One of the core concepts of the embodiment of the present application is that the user's voice command can be obtained, the voice command can be voice recognized, and the voice text corresponding to the voice command can be obtained. The voice text can be semantically understood to obtain the semantic understanding text corresponding to the voice text. Then the semantic understanding text can be matched with the hot words in the hot word library. If the match is successful, the matched target hot word can be determined, and the standard control instruction name corresponding to the target hot word can be determined. Based on the standard control instruction name, the corresponding instruction operation can be executed. By adopting the above method, instead of directly matching the semantic understanding text with the name of a control in the interface, the semantic understanding text is matched with the hot words in the hot word library. For an instruction operation, there can be multiple expressions corresponding to it. Based on the multiple expressions, multiple hot words corresponding to the instruction operation are composed, and then the semantic understanding text is matched with multiple hot words. This can greatly improve the matching success rate of voice instructions and improve the user's voice function experience.
[0037] 1 , a flowchart of a speech processing method according to an embodiment of the present application is shown, which may include the following steps:
[0038] Step 101: Obtain user voice commands.
[0039] A voice processing method according to an embodiment of the present application can be applied to a vehicle-mounted system, and the vehicle-mounted system can obtain a user's voice command through a voice input device.
[0040] Of course, the voice processing method of the embodiment of the present application can also be applied to other terminal devices.
[0041] Step 102: Recognize the voice command to obtain the voice text corresponding to the voice command.
[0042] Speech recognition technology can be used to perform speech recognition on a voice instruction and obtain the speech text corresponding to the voice instruction.
[0043] Step 103: perform semantic understanding on the speech text to obtain semantically understood text.
[0044] Semantic understanding technology can be used to perform semantic understanding on speech text and obtain the semantically understood text corresponding to the speech text.
[0045] Step 104: Match the semantically understood text with the hot words in the hot word library.
[0046] In an embodiment of the present application, the hot word library may include multiple hot word sets, each hot word set corresponds to an instruction operation, and by matching the semantic understanding text with the hot words in the hot word library, the target hot word corresponding to the semantic understanding text is determined, and the target hot word set to which the target hot word belongs can be determined, thereby determining the instruction operation that the user wants to instruct to execute.
[0047] The hot words include the standard control instruction name, the segmented text after segmentation of the standard control instruction name, and the segmented word combination of the segmented text. The standard control instruction name, the segmented text corresponding to the standard control instruction name, and the segmented word combination corresponding to the standard control instruction name constitute a hot word set.
[0048] Step 105 : In response to the semantic understanding text successfully matching a hot word in the hot word library, determining a target hot word that matches the semantic understanding text, and determining a standard control instruction name corresponding to the target hot word.
[0049] Among them, the standard control instruction name is the original name of the control instruction that can directly trigger the execution of the control instruction. Each instruction operation can correspond to at least one standard control instruction name. For example, the standard control instruction name corresponding to a certain instruction operation is "Open TV Bluetooth list", and its modified expressions can include "Open Bluetooth list", "TV Bluetooth", "Open list", etc. These expressions can all be used as hot words corresponding to the instruction operation.
[0050] In a specific application, the currently obtained semantically understood text may be matched with a hot word. When it is determined that the text matches the target hot word, the standard control instruction name corresponding to the target hot word also needs to be determined.
[0051] For example, if the target hotword matched is "TV Bluetooth", it needs to be converted into "Open TV Bluetooth list". The car system can execute the operation of opening the TV Bluetooth list based on "Open TV Bluetooth list". Since the car system does not understand the meaning of "TV Bluetooth", it cannot execute the operation of opening the TV Bluetooth list based on "TV Bluetooth", so the conversion is required here.
[0052] Step 106: Execute the corresponding command operation based on the standard control command name.
[0053] After the target hotword is converted into the corresponding standard control instruction name, the corresponding instruction operation can be executed based on the standard control instruction name.
[0054] In summary, in the embodiment of the present application, the user's voice command can be obtained, the voice command can be voice recognized, and the voice text corresponding to the voice command can be obtained. The voice text can be semantically understood to obtain the semantic understanding text corresponding to the voice text. Then, the semantic understanding text can be matched with the hot words in the hot word library. If the match is successful, the matched target hot word can be determined, and the standard control instruction name corresponding to the target hot word can be determined. Based on the standard control instruction name, the corresponding instruction operation can be executed. By adopting the above method, instead of directly matching the semantic understanding text with the name of a control in the interface, the semantic understanding text is matched with the hot words in the hot word library. For an instruction operation, there can be multiple expressions corresponding to it. Based on the multiple expressions, multiple hot words corresponding to the instruction operation are composed, and then the semantic understanding text is matched with multiple hot words. This can greatly improve the matching success rate of voice instructions and improve the user's voice function experience.
[0055] 2 , there is shown a flowchart of another speech processing method provided by an embodiment of the present application, which may specifically include the following steps:
[0056] Step 201: Acquire user voice commands.
[0057] Step 202: Recognize the voice command to obtain the voice text corresponding to the voice command.
[0058] Step 203: perform semantic understanding on the speech text to obtain semantically understood text.
[0059] The specific implementation process of steps 201 to 203 can refer to steps 101 to 103 and will not be repeated here.
[0060] Step 204 : Determine whether the semantically understood text is a visible, ie, utterable, semantic text.
[0061] Step 205 : In response to the semantically understood text being a visible, ie, audible, semantic text, the semantically understood text is matched with hot words in a hot word library.
[0062] In an embodiment of the present application, it is possible to determine whether a semantically understood text is a visible-to-speak semantic text. A visible-to-speak semantic text refers to a semantically understood text that can trigger a visible-to-speak function. If it is a visible-to-speak semantic text, the semantically understood text can be matched with hot words in a hot word library. Determining whether a semantically understood text is a visible-to-speak semantic text can specifically be determining whether it is in a visible-to-speak mode, that is, determining whether the visible-to-speak function is enabled. Only when it is determined that the visible-to-speak function is enabled can subsequent hot word matching operations be performed, thereby avoiding wasting computing resources.
[0063] In an optional embodiment of the present application, the hot words in the hot word library are obtained in the following manner:
[0064] Get the name of the standard control instruction uploaded by the application;
[0065] Perform word segmentation processing on the standard control instruction name to obtain a word segmentation result including multiple word segmentation texts;
[0066] Combining multiple segmentation texts in the segmentation results to obtain at least one segmentation combination;
[0067] The standard control instruction name, the corresponding word segmentation result, and at least one word segmentation combination are stored as hot words in the hot word library.
[0068] In the embodiment of the present application, the standard control instruction name is the original name of the control instruction that can directly trigger the execution of the control instruction. By processing the standard control instruction name, the corresponding hot words can be obtained and stored in the hot word library. In the embodiment of the application, the segmented text obtained by segmenting the standard control instruction name and the segmented combination obtained by combining the segmented text are used as hot words for subsequent matching, which can greatly improve the matching success rate of the user's voice command.
[0069] In an optional embodiment of the present application, word segmentation processing is performed on the standard control instruction name to obtain a word segmentation result including multiple word segmentation texts, which may specifically include the following sub-steps:
[0070] In response to the character string length of the standard control instruction name being not less than a preset character string length threshold, word segmentation processing is performed on the standard control instruction name to obtain a word segmentation result including a plurality of word segmentation texts.
[0071] In a specific embodiment, word segmentation may be performed on the standard control instruction name when the string length of the standard control instruction name is not less than a preset string length threshold. For example, word segmentation may be performed only when the string length of the standard control instruction name is not less than 4.
[0072] After segmenting the standard control instruction name to obtain a segmentation result, multiple segmentation texts in the segmentation result can be combined to obtain at least one segmentation combination. The combination method can be as follows, assuming that the segmentation texts in the segmentation result include: "thank you", "you", "of", "love", and "1999":
[0073] (1) Cumulative combination method
[0074] After cumulative processing, we can get participle combinations such as ① thank you; ② thank you for; ③ thank you for your love.
[0075] (2) Splicing combination method
[0076] The word segmentation texts at the front of the word segmentation result list are combined with the word segmentation texts at the back of the list. At this time, it is necessary to limit the text lengths of the two word segmentation texts to be greater than 1. After processing, only ①Thank you 1999 can be obtained. In other cases, the text length of the word segmentation text is not greater than 1.
[0077] In an optional embodiment of the present application, the standard control instruction name, the corresponding word segmentation result, and at least one word segmentation combination are stored as hot words in a hot word library, which may specifically include the following sub-steps:
[0078] The standard control instruction name is used as the key in the key-value pair, and the corresponding word segmentation result and at least one word segmentation combination are used as the value in the key-value pair and stored in the hot word library.
[0079] In an embodiment of the present application, a standard control instruction name corresponding to an instruction operation, a segmentation result obtained by segmenting the standard control instruction name, and at least one segmentation combination obtained by combining multiple segmentation texts in the segmentation result are associated and stored in a hot word library. Exemplarily, it can be stored by establishing a mapping relationship between keys and values in a key-value pair, or it can be stored in JSON format, with the standard control instruction name as the key in the key-value pair, and the corresponding segmentation result and at least one segmentation combination as the value in the key-value pair. By establishing a key-value pair mapping relationship, it is convenient to quickly find the standard control instruction name corresponding to the target hot word based on the key-value pair mapping relationship after subsequent matching to the target hot word.
[0080] In an optional embodiment of the present application, the speech processing method of the embodiment of the present application may further include the following steps:
[0081] Periodically determine whether the segmented text obtained by the current segmentation process or the segmented word combination obtained by the current combination is the same as the segmented text obtained by the previous segmentation process or the segmented word combination obtained by the previous combination;
[0082] In response to the segmented text obtained in the current segmentation process or the segmented word combination obtained in the current combination being the same as the segmented text obtained in the previous segmentation process or the segmented word combination obtained in the previous combination, both segmented texts or segmented word combinations obtained in the two processes are removed from the hot word library;
[0083] Periodically determine whether the segmented text obtained by this segmentation process or the segmented combination obtained by this combination is the same as the standard control instruction name stored in the hot word library;
[0084] In response to the fact that the segmented text obtained in this segmentation processing or the segmented combination obtained in this combination is the same as the standard control instruction name stored in the hot word library, the standard control instruction name is retained, and the segmented text obtained in this segmentation processing or the segmented combination obtained in this combination is removed from the hot word library.
[0085] In an embodiment of the present application, it is possible to periodically determine whether the segmentation text obtained by this segmentation processing or the segmentation combination obtained by this combination is the same as the segmentation text obtained by the previous segmentation processing or the segmentation combination obtained by the previous combination. If the segmentation text obtained by this segmentation processing is the same as the segmentation text obtained by the previous segmentation processing or the segmentation combination obtained by the previous combination, or if the segmentation combination obtained by this combination is the same as the segmentation text obtained by the previous segmentation processing or the segmentation combination obtained by the previous combination, then both segmentation texts or segmentation combinations obtained need to be removed from the hot word library.
[0086] Taking the standard control command name "Open TV Bluetooth List" as an example, after word segmentation processing, the word segmentation results of "open", "TV", "Bluetooth" and "list" are obtained. The word segmentation texts in the word segmentation results are combined to obtain the word segmentation combinations of "turn on TV", "turn on TV Bluetooth", "turn on Bluetooth", "open list", "TV Bluetooth", "TV list" and "Bluetooth list". Among them, the word segmentation combination obtained in this combination includes "open list", which is obtained after a series of processing of the standard control command name "Open TV Bluetooth List", and the word segmentation combination obtained in the previous combination also includes "open list", which is obtained after a series of processing of the standard control command name "Open music player list". It is necessary to remove "open list" in this word segmentation combination and remove "open list" in the previous word segmentation combination to avoid the situation where the same hot word corresponds to multiple command operations.
[0087] In addition, it is also possible to periodically determine whether the segmented text obtained by this segmentation processing or the segmented combination obtained by this combination is the same as the standard control instruction name stored in the hot word library. If the segmented text obtained by this segmentation processing is the same as the standard control instruction name stored in the hot word library, or if the segmented combination obtained by this combination is the same as the standard control instruction name stored in the hot word library, the standard control instruction name can be retained, and the segmented text obtained by this segmentation processing or the segmented combination obtained by this combination is removed from the hot word library.
[0088] For example, the word segmentation combination obtained in this combination includes "turn on the TV", which is obtained after a series of processing of the standard control instruction name "turn on the TV Bluetooth list", and corresponds to the instruction operation of turning on the TV Bluetooth list. The hot word library stores the standard control instruction name "turn on the TV", which corresponds to the instruction operation of turning on the TV. At this time, "turn on the TV" is retained as the standard control instruction name, and "turn on the TV" as a word segmentation combination is removed from the hot word library, so that a hot word can only correspond to one instruction operation in the hot word library to avoid errors.
[0089] In an optional embodiment of the present application, the speech processing method of the embodiment of the present application may further include the following steps:
[0090] For any standard control instruction name in the hot word library, in response to the sum of the word segmentation result corresponding to the standard control instruction name and at least one word segmentation combination being greater than a preset quantity threshold, at least one word segmentation combination is removed from the hot word library.
[0091] In an embodiment of the present application, to prevent the hot word library from occupying too much storage space, if the sum of the number of the word segmentation results corresponding to the standard control instruction name and at least one word segmentation combination is greater than a preset number threshold, at least one word segmentation combination may be removed. The preset number threshold can be set according to actual needs.
[0092] It should be noted that after converting the current user voice command into voice text and converting the voice text into semantically understood text, the semantically understood text can be further segmented, and based on the segmentation results obtained by the segmentation processing and the segmentation combination obtained by combining multiple segmentation texts in the segmentation results, the hot words corresponding to the same standard control instruction name in the hot word library are updated. The update process is similar to the process of obtaining hot words based on the standard control instruction name. In order to avoid repetition, it will not be repeated here.
[0093] Referring to Figure 3, there is shown a schematic diagram of the process of obtaining hot words by processing the standard control instruction name in an embodiment of the present application. By performing word segmentation processing on the standard control instruction name, a word segmentation result can be obtained, and multiple word segmentation texts in the word segmentation result can be combined to obtain at least one word segmentation combination. If it is determined that the current word segmentation text or the current word segmentation combination is different from the previous word segmentation text or the previous word segmentation combination, and is different from the standard control instruction name previously stored in the hot word library, it can be stored in the hot word library.
[0094] Step 206 : In response to the semantic understanding text successfully matching a hot word in the hot word library, a target hot word matching the semantic understanding text is determined, and a standard control instruction name corresponding to the target hot word is determined.
[0095] In the case of a successful match, the standard control instruction name corresponding to the target hot word can be quickly determined based on the key-value pair mapping relationship in the hot word library.
[0096] Step 207: Execute the corresponding instruction operation based on the standard control instruction name.
[0097] 4 is a schematic diagram of a speech processing process according to an embodiment of the present application. The speech processing system includes a vehicle screen, a VSP module, an ASR module, an NLU module, a word segmentation service module, and a hot word library. The speech processing process may include the following steps:
[0098] 1. When the "See and Speak" function is enabled, the user speaks the name of a control on the car computer screen, and the car computer system can receive the voice signal and generate the corresponding voice command;
[0099] 2. The voice command is transmitted to the VSP module, and then transmitted to the ASR module through the VSP module. The ASR module performs voice recognition on the voice command to obtain the corresponding voice text, and then transmits the voice text back to the VSP module;
[0100] 3. After receiving the voice text, the VSP module transmits the voice text to the NLU module. The NLU module performs semantic understanding on the voice text to obtain the corresponding semantic understanding text, and then transmits the semantic understanding text back to the VSP module.
[0101] 4. After receiving the semantic understanding text, the VSP module determines whether the semantic understanding text is a visible and speakable semantic text. If it is determined to be a visible and speakable semantic text, on the one hand, the semantic understanding text can be matched with the hot words in the hot word library to determine the target hot word that matches the semantic understanding text, and then the standard control instruction name corresponding to the target hot word is determined, so that the corresponding instruction operation can be executed based on the standard control instruction name; on the other hand, the semantic understanding text can be transmitted to the word segmentation service module, and the word segmentation service module performs word segmentation processing on the semantic understanding text to obtain a word segmentation combination including multiple word segmentation texts, and combines multiple word segmentation texts in the word segmentation results to obtain at least one word segmentation combination, and then the hot words stored in the hot word library can be updated based on the obtained word segmentation text and word segmentation combination.
[0102] Referring to Figure 5, which is a schematic diagram of another speech processing process of an embodiment of the present application, the speech processing system includes a vehicle screen, a VSP module, an ASR module, an NLU module, a word segmentation service module and a hot word library. The difference from the speech processing system in Figure 4 is that the NLU module is deployed in the cloud. After the NLU module in the cloud receives the semantic text sent by the VSP module on the vehicle side, it performs semantic understanding on the speech text and then transmits the obtained semantic understanding text back to the VSP module on the vehicle side.
[0103] In summary, in the embodiment of the present application, the user's voice command can be obtained, the voice command can be voice recognized, and the voice text corresponding to the voice command can be obtained. The voice text can be semantically understood to obtain the semantic understanding text corresponding to the voice text. Then, the semantic understanding text can be matched with the hot words in the hot word library. If the match is successful, the matched target hot word can be determined, and the standard control instruction name corresponding to the target hot word can be determined. Based on the standard control instruction name, the corresponding instruction operation can be executed. By adopting the above method, instead of directly matching the semantic understanding text with the name of a control in the interface, the semantic understanding text is matched with the hot words in the hot word library. For an instruction operation, there can be multiple expressions corresponding to it. Based on the multiple expressions, multiple hot words corresponding to the instruction operation are composed, and then the semantic understanding text is matched with multiple hot words. This can greatly improve the matching success rate of voice instructions and improve the user's voice function experience.
[0104] It should be noted that for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that, depending on the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0105] 6 , a block diagram of a speech processing device according to an embodiment of the present application is shown, which may include the following modules:
[0106] A first acquisition module 601 is configured to acquire a user voice command;
[0107] The recognition module 602 is configured to recognize the voice command and obtain the voice text corresponding to the voice command;
[0108] Semantic understanding module 603, configured to perform semantic understanding on the speech text to obtain semantically understood text;
[0109] A matching module 604 is configured to match the semantically understood text with hot words in a hot word library, wherein the hot words include a standard control instruction name, a segmented text after segmentation processing of the standard control instruction name, and a segmentation combination of the segmented text;
[0110] The determination module 605 is configured to determine, in response to a successful match between the semantically understood text and a hot word in a hot word library, a target hot word that matches the semantically understood text, and a standard control instruction name corresponding to the target hot word; the standard control instruction name is an original name of a control instruction that can directly trigger the execution of a control instruction;
[0111] The execution module 606 is configured to execute a corresponding instruction operation based on the standard control instruction name.
[0112] In an optional embodiment of the present application, the device further includes:
[0113] The second acquisition module is configured to obtain the name of the standard control instruction uploaded by the application;
[0114] A word segmentation processing module is configured to perform word segmentation processing on the standard control instruction name to obtain a word segmentation result including multiple word segmentation texts;
[0115] a combining module configured to combine multiple segmentation texts in the segmentation results to obtain at least one segmentation combination;
[0116] The storage module is configured to store the standard control instruction name, the corresponding word segmentation result, and the at least one word segmentation combination as hot words in the hot word library.
[0117] In an optional embodiment of the present application, the storage module includes:
[0118] The storage submodule is configured to use the standard control instruction name as the key in a key-value pair, and store the corresponding word segmentation result and the at least one word segmentation combination as the value in the key-value pair in the hot word library.
[0119] In an optional embodiment of the present application, the matching module includes:
[0120] A judgment submodule, configured to judge whether the semantically understood text is a visible and audible semantic text;
[0121] The matching submodule is configured to match the semantically understood text with hot words in the hot word library in response to the semantically understood text being a visible, i.e., audible, semantic text.
[0122] In an optional embodiment of the present application, the word segmentation processing module includes:
[0123] The word segmentation processing submodule is configured to perform word segmentation processing on the standard control instruction name in response to the character string length of the standard control instruction name being not less than a preset character string length threshold, and obtain the word segmentation result including multiple word segmentation texts.
[0124] In an optional embodiment of the present application, the device further includes:
[0125] The first judgment module is configured to periodically judge whether the segmented text obtained by the current segmentation processing or the segmented word combination obtained by the current combination is the same as the segmented text obtained by the previous segmentation processing or the segmented word combination obtained by the previous combination;
[0126] A first removal module is configured to remove the segmented texts or segmented word combinations obtained in the current segmentation process from the hot word library in response to the segmented texts obtained in the current segmentation process or the segmented word combinations obtained in the current combination being the same as the segmented texts obtained in the previous segmentation process or the segmented word combinations obtained in the previous combination;
[0127] The second judgment module is configured to periodically judge whether the segmented text obtained by the current segmentation processing or the segmented combination obtained by the current combination is the same as the standard control instruction name stored in the hot word library;
[0128] The retention and removal module is configured to retain the standard control instruction name in response to the segmentation text obtained in this segmentation processing or the segmentation combination obtained in this combination being the same as the standard control instruction name stored in the hot word library, and remove the segmentation text obtained in this segmentation processing or the segmentation combination obtained in this combination from the hot word library.
[0129] In an optional embodiment of the present application, the device further includes:
[0130] The second removal module is configured to remove, for any standard control instruction name in the hot word library, the at least one segmentation combination from the hot word library in response to the sum of the segmentation result corresponding to the standard control instruction name and the at least one segmentation combination being greater than a preset quantity threshold.
[0131] In summary, in the embodiment of the present application, the user's voice command can be obtained, the voice command can be voice recognized, and the voice text corresponding to the voice command can be obtained. The voice text can be semantically understood to obtain the semantic understanding text corresponding to the voice text. Then, the semantic understanding text can be matched with the hot words in the hot word library. If the match is successful, the matched target hot word can be determined, and the standard control instruction name corresponding to the target hot word can be determined. Based on the standard control instruction name, the corresponding instruction operation can be executed. By adopting the above method, instead of directly matching the semantic understanding text with the name of a control in the interface, the semantic understanding text is matched with the hot words in the hot word library. For an instruction operation, there can be multiple expressions corresponding to it. Based on the multiple expressions, multiple hot words corresponding to the instruction operation are composed, and then the semantic understanding text is matched with multiple hot words. This can greatly improve the matching success rate of voice instructions and improve the user's voice function experience.
[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned embodiment of the speech processing method are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0134] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned speech processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0135] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0136] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including magnetic disk storage, CD-ROM (Compact Disc Read-Only Memory) read-only optical disk, optical storage, etc.) containing computer-usable program code.
[0137] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0138] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0140] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0141] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device comprising the element.
[0142] The above is a detailed introduction to a speech processing method and a speech processing device, an electronic device and a computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope.
Claims
1. A speech processing method, the method comprising: Get user voice commands; Recognize the voice command to obtain a voice text corresponding to the voice command; Performing semantic understanding on the speech text to obtain a semantically understood text; Matching the semantically understood text with hot words in a hot word library, wherein the hot words include a standard control instruction name, a segmented text after segmentation processing of the standard control instruction name, and a segmentation combination of the segmented text; In response to the semantic understanding text successfully matching a hot word in a hot word library, determining a target hot word matching the semantic understanding text, and determining a standard control instruction name corresponding to the target hot word; the standard control instruction name is an original name of a control instruction that can directly trigger the execution of a control instruction; Execute corresponding command operations based on the standard control command name.
2. The method according to claim 1, wherein: The hot words in the hot word library are obtained in the following way: Get the name of the standard control instruction uploaded by the application; Performing word segmentation processing on the standard control instruction name to obtain a word segmentation result including multiple word segmentation texts; Combining multiple segmentation texts in the segmentation results to obtain at least one segmentation combination; The standard control instruction name, the corresponding word segmentation result and the at least one word segmentation combination are stored as hot words in the hot word library.
3. The method according to claim 2, wherein: The storing the standard control instruction name, the corresponding word segmentation result, and the at least one word segmentation combination as hot words in the hot word library includes: The standard control instruction name is used as the key in a key-value pair, and the corresponding word segmentation result and the at least one word segmentation combination are stored in the hot word library as the value in the key-value pair.
4. The method according to claim 1, wherein: The matching of the semantically understood text with hot words in a hot word library includes: Determining whether the semantically understood text is a visible, i.e., audible, semantic text; In response to the semantically understood text being a visible, ie, audible, semantic text, the semantically understood text is matched with hot words in the hot word library.
5. The method according to claim 2, wherein: The word segmentation processing is performed on the standard control instruction name to obtain a word segmentation result including multiple word segmentation texts, including: In response to the character string length of the standard control instruction name being not less than a preset character string length threshold, the standard control instruction name is segmented to obtain the segmentation result including a plurality of segmentation texts.
6. The method according to claim 1, further comprising: Periodically determine whether the segmented text obtained by the current segmentation processing or the segmented word combination obtained by the current combination is the same as the segmented text obtained by the previous segmentation processing or the segmented word combination obtained by the previous combination; In response to the segmented text obtained in the current segmentation process or the segmented word combination obtained in the current combination being the same as the segmented text obtained in the previous segmentation process or the segmented word combination obtained in the previous combination, the segmented texts or segmented word combinations obtained twice are removed from the hot word library; Periodically determine whether the segmented text obtained by the current segmentation processing or the segmented combination obtained by the current combination is the same as the standard control instruction name stored in the hot word library; In response to the fact that the segmented text obtained by this segmentation processing or the segmented combination obtained by this combination is the same as the standard control instruction name stored in the hot word library, the standard control instruction name is retained, and the segmented text obtained by this segmentation processing or the segmented combination obtained by this combination is removed from the hot word library.
7. The method according to claim 3, further comprising: For any standard control instruction name in the hot word library, in response to the sum of the number of the word segmentation result and at least one word segmentation combination corresponding to the standard control instruction name being greater than a preset number threshold, the at least one word segmentation combination is removed from the hot word library.
8. A speech processing device, comprising: A first acquisition module, configured to acquire a user voice command; A recognition module, configured to recognize the voice command and obtain a voice text corresponding to the voice command; A semantic understanding module, configured to perform semantic understanding on the speech text to obtain a semantically understood text; A matching module, configured to match the semantically understood text with hot words in a hot word library, wherein the hot words include a standard control instruction name, a segmented text after segmentation processing of the standard control instruction name, and a segmentation combination of the segmented text; A determination module is configured to determine a target hot word that matches the semantic understanding text in response to a successful match between the semantic understanding text and a hot word in a hot word library, and determine a standard control instruction name corresponding to the target hot word; the standard control instruction name is an original name of a control instruction that can directly trigger the execution of a control instruction; The execution module is configured to execute corresponding instruction operations based on the standard control instruction name.
9. An electronic device, comprising: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, a speech processing method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the speech processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Voice instruction recognition method and device, electronic equipment and storage medium
CN113128228A
Voice instruction recommendation method and device and electronic equipment
CN113987130A
Vehicle-mounted voice interaction method and device and vehicle
CN115359793A
Voice control method and device, electronic equipment and storage medium
CN115457951A
Voice control method and device, electronic equipment and storage medium
CN115762509A