Voice interaction method, electronic device and storage medium

By matching the characteristic information of the voice clip and the user-specified voice command information, the problem of low recognition accuracy of dialect or non-standard languages ​​in the prior art is solved, the success rate of voice interaction and device application scenarios are improved, and different users and environments are adapted to .

CN113838457BActive Publication Date: 2024-11-26ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010586746.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2024-11-26
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

Existing speech recognition technology has low recognition accuracy when processing dialects or non-standard languages, resulting in the failure of voice interaction between users and devices, affecting the user experience.

Method used

By obtaining the characteristic information of the voice clips matches the pre-stored voice command information, specify the user-specific interactive voice clips, and input them into the preset voice recognition model for recognition, and perform matching interactive operations.

Benefits of technology

It improves the success rate of voice interaction, adapts to different user language habits and environments, expands the application scenarios of the device, and avoids the need to retrain the speech recognition model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113838457B_ABST
    Figure CN113838457B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention relate to the field of communications, and disclose a method, electronic device, and storage medium for voice interaction. The method for voice interaction in the present invention includes: obtaining feature information of a voice segment based on an acquired voice segment; matching the feature information with pre-stored voice command information to obtain a matching result, wherein the voice command information is determined based on an interactive voice segment specified by a user; based on the matching result, inputting the voice segment into a preset voice recognition model, obtaining a recognition result, and performing an interactive operation indicated by the recognition result. The voice interaction method in this embodiment can improve the success rate of voice interaction and increase the application scenarios for using wake-up devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and in particular to a voice interaction method, electronic equipment and storage medium. Background Art

[0002] Speech recognition technology is widely used in various smart devices, such as smart speakers, car systems, smart kitchens, and mobile assistants, to achieve voice interaction with smart devices. At present, a model trained by deep learning is used to obtain the interactive operation information indicated by the voice. The process of voice interaction between the user and the device is as follows: the device collects the user's voice audio data, pre-processes the voice audio data, divides the frame and performs window processing to obtain a voice segment, inputs the voice segment into the model trained by deep learning, and obtains the information of the interactive operation indicated by the user's voice based on the output result. The device performs the interactive operation based on the interactive operation information obtained.

[0003] However, in actual applications, due to the complexity of the application scenarios, voice is often not recognized, resulting in failure of voice interaction between people and devices. For example, the current training corpus for deep learning is standard Mandarin. If the user uses dialects or other national languages, the trained model cannot accurately recognize the voice, resulting in failure of interaction between the user and the device, affecting the user experience. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a voice interaction method, an electronic device and a storage medium to improve the success rate of voice interaction and increase the use scenarios of voice interaction.

[0005] To solve the above technical problems, an embodiment of the present invention provides a method for voice interaction, comprising: obtaining feature information of a voice segment based on an acquired voice segment; matching the feature information with pre-stored voice command information to obtain a matching result, wherein the voice command information is determined based on an interactive voice segment specified by a user; based on the matching result, inputting the voice segment into a preset voice recognition model to obtain a recognition result, and executing an interactive operation indicated by the recognition result.

[0006] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned voice interaction method.

[0007] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned voice interaction method when executed by a processor.

[0008] Compared with the prior art, the embodiment of the present invention matches the feature information of a voice segment with pre-stored voice command information, inputs the voice segment into a preset voice recognition model according to the matching result, obtains the recognition result, and executes the interactive operation indicated by the matched voice command information; since different users specify different interactive voice segments, the user can specify the voice segment that matches his or her own language as the interactive voice segment, for example, the user can specify the interactive voice segment of the dialect version or the interactive voice segment of other foreign language versions, and determines the voice command information according to the specified interactive voice segment, so that the voice command information can be adapted to the user's language habits, thereby improving the success rate of voice interaction between the user and the device; and since the voice command information can be determined according to the interactive voice segment specified by the user, in different environments, the user can specify the corresponding interactive voice segment according to the needs of the environment without redetermining the voice recognition model, thereby expanding the application scenarios of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0010] Figure 1 is a flow chart of a method for voice interaction in a first embodiment of the present invention;

[0011] Figure 2 is a flow chart of a method for voice interaction in a second embodiment of the present invention;

[0012] Figure 3 yes Figure 2 A schematic diagram of a specific implementation of determining voice command information in the voice interaction method provided by the second embodiment of the present invention;

[0013] Figure 4 is a schematic diagram of a specific implementation of obtaining a hash value in the voice interaction method provided in the third embodiment of the present invention;

[0014] Figure 5 is a schematic diagram of a specific implementation of obtaining a matching result in the voice interaction method provided in the third embodiment of the present invention;

[0015] Figure 6 is a block diagram of the structure of an electronic device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0016] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.

[0017] The inventors have found that the accuracy of voice interaction between users and devices is usually based on the device's recognition results of the user's voice. The current recognition results of voice use a voice recognition model, and the training process of the voice recognition model is roughly as follows: collect a large amount of corpus and perform deep learning training on the collected corpus. The richer the corpus, the more accurate the voice recognition results obtained. However, different scenarios have different corpora, resulting in different voice recognition models in different environments. This causes the recognition accuracy of the voice recognition model used in scenario A to decrease in other scenarios, which in turn causes the device to be unable to interact with the user accurately. For example, if the interactive operation is a wake-up operation, the corpus of the voice recognition model is usually standard Mandarin. If the user uses a dialect or the voice of another country, the voice recognition model will not be able to accurately recognize the user's voice, resulting in the device being unable to wake up, affecting the user's experience.

[0018] The first embodiment of the present invention relates to a method for voice interaction, which can be applied to electronic devices with voice collection functions, such as smart speakers, desk lamps, refrigerators, televisions, and other devices. The process of the voice interaction method is as follows: Figure 1 As shown:

[0019] Step 101: Acquire feature information of the voice segment according to the acquired voice segment.

[0020] Step 102: Match the feature information with pre-stored voice command information to obtain a matching result, where the voice command information is determined based on an interactive voice segment specified by the user.

[0021] Step 103: According to the matching result, the voice segment is input into a preset voice recognition model, the recognition result is obtained, and the interactive operation indicated by the recognition result is performed.

[0022] Compared with the prior art, the embodiment of the present invention matches the feature information of a voice segment with pre-stored voice command information, inputs the voice segment into a preset voice recognition model according to the matching result, obtains the recognition result, and executes the interactive operation indicated by the matched voice command information; since different users specify different interactive voice segments, the user can specify the voice segment that matches his or her own language as the interactive voice segment, for example, the user can specify the interactive voice segment of the dialect version or the interactive voice segment of other foreign language versions, and determines the voice command information according to the specified interactive voice segment, so that the voice command information can be adapted to the user's language habits, thereby improving the success rate of voice interaction between the user and the device; and since the voice command information can be determined according to the interactive voice segment specified by the user, in different environments, the user can specify the corresponding interactive voice segment according to the needs of the environment without redetermining the voice recognition model, thereby expanding the application scenarios of the device.

[0023] The second embodiment of the present invention relates to a method for voice interaction, the process of which is as follows: Figure 2 shown.

[0024] Step 201: Acquire feature information of the voice segment according to the acquired voice segment.

[0025] Specifically, the electronic device can collect the user's voice and audio data in real time; it can also start collecting voice and audio data when monitoring the user's voice and audio data. In order to facilitate the subsequent analysis of the obtained voice and audio data, the collected voice and audio data can be preprocessed first. The preprocessing can include: echo cancellation, de-reverberation, beamforming and other processing operations to improve the sound quality; among them, echo cancellation refers to estimating the size of the echo signal through an adaptive method, and subtracting this estimated value from the received signal to cancel the echo; beamforming refers to a method of processing the output of each element of a multi-element array arranged in a certain geometric shape to form spatial directivity. The collection of voice and audio data can be collected by a microphone, such as a microphone array.

[0026] The preprocessing can eliminate the noise in the speech audio data and improve the sound quality of the speech audio data. After the speech audio data is preprocessed, the speech audio data can be framed and windowed to divide the speech audio data into at least two speech segments. The segmentation can be performed according to a preset segment length, for example, the preset segment length is 1 second to 3 seconds.

[0027] In one example, at least two feature data are extracted from a speech segment; and the speech segment and the feature data are used as feature information of the speech segment.

[0028] Specifically, time-frequency analysis is performed on each speech segment, and the following processing is performed: feature data of at least two dimensions in the speech segment are extracted, and the dimensions may include time domain data, frequency domain data or spectrum data in the speech segment; the speech segment and the extracted feature data may be used as feature information, or only the extracted feature data may be used as feature information.

[0029] In one example, the voice instruction information may be predetermined and the determined voice specific information may be stored. The process of determining the voice instruction information may be as follows: Figure 3 The sub-steps shown.

[0030] Sub-step S11: Acquire at least two interactive voice segments specified by the user.

[0031] Specifically, the collection of interactive voice audio data specified by the user can be collected at a preset time point, or after receiving a trigger instruction from the user, the electronic device prompts to start collecting, and the electronic device collects the interactive voice audio data specified by the user; after detecting that the interactive voice audio data is successfully collected, the collection is ended. Among them, each interactive voice audio data is set with a corresponding interactive operation, and the trigger instruction can be obtained through a button set on the electronic device. Taking the wake-up word for setting the wake-up operation of the electronic device as an example, the user presses the wake-up button for a long time, the electronic device receives the trigger instruction, and the electronic device emits a prompt tone of "Please say the wake-up word". After releasing the wake-up button, the user starts to say the wake-up word. The user can say the wake-up word in dialect or in the language of other countries. It also supports the user to say the wake-up word in the case of stuttering. After reaching the preset time, it is determined that the interactive voice audio data is collected successfully, and the electronic device can emit a prompt tone of "The wake-up word is set successfully" to end the collection.

[0032] The interactive voice audio data is preprocessed, and the preprocessing may include: echo cancellation, dereverberation, and beamforming of the voice audio data. The sound quality of the interactive voice audio data can be improved by preprocessing. After the interactive voice audio data is preprocessed, the interactive voice audio data may be framed and windowed to divide the interactive voice audio data into at least two interactive voice segments. The segmentation may be performed according to a preset segment length, for example, the preset segment length is 1 second to 3 seconds. It should be noted that the preset segment length of the interactive voice audio data may be equal to the preset segment length of the voice audio data.

[0033] Sub-step S12: extracting the interaction feature data of each interaction voice segment.

[0034] Time-frequency analysis is performed on each interactive speech segment, and the following processing is performed: interactive feature data of at least two dimensions in the interactive speech segment is extracted, and the dimensions may include time domain data, frequency domain data or spectrum data in the interactive speech segment; the dimensional features extracted from the interactive speech segment are the same as the dimensional features extracted from the speech segment, that is, if time domain data and frequency domain data are extracted from the interactive speech segment, then time domain data and frequency domain data are also extracted from the speech segment.

[0035] Sub-step S13: Acquire voice command information according to each interaction feature data.

[0036] In one example, according to each interactive feature data, at least two target hash values ​​corresponding to the interactive feature data are obtained; according to the at least two target hash values ​​and the interactive voice segment, voice instruction information is obtained.

[0037] Specifically, each interactive feature data may be hashed to obtain a hash value of each interactive feature data, and the obtained hash value of the interactive feature data may be used as the target hash value of the interactive feature data. The serial number of each interactive voice segment may be obtained, and a corresponding relationship may be established between the serial number and the target hash value, wherein each serial number is identification information of each interactive voice segment; the corresponding interactive voice segment may be searched according to the serial number, and the target hash value, each interactive voice segment, and the corresponding relationship between each voice segment and each target hash value may be used as voice command information. The voice command information includes interactive voice feature data, which facilitates the accuracy of subsequent matching with the feature information of the voice segment.

[0038] The determined voice instruction information can be stored in a database, and a corresponding relationship between the voice instruction information and the interactive operation can be established so that the voice instruction information can indicate the interactive operation. Each interactive operation can correspond to one voice instruction information or multiple voice instruction information.

[0039] The number of stored voice command information may be at least two to meet different interaction needs of users, such as voice command information corresponding to a power-on operation, voice command information corresponding to a wake-up operation, and voice command information corresponding to a play operation.

[0040] It is worth mentioning that since the hash value obtained after hash processing is an output of fixed length, the matching speed of the hash value is fast and the matching accuracy is high, which can improve the subsequent matching speed and accuracy of the voice command information; in addition, the voice command information also includes interactive voice segments, and the correspondence between the target hash value and the interactive voice segment can be obtained, which facilitates the subsequent matching with the feature information of the voice segment.

[0041] Step 202: Match the feature information with pre-stored voice command information to obtain a matching result.

[0042] There are many ways to match the feature information of a voice segment with the stored voice command information. In one example, the hash value of the feature information can be compared with each target hash value respectively; if there is a target hash value whose similarity with the hash value of the feature information is greater than a preset first threshold, the matching result is a successful match; otherwise, the matching result is a failed match.

[0043] Specifically, the feature information of each voice segment can be matched, and the feature data in the feature information can be hashed to obtain a hash value of the feature information, and the hash value can be used as the hash value of the voice segment. The hash value of the feature information can be compared with each target hash value respectively. Since the hash value is an output of fixed length, the similarity between the hash value of the voice segment and the target hash value can be calculated.

[0044] It is determined whether the similarity is greater than a preset first threshold value. The first threshold value can be set as needed. In this example, the first threshold value can be set to be greater than 50% to improve the accuracy of the match. For example, the first threshold value is 80%. If the similarity is greater than the first threshold value, the matching result indicates that the feature information is successfully matched. If the similarity is less than or equal to the first threshold value, the matching result indicates that the feature information fails to match.

[0045] Step 203: Determine whether the matching result indicates that the feature information is successfully matched. If so, execute step 204; otherwise, execute step 205.

[0046] It is understandable that if there is only one voice segment, if the matching result indicates that the feature information matches successfully, step 204 is executed, and if the matching result indicates that the feature information matches failed, step 205 is executed. If there are multiple voice segments, if any feature information matching result indicates that the feature information matches successfully, step 204 is executed, and if each matching result indicates that the respective feature information matches failed, step 205 can be executed.

[0047] Step 204: If the matching result indicates that the feature information is successfully matched, the interactive operation indicated by the matching voice instruction information is executed.

[0048] Specifically, if voice instruction information of different interactive operations is stored, the interactive operation indicated by the matching voice instruction information is executed. For example, the interactive operation indicated by voice instruction information A is a wake-up operation, and the interactive operation indicated by voice instruction information B is to play news. If the matching voice instruction information is voice instruction information A, the wake-up operation will be executed.

[0049] Step 205: Input the speech segment into a preset speech recognition model, obtain the recognition result, and perform the interactive operation indicated by the recognition result.

[0050] Specifically, the speech recognition model is pre-trained, and the training process of the speech recognition model can be: collecting corpora belonging to interactive operations and corpora belonging to non-interactive operations in various environments; preprocessing the collected corpora to obtain various speech sample segments, marking the speech sample segments belonging to interactive operations, using various speech segments as input samples, and each speech sample segment marked with interactive operations as output samples, training is performed based on the input samples and output samples to obtain the speech recognition model, and the model used for training can be a deep neural network model, for example, a fully connected neural network, a convolutional neural network, a convolutional recurrent neural network, a recurrent neural network and an attention mechanism, etc.

[0051] The working process of the speech recognition model is introduced below: a speech segment is input into the speech recognition model, and the speech recognition model outputs the output result, which is the confidence of the interactive operation to which the speech segment belongs. Then, based on the output result, the interactive operation to which the speech segment belongs is determined, and the interactive operation indicated by the recognition result can be executed.

[0052] It can be understood that in practical applications, the number of voice segments is at least 2, then each voice segment is input into the voice recognition model to obtain the output result of each voice segment. In order to improve the accuracy of the recognition result, it can be detected whether the confidence of the output results of K voice segments exceeds the confidence threshold, K is an integer greater than 1, and if so, the interactive operation to which the voice segment belongs is determined, and the corresponding interactive operation is performed. For example, 5 voice segments are input, and the output results of each voice segment are: wake-up operation: 80%; wake-up operation 90%; wake-up operation 60%; play operation 30%; no operation: 10%; the confidence threshold is 50%, and K is 3; it can be seen that there are 3 output results with confidence greater than 90%, and the recognition result is determined to be a wake-up operation, and the wake-up operation is performed.

[0053] It should be noted that steps 203 to 205 in this embodiment are detailed introductions to step 103 in the first embodiment.

[0054] The third embodiment of the present invention relates to a method of voice interaction. The third embodiment is substantially the same as the second embodiment. This embodiment introduces another method of matching feature information with pre-stored voice command information to obtain matching results. The process of obtaining matching results will be specifically described below.

[0055] In this example, it is also necessary to pre-store voice command information. The process of determining the voice command information is roughly the same as the process in the first embodiment, including: obtaining target hash values ​​corresponding to at least two interactive feature data based on each interactive feature data; obtaining voice command information based on at least two target hash values ​​and interactive voice segments.

[0056] According to each interactive feature data, the process of obtaining the target hash value corresponding to at least two interactive feature data is specifically implemented as follows: Figure 4 shown.

[0057] Sub-step S21: Obtain the serial number of the interactive voice segment to which each interactive feature data belongs.

[0058] Since there are multiple interactive voice segments, each interactive voice segment has a unique serial number, which is convenient for querying the interactive voice segment. The serial number can be obtained when the interactive voice segment is divided. The interactive feature data of each interactive voice segment is extracted, and the serial number of the interactive voice segment is obtained, that is, each interactive feature data has a unique corresponding serial number, and the serial number can query the indicated interactive voice segment.

[0059] Sub-step S22: Perform hash processing on each interactive feature data and the corresponding serial number to obtain at least two target hash values.

[0060] Specifically, each interactive feature data and the corresponding serial number are hashed to obtain each hash value. For example, the interactive feature data of interactive voice segment A is data1; the serial number of interactive voice segment A is num1, and data1 and num1 are hashed: hash(data1+num1) to obtain a hash value.

[0061] Sub-step S23: Determine whether the differences between N adjacent target hash values ​​are all within a preset range, where N is an integer greater than 1. If there are differences that are not within the preset range, execute sub-step S24; if there are differences that are all within the preset range, execute step S25.

[0062] Specifically, N can be set according to actual needs. If there are only two target hash values, then N is 2. In this example, taking N equal to 4 as an example, the difference between the four adjacent hash values ​​is obtained, and the four adjacent hash values ​​are hash1, hash2, hash3 and hash4 respectively. The difference between hash1 and hash2 D1 = hash1-hash2; the difference between hash2 and hash3 D2 = hash2-hash3; the difference between hash3 and hash4 D3 = hash3-hash4. The preset range can be set to [a1, b1]. Each difference is detected to be within the preset range. If each difference is within the preset range, step S25 can be executed to maintain each stored target hash value. Any one of the four target hash values ​​can also be selected, and the remaining three target hash values ​​can be deleted, thereby reducing the redundancy of the target hash values. If there is any difference that is not within the preset range, sub-step S25 is executed.

[0063] Sub-step S24: deleting the N target hash values ​​and obtaining return indication information, where the return indication information is used to instruct to re-acquire at least two interactive voice segments specified by the user.

[0064] Specifically, if there is any difference that is not within the preset range, it indicates that the current interactive voice segment is inaccurate and there is a possibility of user error operation; the returned indication information is obtained to indicate to re-acquire at least two voice segments specified by the user. That is, the interactive voice audio data is collected again, and the electronic device can also emit a prompt sound for re-collection.

[0065] Sub-step S25: Maintain the stored N target hash values.

[0066] It should be noted that sub-step S25 may also delete any three target hash values ​​among the N target hash values, thereby reducing the redundancy of the target hash values.

[0067] In one example, after determining the hash value set, voice instruction information can be obtained according to the target hash value and each interactive voice segment. Each target hash value and each interactive voice segment can be used as voice instruction information and stored.

[0068] The following describes the process of obtaining matching results. Figure 5 shown.

[0069] Step S31: Compare the hash value of the feature information with each target hash value respectively.

[0070] Step S32: Determine whether there is a target hash value whose similarity with the hash value of the feature information is greater than a preset first threshold. If so, execute step S33; otherwise, execute step S37.

[0071] Specifically, the feature information of each voice segment can be matched, and the feature data in the feature information can be hashed to obtain a hash value of the feature information, and the hash value can be used as the hash value of the voice segment. The hash value of the feature information can be compared with each target hash value respectively. Since the hash value is an output of fixed length, the similarity between the hash value of the voice segment and the target hash value can be calculated.

[0072] It is determined whether the similarity is greater than a preset first threshold value. The first threshold value can be set as needed. In this example, the first threshold value can be set to be greater than 40% to improve the accuracy of the match. For example, the first threshold value is 40%. If the similarity is greater than the first threshold value, step S33 is executed; if the similarity is less than or equal to the first threshold value, step S37 is executed to determine that the matching result indicates that the feature information matching fails.

[0073] Step S33: searching for a corresponding interactive voice segment according to the determined target hash value.

[0074] In this example, the target hash value is obtained by hashing the interaction feature data and the corresponding serial number. Therefore, the serial number can be obtained according to the matching target hash value, and then the corresponding interaction voice segment can be queried according to the serial number. For example, hash1=hash(data1+num1), data1 is the interaction feature data, num1 is the serial number of the interaction voice segment to which the interaction feature data belongs, and the serial number num1 can be obtained according to hash1, so the interaction voice segment can be found according to the serial number.

[0075] Step S34: Obtain the correlation between the found interactive voice segment and the voice segment.

[0076] Specifically, in order to improve the accuracy, a cross-correlation function may be used to calculate the correlation between the current voice segment and the found interactive voice segment.

[0077] Step S35: Determine whether the obtained correlation is greater than a preset second threshold, if so, execute step S36, otherwise, execute step S37.

[0078] The second threshold can be set according to actual application, for example, can be set to 80%; if it is determined that the correlation is greater than the second threshold, step S6 is executed, otherwise, step S37 is executed.

[0079] Step S36: The matching result indicates that the feature information is matched successfully.

[0080] Step S37: The matching result indicates that the feature information matching fails.

[0081] In this example, after the similarity of the hash values ​​is determined, the relevance between the voice segment and the interactive voice segment is determined, and the relevance is judged. The matching process can improve the accuracy of the matching through two comparisons.

[0082] In addition, those skilled in the art can understand that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this patent.

[0083] A fourth embodiment of the present invention relates to an electronic device, such as Figure 6 As shown, the electronic device includes: at least one processor 301; and a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can perform the above-mentioned voice interaction method.

[0084] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0085] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0086] A fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements an embodiment of the above-mentioned voice interaction method when the computer program is executed by a processor.

[0087] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0088] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A voice interaction method, characterized in that: include: Acquire feature information of the voice segment according to the acquired voice segment; Matching the feature information with pre-stored voice command information to obtain a matching result, wherein the voice command information is determined based on an interactive voice segment specified by a user; If the matching result is successful, executing the interactive operation indicated by the matching voice instruction information; In the case where the matching result is a match failure, inputting the voice segment into a preset voice recognition model, obtaining a recognition result, and performing an interactive operation indicated by the recognition result; Before matching the feature information with the pre-stored voice command information to obtain the matching result, the method further includes: Obtain at least two interactive voice clips specified by the user; Extracting interactive feature data of each interactive voice segment; According to each of the interaction feature data, obtaining target hash values ​​corresponding to at least two of the interaction feature data; Determine whether the differences between N adjacent target hash values ​​are all within a preset range; If there is a difference that is not within the preset range, the N target hash values ​​are deleted, and return indication information is obtained, where the return indication information is used to indicate to re-acquire at least two interactive voice segments specified by the user, where N is an integer greater than 1; or, If there are differences that are all within the preset range, the stored N target hash values ​​are maintained; The voice instruction information is obtained according to at least two of the target hash values ​​and the interactive voice segment.

2. The method of voice interaction according to claim 1, characterized in that: The step of obtaining target hash values ​​corresponding to at least two of the interaction feature data according to each of the interaction feature data includes: Obtaining a serial number of an interactive voice segment to which each interactive feature data belongs; Hash processing is performed on each of the interactive feature data and the corresponding serial number to obtain at least two target hash values.

3. The method for voice interaction according to claim 1 or 2, characterized in that: The matching of the feature information with the pre-stored voice command information to obtain a matching result includes: Compare the hash value of the characteristic information with each target hash value respectively; If there is a target hash value whose similarity with the hash value of the feature information is greater than a preset first threshold, the matching result is a successful match; otherwise, the matching result is a failed match.

4. The method for voice interaction according to claim 1 or 2, characterized in that: The matching of the feature information with the pre-stored voice command information to obtain a matching result includes: Compare the hash value of the characteristic information with each of the target hash values ​​respectively; If there is a target hash value whose similarity with the hash value of the feature information is greater than a preset first threshold, searching for the corresponding interactive voice segment according to the determined target hash value; Obtaining the correlation between the found interactive voice segment and the voice segment; If it is determined that the correlation is greater than a preset second threshold, the matching result is a successful match; Otherwise, the matching result is a matching failure.

5. The method for voice interaction according to claim 1 or 2, characterized in that: The step of acquiring feature information of the voice segment according to the acquired voice segment includes: Extracting at least two feature data from the speech segment; The voice segment and the feature data are used as feature information of the voice segment.

6. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the voice interaction method as described in any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for voice interaction according to any one of claims 1 to 5 is implemented.