A language learning method, system and storage medium
By receiving the user's voice and generating word animation videos with emotional types and scores, it solves the problem of high-cost equipment in existing English teaching methods, achieves low-cost and efficient English teaching, and enhances learning effects and immersion.
Patent Information
- Application Number
- CN202410217573.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-02-27
AI Technical Summary
Existing English teaching methods require high-cost AR/MR glasses equipment, resulting in higher learning costs for users.
By receiving the user's voice, using the recognition model to obtain the voice text, splitting it into words and assigning emotional types and scores, generating online or offline animated videos based on the network status, and combining voice and animation for English teaching.
It reduces the hardware cost of English teaching, improves the accuracy and immersion of learning, avoids animation generation problems when the network is abnormal, and enhances the learning effect.
Smart Images

Figure CN118410813B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing, and in particular relates to a language learning method, system and storage medium. Background Art
[0002] At present, the importance of English as a subject in learning is becoming increasingly prominent, and its application in daily life is becoming more and more extensive.
[0003] At present, the following methods are proposed for English teaching. For example, the Chinese patent document "CN112700553A" discloses an interactive multimedia English teaching device and system. The method uses AR / MR glasses, a data receiver and a data processor. Through three-dimensional imaging, users can recognize objects in English in a three-dimensional scene, improve the diversity of English data display, and simultaneously obtain English data and English audio data in combination with the scene. Another example is the Chinese patent document "CN112270763A" discloses a method and device for generating virtual reality teaching videos. In this method, the teacher wears a virtual reality head-mounted display device, constructs a virtual teaching scene and collects teaching information according to the teaching mode, and generates a virtual reality teaching video using the teaching information and the virtual teaching scene. The teacher can write on the blackboard and do experiments in the virtual reality scene, and students can watch the teaching content and experimental content more intuitively and stereoscopically, with a stronger sense of immersion, which further improves the student participation.
[0004] However, the above two methods require the support of hardware equipment, and the cost of existing AR / MR glasses is relatively high, which will greatly increase the cost for users. Summary of the invention
[0005] To solve the above problems, the present invention provides a language learning method, system and storage medium to solve the problem of high English teaching cost in the prior art.
[0006] In order to achieve the above-mentioned object of the invention, the present invention provides a language learning method, comprising:
[0007] Receiving user speech, removing noise from the user speech and then recognizing it using a first recognition model to obtain speech text;
[0008] If the voice text is incomplete, a reminder statement is generated to prompt the user to correct the user voice to obtain a corrected voice, and the corrected voice is recognized again to obtain the voice text;
[0009] Splitting the speech text into a plurality of words, establishing an emotion dictionary, assigning an emotion type and an emotion score corresponding to each of the words based on the emotion dictionary, wherein the emotion type includes positive emotion and negative emotion, and dividing the emotion type of the speech text based on the emotion type and the emotion score, and the first duration of the user's speech;
[0010] Translate the speech text into English text, generate a reply speech based on the English text, and obtain a second duration of the reply speech;
[0011] If the network status is normal, calling the online animation model to generate an online animation, combining the answering voice with the online animation to generate an online answering video;
[0012] If the network status is abnormal, an offline animation is generated, and the third duration of each of the words is obtained, and the time interval of the words with the highest emotion score and the longest third duration in the English text in the second duration is located, and the time interval is defined as a memory interval;
[0013] The animation effect of the memory interval in the offline animation is changed to obtain a derivative animation, and the answer voice is combined with the derivative animation to generate an offline answer video.
[0014] Furthermore, the derivative animation is generated based on the following steps:
[0015] Generate the offline animation based on a preset animation template, wherein the offline animation includes a human face, annotate a first key point associated with two eyes and a second key point associated with two ends of a mouth in the offline animation, and connect the first key point and the second key point to obtain an expression contour;
[0016] The emotion type of the voice text is obtained. If the emotion type is a positive emotion, the first key point and the second key point are moved according to a preset trajectory to expand the area of the expression contour. If the emotion type is a negative emotion, the first key point and the second key point are moved according to a preset trajectory to reduce the area of the expression contour. The adjusted offline animation is defined as the derivative animation.
[0017] Further, the emotion type of the speech text is calculated based on the following steps:
[0018] The user voice is divided into a first speed, a second speed, and a third speed according to the first duration, and the emotion score α of the user voice is calculated based on a first formula, where the first formula is: Among them, β iis the emotion score of the i-th word in the speech text, I is the number of words included in the speech text, V j A threshold is set for the weights of the user voice when the first speed, the second speed, and the third speed. If the emotion score of the user voice is greater than the threshold, it is determined to be a positive emotion, otherwise it is determined to be a negative emotion.
[0019] Further, the reminder statement is generated based on the following steps:
[0020] Determine the defect type of the voice text. If it is the first defect type, insert the voice text after removing the defective content into the first template question sentence to generate a first reminder sentence. If it is the second defect type or the third defect type, locate the defective part in the voice text, intercept the pronunciation of the user's voice in the defective part, and input the pronunciation of the defective part into the first recognition model, the second recognition model, and the third recognition model separately to obtain the first recognition result, the second recognition result, and the third recognition result;
[0021] Calculating the similarity between the incomplete part and the first recognition result, the second recognition result and the third recognition result, and taking the recognition result corresponding to the maximum similarity as the final recognition result;
[0022] The final recognition result is inserted into the second template text question to generate a second reminder sentence corresponding to the second incomplete type, and the incomplete part in the voice text is replaced with the final recognition result to generate a third reminder sentence corresponding to the third incomplete type.
[0023] Further, the similarity between the incomplete part and the first recognition result is calculated based on the following steps:
[0024] The incomplete part and the first recognition result are converted into a first Chinese Pinyin and a second Chinese Pinyin, and the similarity λ between the first Chinese Pinyin and the second Chinese Pinyin is calculated based on a second formula, wherein the second formula is: Wherein, b is calculated based on the third formula, and the third formula is: in, is a preset base number, whose value is between 0 and 1, a is the difference in character length between the first Chinese Pinyin and the second Chinese Pinyin, b is the difference in the number of identical letters between the first Chinese Pinyin and the second Chinese Pinyin, and The numbers of n-th letters included in the first Chinese Pinyin and the second Chinese Pinyin respectively.
[0025] Further, the defect type of the speech text is determined based on the following steps:
[0026] Acquire a first confidence of the speech text, and if the first confidence is less than a first threshold, continue to acquire a second confidence of each of the words, and define the words whose second confidence is less than a second threshold as ambiguous words;
[0027] If the ambiguous words are all located in the first half or the second half of the speech text, the speech text is classified as the first incomplete type; if the ambiguous words are respectively located in the first half and the second half of the speech text, the speech text is classified as the second incomplete type; if the ambiguous words have only one such word and the word is not an auxiliary verb, the speech text is classified as the third incomplete type.
[0028] Further, the first confidence level is calculated based on the following steps:
[0029] Recognize the user's voice based on the first recognition model to obtain a plurality of the words and the corresponding third confidences, divide the different words into a plurality of independent intervals, and the same independent interval corresponds to the words with the same pronunciation. If the independent interval includes only one word, add a blank word in the independent interval, and the third confidence of the blank word is 1;
[0030] Normalize the third confidence in each of the independent intervals to obtain the second confidence of each of the words, extract the words with the largest second confidence in each of the independent intervals, connect the words in sequence based on the recognition order to obtain the speech text, and define the average value of the speech text including the second confidence of the words as the first confidence.
[0031] Further, the user voice is denoised based on the following steps:
[0032] A plurality of denoising models are established, each denoising model corresponds to a noise type, and the denoising model is generated based on training of the noise type. After receiving the user voice, the noise type included in the user voice is identified, and the corresponding denoising model is selected based on the noise type, and the user voice is input into the selected denoising model for denoising.
[0033] The present invention also provides a language learning system, which is used to implement the above-mentioned language learning method, and the system comprises:
[0034] A recognition module receives user speech, removes noise from the user speech, and then uses a first recognition model to recognize the speech to obtain speech text;
[0035] A reminder module, if the voice text is incomplete, generates a reminder statement to prompt the user to correct the user voice to obtain a corrected voice, and recognizes the corrected voice again to obtain the voice text;
[0036] a segmentation module, which segments the speech text into a plurality of words, establishes an emotion dictionary, assigns an emotion type and an emotion score corresponding to each word based on the emotion dictionary, wherein the emotion type includes positive emotion and negative emotion, and segments the emotion type of the speech text based on the emotion type and the emotion score, as well as the first duration of the user's speech;
[0037] A translation module, translating the speech text into English text, generating a reply speech based on the English text, and obtaining a second duration of the reply speech;
[0038] A generation module, if the network status is normal, calls the online animation model to generate an online animation, combines the answer voice with the online animation to generate an online answer video, if the network status is abnormal, generates an offline animation, and simultaneously obtains the third duration of each of the words, locates the time interval of the words with the highest emotion score and the longest third duration in the English text in the second duration, defines the time interval as a memory interval, changes the animation effect of the memory interval in the offline animation, obtains a derivative animation, and combines the answer voice with the derivative animation to generate an offline answer video.
[0039] The present invention also provides a computer storage medium, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned language learning method.
[0040] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0041] The present invention first receives Chinese speech from the user, and then converts the Chinese speech into Chinese speech text. If there is a missing part in the speech text, a reminder statement will be generated to remind the user to repeat the previous speech, so that the system can obtain accurate speech text, and the translated English text will also be accurate, so as to avoid translation errors, causing the user to learn incorrect English pronunciation and meaning. After that, the present invention also monitors the user's network status. If the network is abnormal, the local animation template can be called to generate animation to avoid the situation where only speech can be played but animation cannot be generated in an offline situation; and when generating offline animation, the expression mark of the generated animation at a certain time point is adjusted according to the user's speech speed and the words contained in the text, so as to deepen the user's learning impression and enable the user to obtain better learning effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flow chart of the steps of a language learning method of the present invention;
[0043] Figure 2 The figure is a structural diagram of a language learning system of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0046] like Figure 1 A language learning method, comprising:
[0047] Step S1: receiving user speech, denoising the user speech, and then recognizing the speech using a first recognition model to obtain speech text.
[0048] Specifically, the user's voice is in Chinese. After the system receives the user's Chinese, it converts it into synonymous English and repeats it, thereby achieving the purpose of English teaching. After receiving the user's voice, the noise in the user's voice is eliminated to improve the recognition accuracy of the user's voice. For example, the user will study in the subway and will have the background noise of the subway. Afterwards, the user's voice is recognized using the first recognition model to obtain a voice text in Chinese; the semantic recognition model of this embodiment is specifically a deep neural network (DNN) model. When performing recognition, the voice is first converted into a feature vector. This embodiment uses MFCC as a feature vector. Similarity measurement, acoustic model recognition, voice model recognition and decoding are performed to finally obtain a voice text. The above recognition process is a prior art and will not be repeated here.
[0049] Step S2: If the voice text is incomplete, a reminder statement is generated to prompt the user to correct the user's voice, obtain the corrected voice, and recognize the corrected voice again to obtain the voice text.
[0050] A represents the recognized speech, and B represents the unrecognized speech. For example, if the speech text is AAABBAA, the existence of B indicates that the recognized speech text is incomplete. Then a reminder voice is sent out to prompt the user to repeat the speech at B, that is, to correct the speech. Then, the speech is recognized again based on the corrected speech to obtain a complete speech text.
[0051] Step S3: Split the speech text into multiple words, establish an emotion dictionary, assign a corresponding emotion type and emotion score to each word based on the emotion dictionary, where the emotion type includes positive emotion and negative emotion, and divide the emotion type of the speech text based on the emotion type and emotion score, as well as the first duration of the user's voice.
[0052] This embodiment uses the two-way maximum matching method for word segmentation. The emotional dictionary can be established based on the Internet database, because the Internet database has already marked each word with the corresponding emotional label, such as which words represent positive emotions and which emotions represent negative words. And the corresponding emotional score is assigned based on the description of each word, such as the implementation of dividing the score into 3 levels, where for positive emotions, the word description is passionate and 3 points, the word description is relaxed and fast and 2 points, and for negative emotions, -3 points and -2 points. Specifically, a sample set can be established in advance, and a neural network model can be selected for training. After that, a large number of words can be input into the trained neural network model for automatic labeling and scoring, which can reduce the workload of manual labeling. The first duration is the time from the beginning to the end of the user's speech.
[0053] Step S4: Translate the speech text into English text, generate a reply speech based on the English text, and obtain a second duration of the reply speech.
[0054] An external interface can be used to translate the voice text into English text, and then the English text is converted into voice and played externally, so that users can listen and learn; the second duration is the time from the utterance to the cessation of the answering voice.
[0055] Step S5: If the network status is normal, the online animation model is called to generate the online animation, and the answering voice is combined with the online animation to generate the online answering video.
[0056] Step S6: If the network status is abnormal, an offline animation is generated, and the third duration of each word is obtained at the same time, and the time interval of the word with the highest emotion score and the longest third duration in the English text in the second duration is located, and the time interval is defined as a memory interval.
[0057] Step S7: Change the animation effect of the memory interval in the offline animation to obtain a derivative animation, and combine the answer voice with the derivative animation to generate an offline answer video.
[0058] This system not only plays the answering voice, but also plays the answering voice in combination with animation, thereby increasing the learner's learning impression and improving the learning effect. When generating animation, if it is detected that the current network is in normal state, the cloud-based animation generation model is used to generate online animation. The computing power of the cloud can generate more realistic animation, thereby enhancing the user's learning immersion. If it is detected that the network is currently in an abnormal state, such as the user's network signal in the subway is poor, that is, the large model in the cloud cannot be called to generate animation, then the local animation template is used to generate an offline animation. Afterwards, in order to enhance the user's learning immersion and impression, the emotion of the user's voice is analyzed. If the user is in an excited positive emotion, an offline animation expressing excitement is also generated. If the user is in a lost negative emotion, an offline animation expressing loss is also generated. Specifically, after the offline animation is generated, the animation form is modified at the lowest or highest emotion. The interval with the lowest or highest emotion is the memory interval. For example, if the English text is ACAAA, C is the highest emotion, and the appearance time is 00:02-00:05, then this period of time is positioned as the memory interval, and then the expression in the memory interval is modified to an exaggerated expression or a painful expression, thereby converting the offline animation into a derivative animation; then, the generated answer voice is combined with the derivative animation to generate an offline answer video.
[0059] The present invention first receives Chinese speech from the user, and then converts the Chinese speech into Chinese speech text. If there is a missing part in the speech text, a reminder statement will be generated to remind the user to repeat the previous speech, so that the system can obtain accurate speech text, and the translated English text will also be accurate, so as to avoid translation errors, causing the user to learn incorrect English pronunciation and meaning. After that, the present invention also monitors the user's network status. If the network is abnormal, the local animation template can be called to generate animation to avoid the situation where only speech can be played but animation cannot be generated in an offline situation; and when generating offline animation, the expression mark of the generated animation at a certain time point is adjusted according to the user's speech speed and the words contained in the text, so as to deepen the user's learning impression and enable the user to obtain better learning effect.
[0060] In this embodiment, the derivative animation is generated based on the following steps:
[0061] An offline animation is generated based on a preset animation template. The offline animation includes a human face. A first key point associated with two eyes and a second key point associated with both ends of a mouth are marked in the offline animation. The first key point and the second key point are connected to obtain an expression contour.
[0062] Get the emotion type of the voice text. If the emotion type is positive, move the first key point and the second key point along the preset trajectory to expand the area of the expression contour. If the emotion type is negative, move the first key point and the second key point along the preset trajectory to reduce the area of the expression contour. Define the adjusted offline animation as a derivative animation.
[0063] It is particularly noted that the voice text and the English text have the same emotion type, and the corresponding words and words in the voice text and the English text have the same emotion scores, so they will not be distinguished one by one in the subsequent introduction. After generating the offline animation, locate the memory interval and obtain the emotion type of the voice text. If it is a positive emotion, move the two first key points in the memory interval upward, and move the two second key points toward the upper side away from each other, that is, move according to the preset trajectory, so that the expression contour area becomes larger and the character's expression becomes joyful; if it is a negative emotion, move the two first key points in the memory interval downward, and move the two second key points toward the lower side away from each other, so that the expression contour area becomes smaller and the character's expression becomes sad.
[0064] In this embodiment, the following steps are also included: connecting two second key points to obtain a first connecting line, drawing a second connecting line perpendicular to the midpoint of the first connecting line, setting a maximum limit length of the second connecting line, obtaining the pronunciation rules of each word, setting an expansion percentage based on the pronunciation rules of the words in the memory interval, multiplying the expansion percentage by the maximum limit length of the second connecting line, and obtaining the mouth opening during pronunciation.
[0065] Assume that the maximum limit length is set to 3cm, and then obtain the pronunciation rules of each word. The pronunciation rules specifically include vowels, consonants, stressed sounds, and prefix and suffix sounds. Each pronunciation sets the mouth shape opening. For example, word D includes vowels and stressed sounds, the vowel expansion percentage is set to 0.5, and the stressed sound expansion percentage is set to 0.4. When playing the word, the mouth shape first opens 3*0.5=1.5cm, and then changes to 3*0.4=1.2cm. This step can generate a more realistic generated pronunciation mouth shape in an offline state.
[0066] In this embodiment, the emotion type of the speech text is calculated based on the following steps:
[0067] The user's voice is divided into a first speed, a second speed, and a third speed according to the first duration, and the emotion score α of the user's voice is calculated based on the first formula. The first formula is: Among them, β i is the sentiment score of the i-th word in the speech text, I is the number of words included in the speech text, V jA threshold is set for the weights of the user's voice when it is at the first speed, the second speed, and the third speed. If the emotion score of the user's voice is greater than the threshold, it is determined to be a positive emotion, otherwise it is determined to be a negative emotion.
[0068] Specifically, the first range, the second range and the third range are set. For example, if the first duration is within the first range, the speech speed is judged to be the first speed, that is, the slower speed; then the corresponding weight is set for each speed, such as the weight V1 of the first speed is 0.2, the weight of the second speed V2 is 0.3, and the weight of the third speed V3 is 0.5. Then, the words included in the voice text are obtained. If the voice text is "Although you did a good job, I am still very, very angry", it is divided into "not bad", "very" and "angry", and the emotion type corresponding to "not bad" is a positive type, and "angry" corresponds to a negative type. Then, "very" is a neutral word and has no score in the emotion dictionary, so its score is set to 0, "not bad" is scored as 1, and "angry" is scored as -2. The speed of the user's voice is the third speed, then the calculated negative emotion score is -1-0.5=-1.5. If the threshold is set to 0, since the emotion score is less than 0, it is determined to be a negative emotion; the reason for introducing the speech speed here is that, in general, the faster the speech speed, the greater the emotional fluctuation, because people speak faster when they are sad.
[0069] This embodiment generates a reminder statement based on the following steps:
[0070] Determine the incomplete type of the voice text. If it is the first incomplete type, insert the voice text after removing the incomplete content into the first template question to generate a first reminder sentence. If it is the second incomplete type or the third incomplete type, locate the incomplete part in the voice text, intercept the pronunciation of the user's voice in the incomplete part, and input the pronunciation of the incomplete part into the first recognition model, the second recognition model and the third recognition model separately to obtain the first recognition result, the second recognition result and the third recognition result.
[0071] The method for determining the incomplete type will be introduced in detail later. If the speech text determined to be the first incomplete type is "Some birds are destined to be locked in AA at BBB", and the first template question is "I didn't hear it clearly, please repeat it ***", then remove the incomplete part to obtain "Some birds are destined to be locked in", and then insert it into the first template question to generate the first reminder sentence "I didn't hear it clearly, please repeat it some birds are destined to be locked in XXX at XXX", where X is a beeping sound.
[0072] If it is the second incomplete type or the third incomplete type, the pronunciation of the incomplete part is extracted and input into the first recognition model, the second recognition model and the third recognition model. The second recognition model can be an HMM (Hidden Markov Model) model, and the third recognition model can be a recurrent neural network (RNN). Others include CNN and Transformer models, etc., which are not listed here one by one. Then the recognition results corresponding to each recognition model are obtained. For example, if the second incomplete sentence is "Some AAs are destined not to be locked in BBB", for position AA, the first recognition result is "bird", the second recognition result is "seedling", and the third recognition result is "bird". For position BB, the first recognition result is "in the dragon boat", the second recognition result is "in the cage", and the third recognition result is "dragon plum".
[0073] The similarity between the incomplete part and the first recognition result, the second recognition result and the third recognition result is calculated, and the recognition result corresponding to the maximum similarity is taken as the final recognition result.
[0074] The final recognition result is inserted into the second template text question to generate a second reminder sentence corresponding to the second defect type, and the defective part in the voice text is replaced with the final recognition result to generate a third reminder sentence corresponding to the third defect type.
[0075] The method for calculating similarity is introduced later. It can be seen that the recognition results of "bird" and "cage" are accurate. Assuming that the second template question is "I only heard **, **, please repeat the other content", then after inserting the final recognition result, the second reminder sentence "I only heard birds, cages, please repeat the other content" will be generated.
[0076] If the third incomplete sentence is "some birds are not destined to be kept in BBB", the third reminder sentence generated is "some birds are not destined to be kept in cages". If the user has no objection to the third reminder sentence, the English pronunciation is generated. If there is any objection, the user pronunciation is continuously listened to.
[0077] In this embodiment, the similarity between the incomplete part and the first recognition result is calculated based on the following steps:
[0078] The incomplete part and the first recognition result are converted into the first Chinese Pinyin and the second Chinese Pinyin, and the similarity λ of the first Chinese Pinyin and the second Chinese Pinyin is calculated based on the second formula, and the second formula is: Wherein, b is calculated based on the third formula, which is: in, is a preset base number, whose value is between 0 and 1, a is the difference between the length of the first Chinese Pinyin and the second Chinese Pinyin, b is the difference between the number of identical letters in the first Chinese Pinyin and the second Chinese Pinyin, and The numbers of n-th letters included in the first Chinese Pinyin and the second Chinese Pinyin respectively.
[0079] For example, the first Chinese pinyin obtained by converting the incomplete part is "longzili", and the corresponding character length is 8; the second Chinese pinyin obtained by the first recognition result is "longzhouli", and the corresponding character length is 10, then the value of a is 10-8=2. For b, the first Chinese pinyin includes 2 Ls and 2 i's, 1 o, 1 n, 1 g, 1 z, and the number of remaining letters is 0. The second Chinese pinyin includes 2 Ls and 2 o's, 1 n, 1 g, 1 z, 1 h, 1 u, 1 i, and the number of remaining letters is 0. By inputting the third formula for calculation, it can be obtained that b is 4. Here the preset base is set to 0.9, so the similarity is λ, which is 0.6561.
[0080] It can be predicted that the larger the value of a+b is, the smaller the calculated similarity result will be because the base is less than 1, which means that the greater the difference in pinyin is, the smaller the similarity is. In addition, when calculating the similarity, the order of letter appearance is not included in the calculation of similarity in consideration of the particularity of Chinese pinyin. For example, the above method will make the similarity between "long" and "ongl" reach 1, but the pinyin "ongl" is impossible to appear. Therefore, the above calculation method is not only accurate but also simplifies the calculation process.
[0081] In this embodiment, the defect type of the speech text is determined based on the following steps:
[0082] Obtaining a first confidence of the speech text, if the first confidence is less than a first threshold, continuing to obtain a second confidence of each word, and defining the words whose second confidence is less than the second threshold as fuzzy words;
[0083] If the ambiguous words are all located in the first half or the second half of the speech text, the speech text is classified as the first incomplete type; if the ambiguous words are located in the first half and the second half of the speech text respectively, the speech text is classified as the second incomplete type; if there is only one ambiguous word and the word is not an auxiliary verb, the speech text is classified as the third incomplete type.
[0084] The method for calculating the first confidence is introduced later. If the first confidence of the speech text is less than the first threshold, it is considered that the recognition accuracy of the speech text is low, so the text is judged as an incomplete text. After that, the second confidence of each word in the speech text is obtained, and the words with the second confidence less than the second threshold are judged as ambiguous words, that is, the recognition accuracy of ambiguous words is low.
[0085] For example, if the speech text is "AABBAAAAAAA", B is an ambiguous word and is located in the first half of the speech text, the speech text is classified as the first incomplete type; if the speech text is "AABAAABAAB", the ambiguous words are distributed in both the first and second halves, the speech text is classified as the second incomplete type; if the speech text is "AAAAAAAAAB" and B is not an auxiliary verb, the speech text is classified as the third incomplete type. Auxiliary verbs are words without real meaning and can be judged based on the preset part-of-speech dictionary.
[0086] In this embodiment, the first confidence level is calculated based on the following steps:
[0087] Recognize the user's voice based on the first recognition model to obtain multiple words and corresponding third confidences, divide different words into multiple independent intervals, and the same independent interval corresponds to words with the same pronunciation. If the independent interval only includes one word, add a blank word in the independent interval, and the third confidence of the blank word is 1;
[0088] The third confidence in each independent interval is normalized to obtain the second confidence of each word, the word with the largest second confidence in each independent interval is extracted, the words are connected in sequence based on the recognition order to obtain the speech text, and the average value of the speech text including the second confidence of the words is defined as the first confidence.
[0089] Each word in the speech text corresponds to a third confidence, which is directly output by the recognition model. In particular, the first recognition model may output multiple words and corresponding confidences for the same speech. For example, for "longzi", the word "cage" will be output, and the corresponding third confidence is 0.7, and the word "dragon", and the corresponding third confidence is 0.3; then, the independent interval is divided. Since "cage" and "dragon" are both obtained by recognizing "longzi", the two are divided into an independent interval; in particular, assuming that the independent interval only contains "dragon", a blank word is introduced, and the corresponding third confidence is 1, 0.3 and 1 are normalized to 0.23 and 0.77 respectively.
[0090] Afterwards, the words with the maximum second confidence in each independent interval are extracted to form a speech text, and the second confidence of each word is accumulated and divided by the number of words included in the speech text to obtain an average value, which is used as the first confidence of the speech text. It can be seen that the size of the first confidence is related to the second confidence of each word. Therefore, when the first confidence is small, there must be words with smaller second confidence.
[0091] De-noise the user's voice based on the following steps:
[0092] Multiple denoising models are established, each denoising model corresponds to a noise type. The denoising model is generated based on a noise type training. After receiving the user's voice, the noise type included in the user's voice is identified, and the corresponding denoising model is selected based on the noise type. The user's voice is input into the selected denoising model for denoising.
[0093] For example, the user's voice is combined with subway noise to generate a first sample set, and the user's voice is combined with car horn sound to generate a second sample set. The first sample set is used to train a first denoising model based on deep learning, and the second sample set is used to train a second denoising model based on deep learning. After the training is completed, if it is recognized that the voice actually input by the user includes subway noise, the user's voice is then input into the first denoising model for denoising. This embodiment can improve the denoising effect of the user's voice by establishing a proprietary denoising model.
[0094] like Figure 2 As shown, the present invention also provides a language learning system, which is used to implement the above-mentioned language learning method, and the system includes:
[0095] A recognition module receives user speech, removes noise from the user speech, and uses the first recognition model to perform recognition to obtain speech text;
[0096] The reminder module generates a reminder statement if the voice text is incomplete, prompting the user to correct the user's voice, obtain the corrected voice, and recognize the corrected voice again to obtain the voice text;
[0097] A segmentation module, which segments the speech text into multiple words, establishes an emotion dictionary, assigns each word a corresponding emotion type and emotion score based on the emotion dictionary, wherein the emotion type includes positive emotion and negative emotion, and divides the emotion type of the speech text based on the emotion type and emotion score, as well as the first duration of the user's speech;
[0098] A translation module, translating the speech text into English text, generating a reply speech based on the English text, and obtaining a second duration of the reply speech;
[0099] A generation module, if the network status is normal, calls the online animation model to generate online animation, combines the answer voice with the online animation to generate an online answer video, if the network status is abnormal, generates an offline animation, and obtains the third duration of each word, locates the time interval of the words with the highest sentiment score and the longest third duration in the English text in the second duration, defines the time interval as a memory interval, changes the animation effect of the memory interval in the offline animation, obtains a derivative animation, and combines the answer voice with the derivative animation to generate an offline answer video.
[0100] The present invention also provides a computer storage medium, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned language learning method.
[0101] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0102] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0103] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0104] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A language learning method, characterized in that: The method comprises the following steps: Receiving user speech, removing noise from the user speech and then recognizing it using a first recognition model to obtain speech text; If the voice text is incomplete, a reminder statement is generated to prompt the user to correct the user voice to obtain a corrected voice, and the corrected voice is recognized again to obtain the voice text; The reminder statement is generated based on the following steps: Determine the defect type of the voice text. If it is the first defect type, insert the voice text after removing the defective content into the first template question sentence to generate a first reminder sentence. If it is the second defect type or the third defect type, locate the defective part in the voice text, intercept the pronunciation of the user's voice in the defective part, and input the pronunciation of the defective part into the first recognition model, the second recognition model, and the third recognition model separately to obtain the first recognition result, the second recognition result, and the third recognition result; Calculating the similarity between the incomplete part and the first recognition result, the second recognition result and the third recognition result, and taking the recognition result corresponding to the maximum similarity as the final recognition result; Inserting the final recognition result into the second template text question sentence to generate a second reminder sentence corresponding to the second defect type, replacing the defective part in the speech text with the final recognition result to generate a third reminder sentence corresponding to the third defect type; The similarity between the incomplete part and the first recognition result is calculated based on the following steps: The incomplete part and the first recognition result are converted into a first Chinese pinyin and a second Chinese pinyin, and the similarity between the first Chinese pinyin and the second Chinese pinyin is calculated based on a second formula , the second formula is: , wherein b is calculated based on the third formula, and the third formula is: ,in, is a preset base number, whose value is between 0 and 1, a is the difference in character length between the first Chinese Pinyin and the second Chinese Pinyin, b is the difference in the number of identical letters between the first Chinese Pinyin and the second Chinese Pinyin, and The number of n-th letters included in the first Chinese phonetic spelling and the second Chinese phonetic spelling respectively; Splitting the speech text into a plurality of words, establishing an emotion dictionary, assigning an emotion type and an emotion score corresponding to each of the words based on the emotion dictionary, wherein the emotion type includes positive emotion and negative emotion, and dividing the emotion type of the speech text based on the emotion type and the emotion score, and the first duration of the user's speech; Translate the speech text into English text, generate a reply speech based on the English text, and obtain a second duration of the reply speech; If the network status is normal, calling the online animation model to generate an online animation, combining the answering voice with the online animation to generate an online answering video; If the network status is abnormal, an offline animation is generated, and the third duration of each of the words is obtained, and the time interval of the words with the highest emotion score and the longest third duration in the English text in the second duration is located, and the time interval is defined as a memory interval; Changing the animation effect of the memory interval in the offline animation to obtain a derivative animation, and combining the answer voice with the derivative animation to generate an offline answer video; The derivative animation is generated based on the following steps: Generate the offline animation based on a preset animation template, wherein the offline animation includes a human face, annotate a first key point associated with two eyes and a second key point associated with two ends of a mouth in the offline animation, and connect the first key point and the second key point to obtain an expression contour; Acquire the emotion type of the voice text, if the emotion type is positive emotion, move the first key point and the second key point according to a preset trajectory to expand the area of the expression contour, if the emotion type is negative emotion, move the first key point and the second key point according to a preset trajectory to reduce the area of the expression contour, and define the adjusted offline animation as the derivative animation; The emotion type of the speech text is calculated based on the following steps: The user voice is divided into a first speed, a second speed, and a third speed according to the first duration, and the emotion score of the user voice is calculated based on a first formula , the first formula is: , where β i is the emotion score of the i-th word in the speech text, I is the number of the words included in the speech text, A threshold is set for the weights of the user voice when the first speed, the second speed, and the third speed. If the emotion score of the user voice is greater than the threshold, it is determined to be a positive emotion, otherwise it is determined to be a negative emotion.
2. A language learning method according to claim 1, characterized in that: The defect type of the speech text is determined based on the following steps: Acquire a first confidence of the speech text, and if the first confidence is less than a first threshold, continue to acquire a second confidence of each of the words, and define the words whose second confidence is less than a second threshold as ambiguous words; If the ambiguous words are all located in the first half or the second half of the speech text, the speech text is classified as the first incomplete type; if the ambiguous words are respectively located in the first half and the second half of the speech text, the speech text is classified as the second incomplete type; if the ambiguous words have only one such word and the word is not an auxiliary verb, the speech text is classified as the third incomplete type.
3. A language learning method according to claim 2, characterized in that: The first confidence level is calculated based on the following steps: Recognize the user's voice based on the first recognition model to obtain a plurality of the words and the corresponding third confidences, divide the different words into a plurality of independent intervals, and the same independent interval corresponds to the words with the same pronunciation. If the independent interval includes only one word, add a blank word in the independent interval, and the third confidence of the blank word is 1; Normalize the third confidence in each of the independent intervals to obtain the second confidence of each of the words, extract the words with the largest second confidence in each of the independent intervals, connect the words in sequence based on the recognition order to obtain the speech text, and define the average value of the speech text including the second confidence of the words as the first confidence.
4. A language learning method according to claim 1, characterized in that: De-noising the user's voice is performed based on the following steps: A plurality of denoising models are established, each denoising model corresponds to a noise type, and the denoising model is generated based on training of the noise type. After receiving the user voice, the noise type included in the user voice is identified, and the corresponding denoising model is selected based on the noise type, and the user voice is input into the selected denoising model for denoising.
5. A language learning system, used to implement a language learning method as claimed in any one of claims 1 to 4, characterized in that: The system includes the following modules: A recognition module receives user speech, removes noise from the user speech, and then uses a first recognition model to recognize the speech to obtain speech text; A reminder module, if the voice text is incomplete, generates a reminder statement to prompt the user to correct the user voice to obtain a corrected voice, and recognizes the corrected voice again to obtain the voice text; a segmentation module, which segments the speech text into a plurality of words, establishes an emotion dictionary, assigns an emotion type and an emotion score corresponding to each word based on the emotion dictionary, wherein the emotion type includes positive emotion and negative emotion, and segments the emotion type of the speech text based on the emotion type and the emotion score, as well as the first duration of the user's speech; A translation module, translating the speech text into English text, generating a reply speech based on the English text, and obtaining a second duration of the reply speech; A generation module, if the network status is normal, calls the online animation model to generate an online animation, combines the answer voice with the online animation to generate an online answer video, if the network status is abnormal, generates an offline animation, and simultaneously obtains the third duration of each of the words, locates the time interval of the words with the highest emotion score and the longest third duration in the English text in the second duration, defines the time interval as a memory interval, changes the animation effect of the memory interval in the offline animation, obtains a derivative animation, and combines the answer voice with the derivative animation to generate an offline answer video.
6. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute a language learning method according to any one of claims 1 to 4.
