Voice command word construction method, system, terminal and storage medium
By querying preset command words and related voices in voice interaction data, synonymous command words are automatically detected and set, which solves the time-consuming problem of user recording in the existing technology and improves the convenience of voice command word construction and user experience.
Patent Information
- Application Number
- CN202211657382.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-12-22
AI Technical Summary
In the existing voice command word construction process, users need to spend a lot of time recording, resulting in a poor user experience.
By obtaining voice interaction data, querying preset command words, determining the associated voice based on the command time, and performing correlation detection on the preset command words and the unrecognized command words in the associated voice, if they are qualified, they are set as synonymous command words to achieve automatic voice command word setting.
There is no need for users to record and set voice command words separately, which improves the user's operation convenience and usage experience, and realizes the construction of personalized voice command words based on user habits.
Smart Images

Figure CN115985318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of voice control technology, and in particular to a method, system, terminal and storage medium for constructing voice command words. Background Art
[0002] Voice control technology refers to the use of speech recognition to control or operate electronic devices. Speech recognition is one of the core technologies of voice control technology. Although speech recognition technology has made significant progress in recent years, users still need to control electronic devices based on preset voice commands. Voice commands are command words for electronic devices. They are specific instructions that enable electronic devices to understand the user's intentions. When the electronic device recognizes the preset voice command words spoken by the user, it executes the command operation corresponding to the preset voice command words.
[0003] In the existing voice command word construction process, users are generally asked to record their favorite command words to achieve the effect of constructing voice command words customized according to user habits and obtain preset command words. However, since the voice command word recording process requires users to spend a lot of time to cooperate, the user experience is reduced. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a method, system, terminal and storage medium for constructing voice command words, aiming to solve the problem of poor user experience in the existing voice command word construction process.
[0005] The embodiment of the present invention is implemented as follows: a method for constructing a voice command word, the method comprising:
[0006] Acquire voice interaction data, and query the preset command words in the voice interaction data;
[0007] determining, based on the command time of the preset command word, an associated voice in the voice interaction data, and performing a correlation detection between the preset command word and an unrecognized command word in the associated voice;
[0008] If the correlation test between any of the unrecognized command words and the preset command words passes, setting the unrecognized command word as a synonymous command word of the preset command word;
[0009] If a voice instruction containing the synonymous command word is received, the command operation of the preset command word is executed.
[0010] Preferably, the detecting of the correlation between the preset command word and the unrecognized command word in the associated speech includes:
[0011] Segmenting the associated speech to obtain segmented speech, and calculating the speech similarity between the segmented speech;
[0012] determining repeated speech in the associated speech according to the speech similarity, and determining whether the number of repetitions of the repeated speech in the associated speech is greater than a number threshold;
[0013] If the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, it is determined that the association detection between the unrecognized command word in the repeated speech and the preset command word is qualified.
[0014] Preferably, if the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, the method further includes:
[0015] semantically matching the unrecognized command words in the repeated speech with the preset command words;
[0016] If the semantic similarity between the unrecognized command word and the preset command word is less than a similarity threshold, it is determined that the association detection between the unrecognized command word and the preset command word fails.
[0017] Preferably, determining the associated voice in the voice interaction data according to the command time of the preset command word includes:
[0018] In the voice interaction data, the command time of the preset command word is taken as the time end point, and the voice data within a first preset time length is obtained to obtain the associated voice.
[0019] Preferably, after acquiring the voice data within the first preset time period and obtaining the associated voice, the method further includes:
[0020] Determine whether there is speech overlap between the associated speech of different preset command words;
[0021] If there is speech overlap between the associated speech of the different preset command words, obtaining the speech duration of the overlapping speech;
[0022] If the duration of the overlapping speech is greater than the duration threshold, deleting the relationship between the first executed preset command word among the different preset command words and the corresponding associated speech;
[0023] The associated voices between the different preset command words are voice-combined to obtain an associated combined voice, and the associated combined voice is set as the associated voice of the preset command word to be executed later among the different preset command words.
[0024] Preferably, after obtaining the speech duration of the overlapping speech, the method further includes:
[0025] If the speech duration of the overlapping speech is less than or equal to the duration threshold, the command termination time of the preset command word executed first is determined as the time starting point, and the associated speech of the preset command word executed later is speech segmented according to the time starting point.
[0026] Preferably, after setting the unrecognized command word as a synonymous command word of the preset command word, the method further includes:
[0027] Obtaining the number of synonymous command words corresponding to the preset command word to obtain the number of synonymous commands;
[0028] If the number of the synonymous commands is greater than the number threshold, obtaining the command setting time of the preset command words corresponding to the synonymous command words respectively;
[0029] The synonymous command words are subjected to command word screening processing according to the command setting time.
[0030] Another object of an embodiment of the present invention is to provide a system for constructing voice command words, the system comprising:
[0031] A command query module, configured to obtain voice interaction data and query preset command words in the voice interaction data;
[0032] a relevance detection module, configured to determine a related voice in the voice interaction data based on the command time of the preset command word, and perform relevance detection on the preset command word and an unrecognized command word in the related voice;
[0033] a command word setting module, configured to set any unrecognized command word as a synonymous command word of the preset command word if the association detection between the unrecognized command word and the preset command word passes;
[0034] The command execution module is configured to execute the command operation of the preset command word if a voice instruction containing the synonymous command word is received.
[0035] Another object of an embodiment of the present invention is to provide a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0036] Another object of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0037] In an embodiment of the present invention, by querying preset command words in voice interaction data, the associated voice in the voice interaction data can be effectively determined based on the command time of the preset command words. By performing a correlation detection on the preset command words and the unrecognized command words in the associated voice, it is determined whether there is a synonymous relationship between the unrecognized command words and the preset command words. If the correlation detection between the unrecognized command words and the preset command words is qualified, the unrecognized command words can be automatically set as a synonymous command word of the preset command words, so that the voice command words can be automatically set based on user habits, without the user having to record and set the voice command words separately, which facilitates the user's operation and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flow chart of a method for constructing a voice command word provided by the first embodiment of the present invention;
[0039] Figure 2 is a flow chart of a method for constructing a voice command word provided by a second embodiment of the present invention;
[0040] Figure 3 is a flowchart of the implementation of the method for constructing a voice command word provided by the second embodiment of the present invention;
[0041] Figure 4 is a schematic structural diagram of a voice command word construction system provided by a third embodiment of the present invention;
[0042] Figure 5 It is a schematic structural diagram of a terminal device provided in the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.
[0045] Example 1
[0046] See also Figures 1 to 2 , is a flowchart of a method for constructing a voice command word provided in a first embodiment of the present invention. The method for constructing a voice command word can be applied to any terminal device or system. In this embodiment, the method for constructing a voice command word is applied to a voice recognition device. The method for constructing a voice command word includes the following steps:
[0047] Step S10, acquiring voice interaction data, and searching for preset command words in the voice interaction data;
[0048] The voice interaction data is obtained by acquiring the user's voice command data within a preset time interval. The preset time interval can be set as needed. For example, the preset time interval can be set to 1 hour, 1 day, 1 week, or 1 month. In this step, the preset time interval is set to 1 day, that is, on the second day, the user's voice command data on the previous day is acquired to obtain the voice interaction data;
[0049] In this embodiment, a voice command control table is pre-set for the voice recognition device. The voice command control table includes preset command words set when the voice recognition device leaves the factory. The preset command words are used by the user to control the voice recognition device by voice. The user can also add and delete preset command words in the voice command control table.
[0050] In this step, each preset voice word in the voice word control table is voice matched with the voice interaction data, and the preset command word appearing in the voice interaction data is determined according to the voice matching result.
[0051] Step S20, determining the associated speech in the voice interaction data according to the command time of the preset command word, and performing correlation detection on the preset command word and the unrecognized command word in the associated speech;
[0052] According to the voice matching results between each preset voice word and the voice interaction data, the command time of each preset command word is determined respectively, and the associated voice in the voice interaction data can be automatically determined according to the command time of each preset command word;
[0053] In this step, a correlation test is performed on the preset command word and the unrecognized command word in the associated speech to determine whether there is a synonymous relationship between the unrecognized command word and the preset command word in the user's usage habits.
[0054] Optionally, determining the associated voice in the voice interaction data according to the command time of the preset command word includes:
[0055] Taking the command time of the preset command word as the time end point in the voice interaction data, acquiring voice data within a first preset time length to obtain the associated voice;
[0056] The first preset duration can be set as required. For example, the first preset duration can be set to 1 minute, 2 minutes, or 5 minutes. In this step, the voice data within the first minute is obtained with the voice reception point in the command time of each preset command word as the time end point to obtain the associated data.
[0057] For example, when the first preset duration is 1 minute, and the time point corresponding to the preset command word a1 in the voice interaction data is 03:05 to 03:08, then the data from 02:05 to 03:05 in the voice interaction data is determined as the associated data of the preset command word a1;
[0058] Furthermore, after acquiring the voice data within the first preset time period and obtaining the associated voice, the method further includes:
[0059] Determine whether there is speech overlap between the associated speech of different preset command words;
[0060] The duration ranges corresponding to the associated voices are obtained respectively, and the duration ranges of the associated voices are compared to determine whether there is voice overlap between the associated voices of different preset command words;
[0061] For example, if the voice interaction data includes preset command words a1 and a2, and the corresponding associated voices include associated voice b1 (02 minutes 05 seconds to 03 minutes 05 seconds), associated voice b2 (03 minutes 00 seconds to 04 minutes 00 seconds), and associated voice b3 (05 minutes 00 seconds to 06 minutes 00 seconds), then the duration of associated voice b1 is compared with associated voice b2, associated voice b1 with associated voice b3, and associated voice b2 with associated voice b3.
[0062] If there is speech overlap between the associated speech of the different preset command words, obtaining the speech duration of the overlapping speech;
[0063] For example, if the associated voice b1 and the associated voice b2 overlap from 03 minutes 00 seconds to 03 minutes 05 seconds, the overlapped voice c1 is determined to be the voice data from 03 minutes 00 seconds to 03 minutes 05 seconds, and the voice duration of the overlapped voice c1 is 5 seconds.
[0064] If the duration of the overlapping speech is greater than the duration threshold, deleting the relationship between the first executed preset command word among the different preset command words and the corresponding associated speech;
[0065] Combining the associated voices between the different preset command words to obtain an associated combined voice, and setting the associated combined voice as the associated voice of the preset command word to be executed later among the different preset command words;
[0066] The duration threshold can be set as needed. For example, the duration threshold can be set to 1 second, 2 seconds, or 3 seconds. In this step, the duration threshold is set to 3 seconds. For the overlapping voice c1, the relationship between the preset command word executed first and the corresponding associated voice in the associated voice b1 and the associated voice b2 is deleted. That is, the association between the preset command word a1 and the associated voice b1 is deleted. The associated voice b1 and the associated voice b2 are voice-combined to obtain the associated combined voice d1 (02 minutes 05 seconds to 04 minutes 00 seconds), and the associated combined voice d1 is set as the associated voice of the associated voice b2.
[0067] In this step, if the voice duration of the overlapping voice is greater than the duration threshold, the accuracy of the associated voice determination is effectively improved by deleting the relationship between the preset command word executed first among different preset command words and the corresponding associated voice. That is, when the user executes the preset command word multiple times and the time interval between different preset command words is less than the preset interval, it is determined that the preset command word executed first is not what the user needs. Therefore, the relationship between the preset command word executed first among different preset command words and the corresponding associated voice is deleted, and the associated voices between different preset command words are voice-combined to obtain an associated combined voice, and the associated combined voice is set as the associated voice of the preset command word executed later among different preset command words, thereby effectively improving the accuracy of the corresponding relationship between the preset command word and the associated voice.
[0068] Furthermore, after obtaining the speech duration of the overlapping speech, the method further includes:
[0069] If the speech duration of the overlapping speech is less than or equal to the duration threshold, the command termination time of the first executed preset command word is determined as the time starting point, and the speech associated with the later executed preset command word is segmented according to the time starting point;
[0070] If there is a short overlap between different associated voices, in order to improve the accuracy of the associated voices, the command end time of the first executed preset command word is determined as the time starting point, and the associated voice of the later executed preset command word is segmented according to the time starting point;
[0071] For example, if the associated speech b1 is from 02 minutes and 05 seconds to 03 minutes and 05 seconds, and the associated speech b2 is from 03 minutes and 04 seconds to 04 minutes and 09 seconds, then the overlapping speech is from 03 minutes and 04 seconds to 03 minutes and 05 seconds, and the duration of the overlapping speech is 1 second, then 03 minutes and 05 seconds is determined as the starting time point to perform speech segmentation on the associated speech b2, so that the associated speech b2 after separation is from 03 minutes and 05 seconds to 04 minutes and 09 seconds.
[0072] Step S30: If the correlation test between any of the unrecognized command words and the preset command words passes, the unrecognized command word is set as a synonymous command word of the preset command word;
[0073] If the correlation test between the unrecognized command word and the preset command word is qualified, the unrecognized command word can be automatically set as a synonym of the preset command word, so that the voice command word can be automatically set based on user habits;
[0074] Optionally, in this step, if the correlation test between any unrecognized command word and the preset command word is qualified, a synonym setting prompt is performed for the unrecognized command word and the preset command word to prompt the user to set the unrecognized command word as a synonym of the preset command word. If a confirmation instruction is received from the user for the synonym setting prompt, the unrecognized command word is set as a synonym of the preset command word.
[0075] Step S40, if a voice instruction containing the synonymous command word is received, executing the command operation of the preset command word;
[0076] If a voice instruction containing a synonymous command word is received, a preset command word corresponding to the synonymous command word is searched, and the command operation is executed based on the searched preset command word.
[0077] Optionally, in this embodiment, after setting the unrecognized command word as a synonymous command word of the preset command word, the method further includes:
[0078] Obtaining the number of synonymous command words corresponding to the preset command word to obtain the number of synonymous commands;
[0079] If the number of the synonymous commands is greater than the number threshold, obtaining the command setting time of the preset command words corresponding to the synonymous command words respectively;
[0080] Performing command word screening processing on the synonymous command words according to the command setting time;
[0081] Among them, the quantity threshold can be set according to needs. For example, the quantity threshold can be set to 5, 10 or 15, etc. In this step, if the number of synonymous commands is greater than the quantity threshold, the command setting time of the preset command word corresponding to the synonymous command word is obtained respectively, and the priority of the corresponding synonymous command word is determined according to the command setting time. When the command setting time is later, the priority of the corresponding synonymous command word is higher. By deleting the synonymous command word with the lowest priority, the effect of command word screening is achieved.
[0082] In this embodiment, by querying the preset command words in the voice interaction data, the related voice in the voice interaction data can be effectively determined based on the command time of the preset command words. By performing a correlation test on the preset command words and the unrecognized command words in the related voice, it is determined whether there is a synonymous relationship between the unrecognized command words and the preset command words. If the correlation test between the unrecognized command words and the preset command words is qualified, the unrecognized command words can be automatically set as a synonymous command word of the preset command words, so that the voice command words can be automatically set based on user habits, without the user having to record and set the voice command words separately, which facilitates the user's operation and improves the user experience.
[0083] Example 2
[0084] See also Figure 2 , is a flow chart of a method for constructing a voice command word according to a second embodiment of the present invention. This embodiment further refines step S20 in the first embodiment, including the following steps:
[0085] Step S21, segmenting the associated speech to obtain segmented speech, and calculating the speech similarity between each segmented speech;
[0086] The associated speech is segmented according to a second preset duration to obtain segmented speech. The second preset duration can be set as required, and similarity matching is performed on each segmented speech respectively.
[0087] Step S22, determining the repeated speech in the associated speech according to the speech similarity, and determining whether the number of repetitions of the repeated speech in the associated speech is greater than a number threshold;
[0088] wherein, based on the speech similarity, the total speech similarity corresponding to each segmented speech is calculated respectively, and the segmented speech corresponding to the maximum total speech similarity is determined as the repeated speech;
[0089] In this step, if the speech similarity between any segmented speech and the repeated speech is greater than the preset similarity, the number of repetitions of the repeated speech is accumulated and calculated, and the cumulative value of the accumulation calculation is 1. The number of repetitions of the repeated speech in the initial stage is 0. The number threshold can be set according to needs. For example, the number threshold can be set to 2, 3, 4 or 8, etc.
[0090] Step S23: If the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, determining that the correlation test between the unrecognized command word in the repeated speech and the preset command word is qualified;
[0091] If the number of repetitions of the repeated speech in the associated speech exceeds a threshold, it is determined that the unrecognized command word in the repeated speech is the user's current usage habit, and the unrecognized command word in the repeated speech is synonymous with the preset command word in the user's usage habit;
[0092] For example, please refer to 3, the voice recognition device is a fan, and the preset voice command word is "swing the wind left and right". In the voice interaction data, the unrecognized command word in the repeated voice is determined to be "shake head left and right", and the number of repetitions of "shake head left and right" is 3 times. The number threshold in this embodiment is set to 2. Therefore, the unrecognized command word "shake head left and right" is set as a synonymous command word of the preset voice command word "swing the wind left and right". When the voice command of "shake head left and right" is received again, the command operation corresponding to "swing the wind left and right" is executed.
[0093] Optionally, in this step, if the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, the method further includes:
[0094] semantically matching the unrecognized command words in the repeated speech with the preset command words;
[0095] If the semantic similarity between the unrecognized command word and the preset command word is less than a similarity threshold, it is determined that the association detection between the unrecognized command word and the preset command word fails.
[0096] In this embodiment, based on the user's usage habits, synonymous command words can be automatically set, and the user does not need to set the recording of voice command words separately, which facilitates the user's operation of setting voice command words and improves the user's usage experience. By adopting a method that the user does not feel, the command words that the user is accustomed to saying are actively discovered and mined to achieve the purpose of personalized generalized voice command words.
[0097] Example 3
[0098] See also Figure 4 , is a schematic diagram of the structure of a voice command word construction system 100 provided in a third embodiment of the present invention, comprising: a command query module 10, a relevance detection module 11, a command word setting module 12, and a command execution module 13, wherein:
[0099] The command query module 10 is used to obtain voice interaction data and query preset command words in the voice interaction data.
[0100] The relevance detection module 11 is configured to determine the associated speech in the speech interaction data according to the command time of the preset command word, and perform relevance detection on the preset command word and the unrecognized command word in the associated speech.
[0101] Optionally, the relevance detection module 11 is further configured to: segment the related speech to obtain segmented speech, and calculate the speech similarity between each segmented speech;
[0102] determining repeated speech in the associated speech according to the speech similarity, and determining whether the number of repetitions of the repeated speech in the associated speech is greater than a number threshold;
[0103] If the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, it is determined that the association detection between the unrecognized command word in the repeated speech and the preset command word is qualified.
[0104] Furthermore, the relevance detection module 11 is further configured to: perform semantic matching between the unrecognized command words in the repeated speech and the preset command words;
[0105] If the semantic similarity between the unrecognized command word and the preset command word is less than a similarity threshold, it is determined that the association detection between the unrecognized command word and the preset command word fails.
[0106] Preferably, the relevance detection module 11 is further configured to: acquire voice data within a first preset time length with the command time of the preset command word as the time end point in the voice interaction data, to obtain the associated voice.
[0107] Furthermore, the relevance detection module 11 is further configured to: determine whether there is speech overlap in the associated speech between different preset command words;
[0108] If there is speech overlap between the associated speech of the different preset command words, obtaining the speech duration of the overlapping speech;
[0109] If the duration of the overlapping speech is greater than the duration threshold, deleting the relationship between the first executed preset command word among the different preset command words and the corresponding associated speech;
[0110] The associated voices between the different preset command words are voice-combined to obtain an associated combined voice, and the associated combined voice is set as the associated voice of the preset command word to be executed later among the different preset command words.
[0111] Furthermore, the association detection module 11 is also used to: if the speech duration of the overlapping speech is less than or equal to the duration threshold, the command termination time of the preset command word executed first is determined as the time starting point, and the associated speech of the preset command word executed later is voice segmented according to the time starting point.
[0112] The command word setting module 12 is configured to set any unrecognized command word as a synonymous command word of the preset command word if the correlation detection between the unrecognized command word and the preset command word is qualified.
[0113] Optionally, the command word setting module 12 is further configured to: obtain the number of synonymous command words corresponding to the preset command word to obtain the number of synonymous commands;
[0114] If the number of the synonymous commands is greater than the number threshold, obtaining the command setting time of the preset command words corresponding to the synonymous command words respectively;
[0115] The synonymous command words are subjected to command word screening processing according to the command setting time.
[0116] The command execution module 13 is configured to execute the command operation of the preset command word if a voice instruction containing the synonymous command word is received.
[0117] In this embodiment, by querying the preset command words in the voice interaction data, the related voice in the voice interaction data can be effectively determined based on the command time of the preset command words. By performing a correlation test on the preset command words and the unrecognized command words in the related voice, it is determined whether there is a synonymous relationship between the unrecognized command words and the preset command words. If the correlation test between the unrecognized command words and the preset command words is qualified, the unrecognized command words can be automatically set as a synonymous command word of the preset command words, so that the voice command words can be automatically set based on the user's habits, without the user having to record and set the voice command words separately, which facilitates the user's operation and improves the user experience.
[0118] Example 4
[0119] Figure 5 This is a structural block diagram of a terminal device 2 provided in the fourth embodiment of the present application. Figure 5 As shown, the terminal device 2 of this embodiment includes: a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program for the voice command word construction method. When the processor 20 executes the computer program 22, the steps of each embodiment of the voice command word construction method described above are implemented.
[0120] Exemplarily, the computer program 22 may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 20 to implement the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 22 in the terminal device 2. The terminal device may include, but is not limited to, a processor 20 and a memory 21.
[0121] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0122] The memory 21 may be an internal storage unit of the terminal device 2, such as a hard disk or memory of the terminal device 2. The memory 21 may also be an external storage device of the terminal device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 2. Furthermore, the memory 21 may include both an internal storage unit of the terminal device 2 and an external storage device. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 may also be used to temporarily store data that has been output or is about to be output.
[0123] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0124] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunications signals.
[0125] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for constructing a voice command word, characterized in that: The method comprises: Acquire voice interaction data, and query the preset command words in the voice interaction data; Acquire voice data within a first preset duration in the voice interaction data, taking the command time of the preset command word as the time end point, obtain associated voice, and perform correlation detection on the preset command word and the unrecognized command word in the associated voice; If the correlation test between any of the unrecognized command words and the preset command words passes, setting the unrecognized command word as a synonymous command word of the preset command word; If a voice instruction containing the synonymous command word is received, the command operation of the preset command word is executed.
2. The method for constructing a voice command word according to claim 1, wherein: The detecting of the correlation between the preset command word and the unrecognized command word in the associated speech includes: Segmenting the associated speech to obtain segmented speech, and calculating the speech similarity between the segmented speech; determining repeated speech in the associated speech according to the speech similarity, and determining whether the number of repetitions of the repeated speech in the associated speech is greater than a number threshold; If the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, it is determined that the association detection between the unrecognized command word in the repeated speech and the preset command word is qualified.
3. The method for constructing a voice command word according to claim 2, wherein: If the number of repetitions of the repeated speech in the associated speech is greater than the number threshold, the method further includes: semantically matching the unrecognized command words in the repeated speech with the preset command words; If the semantic similarity between the unrecognized command word and the preset command word is less than a similarity threshold, it is determined that the association detection between the unrecognized command word and the preset command word fails.
4. The method for constructing a voice command word according to claim 1, wherein: After acquiring the voice data within the first preset time period and obtaining the associated voice, the method further includes: Determine whether there is speech overlap between the associated speech of different preset command words; If there is speech overlap between the associated speech of the different preset command words, obtaining the speech duration of the overlapping speech; If the duration of the overlapping speech is greater than the duration threshold, deleting the relationship between the first executed preset command word among the different preset command words and the corresponding associated speech; The associated voices between the different preset command words are voice-combined to obtain an associated combined voice, and the associated combined voice is set as the associated voice of the preset command word to be executed later among the different preset command words.
5. The method for constructing a voice command word according to claim 1, wherein: After obtaining the speech duration of the overlapping speech, the method further includes: If the speech duration of the overlapping speech is less than or equal to the duration threshold, the command termination time of the preset command word executed first is determined as the time starting point, and the associated speech of the preset command word executed later is speech segmented according to the time starting point.
6. The method for constructing a voice command word according to claim 1, wherein: After setting the unrecognized command word as a synonymous command word of the preset command word, the method further includes: Obtaining the number of synonymous command words corresponding to the preset command word to obtain the number of synonymous commands; If the number of the synonymous commands is greater than the number threshold, obtaining the command setting time of the preset command words corresponding to the synonymous command words respectively; The synonymous command words are subjected to command word screening processing according to the command setting time.
7. A system for constructing voice command words, characterized in that: The system comprises: A command query module, configured to obtain voice interaction data and query preset command words in the voice interaction data; a correlation detection module, configured to obtain voice data within a first preset duration from the voice interaction data, starting with the command time of the preset command word as a time end point, obtain associated voices, and perform correlation detection between the preset command word and unrecognized command words in the associated voices; a command word setting module, configured to set any unrecognized command word as a synonymous command word of the preset command word if the association detection between the unrecognized command word and the preset command word passes; The command execution module is configured to execute the command operation of the preset command word if a voice instruction containing the synonymous command word is received.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Intelligent air conditioning system and air conditioner
CN108731183A
Speech equipment and self-learning speech recognition method
CN109671434A