A voice processing method, device, electronic device and storage medium

Through the method of identifying and correcting speech words, the vocabulary to be corrected and the vocabulary after error correction are constructed, which solves the problem of low speech recognition accuracy in the existing technology and improves the user experience and the accuracy of speech recognition.

CN114242047BActive Publication Date: 2024-10-29PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202111535535.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2024-10-29
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

Existing speech recognition technology has low speech recognition accuracy and poor user experience due to speech recognition model recognition errors. Especially in fields such as intelligent customer service robots, users need to repeatedly enter speech to obtain the correct response.

Method used

By acquiring two pieces of the user's speech, the words in them are identified, and when the word is determined to be a confusing word, a vocabulary to be corrected is built, and the corresponding relationship between the words is recorded and marked. The corrected vocabulary is used for query and response, improving speech recognition. accuracy.

Benefits of technology

It improves the accuracy of speech recognition, reduces the possibility of users repeatedly typing speech, improves user experience, and adapts to the impact of user location changes on speech recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114242047B_ABST
    Figure CN114242047B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a speech processing method, device, electronic device and storage medium, which are applied to the field of artificial intelligence. The method includes: obtaining a first speech and a second speech respectively, and identifying a first word of the first speech to respond to the first speech and / or identifying a second word of the second speech to respond to the second speech; when determining that the first word is a confusing word of the second word, constructing a word library to be corrected including the first word; recording the target correspondence between the first word and the second word and marking the correct word corresponding to the target correspondence in the word library after correction; obtaining the target speech to identify the target word included in the target speech; when determining that the word library to be corrected includes the target word, querying the correct word corresponding to the target word according to the word library after correction to respond to the target speech, this process can improve the accuracy of speech recognition. The present application relates to blockchain technology, such as obtaining speech from blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech semantics technology, and in particular to a speech processing method, device, electronic device and storage medium. Background Art

[0002] Thanks to the mature application of artificial intelligence technology, robots, such as customer service robots, have become an indispensable part of the customer service field, especially online intelligent customer service robots, which greatly save manpower and improve customer service efficiency. Intelligent customer service robots currently cover multiple fields such as finance, insurance, automobiles, real estate, e-commerce, and government. Their main functions include automatic learning of knowledge bases, semantic recognition, user intent recognition, and simulated dialogue. Robots mainly use speech recognition models to convert speech into text and respond to text, such as returning answers based on questions, chatting, executing specified instructions, etc. However, due to the recognition errors of the speech recognition model, the speech recognition accuracy of this method is not high, and the user experience is poor. Summary of the invention

[0003] The embodiments of the present application provide a speech processing method, device, electronic device and storage medium, which can improve speech recognition accuracy and enhance user experience.

[0004] In a first aspect, an embodiment of the present application provides a speech processing method, comprising:

[0005] Acquire a first voice and a second voice of a target user respectively, and recognize a first word included in the first voice and a second word included in the second voice;

[0006] responding to the first speech according to the first word and / or responding to the second speech according to the second word;

[0007] When it is determined that the first word is a confusing word of the second word, constructing a word library to be corrected including the first word;

[0008] Recording the target correspondence between the first word and the second word in the word library after error correction, and marking the correct word corresponding to the target correspondence in the word library after error correction;

[0009] Acquire the target speech of the target user, and identify the target words included in the target speech;

[0010] When it is determined that the to-be-corrected word library includes the target word, querying the correct word corresponding to the target word according to the correspondence between the words recorded in the corrected word library and the correct word corresponding to the correspondence between the words marked in the corrected word library;

[0011] Respond to the target speech according to the correct word corresponding to the target word.

[0012] In a second aspect, an embodiment of the present application provides a speech processing device, including:

[0013] An acquisition module, used to respectively acquire a first voice and a second voice of a target user;

[0014] A recognition module, configured to recognize a first word included in the first speech and a second word included in the second speech;

[0015] a processing module, configured to respond to the first speech according to the first word and / or respond to the second speech according to the second word;

[0016] The processing module is further configured to, when determining that the first word is a confused word of the second word, construct a to-be-corrected word library including the first word, record a target correspondence between the first word and the second word in the corrected word library, and mark a correct word corresponding to the target correspondence in the corrected word library;

[0017] The acquisition module is further used to acquire the target voice of the target user;

[0018] The recognition module is further used to recognize the target words included in the target speech;

[0019] The processing module is also used to, when it is determined that the to-be-corrected word library includes the target word, query the correct word corresponding to the target word based on the correspondence between the words recorded in the word library after correction and the correct word corresponding to the correspondence between the words marked in the word library after correction, and respond to the target speech based on the correct word corresponding to the target word.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store computer program instructions, and the processor is configured to execute the program instructions to implement the method described in the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, they are used to execute the method described in the first aspect.

[0022] In summary, the electronic device can obtain two segments of speech of the target user and respond to at least one of the speech segments; when it is determined that the first word included in one segment of speech is a confusing word of the second word included in the other segment of speech, the electronic device can use the first word to update the vocabulary to be corrected, and record the target correspondence between the first word and the second word in the vocabulary after correction and mark the correct word corresponding to the target correspondence; after the electronic device obtains a new segment of speech, it can identify the target word included in the segment of speech, and when it is determined that the vocabulary to be corrected includes the target word, obtain the correct word corresponding to the target word according to the vocabulary after correction, so as to respond to the target speech. The above-mentioned method of determining the correct word in combination with the vocabulary to be corrected and the vocabulary after correction to respond to the speech is not like the prior art that directly responds to the speech according to the converted erroneous text. The use of this application can improve the accuracy of speech recognition and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 It is a flowchart of a speech processing method provided in an embodiment of the present application;

[0025] Figure 2 is a flow chart of a speech processing method provided in yet another embodiment of the present application;

[0026] Figure 3 is a structural schematic diagram of a speech processing device provided in an embodiment of the present application;

[0027] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0029] In an embodiment of the present application, the electronic device may provide a voice processing function that can improve the accuracy of voice recognition. The voice processing function can be applied to scenarios such as voice wake-up, voice question and answer, voice chat, and voice search. The voice processing function generally includes a method for constructing a vocabulary to be corrected and a vocabulary after correction based on voice, and a method for applying the vocabulary to be corrected and the vocabulary after correction in the voice recognition process. The voice processing function can be applied to an electronic device. The electronic device may be a user terminal or a server. The user terminal may be a smart phone, a tablet computer, a laptop computer, a smart speaker, an intelligent robot (such as an intelligent customer service robot, an intelligent chat robot), an in-vehicle infotainment system, and the like. The server may be an independent server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, but is not limited thereto. In one embodiment, the voice processing function can be added as an independent functional module to the application software installed on the electronic device, such as a voice assistant, entertainment application (social application, game application, music application, etc.), payment application, shopping application, search engine, or the voice processing function can also be run as an independent application software in the electronic device, or the voice processing function can also be an independent system function of the electronic device.

[0030] Wherein, the speech processing function is specifically as follows: respectively obtain the first speech and the second speech of the target user, and identify the first word included in the first speech and the second word included in the second speech; respond to the first speech according to the first word and / or respond to the second speech according to the second word; when determining that the first word is a confusing word of the second word, construct a word library to be corrected including the first word; record the target correspondence between the first word and the second word in the word library after correction, and mark the correct word corresponding to the target correspondence in the word library after correction; obtain the target speech of the target user, and identify the target word included in the target speech; when determining that the word library to be corrected includes the target word, query the correct word corresponding to the target word according to the correspondence between the words recorded in the word library after correction and the correct word corresponding to the correspondence between the words marked in the word library after correction, so as to respond to the target speech according to the correct word corresponding to the target word. Wherein, the speech mentioned in the embodiment of the present application, such as the first speech, the second speech, and the target speech can be a wake-up speech. According to the different types of wake-up speech, the text obtained by such speech conversion can include a wake-up word, or include a wake-up word + instruction, or include an instruction, and so on. The wake-up word is used to switch the robot from standby mode to working mode. In other words, the wake-up word can be used to activate the robot. The instruction is used to indicate the operation to be performed. It should be noted that the voice mentioned in the embodiment of the present application can be other types of voices in addition to the wake-up voice, such as question and answer voice and chat voice, which are not limited in the embodiment of the present application. Accordingly, the text obtained by converting these voices can also be other types of texts, such as question and answer text and chat text, which are not limited in the embodiment of the present application.

[0031] In one embodiment, the second voice may refer to a voice acquired after the first voice. The time interval between the acquisition time of the second voice and the acquisition time of the first voice is less than the preset time interval. That is, the second voice may be a voice recorded by the target user immediately after recording the first voice. The following takes the electronic device as a server as an example to explain the voice processing function. In an application scenario, there is a situation where the user does not obtain the desired response based on the first recorded voice, and then records a voice to obtain the desired response, that is, there is a situation where the user repeatedly records the same voice or expresses the same or similar meaning. In this case, the server can obtain a voice collected successively by the same user terminal, and then respond to the successively collected voices in turn, for example, the first collected voice can be processed first and a response result data can be returned to the user terminal, and then the later collected voice can be processed and another response result data can be returned to the user terminal. In the process of processing one of the voices, the server can identify the words included in the voice, and obtain a response result data based on the words, and then return the response result data to the user terminal. The server can refer to the above process for the processing process of another voice, which will not be repeated here. In the above manner, the server can obtain the words included in the first collected speech and the words included in the later collected speech, and then determine whether the words included in the first collected speech are confused words of the words included in the later collected speech, and when it is determined that the words included in the first collected speech are confused words of the words included in the later collected speech, the words included in the first collected speech are added to the to-be-corrected vocabulary, and the correspondence between the words included in the first collected speech and the words included in the later collected speech is recorded in the vocabulary after correction, and the correct words corresponding to the correspondence are marked in the vocabulary after correction, so that after a new speech is recorded later, if the words included in the newly recorded speech can be matched in the vocabulary to be corrected, then the correct words corresponding to the words included in the newly recorded speech can be found according to the vocabulary after correction, so as to obtain the correct response result data according to the correct words corresponding to the words included in the newly recorded speech to return to the user terminal. In this scenario, whether it is because of the user's pronunciation problems, the quality of the recording equipment, or the problems with the speech recognition algorithm itself, which causes the user to repeatedly enter speech with the same or similar meaning to try to obtain the correct response result data, the present application can obtain two segments of speech collected by the same recording device, such as obtaining two segments of speech collected by the same recording device at a short interval to identify confusing words, thereby automatically updating and maintaining the vocabulary to be corrected and the vocabulary after correction.Since the process of identifying confusing words and building a word library to be corrected is completed without the user's awareness, that is, the process of identifying confusing words and building a word library to be corrected is completed when the user uses the voice processing function normally, this method can effectively improve the user's experience of related products with voice processing functions. In addition, applying the continuously improved word library to be corrected and the corrected word library to the entire voice recognition process can effectively improve the accuracy of voice recognition, reduce the possibility of users repeatedly entering voice, and further improve the user's experience of related products with voice processing functions.

[0032] In one embodiment, the second voice may refer to a voice collected simultaneously or almost simultaneously with the first voice. The first voice may be collected by a first recording device set by the user terminal, and the second voice may be collected by a second microphone set by the user terminal. The first recording device and the second recording device are set at different locations. When the user terminal is only provided with one recording device, as the distance between the user and the recording device changes, the voice collected by the recording device when the user is in different positions will also change, and the distance will affect the accuracy of the voice recognition result. For example, when the user is far away from the recording device, the voice collected by the recording device will be very unclear, and the unclear voice will greatly reduce the accuracy of the voice recognition. The voice processing function is described below by taking the electronic device as a server as an example. In an application scenario, during the user recording voice, the user's voice can be collected simultaneously by two recording devices set by the user terminal. The server can obtain the voice collected by the two recording devices simultaneously or almost simultaneously, and then respond to the voice collected by any one of them, or respond to the voice collected by the designated recording device. Specifically, the server can process the first voice collected by the first microphone and return a response result data to the user terminal, or process the second voice collected by the second microphone and return another response result data to the user terminal. Here, the server can identify the words included in the voice during the processing of one of the voices, and obtain a response result data according to the words, and then return the response result data to the user terminal. The server can refer to the above process for the processing of another voice, which is not repeated here. In this way, the server can obtain the words included in one of the voices, and then determine whether the words included in one of the voices are confusing words of the words included in the other voice, and when it is determined that the words included in one of the voices are confusing words of the words included in the other voice, the words of one of the voices are added to the word library to be corrected, and the word library after correction records the corresponding relationship between the words included in one of the voices and the words included in the other voice, and marks the correct words corresponding to the corresponding relationship in the word library after correction, so that after a new voice is recorded later, if it is determined that the words included in the newly recorded voice are confusing words, the correct words corresponding to the words included in the newly recorded voice can be found and returned to the user terminal The correct response result data. In this scenario, the speech collected by two recording devices simultaneously or nearly simultaneously can be obtained to analyze and judge the confusing words, so as to automatically maintain the word library to be corrected and the word library after correction. When the user's position changes, the speech recognition process can also have better adaptability, which can reduce the impact of the position change between the user and the recording device on the accuracy of speech recognition.Moreover, the process of identifying confused words and building a word library to be corrected is completed without the user's awareness, that is, the process of identifying confused words and building a word library to be corrected is completed when the user uses the voice processing function normally. This method can effectively improve the user's experience of using related products with voice processing functions. Furthermore, applying the continuously improved word library to be corrected and the corrected word library to the entire voice recognition process can effectively improve the accuracy of voice recognition, reduce the possibility of users repeatedly entering voice, and further improve the user's experience of using related products with voice processing functions.

[0033] In other embodiments, the user terminal may also be provided with other recording devices in addition to the first recording device and the second recording device, that is, the user terminal may have three or more recording devices. In the embodiment of the present application, the use rights of any two recording devices or two designated recording devices can be obtained, and then the two recording devices can be instructed to collect the user's voice at the same time. Subsequently, the vocabulary to be corrected and the vocabulary after correction can be updated and maintained according to the voice collected simultaneously or almost simultaneously by the two recording devices by analyzing the confusing words. After that, whether it is a user terminal with two recording devices or a user terminal with three or more recording devices, it can be further instructed to close one of the two recording devices used to collect the user's voice during the entire voice recognition process, and then the remaining recording device is used to collect the user's newly recorded voice, and the correct words corresponding to the words included in the newly recorded voice are found and returned to the user terminal The correct response result data. Here, the remaining recording device can be any one of the two recording devices, or it can also be a recording device with better quality among the two recording devices, which is not limited here. In other embodiments, the quality of the recording device may be determined based on the device parameters of the recording device, or may be determined based on the probability of occurrence of confusing words corresponding to the recording device. For example, a recording device with a higher probability of occurrence of confusing words may have a worse quality.

[0034] In one embodiment, the confusing words mentioned in the embodiment of the present application can be determined by the following method: determine whether the first word and the second word are the same, if they are different, determine that there is a confusing word between the first word and the second word. For example, when the second voice refers to a voice collected simultaneously or nearly simultaneously with the first voice, by comparing the first word and the second word, if it is found that the first word is different from the second word, it means that there is a confusing word between the first word and the second word. Alternatively, after returning the response result data obtained according to the first word to the user terminal, if it is determined that no response in a specified form from the user terminal is received, it means that the first word may be a confusing word of a certain word. After returning the response result data obtained according to the second word to the user terminal, if a response in a specified form from the user terminal is received, it can be indicated that the first word is a confusing word of the second word. For example, a first number of standard questions can be obtained according to the first word to be returned to the user terminal. After returning the first number of standard questions to the user terminal, if a question selected by the user from the first number of questions is not detected, but it is detected that the user has re-entered the second voice, it means that the response to the first voice is not the response the user wants. Afterwards, a second number of standard questions can be obtained based on the second word to be returned to the user terminal. After the second number of standard questions are returned to the user terminal, if a question selected by the user from the second number of questions is detected, it means that the first word may be a confusing word of the second word.

[0035] In one embodiment, the response result data mentioned in the embodiment of the present application may be data of the type of audio data, picture data, video data, etc., or may also be data of the type of text information, reply message, etc. obtained after replacing the confusing words. The reply message may be a message of the type of chat message, question and answer message, etc., and the reply message includes but is not limited to being presented in the form of text or voice. It should be noted that in most cases, the response result data depends on the type of device, the type of application software, or the type of functional module to which the voice processing function is applied, and the response result data is different depending on its application. For example, when the voice processing function is used for a smart speaker, its response result data may be music data, etc. For another example, when the voice processing function is used for an intelligent customer service robot, its response result data may be a question and answer message, etc. It should also be noted that the aforementioned methods of responding to voice according to words are all explained by taking the example of obtaining response result data according to words to return to the user terminal, and in fact, the voice processing function may be used to assist in realizing other functions in some scenarios, and its response method may also be different depending on other functions. That is to say, in addition to providing the response result data to the user terminal, some other operations can also be performed. For example, other devices can be controlled directly according to the words, or some data can be sent, and so on.

[0036] The present application relates to blockchain technology, such as the response result data can be stored in the blockchain, and the electronic device can obtain the response data from the blockchain. Alternatively, the voice described in the embodiment of the present application can be encrypted and stored in the blockchain, and the electronic device can obtain the encrypted voice from the blockchain and decrypt it to obtain the voice.

[0037] Based on the above description, the present application embodiment provides a speech processing method. The method can be applied to the electronic device mentioned above. Specifically, see Figure 1 , the speech processing method may include the following steps:

[0038] S101, respectively acquiring a first voice and a second voice of a target user, and identifying a first word included in the first voice and a second word included in the second voice.

[0039] S102: respond to the first voice according to the first word and / or respond to the second voice according to the second word.

[0040] In an embodiment of the present application, the electronic device can obtain a first voice of a target user and convert the first voice into a first text. Here, the electronic device can use voice recognition technology to perform voice recognition on the first voice to obtain a first text. The first text consists of one or more words. In other words, the electronic device can recognize one or more words included in the first voice. It should be noted that the words mentioned in the embodiment of the present application are composed of one or more characters. In one embodiment, the first term referred to can refer to a keyword included in the first text, and the keyword included in the first text can refer to a key word segmentation result extracted from the word segmentation result set after the first text is segmented.

[0041] In one embodiment, the electronic device can directly respond to the first voice according to the first word. For example, in the scenario of voice search, the corresponding data can be searched according to the recognized word, and then the searched data can be output through the user terminal. Or in the scenario of voice chat, the chat content can be matched according to the recognized word, and then the chat content can be output through the user terminal. In one embodiment, the electronic device can also respond to the first voice according to the first word and other words in the first text except the first word. For example, the electronic device can respond directly according to the first text. In the scenario of voice search, the corresponding data can be searched according to the recognized text, and then the searched data can be output through the user terminal. Or in the scenario of voice chat, the chat content can be matched according to the recognized text, and then the chat content can be output through the user terminal. In one embodiment, the other words in the first text except the first word can refer to all words in the first text except the first word, or can refer to important words included in the first text that will affect the response method or response result data.

[0042] In one embodiment, when responding to the first voice according to the first word, the electronic device may also query whether the word library to be corrected includes the first word. If the word library to be corrected includes the first word, the correct word corresponding to the first word is queried according to the correspondence between the words included in the word library after correction and the correct word corresponding to the correspondence marked by the word library after correction, and the first voice is responded to according to the correct word corresponding to the first word, or the first voice is responded to according to the correct word corresponding to the first word and other words in the first text except the first word. In one embodiment, if the word library to be corrected does not include the first word, the electronic device directly responds to the first voice according to the first word, or responds to the first voice according to the first word and other words in the first text except the first word.

[0043] Similarly, in an embodiment of the present application, the electronic device can obtain the second voice of the target user and convert the second voice into a second text. Here, the electronic device can use voice recognition technology to perform voice recognition on the second voice to obtain a second text. The second text consists of one or more words. In other words, the electronic device can recognize one or more words included in the second voice. It should be noted that the words mentioned in the embodiment of the present application are composed of one or more characters. In one embodiment, the second term referred to can refer to the keywords included in the second text, and the keywords included in the second text can refer to the key segmentation results extracted from the segmentation result set after the second text is segmented.

[0044] Similarly, in one embodiment, the electronic device can directly respond to the second voice according to the second word. For example, in the scenario of voice search, the corresponding data can be searched according to the recognized word, and then the searched data can be output through the user terminal. Or in the scenario of voice chat, the chat content can be matched according to the recognized word, and then the chat content can be output through the user terminal. In one embodiment, the electronic device can also respond to the second voice according to the second word and other words in the second text except the second word. For example, the electronic device can respond directly according to the second text. For example, in the scenario of voice search, the corresponding data can be searched according to the recognized text, and then the searched data can be output through the user terminal. Or in the scenario of voice chat between people and robots, the chat content can be matched according to the recognized text, and then the chat content can be output through the user terminal. In one embodiment, the other words in the second text except the second word can refer to all words in the second text except the second word, or can refer to important words included in the second text that will affect the response method or response result data.

[0045] Similarly, in one embodiment, when responding to the second voice according to the second word, the electronic device can also query whether the word library to be corrected includes the second word. If the word library to be corrected includes the second word, then based on the correspondence between the words included in the word library after correction and the correct word corresponding to the correspondence marked by the word library after correction, query the correct word corresponding to the second word, and respond to the second voice according to the correct word corresponding to the second word, or respond to the second voice according to the correct word corresponding to the second word and other words in the second text except the second word. In one embodiment, if the word library to be corrected does not include the second word, the electronic device directly responds to the second voice according to the second word, or responds to the second voice according to the second word and other words in the second text except the second word.

[0046] In one embodiment, the first voice may be acquired first, the first voice may be responded to, and then the second voice may be acquired and then responded to. Alternatively, the first voice and the second voice may be acquired simultaneously, and the first voice or the second voice may be responded to.

[0047] S103: When it is determined that the first word is a confusing word of the second word, construct a to-be-corrected word library including the first word.

[0048] S104: Record the target correspondence between the first word and the second word in the word library after error correction, and mark the correct word corresponding to the target correspondence in the word library after error correction.

[0049] In the embodiment of the present application, when the electronic device determines that the first word is a confused word of the second word, the electronic device may update the first word to a word library to be corrected.

[0050] In one embodiment, the electronic device may update the first word to the word library to be corrected when it is found that the first word does not exist in the word library to be corrected. In one embodiment, the electronic device may directly update the first word to the word library to be corrected without paying attention to whether the first word exists in the word library to be corrected. In this case, the word library to be corrected may include the update time of each first word in addition to the first word.

[0051] It should be noted that, since the second word here is not necessarily the correct word, when it is determined that the second word is also a confusing word of a certain word, that is, when it is determined that the second word is not a correct word, a word library to be corrected including the first word and the second word can be constructed, and the first word and the second word are mutually confusing words. Similarly, when the third voice of the target user is obtained, for example, when the third voice input after the first voice and / or the second voice is obtained, the third word can be obtained according to the third voice, and when the second word is determined to be a confusing word of the third word, a word library to be corrected including the first word and the second word can be constructed. At the same time, the target correspondence between the first word, the second word, and the third word can also be recorded. Here, the target correspondence is updated to the correspondence of these three words. When there is a word in the target correspondence that is the correct word of other words in the target correspondence, the word is marked as the correct word. If there is no word in the target correspondence that is the correct word of other words in the target correspondence, the corresponding correct word is added to each word in the target correspondence. In other words, the process of marking the correct word can find the correct word mark from the target correspondence, or add the corresponding correct word to the target correspondence. In one embodiment, the process of marking the correct words may be to output the target correspondence through the user terminal so that the target user can mark the correct words. In addition to this marking method, other methods may also be used, which will not be described in detail here.

[0052] In one embodiment, the electronic device determines whether the first word is a confusing word of the second word in the following manner: the electronic device can obtain the pinyin of each character in the second word, and determine the similar pinyin corresponding to the pinyin of each character; the electronic device obtains the target keyword set corresponding to each character according to the similar pinyin corresponding to the pinyin of each character; the electronic device selects the third keyword from the second word, and determines the target sub-keyword set from the target keyword set corresponding to the third keyword; the electronic device uses each keyword in the target sub-keyword set to perform a replacement operation on the second word for the third keyword in turn, and obtains a replaced word set, and the replaced word set includes each replaced word; when the replaced word set includes the first word, the electronic device determines the first word as a confusing word of the second word. Among them, the second word includes the first keyword, the target keyword set corresponding to the first keyword includes the second keyword, and the pinyin of the second keyword is a similar pinyin of the pinyin of the first keyword. Pinyin refers to a sound composed of two or more factors. Similar pinyin, for example, the similar pinyin corresponding to the first pinyin including a certain front nasal letter can be the second pinyin, and the second pinyin includes the back nasal letter corresponding to the front nasal letter and other letters in the first pinyin except the front nasal letter. For example, the similar pinyin corresponding to lan may be nan. For another example, the similar pinyin corresponding to the third pinyin including a certain rolled tongue letter may be the fourth pinyin, and the fourth pinyin includes the flat tongue letter corresponding to the rolled tongue letter and other letters in the third pinyin except the rolled tongue letter. For example, the similar pinyin corresponding to shi may be si. For another example, the similar pinyin of the fifth pinyin including z or zhi may be the sixth pinyin, and the sixth pinyin includes j and other letters in the fifth pinyin except z or zhi. For example, the similar pinyin corresponding to zhi may be ji. For another example, the similar pinyin of the seventh pinyin including c or chi may be the eighth pinyin, and the eighth pinyin includes q and other letters in the seventh pinyin except c or chi.

[0053] For example, suppose the first word is "four years" and the second word is "ten years". The electronic device can obtain the pinyin of each character in "ten years", that is, "shi" and "nian". After obtaining the pinyin of each character, the similar pinyin corresponding to the pinyin of each character can be determined. Here, the similar pinyin of "shi" includes "si" and the similar pinyin of "nian" includes "lian". The electronic device can obtain the target keyword set corresponding to "ten" according to "si", including keywords such as "four", "company", "thinking", and can also obtain the target keyword set corresponding to "year" according to "nian", including keywords such as "link", "chain", "link". The electronic device selects "ten" from "ten years", and determines a target sub-keyword set from the target keyword set corresponding to "ten", including keywords such as "four"; the electronic device uses each keyword in the target sub-keyword set to perform a replacement operation on "ten" in turn, and obtains a replaced word set, and the replaced word set includes the words after each replacement, such as "four years". Here, the electronic device can determine that when the replaced word set includes the word "four years", "four years" can be determined as a confusing word for "ten years". It should be noted that the above is only an example of replacing a certain word in the second word. The electronic device can also replace two or more keywords in the second word to obtain a replaced word set. For example, in the above example, a replaced word set including words such as "missing" and "four consecutive" can be obtained.

[0054] In one embodiment, the electronic device can obtain a similar pinyin table that records multiple groups of similar pinyins, and determine the similar pinyin corresponding to the pinyin of each character based on the similar pinyin table. In one embodiment, the electronic device can construct a similar pinyin table corresponding to each language type in multiple language types, and the electronic device can also recognize the voice type of the target user based on the first voice and / or the second voice. The voice type can be Mandarin or a dialect, etc. Afterwards, the electronic device can obtain the similar pinyin table corresponding to the voice type of the target user, and determine the similar pinyin corresponding to the pinyin of each character based on the similar pinyin table corresponding to the voice type of the target user.

[0055] In one embodiment, the electronic device may determine whether the first word is a confused word of the second word as follows: the electronic device identifies whether the first word is a homophone of the second word, and when the first word is a homophone of the second word, determines that the first word is a confused word of the second word.

[0056] S105: Acquire the target voice of the target user, and identify the target words included in the target voice.

[0057] In the embodiment of the present application, the electronic device can obtain the target voice of the target user, and obtain the target word according to the text converted from the target voice. Among them, the electronic device can convert the voice to text through voice recognition technology, which is not described in detail here. The method of obtaining the target word can refer to the method of obtaining the first word mentioned above, which is not described in detail here.

[0058] S106. When it is determined that the to-be-corrected word library includes the target word, the correct word corresponding to the target word is searched based on the correspondence between the words recorded in the corrected word library and the correct word corresponding to the correspondence between the words marked in the corrected word library.

[0059] S107: Respond to the target speech according to the correct word corresponding to the target word.

[0060] There may be one or more correct words corresponding to the target word.

[0061] In one embodiment, since a word has different meanings in different language environments, it may also correspond to multiple correct words. When the target word corresponds to multiple correct words, the electronic device can perform feature extraction on the text converted from the target speech to obtain the semantic vector of the text, and further calculate the semantic similarity between the semantic vector of the text and the semantic vector of the reference text corresponding to each correct word in the multiple correct words, and then determine the correct word with the greatest semantic similarity from the multiple correct words, so as to respond to the target speech according to the correct word with the greatest semantic similarity. This process can substitute the words and the corrected words into the corresponding text semantic environment to understand them, so as to find the corrected words that are most semantically matched.

[0062] In one embodiment, when the target word corresponds to multiple correct words, the electronic device can obtain the matching weight of each correct word among the multiple correct words, and determine the correct word with the highest matching weight from the multiple correct words based on the matching weight of each correct word, thereby responding to the target voice according to the correct word with the highest matching weight.

[0063] In one embodiment, the matching weight of a correct word can be determined based on the number of times the correct word is marked. Accordingly, the electronic device can obtain the matching weight of each correct word in a plurality of correct words by counting the number of times each correct word is marked in a plurality of correct words, and determining the matching weight of each word based on the number of times marked. In an embodiment of the present application, a higher matching weight can be given to a correct word with a higher number of marks.

[0064] In one embodiment, the matching weight of the correct word can also be determined based on the scoring data of the correct word. Accordingly, the electronic device can obtain the matching weight of each correct word in the multiple correct words by: the electronic device obtains the scoring data of each correct word in the multiple correct words, and determines the matching weight of each word based on the scoring data. For example, a higher matching weight is given to a correct word with a higher score.

[0065] In one embodiment, the scoring data can be set by the target user, or determined according to the scoring data of each correct word in the multiple correct words by each user in the multiple users. For the latter, in the actual application process, it is possible that the word library to be corrected and the word library after correction are not maintained separately for each user, and it is possible that multiple users share the same word library after correction. However, due to individual differences, the judgment results of the correct words corresponding to some correct words to be corrected may be different. At this time, the scoring data of each correct word in the multiple correct words corresponding to the target word can be obtained by each user in the multiple users, and the scoring data of each word can be determined according to the scoring data of each correct word in the multiple correct words corresponding to the target word by each user in the multiple users. For example, the multiple users include user 1, user 2 and user 3, and the multiple correct words include correct word a. The electronic device can average the scoring data of user 1 for correct word a, the scoring data of user 2 for correct word a, and the scoring data of user 3 for correct word a, that is, the three data are averaged to obtain the scoring data for correct word a.

[0066] In one embodiment, the electronic device responds to the target voice according to the correct word with the highest matching weight in a manner that the electronic device obtains the target response result data for the target voice according to the correct word with the highest matching weight to return to the user terminal corresponding to the target user. After responding to the target voice according to the correct word with the highest matching weight, the electronic device can update the matching weight of the word with the highest matching weight according to the feedback information when it detects the information fed back by the user terminal according to the target response result data. For example, the electronic device can determine whether there is data fed back by the user terminal according to the first response result, and when the fed back data is data in the first form, increase the matching weight of the corrected word with the highest matching weight, and when the fed back data is data in the second form, reduce the matching weight of the corrected word with the highest matching weight. In other words, the matching weight of the corrected word depends on what form of data is received from the user terminal.

[0067] visible, Figure 1In the illustrated embodiment, the electronic device can respectively obtain the first voice and the second voice of the target user, and identify the first word included in the first voice and the second word included in the second voice; the electronic device can respond to the first voice according to the first word and / or respond to the second voice according to the second word; when the electronic device determines that the first word is a confusing word of the second word, it can build a to-be-corrected word library including the first word, and record the target correspondence between the first word and the second word in the word library after correction, and mark the correct word corresponding to the target correspondence in the word library after correction; the electronic device obtains the target voice of the target user and identifies the target word included in the target voice; when the electronic device determines that the to-be-corrected word library includes the target word, it queries the correct word corresponding to the target word according to the correspondence between the words recorded in the word library after correction and the correct word corresponding to the correspondence between the words marked in the word library after correction, and responds to the target voice according to the correct word corresponding to the target word. The embodiment of the present application combines the to-be-corrected word library and the word library after correction to determine the correct word to respond to the voice, which can improve the accuracy of voice recognition and improve user experience.

[0068] See also Figure 2 , is a flow chart of a speech processing method provided by another embodiment of the present application. The method can be applied to the electronic device mentioned above. Specifically, the method can include the following steps:

[0069] S201. Acquire a first voice and a second voice of a target user respectively, and record the acquisition time of the first voice and the acquisition time of the second voice.

[0070] S202: respond to the first voice according to the first word and / or respond to the second voice according to the second word.

[0071] The electronic device may obtain the first voice and the second voice of the target user by referring to Figure 1 In step S101 of the embodiment, the electronic device responds to the first voice according to the first word and / or responds to the second voice according to the second word. Figure 1 The step S102 of the embodiment is not described in detail in the embodiment of the present application.

[0072] S203: Obtain the recorded acquisition time of the first voice and the acquisition time of the second voice.

[0073] S204: Obtain the trigger time and collected text recorded when the target embedding event is triggered.

[0074] S205: Determine whether the collected text includes a target text according to the acquisition time of the first voice, the acquisition time of the second voice, and the trigger time.

[0075] S206: After determining that the collected text includes the target text, determine whether the first word is a confusing word of the second word.

[0076] In steps S203-S206, the electronic device can obtain the acquisition time of the recorded first voice, the acquisition time of the second voice, and the trigger time recorded when the target buried event is triggered and the collected text; the electronic device determines whether the collected text includes the target text based on the acquisition time of the first voice, the acquisition time of the second voice and the trigger time; the electronic device can determine whether the first word is a confusing word of the second word after determining that the collected text includes the target text.

[0077] In one embodiment, the target text may include the first word and other words in the first text except the first word. For example, the target text may be the first text. Or the target text may include the correct word corresponding to the first word and other words in the first text except the first word. For example, the target text may be the text obtained after performing a confusing word replacement operation on the first text. The target buried event may be to obtain the time of the operation and the text of the operation when a touch operation on the target control is detected. The trigger time recorded when the target buried event is triggered is the time of the operation, and the text collected when the target buried event is triggered is the text of the operation. The relevant applications of the embodiments of the present application are explained below.

[0078] In one embodiment, the speech processing process of the embodiment of the present application can be an optimization of the speech-to-text function of the prior art, that is, an optimization of the speech recognition technology of the prior art. The speech-to-text function of the prior art generally outputs the text directly through the user terminal after the text is converted according to the speech, that is, after the text is recognized by the speech recognition technology. When the user finds that the converted text is not the conversion result he wants, he will continue to enter similar or identical voices to obtain the ideal conversion result. However, due to the lack of corresponding optimization measures in the prior art, even if the user re-enters the voice, the conversion result obtained by the user is still not the conversion result the user wants to a great extent. The embodiment of the present application introduces the judgment of confusing words to optimize the word library to be corrected and the word library after correction, so as to respond to the newly entered voice based on the optimized word library, and can feedback to the user a more correct conversion result based on the optimized word library, so as to achieve the purpose of finally presenting the user with a better conversion result. In addition, the embodiment of the present application introduces the target buried event, so that it is not necessary to perform a judgment operation of a confusing word for each of the two consecutive voices in the multiple consecutive voices, which can reduce the consumption of the operating resources of the electronic device. In an application scenario, when the target user finds that the text converted from the initially recorded voice is wrong, he can click the cancel send button on the user terminal to cancel the sending of the converted text. After that, the target user can record the voice again, and obtain the text converted from the re-recorded voice through the electronic device, and output it through the user terminal after converting the re-recorded voice into text. In this scenario, the target buried event referred to can be when a click operation on the cancel send button is detected, the time of canceling the sending and the text of canceling the sending are recorded.

[0079] S207: When it is determined that the first word is a confusing word of the second word, construct a to-be-corrected word library including the first word.

[0080] S208: Record the target correspondence between the first word and the second word in the word library after error correction, and mark the correct word corresponding to the target correspondence in the word library after error correction.

[0081] S209: Acquire the target voice of the target user, and identify the target words included in the target voice.

[0082] S210. When it is determined that the to-be-corrected word library includes the target word, the correct word corresponding to the target word is queried based on the correspondence between the words recorded in the corrected word library and the correct word corresponding to the correspondence between the words marked in the corrected word library.

[0083] S211. Respond to the target speech according to the correct word corresponding to the target word.

[0084] Among them, steps S207 to S211 can refer to Figure 1 Steps S103 to S107 of the embodiment are not described in detail here.

[0085] In one embodiment, the electronic device can also identify the word collision scene (scenes where confusing words are likely to appear) corresponding to the acquired voice, and then establish different to-be-corrected word libraries and corrected word libraries for different collision scenes. After acquiring the target voice of the target user, the target collision scene corresponding to the target voice can be determined, and then the target to-be-corrected word library corresponding to the target collision scene and the target corrected word library corresponding to the target collision scene are determined based on the correspondence between the collision scene and the word library. After the electronic device converts the target voice into a target text and acquires the target word based on the target text, if it is determined that the target to-be-corrected word library includes the target word, the correct word corresponding to the target word can be queried based on the correspondence between the words recorded in the target corrected word library and the correct word corresponding to the correspondence between the words marked in the target corrected word library, so as to respond to the target voice based on the correct word corresponding to the target word. This process can be used to respond to the voice more accurately.

[0086] In one embodiment, after obtaining any voice of the target user (such as the first voice, the second voice, and the target voice), the voiceprint information of the voice can be extracted, and the voiceprint database of the target user is queried to see whether the voiceprint information exists, and then the step of identifying the words included in the voice is performed. By comparing the voiceprints, the use rights of the voice processing function can be restricted.

[0087] In one embodiment, the electronic device can also determine whether the length of the text is within a preset length range after converting any voice of the target user (such as the first voice, the second voice, and the target voice) into the corresponding text. If the length of the text is within the preset length range, the step of identifying the words included in the voice is performed. For example, in scenarios such as voice wake-up, by determining whether the length of the text is within the preset length range, the probability of the electronic device being mistakenly awakened due to the acquisition of a large voice containing words with the same pronunciation as the wake-up word can be reduced.

[0088] visible, Figure 2In the illustrated embodiment, the electronic device can obtain the recorded acquisition time of the first voice, the acquisition time of the second voice, the trigger time recorded when the target buried event is triggered, and the collected text; then, the electronic device determines whether the collected text includes the target text based on the acquisition time of the first voice, the acquisition time of the second voice, and the trigger time; thereafter, the electronic device can determine whether the first word is a confused word of the second word after determining that the collected text includes the target text, and when determining that the first word is a confused word of the second word, construct a to-be-corrected word library including the first word, record the target correspondence between the first word and the second word in the corrected word library, and mark the correct word corresponding to the target correspondence in the corrected word library. This method can automatically and intelligently judge the confused words through the setting of buried events, thereby achieving the purpose of automatically maintaining the to-be-corrected word library and the corrected word library.

[0089] See also Figure 3 , is a schematic diagram of the structure of a speech processing device provided in an embodiment of the present application. The speech processing device can be applied to the electronic device mentioned above. Specifically, the device may include:

[0090] The acquisition module 301 is used to respectively acquire a first voice and a second voice of a target user.

[0091] The recognition module 302 is configured to recognize a first word included in the first speech and a second word included in the second speech.

[0092] The processing module 303 is configured to respond to the first speech according to the first word and / or respond to the second speech according to the second word.

[0093] The processing module 303 is also used to, when it is determined that the first word is a confused word of the second word, construct a to-be-corrected word library including the first word, record the target correspondence between the first word and the second word in the corrected word library, and mark the correct word corresponding to the target correspondence in the corrected word library.

[0094] The acquisition module 301 is further used to acquire the target voice of the target user.

[0095] The recognition module 302 is further configured to recognize target words included in the target speech.

[0096] The processing module 303 is also used to, when it is determined that the vocabulary to be corrected includes the target word, query the correct word corresponding to the target word according to the correspondence between the words recorded in the vocabulary after correction and the correct word corresponding to the correspondence between the words marked in the vocabulary after correction, and respond to the target speech according to the correct word corresponding to the target word.

[0097] In an optional embodiment, the processing module 303 responds to the target speech according to the correct word corresponding to the target word. Specifically, when the target word corresponds to multiple correct words, the matching weight of each correct word in the multiple correct words is obtained; according to the matching weight of each correct word, the correct word with the highest matching weight is determined from the multiple correct words; and the target speech is responded to according to the correct word with the highest matching weight.

[0098] In an optional implementation, the processing module 303 obtains the matching weight of each correct word among the multiple correct words, specifically obtains the scoring data of each correct word among the multiple correct words; and determines the matching weight of each correct word according to the scoring data of each correct word.

[0099] In an optional implementation, the processing module 303 responds to the target speech according to the correct word with the highest matching weight, specifically obtaining the target response result data for the target speech according to the correct word with the highest matching weight and returning it to the user terminal corresponding to the target user.

[0100] In an optional embodiment, after the processing module 303 responds to the target speech according to the correct word with the highest matching weight, when it detects information fed back by the user terminal based on the target response result data, it updates the matching weight of the word with the highest matching weight according to the feedback information.

[0101] In an optional embodiment, the processing module 303 responds to the target speech according to the correct word corresponding to the target word. Specifically, when the target word corresponds to multiple correct words, feature extraction is performed on the text converted from the target speech to obtain a semantic vector of the target text; the semantic similarity between the semantic vector of the target text and the semantic vector of the reference text corresponding to each of the multiple correct words is calculated; the correct word with the greatest semantic similarity is determined from the multiple correct words, and the target speech is responded to according to the correct word with the greatest semantic similarity.

[0102] In an optional embodiment, the processing module 303 is also used to obtain the pinyin of each character in the second word; determine the similar pinyin corresponding to the pinyin of each character; obtain the target keyword set corresponding to each character according to the similar pinyin corresponding to the pinyin of each character, the second word includes a first keyword, the target keyword set corresponding to the first keyword includes a second keyword, and the pinyin of the second keyword is a similar pinyin of the pinyin of the first keyword; select a third keyword from the second word, and determine a target sub-keyword set from the target keyword set corresponding to the third keyword; use each keyword in the target sub-keyword set to perform a replacement operation on the second word for the third keyword in turn to obtain a replaced word set, the replaced word set includes each replaced word; when the replaced word set includes the first word, determine the first word as a confusing word of the second word.

[0103] In an optional implementation, the processing module 303 is further configured to record the time when the first voice is acquired; and record the time when the second voice is acquired.

[0104] In an optional embodiment, the processing module 303 is also used to obtain the recorded acquisition time of the first voice and the acquisition time of the second voice before constructing the to-be-corrected vocabulary library including the first word when it is determined that the first word is a confused word of the second word; obtain the recorded trigger time and the collected text when the target buried event is triggered; judge whether the collected text includes the target text according to the acquisition time of the first voice, the acquisition time of the second voice and the trigger time; after determining that the collected text includes the target text, judge whether the first word is a confused word of the second word.

[0105] visible, Figure 3In the illustrated embodiment, the speech processing device can respectively obtain the first speech and the second speech of the target user, and identify the first word included in the first speech and the second word included in the second speech; the speech processing device can respond to the first speech according to the first word and / or respond to the second speech according to the second word; the speech processing device can, when determining that the first word is a confusing word of the second word, construct a to-be-corrected word library including the first word, and record the target correspondence between the first word and the second word in the word library after correction, and mark the correct word corresponding to the target correspondence in the word library after correction; the speech processing device obtains the target speech of the target user and identifies the target word included in the target speech; when determining that the to-be-corrected word library includes the target word, the speech processing device queries the correct word corresponding to the target word according to the correspondence between the words recorded in the word library after correction and the correct word corresponding to the correspondence between the words marked in the word library after correction, and responds to the target speech according to the correct word corresponding to the target word. The embodiment of the present application combines the to-be-corrected word library and the word library after correction to determine the correct word to respond to the speech, which can improve the accuracy of speech recognition and improve user experience.

[0106] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device described in this embodiment may include: one or more processors 1000 and a memory 2000. The processor 1000 and the memory 2000 may be connected via a bus or the like.

[0107] The processor 1000 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. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0108] The memory 2000 may be a high-speed RAM memory or a non-volatile memory, such as a disk memory. The memory 2000 is used to store a set of program codes, and the processor 1000 may call the program codes stored in the memory 2000. Specifically:

[0109] The processor 1000 is configured to respectively acquire a first voice and a second voice of a target user, and identify a first word included in the first voice and a second word included in the second voice; respond to the first voice according to the first word and / or respond to the second voice according to the second word; when it is determined that the first word is a confused word of the second word, construct a to-be-corrected word library including the first word; record a target correspondence between the first word and the second word in the corrected word library, and mark a correct word corresponding to the target correspondence in the corrected word library; acquire a target voice of the target user, and identify a target word included in the target voice; when it is determined that the to-be-corrected word library includes the target word, query a correct word corresponding to the target word according to the correspondence between words recorded in the corrected word library and the correct word corresponding to the correspondence between words marked in the corrected word library; and respond to the target voice according to the correct word corresponding to the target word.

[0110] In one embodiment, when the processor 1000 responds to the target speech according to the correct word corresponding to the target word, it is specifically used to obtain the matching weight of each correct word in the multiple correct words when the target word corresponds to multiple correct words; determine the correct word with the highest matching weight from the multiple correct words according to the matching weight of each correct word; and respond to the target speech according to the correct word with the highest matching weight.

[0111] In one embodiment, when the processor 1000 obtains the matching weight of each correct word in the multiple correct words, it is specifically used to obtain the scoring data of each correct word in the multiple correct words; and determine the matching weight of each correct word according to the scoring data of each correct word.

[0112] In one embodiment, when the processor 1000 responds to the target speech according to the correct word with the highest matching weight, it is specifically used to obtain target response result data for the target speech according to the correct word with the highest matching weight to return it to the user terminal corresponding to the target user; after the processor 1000 responds to the target speech according to the correct word with the highest matching weight, it is also used to update the matching weight of the word with the highest matching weight according to the feedback information when it is detected that the user terminal has fed back information based on the target response result data.

[0113] In one embodiment, when the processor 1000 responds to the target speech according to the correct word corresponding to the target word, it is specifically used to, when the target word corresponds to multiple correct words, perform feature extraction on the text converted from the target speech to obtain a semantic vector of the target text; calculate the semantic similarity between the semantic vector of the target text and the semantic vector of the reference text corresponding to each of the multiple correct words; determine the correct word with the greatest semantic similarity from the multiple correct words, and respond to the target speech according to the correct word with the greatest semantic similarity.

[0114] In one embodiment, the processor 1000 is further used to obtain the pinyin of each character in the second word; determine the similar pinyin corresponding to the pinyin of each character; obtain a target keyword set corresponding to each character according to the similar pinyin corresponding to the pinyin of each character, the second word includes a first keyword, the target keyword set corresponding to the first keyword includes a second keyword, and the pinyin of the second keyword is a similar pinyin of the pinyin of the first keyword; select a third keyword from the second word, and determine a target sub-keyword set from the target keyword set corresponding to the third keyword; use each keyword in the target sub-keyword set to perform a replacement operation on the second word for the third keyword in turn to obtain a replaced word set, the replaced word set includes each replaced word; when the replaced word set includes the first word, determine the first word as a confusing word of the second word.

[0115] In one embodiment, the processor 1000 is further used to record the acquisition time of the first voice; record the acquisition time of the second voice; the processor 1000 is also used to obtain the recorded acquisition time of the first voice and the acquisition time of the second voice before building a to-be-corrected word library including the first word when determining that the first word is a confused word of the second word; obtain the recorded trigger time and the collected text when the target buried event is triggered; judge whether the collected text includes the target text according to the acquisition time of the first voice, the acquisition time of the second voice and the trigger time; after determining that the collected text includes the target text, judge whether the first word is a confused word of the second word.

[0116] In a specific implementation, the processor 1000 described in the embodiment of the present application may execute Figure 1 Example Figure 2 The implementation method described in the embodiment can also execute the implementation method described in the embodiment of the present application, which will not be repeated here.

[0117] Each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of sampling hardware or sampling software functional modules.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the computer-readable storage medium can be volatile or non-volatile. For example, the computer storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM). The computer-readable storage medium can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, at least one application required for a function, etc.; the storage data area can store data created according to the use of the blockchain node, etc.

[0119] Among them, the blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0120] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiment and equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A speech processing method, characterized in that: include: Acquire a first voice and a second voice of a target user respectively, and recognize a first word included in the first voice and a second word included in the second voice; responding to the first speech according to the first word and / or responding to the second speech according to the second word; Recording the time when the first voice is acquired, and recording the time when the second voice is acquired; Obtaining the recorded acquisition time of the first voice and the acquisition time of the second voice; Get the trigger time and collected text recorded when the target tracking event is triggered; Determining whether the collected text includes a target text according to the acquisition time of the first voice, the acquisition time of the second voice, and the trigger time; After determining that the collected text includes the target text, determining whether the first word is a confusing word of the second word; When it is determined that the first word is a confusing word of the second word, constructing a word library to be corrected including the first word; Recording the target correspondence between the first word and the second word in the word library after error correction, and marking the correct word corresponding to the target correspondence in the word library after error correction; Acquire the target speech of the target user, and identify the target words included in the target speech; When it is determined that the to-be-corrected word library includes the target word, querying the correct word corresponding to the target word according to the correspondence between the words recorded in the corrected word library and the correct word corresponding to the correspondence between the words marked in the corrected word library; Responding to the target speech according to the correct word corresponding to the target word; The method further comprises: Obtaining the pinyin of each character in the second word, and determining a similar pinyin corresponding to the pinyin of each character; According to the similar pinyin corresponding to the pinyin of each word, a target keyword set corresponding to each word is obtained, wherein the second word includes a first keyword, the target keyword set corresponding to the first keyword includes a second keyword, and the pinyin of the second keyword is a similar pinyin to the pinyin of the first keyword; A third keyword is selected from the second word, and a target sub-keyword set is determined from a target keyword set corresponding to the third keyword; a replacement operation for the third keyword is performed on the second word in turn using each keyword in the target sub-keyword set to obtain a replaced word set, wherein the replaced word set includes each replaced word; when the replaced word set includes the first word, the first word is determined to be a confusing word of the second word.

2. The method according to claim 1, characterized in that The step of responding to the target speech according to the correct word corresponding to the target word comprises: When the target word corresponds to multiple correct words, obtaining a matching weight of each correct word in the multiple correct words; According to the matching weight of each correct word, determining the correct word with the highest matching weight from the multiple correct words; The target speech is responded to according to the correct word with the highest matching weight.

3. The method according to claim 2, characterized in that The obtaining of the matching weight of each correct word in the plurality of correct words comprises: Obtaining scoring data for each correct word among the multiple correct words; The matching weight of each correct word is determined according to the scoring data of each correct word.

4. The method according to claim 2, characterized in that: The step of responding to the target speech according to the correct word with the highest matching weight comprises: Acquire target response result data for the target speech according to the correct word with the highest matching weight and return it to the user terminal corresponding to the target user; After responding to the target speech according to the correct word with the highest matching weight, the method further includes: When it is detected that the user terminal feeds back information according to the target response result data, the matching weight of the word with the highest matching weight is updated according to the fed back information.

5. The method according to claim 1, characterized in that The step of responding to the target speech according to the correct word corresponding to the target word comprises: When the target word corresponds to multiple correct words, feature extraction is performed on the text obtained by converting the target speech to obtain a semantic vector of the target text; Calculating the semantic similarity between the semantic vector of the target text and the semantic vector of the reference text corresponding to each correct word in the plurality of correct words; A correct word with the greatest semantic similarity is determined from the multiple correct words, and the target speech is responded to according to the correct word with the greatest semantic similarity.

6. A speech processing device, characterized in that: include: An acquisition module, used to respectively acquire a first voice and a second voice of a target user; A recognition module, configured to recognize a first word included in the first speech and a second word included in the second speech; a processing module, configured to respond to the first speech according to the first word and / or respond to the second speech according to the second word; The processing module is further used to record the acquisition time of the first voice and the acquisition time of the second voice; obtain the recorded acquisition time of the first voice and the acquisition time of the second voice; Get the trigger time and collected text recorded when the target tracking event is triggered; According to the acquisition time of the first voice, the acquisition time of the second voice and the trigger time, determining whether the collected text includes the target text; after determining that the collected text includes the target text, determining whether the first word is a confusing word of the second word; The processing module is further configured to, when determining that the first word is a confused word of the second word, construct a to-be-corrected word library including the first word, record a target correspondence between the first word and the second word in the corrected word library, and mark a correct word corresponding to the target correspondence in the corrected word library; The acquisition module is further used to acquire the target voice of the target user; The recognition module is further used to recognize the target words included in the target speech; The processing module is further configured to, when it is determined that the to-be-corrected word library includes the target word, query the correct word corresponding to the target word according to the correspondence between the words recorded in the word library after error correction and the correct word corresponding to the correspondence between the words marked in the word library after error correction, and respond to the target speech according to the correct word corresponding to the target word; The processing module is further used to obtain the pinyin of each character in the second word, determine the similar pinyin corresponding to the pinyin of each character; obtain the target keyword set corresponding to each character according to the similar pinyin corresponding to the pinyin of each character, the second word includes a first keyword, the target keyword set corresponding to the first keyword includes a second keyword, and the pinyin of the second keyword is a similar pinyin to the pinyin of the first keyword; Selecting a third keyword from the second word, and determining a target sub-keyword set from a target keyword set corresponding to the third keyword; Using each keyword in the target sub-keyword set, the second word is replaced with respect to the third keyword in turn to obtain a replaced word set, wherein the replaced word set includes each replaced word; when the replaced word set includes the first word, the first word is determined to be a confusing word of the second word.

7. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the processor and the memory are connected to each other, wherein the memory is used to store computer program instructions, and the processor is configured to execute the program instructions to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, they are used to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Error correction method and device for speech recognition, electronic device and readable storage medium

    CN109065054A

  • Method and device for correcting the error of the text, electronic equipment and storage medium

    CN113051896A

Cited By

  • Method, computer device and computer programs for enhancing privacy and security in audio and video communications

    EP4822689A1