Tone correction method and device, electronic equipment and storage medium

Through the combination of tone recognition and multi-phonetic word correction models, accurate identification and correction of tone errors in spoken audio are achieved, which solves the problem of inaccurate tone evaluation in the existing technology and improves the performance of the speech processing system.

CN118865952APending Publication Date: 2024-10-29SUZHOU SHENGTONG INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411319783.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

It is difficult to accurately evaluate and correct intonation errors in spoken language with existing technology, which affects semantic understanding and the performance of intelligent speech systems.

Method used

The audio to be evaluated is decoded through the tone recognition model, and the recognized text is generated, and processed and matched based on the dictionary and polyphone correction model to automatically correct incorrect tones in reading.

Benefits of technology

It improves the accuracy of tone evaluation, can accurately identify and correct reading errors, and enhances the performance of the speech processing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865952A_ABST
    Figure CN118865952A_ABST
Patent Text Reader

Abstract

The invention discloses a tone correction method and device, electronic equipment and a storage medium. The tone correction method comprises the following steps: acquiring an audio to be evaluated and an evaluation text corresponding to the audio to be evaluated; the to-be-evaluated audio is decoded through the tone recognition model, a recognition text which is output from the tone recognition model and comprises the tone identifier is obtained, and the recognition text conforms to a format rule of a dictionary used when the tone recognition model is trained; processing the evaluation text based on the dictionary to obtain a reference text conforming to a format rule; performing matching operation on the reference text and the recognition text; and based on a result of the matching operation, correcting the tones with wrong reading. The tone correction method can improve the accuracy of tone correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to a tone correction method, device, electronic device, and storage medium. Background Art

[0002] In oral learning or oral teaching, audio evaluation technology can score the audio of the user's reading according to the difference between the audio and the text, thereby realizing automatic evaluation of the user's oral level. In addition to knowing whether the oral expression is right or wrong, the user also needs to know the specific circumstances of the reading error.

[0003] The accuracy of tones has a significant impact on semantic understanding, speech communication, learning and teaching, and the performance of intelligent speech systems. Therefore, in addition to evaluation criteria such as pronunciation, completeness, accuracy, and fluency, the accuracy of tones has also become one of the important criteria for oral evaluation. How to improve the accuracy of tone evaluation is a key task in speech processing. Summary of the invention

[0004] At least one embodiment of the present disclosure provides a tone correction method, which includes: obtaining an audio to be evaluated and an evaluation text corresponding to the audio to be evaluated; decoding the audio to be evaluated by a tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with the format rules of a dictionary used when training the tone recognition model; processing the evaluation text based on the dictionary to obtain a reference text that complies with the format rules; matching the reference text and the recognition text; and correcting the incorrectly read tone based on the result of the matching operation.

[0005] For example, the tone correction method provided by at least one embodiment of the present disclosure also includes: inputting the evaluation text into a polyphone correction model, automatically marking polyphones for the evaluation text through the polyphone correction model, and obtaining a polyphone correction text output from the polyphone correction model.

[0006] For example, the tone correction method provided by at least one embodiment of the present disclosure also includes: performing word segmentation processing on the evaluation text or the polyphone correction text through a tone conversion module to obtain multiple phrases; performing tone adjustment operations on the target text in the multiple phrases based on the tone conversion rules to obtain a standard tone text after the tone is adjusted.

[0007] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the tone transformation rules include at least one of the following: in response to both of the tones of two consecutive characters in the phrase being the third tone, changing the tone of the first character to the second tone; in response to the tones of three consecutive characters in the phrase being the third tone, changing the tones of the first two characters to the second tone; in response to the first character in the phrase being "one", determining whether the tone of the character following "one" is the fourth tone. If it is the fourth tone, adjusting the tone of "one" to the second tone. If it is the first tone, the second tone, or the third tone, adjusting the tone of "one" to the fourth tone; in response to the first character in the phrase being "not", determining whether the tone of the character following "not" is the fourth tone. If it is the fourth tone, adjusting the tone of "not" to the second tone.

[0008] For example, the tone correction method provided by at least one embodiment of the present disclosure further includes: processing the polyphonic character correction text or the standard tone text based on the dictionary to obtain the reference text that conforms to the format rules.

[0009] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the tone identifier includes a preset identifier and a tone value. The format rules of the dictionary include: for non-zero initial consonant syllables, retaining the initial consonant identifier and the tone value, and replacing the final identifier with the preset identifier; or, for zero initial consonant syllables, retaining the tone value and replacing the final identifier with the preset identifier.

[0010] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the matching operation on the reference text and the recognition text includes: based on multiple syllables in the evaluation text, determining multiple first syllable units in the reference text that have a one-to-one correspondence with the multiple syllables; determining multiple second syllable units in the recognition text; and performing a matching operation on the multiple first syllable units and the multiple second syllable units.

[0011] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the determining of the multiple second syllable units in the recognition text includes: in response to two initial consonant identifiers in the recognition text being adjacent, deleting the first initial consonant identifier of the adjacent two initial consonant identifiers and retaining the second one; in response to an initial consonant identifier in the recognition text being immediately followed by a tone identifier, determining the adjacent initial consonant identifier and the tone identifier as a second syllable unit; or, in response to two tone identifiers in the recognition text being adjacent, determining the second tone identifier of the adjacent two tone identifiers as a second syllable unit.

[0012] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the matching operation on the multiple first syllable units and the multiple second syllable units includes: classifying the first syllable units including the same initial consonant identifier in the reference text into the same first array, and classifying the first syllable units not including the initial consonant identifier in the reference text into the same second array; classifying the second syllable units including the same initial consonant identifier in the recognized text into the same third array, and classifying the second syllable units not including the initial consonant identifier in the recognized text into the same fourth array; performing array matching operations on the multiple first arrays and the multiple third arrays to find the first array and the third array having the same initial consonant identifier.

[0013] For example, in the tone correction method provided in at least one embodiment of the present disclosure, the incorrectly read tone is corrected based on the result of the matching operation, including: in response to the array matching operation not finding the third array matching the first array, determining that the syllables corresponding to the first array are missed; in response to the array matching operation not finding the first array matching the third array, determining that the syllables corresponding to the third array are read more.

[0014] For example, the tone correction method provided by at least one embodiment of the present disclosure also includes: performing a syllable matching operation on the first syllable unit and the second syllable unit in the first array and the third array that are successfully matched based on the tone value and the pronunciation features recognized by the acoustic model; performing a syllable matching operation on the first syllable unit and the second syllable unit in the second array and the fourth array based on the tone value and the pronunciation features recognized by the acoustic model.

[0015] For example, in the tone correction method provided by at least one embodiment of the present disclosure, the correction of the incorrectly read tone based on the result of the matching operation includes: in the first array and the third array that are successfully matched, or in the second array and the fourth array, in response to the syllable matching operation not finding the second syllable unit that matches the first syllable unit, determining that the syllable corresponding to the first syllable unit is missed; in the first array and the third array that are successfully matched, or in the second array and the fourth array, in response to the syllable matching operation not finding the first syllable unit that matches the second syllable unit, determining that the syllable corresponding to the second syllable unit is read more; in the first array and the third array that are successfully matched, or in the second array and the fourth array, in response to the syllable matching operation finding the first syllable unit and the second syllable unit that are successfully matched, determining whether the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are the same, and if they are not the same, determining that the syllable corresponding to the first syllable unit is read incorrectly.

[0016] For example, in the tone correction method provided by at least one embodiment of the present disclosure, after determining that the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are not the same, the tone correction method also includes: determining whether the second syllable unit is located at the second to last position in the third array or the fourth array; if the second syllable unit is located at the second to last position in the third array or the fourth array, determining whether the tone value of the second syllable unit located at the first to last position in the third array or the fourth array is the same as the tone value of the first syllable unit in the previous determination; if they are the same, determining that the syllable corresponding to the first syllable unit has been corrected in tone by the user himself; if they are not the same, determining that the syllable corresponding to the first syllable unit is read incorrectly, and the syllable corresponding to the middle second syllable unit is read multiple times.

[0017] For example, in the tone correction method provided by at least one embodiment of the present disclosure, after determining that the tone values ​​in the successfully matched first syllable unit and the second syllable unit are not the same, the tone correction method further includes: determining whether the tone values ​​in the next successfully matched first syllable unit and the second syllable unit are the same; if they are the same, and there is an intermediate second syllable unit between the second syllable unit in the previous judgment and the second syllable unit in the subsequent judgment, determining whether the tone values ​​in the intermediate second syllable unit and the first syllable unit in the previous judgment are the same; if they are the same, determining that the syllable corresponding to the first syllable unit has been corrected in tone by the user himself, and if they are not the same, determining that the syllable corresponding to the first syllable unit is read incorrectly, and the syllable corresponding to the intermediate second syllable unit is read multiple times.

[0018] For example, in the tone correction method provided in at least one embodiment of the present disclosure, the tone recognition model is trained using a sparse attention mechanism in a local window mode.

[0019] At least one embodiment of the present disclosure further provides a tone correction device, which includes: an acquisition module, configured to acquire an audio to be evaluated and an evaluation text corresponding to the audio to be evaluated; a decoding module, configured to decode the audio to be evaluated through a tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with the format rules of a dictionary used when training the tone recognition model; a processing module, configured to process the evaluation text based on the dictionary to obtain a reference text that complies with the format rules; a matching module, configured to perform a matching operation on the reference text and the recognition text; and a correction module, configured to correct the incorrectly read tone based on the result of the matching operation.

[0020] For example, the tone correction device provided by at least one embodiment of the present disclosure also includes: a polyphone correction module, which is configured to input the evaluation text into a polyphone correction model, automatically annotate the polyphones for the evaluation text through the polyphone correction model, and obtain a polyphone correction text output from the polyphone correction model.

[0021] For example, the tone correction device provided by at least one embodiment of the present disclosure also includes: a tone conversion module, configured to perform word segmentation processing on the evaluation text or the polyphone correction text to obtain multiple phrases; based on the tone conversion rules, perform tone adjustment operations on the target text in the multiple phrases to obtain a standard tone text after the tone is adjusted.

[0022] At least one embodiment of the present disclosure further provides an electronic device, comprising: at least one memory, which non-transiently stores computer-executable instructions; and at least one processor, which is configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the tone correction method described in any of the above embodiments.

[0023] At least one embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by at least one processor, the tone correction method described in any of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.

[0025] Figure 1 is a schematic diagram of an exemplary phoneme boundary corresponding to an evaluation text and an audio to be evaluated;

[0026] Figure 2 A flowchart of a tone correction method provided by at least one embodiment of the present disclosure;

[0027] Figure 3 A schematic diagram of an exemplary phoneme boundary consistency provided for at least one embodiment of the present disclosure;

[0028] Figure 4 A schematic diagram of an exemplary phoneme boundary inconsistency provided for at least one embodiment of the present disclosure;

[0029] Figure 5 A flowchart of a tone correction method provided by at least one embodiment of the present disclosure;

[0030] Fig. 6AA schematic diagram of the structure of a tone correction device provided by at least one embodiment of the present disclosure;

[0031] Figure 6B A schematic diagram of the structure of another tone correction device provided by at least one embodiment of the present disclosure;

[0032] Figure 7 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure;

[0033] Figure 8 A schematic diagram of the structure of an electronic device provided in at least one embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0035] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. It should be understood that the various steps recorded in the method implementation of the present disclosure can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0036] The present disclosure is described below through several specific embodiments. In order to keep the following description of the embodiments of the present disclosure clear and concise, detailed descriptions of known functions and known components (elements) may be omitted. When any component (component) of the embodiments of the present disclosure appears in more than one drawing, the component (component) is represented by the same or similar reference numeral in each drawing.

[0037] In oral assessment technology, the phoneme boundaries of the assessment text in the audio to be assessed can be first obtained through an acoustic model, for example, the forced alignment (FA) algorithm is used to align the audio to be assessed and the assessment text, and then the tone features extracted within the phoneme boundaries of the corresponding phonemes are input into the tone classifier for recognition, thereby obtaining the tone recognition results within the phoneme boundaries. Here, phonemes refer to the basic elements of speech in a language, such as vowel phonemes or consonant phonemes.

[0038] Figure 1 Schematic diagram of an exemplary phoneme boundary corresponding to the evaluation text and the audio to be evaluated. Figure 1 As shown in the figure, for example, if the evaluation text is "tomorrow", and the phoneme corresponding to the evaluation text is "ming t ian", the phoneme boundaries of each phoneme in the evaluation text corresponding to the audio to be evaluated can be obtained through the Viterbi algorithm, such as obtaining the start timestamp and end timestamp corresponding to each phoneme. Then, for each phoneme, the tone features in the audio segment corresponding to its phoneme boundary are extracted, and then the tone features are input into the classifier, and the probability of the phoneme corresponding to each tone is output through the softmax function. Finally, the tone with the largest probability is selected as the actual reading tone of the phoneme, and it is determined whether the actual reading tone is consistent with the target tone. If they are consistent, no tone correction operation is performed. If they are inconsistent, the user is prompted that the tone read is wrong.

[0039] For example, in one example, the phoneme boundary of the phoneme "m" in the audio to be evaluated is obtained as [1,2] through the Viterbi algorithm, and the tone features of the audio segment with the phoneme boundary of [1,2] are extracted, such as fundamental frequency features and energy features. Then, the tone features of the phoneme are input into the classifier. For example, there are five tones in Chinese, namely, the first tone, the second tone, the third tone, the fourth tone and the light tone, and the corresponding classifiers are (tone1, tone2, tone3, tone4, tone5). The probability of the phoneme "m" read by the user corresponding to tone1, tone2, tone3, tone4, and tone5 is calculated through the softmax function, for example, 0.1, 0.15, 0.6, 0.1, and 0.05 respectively, and tone3 with the largest probability is determined as the tone of the phoneme "m" actually read. For example, when the tone is greater than the preset value, it is considered that the recognition result of the tone is accurate, and the tone can be compared with the target tone.

[0040] However, when the user makes a pronunciation error, or reads too much or too little, the phoneme boundaries found by the Viterbi algorithm may be biased, resulting in inaccurate tone correction results. Figure 1As shown in the figure, because the phoneme "e" is added to the phoneme actually read by the user, the phoneme boundary of "ing" searched by the Viterbi algorithm is inaccurate, and the tone features extracted within its phoneme boundary will be disturbed by noise, which may make the probability of the wrong tone in the probability distribution output by the softmax function greater. Although the user actually reads the correct tone of "ing", it is judged as reading the wrong tone. Alternatively, the probabilities of the two tones in the probability distribution output by the softmax function are close, but both are lower than the preset value, so the correct tone cannot be identified.

[0041] Some embodiments of the present disclosure provide a method for correcting a tone. The method for correcting a tone includes: obtaining an audio to be evaluated and an evaluation text corresponding to the audio to be evaluated; decoding the audio to be evaluated by a tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with the format rules of a dictionary used when training the tone recognition model; processing the evaluation text based on the dictionary to obtain a reference text that complies with the format rules; matching the reference text and the recognition text; and correcting the incorrectly read tone based on the result of the matching operation.

[0042] Some embodiments of the present disclosure also provide a tone correction device. The tone correction device includes an acquisition module, a decoding module, a processing module, a matching module and a correction module. The acquisition module is configured to acquire the audio to be evaluated and the evaluation text corresponding to the audio to be evaluated; the decoding module is configured to decode the audio to be evaluated through the tone recognition model to obtain the recognition text including the tone identifier output from the tone recognition model, wherein the recognition text conforms to the format rules of the dictionary used when training the tone recognition model; the processing module is configured to process the evaluation text based on the dictionary to obtain a reference text conforming to the format rules; the matching module is configured to perform a matching operation on the reference text and the recognition text; the correction module is configured to correct the incorrectly read tone based on the result of the matching operation.

[0043] Some embodiments of the present disclosure also provide electronic devices and non-transitory computer-readable storage media corresponding to the above-mentioned tone correction method.

[0044] The tone correction method, device, electronic device and storage medium provided by the above-mentioned embodiments of the present disclosure can identify the tones of each syllable in the audio to be evaluated through a tone recognition model, and obtain a recognition text including a tone identifier. The format rules of the recognition text are the same as the format rules of the dictionary used for training the tone recognition model. The evaluation text is subjected to text processing to obtain a reference text of the same format, and then the tone identifiers in the two texts are directly matched and compared, which can avoid the tone misjudgment caused by inaccurate phoneme boundary search and improve the accuracy of tone correction.

[0045] Some embodiments and examples of the present disclosure are described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementations described herein are only used to illustrate and explain the present disclosure, and are not used to limit the present disclosure.

[0046] Figure 2 A flowchart of a tone correction method provided by at least one embodiment of the present disclosure. Figure 2 As shown, the tone correction method includes the following steps S100 to S500.

[0047] Step S100: Acquire the audio to be evaluated and the evaluation text corresponding to the audio to be evaluated.

[0048] Step S200: decoding the audio to be evaluated by the tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with the format rule of the dictionary used when training the tone recognition model.

[0049] Step S300: Process the evaluation text based on the dictionary to obtain a reference text that complies with the format rules.

[0050] Step S400: performing a matching operation on the reference text and the recognition text.

[0051] Step S500: Based on the result of the matching operation, correct the incorrect intonation of the reading.

[0052] For example, in some embodiments, Figure 2 The tone correction method shown can be executed locally by, for example, a client. In step S100, the evaluation text can be a preset text provided by the client, or a text uploaded by a user, or a text obtained from the network, and the embodiments of the present disclosure do not limit this. The audio to be evaluated can be an audio file uploaded by a user, or can be collected by an audio collection device of the client, or can be an audio file obtained from the network, and the embodiments of the present disclosure do not limit this.

[0053] For example, the client includes but is not limited to mobile terminals such as smart phones, tablet computers, personal computers, personal digital assistants (PDAs), PADs (tablet computers), wearable devices, smart watches, smart bracelets, head-mounted display devices, and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. For example, the audio acquisition device includes but is not limited to a microphone built into or external to the client. For example, the audio to be evaluated can be pre-recorded or recorded in real time, and the embodiments of the present disclosure do not limit this.

[0054] For example, in some other embodiments, Figure 2 The tone correction method shown can also be performed remotely, for example, by a server. In this case, the server can receive the audio to be evaluated uploaded by the user through the client (the evaluation text can be pre-stored on the server or uploaded to the server by the user through the client), perform tone evaluation on the server, and return the evaluation result to the client after the evaluation is completed for the user's reference.

[0055] The audio to be evaluated corresponds to the evaluation text. For example, the audio to be evaluated can be the practice audio obtained by the user reading aloud against the evaluation text during practice, or it can be the test audio obtained by the user reading aloud against the evaluation text during the test, which can be used to reflect the user's oral level.

[0056] For example, the audio file can be in wav format. WAV format is a lossless audio coding format that can preserve the complete details of the voice signal and can be used for speech recognition and model training. In some examples, the audio sampling rate can be selected as 16khz, or other sampling rates (8khz, 48khz, etc.) or stereo formats can be selected according to application requirements. The length of the audio frame is generally set to 20-60ms as the basic unit of algorithm processing. The optimal frame length can be set according to the specific application scenario or requirements. For example, short frames are conducive to reducing algorithm delays, and long frames contain more audio detail information. For example, mono audio can also be used, and the embodiments of the present disclosure are not limited to this.

[0057] For example, in step S200, the audio to be evaluated can be decoded by a tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model. The tone recognition model can be pre-trained. For example, the tone recognition model can be trained with a large number of text training samples and a large number of audio training samples. The trained tone recognition model can directly accurately recognize the tones corresponding to each syllable read by the user, and output a recognition text with preset format rules. The recognition text includes the tone identifiers of each syllable, and the tone identifiers of these syllables can be used for comparison with the correct tones in the reference text. Here, a syllable is the smallest semantic unit, and a syllable can include one or more phonemes.

[0058] For example, the tone recognition model and the acoustic model can be constructed separately. The tone recognition model is used to extract tone features, such as filter bank features, fundamental frequency features, and energy features, and the acoustic model is used to extract pronunciation features, such as Mel cepstral coefficients and fundamental frequency features.

[0059] For example, the acoustic model can adopt the architecture of Hidden Markov Model (HMM)-Gaussian Mixture Model (GMM), Hidden Markov Model (HMM)-Time-Delay Neural Network (TDNN), or Deep Neural Networks (DNN) to perform modeling. For the specific technical details of the construction and training of the acoustic model, reference can be made to the relevant technologies in the field of natural language processing, which will not be elaborated here.

[0060] The training process of the tone recognition model is introduced in detail below.

[0061] First, before training the tone recognition model, a tone dictionary needs to be constructed. For example, an open-source Chinese dictionary can be converted into a dictionary with phonemes as units. The tone dictionary includes tone identifiers. For non-zero initial consonant syllables, the tone dictionary also includes initial consonant identifiers.

[0062] For example, in one example, the tone dictionary includes initial consonant identifiers, final vowel identifiers, and tone values, and the tone identifier is composed of the final vowel identifier and the tone value.

[0063] For example, in another example, the tone dictionary includes initial consonant identifiers, preset identifiers, and tone values, and the tone identifier is composed of the preset identifier and the tone value. In this example, the final vowel identifier is replaced with a preset identifier, which can reduce the number of training data and is beneficial for faster convergence. Specifically, in this example, the format rules of the dictionary are as follows: for non-zero initial consonant syllables, the initial consonant identifier and the tone value are retained, and the final vowel identifier is replaced with a preset identifier; for zero initial consonant syllables, the tone value is retained, and the final vowel identifier is replaced with a preset identifier.

[0064] For example, for the non-zero initial consonant syllable "你" (nǐ), its initial consonant identifier is "n", its final vowel identifier is "i", and its tone is the third tone, and the tone value 3 can be used to represent its tone. For the zero initial consonant syllable "啊" (ā), it has no initial consonant identifier and only the final vowel identifier "a". In different contexts, the tone of "啊" is different, and its tone may be the first tone, the second tone, the third tone, the fourth tone, or the neutral tone, which can be represented by the tone values 1, 2, 3, 4, and 5 respectively.

[0065] In the embodiments of the present disclosure, retaining the initial consonant identifier can reduce the interference between tone features in a sentence; without considering the pronunciation of the final vowel and only considering the tone value, that is, replacing the final vowel identifier with the same preset identifier, can reduce the training complexity and improve the training speed.

[0066] In the process of training the tone recognition model, a large number of text training samples and a large number of audio training samples need to be prepared. For example, according to the constructed tone dictionary, the initials and finals of the pinyin in the text training sample can be split, only the initials and tone values ​​are retained, and the finals are replaced with a unified preset identifier, thereby obtaining a standard training sample. For example, the word "blue sky" in the text training sample is processed into a standard training sample "L TONE2 T TONE1". For example, the preset identifier can be set to "TONE", or it can be set to other representations according to actual needs. The embodiments of the present disclosure do not limit the specific representation of the preset identifier.

[0067] Then, the standard training samples can be preprocessed to establish a one-to-one mapping relationship between text and numbers, thereby mapping the text in the form of a string to numbers that can be processed by the computer. The modeling unit is the phoneme level. For example, the five tone identifiers in Chinese are mapped to the numbers 1, 2, 3, 4, and 5 respectively, and the 21 initial consonant identifiers are mapped to the numbers 6-27 respectively. At the same time, the sentence end identifier eos and the sentence start identifier sos are added.

[0068] For example, a large number of monophonic audios in WAV format and with an audio sampling rate of 16 kHz can be prepared as audio training samples. After the audio training samples are prepared, feature extraction can be performed on the audio training samples, such as extracting 40-dimensional filter bank features, 1-dimensional fundamental frequency features, and 1-dimensional energy features, a total of 42-dimensional tone features, and performing first-order differences and second-order differences on the 42-dimensional tone features, thereby expanding them into a 126-dimensional (42*3-dimensional) feature vector.

[0069] For example, a neural network structure with a sparse attention mechanism can be used to train a tone recognition model. Compared with the attention mechanism, the sparse attention mechanism can reduce the amount of calculation when processing long sequences. For example, the neural network architecture based on the attention mechanism includes but is not limited to the transformer architecture. For example, in an embodiment of the present disclosure, a network structure with 4 multi-head attention mechanisms, 12 encoding layers, 256 dimensions, 2048 feedforward layer dimensions, 1024 output dimensions, and 6 decoding layers can be constructed to train a tone recognition model.

[0070] Since the Chinese tones in a sentence are greatly affected by the preceding and following tones, a local window mode can be used to train the tone recognition model, thereby reducing redundant calculations and memory consumption and improving recognition efficiency.

[0071] For example, in an embodiment of the present disclosure, the following sparse attention formula may be used to train the tone recognition model:

[0072]

[0073] Among them, Q represents the query value of the currently predicted tone, and K and V are the values output by the decoding layer, representing the phonetic information of the input audio. The dot product result can be scaled to an appropriate range, so that the input value of the softmax function will not be too large, and the attention weight distribution can be made smoother.

[0074] For example, the correlation between Q and K can be calculated to obtain the attention weight, and then the attention weight is applied to V to obtain the context vector. Combining the context vector with the current state of the decoding layer can predict the next tone.

[0075] M represents the training window matrix, with the values inside the window being 1 and the values outside the window being 0. After dot multiplication, only the information inside the window is retained. That is, the information inside the window is taken into account, and the information outside the window is filtered. For example, in Chinese, since Chinese tones are usually only related to the two characters before and the two characters after a character, the window size can be set to 5. The size of the window can be set according to actual needs, such as 3, 6, 8, 10, etc., and the embodiments of the present disclosure do not limit this.

[0076] For example, in an example, the length of the training sequence is 20 and the window size is 5. Then, for the 4th character in the training sequence, its window matrix M can be represented as [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], that is, the 2nd, 3rd, 4th, 5th, and 6th characters are inside the window, and only the influence of the 2nd, 3rd characters and the 5th, 6th characters on the tone of the 4th character needs to be considered, thereby effectively reducing the amount of calculation and improving the training speed.

[0077] The trained tone recognition model can perform tone recognition and prediction on the audio to be evaluated. For example, the predicted tone result can be output through the activation function softmax, and the tone result with a confidence greater than the preset value is used as the final recognition result. For example, this preset value can be 0.8, 0.9, or other values, which can be set according to actual needs. The tone with a confidence greater than the preset value can be understood as the tone that the tone recognition model can accurately recognize, and the tone with a confidence less than the preset value can be understood as the tone that the tone recognition model fails to accurately recognize.

[0078] For example, the audio to be evaluated that correctly reads "Before my bed a pool of light" is input into the tone recognition model, and the recognized text output by the tone recognition model can be: "BOS CH TONE2 Q TONE2 M TONE2 Y TONE4 G TONE1 EOS".

[0079] The inventors of the present disclosure also noticed that in Chinese characters, there are polysemous words, and the pronunciations of certain characters are different in different sentence patterns or different phrases, so the tones may also be different. For example, in the phrase "长久" (long-term), the pronunciation of "长" is "chang" with the second tone, and in the phrase "成长" (grow), the pronunciation of "长" is "zhang" with the third tone. Therefore, when identifying and correcting tones, the situation of polysemous words also needs to be considered.

[0080] In this regard, in some embodiments of the present disclosure, the tone correction method further includes: inputting the evaluation text into the polysemous word correction model, and automatically annotating the polysemous words for the evaluation text through the polysemous word correction model to obtain the polysemous word correction text output from the polysemous word correction model.

[0081] For example, the polysemous word correction model can be a natural language processing (Natural Language Processing, NLP) model pre-constructed offline. For example, a neural network structure based on the attention mechanism can be used to train the polysemous word correction model. For example, the neural network architecture based on the attention mechanism includes but is not limited to the transformer architecture. For example, in the embodiments of the present disclosure, a network structure with 4 multi-head attention mechanisms, 3 encoding layers, 1024 fully connected layers, and 3 decoding layers can be constructed to train the polysemous word correction model.

[0082] Since polysemous words are usually highly related to the meanings of phrases or sentences, in order to improve the recognition efficiency of polysemous words, in the embodiments of the present disclosure, the following sparse attention formula is used to train the polysemous word correction model:

[0083]

[0084] Among them, Q represents the information contained in the target word to be predicted currently, and K and V represent the information of each word in the source language sequence.

[0085] For example, taking the dot product of Q and K to obtain the attention weight, applying the attention weight to V to obtain the weighted context vector, and combining the context vector with the hidden state of the current target language to generate the final target language.

[0086] For example, inputting the evaluation text of "床前明月光" (Before my bed a pool of light) into the polysemous word correction model, the recognized text output by the polysemous word correction model can be: "BOS chuang2 qian2 ming2 yue4 guang1 EOS".

[0087] The inventors of the present disclosure also noticed that in Chinese spoken language, the tone of actually pronouncing a character is also affected by its position in a word. The tone of the same character may be different in different contexts. For example, the character "一" is not a polyphonic character and has only one pronunciation, that is, "yi", and the tone is usually the first tone. However, when pronouncing "一切", the tone of "一" should be changed to the second tone.

[0088] In view of this, in some embodiments of the present disclosure, the tone correction method further includes: performing word segmentation processing on the evaluation text or the polyphonic character correction text through a tone conversion module to obtain a plurality of word groups; performing a tone adjustment operation on the target characters in the plurality of word groups based on the tone transformation rule to obtain a standard tone text with adjusted tones.

[0089] For example, a word segmentation tool (for example, the jieba tool) can be used to perform word segmentation processing on the evaluation text, so as to obtain a plurality of word groups. For example, the phrase "这个五彩斑斓的世界" can be segmented into "这个", "五彩斑斓", "的", and "世界".

[0090] For example, word segmentation processing can also be performed on the polyphonic character correction text, so as to make the tone recognition more accurate. For example, the polyphonic character correction text "zhe4 ge1 wu3 cai3 ban1 lan2 de5 shi4 jie4" can be segmented into "zhe4ge1", "wu3 cai3 ban1 lan2", "de5", and "shi4 jie4".

[0091] For example, in response to the tones of two consecutive characters in a word group both being the third tone, change the tone of the first character to the second tone. For example, change the tone of "五彩斑斓" from "wu3 cai3 ban1 lan2" to "wu2 cai3 ban1lan2".

[0092] For example, in response to the tones of three consecutive characters in a word group both being the third tone, change the tones of the first two characters to the second tone. For example, change the tone of "洗澡水" from "xi3 zao3 shui3" to "xi2 zao2 shui3".

[0093] For example, in response to the first character in a word group being "一", determine whether the tone of the character following "一" is the fourth tone. If it is the fourth tone, then adjust the tone of "一" to the second tone. For example, change the tone of "一不小心" from "yi1 bu4 xiao3xin1" to "yi2 bu4 xiao3 xin1".

[0094] For example, in response to the first character in a phrase being "一", it is determined whether the tone of the character following "一" is the fourth tone. If it is the first, second, or third tone, the tone of "一" is adjusted to the fourth tone. For example, the tone of "一腔热血" is adjusted from "yi1 qiang1 re4 xue3" to "yi4 qiang1 re4 xue3", the tone of "一条" is adjusted from "yi1 tiao2" to "yi4 tiao2", and the tone of "一起" is adjusted from "yi1 qi3" to "yi4 qi3".

[0095] For example, in response to the first character in a phrase being "不", it is determined whether the tone of the character following "不" is the fourth tone. If it is the fourth tone, the tone of "不" is adjusted to the second tone. For example, the tone of "不是" is adjusted from "bu4 shi4" to "bu2 shi4".

[0096] In an embodiment of the present disclosure, the text training samples used when training the tone recognition model can also be texts in which polyphones and tone rules have been corrected in advance, so as to ensure that the recognition results of the tone recognition model are more accurate.

[0097] In step S300, the evaluation text can be processed based on the tone dictionary used when training the tone recognition model, so as to obtain a reference text that conforms to the format rules of the dictionary. For example, in one example, the initial consonant identifiers and tone values of each syllable in the evaluation text can be retained, and the final vowel identifiers are replaced with a unified preset identifier TONE. For example, the evaluation text "chuang2 qian2 ming2 yue4 guang1" is processed into the reference text "CH TONE2 Q TONE2 MTONE2 Y TONE4 G TONE1".

[0098] For example, in some examples, the polyphone correction text or the standard tone text can also be processed to obtain a reference text that conforms to the format rules, so as to ensure that the tone of the reference text is correct.

[0099] After obtaining the reference text and the recognition text, step S400 can be executed, that is, a matching operation is performed on the reference text and the recognition text.

[0100] For example, the reference text and the recognition text can be matched through an edit distance operation.

[0101] Figure 3 A schematic diagram of the consistency of phoneme boundaries provided for at least one embodiment of the present disclosure. As Figure 3As shown in the figure, when reading a single word, the acoustic model can find the accurate phoneme boundaries of the phonemes in the evaluation text in the audio to be evaluated through the forced alignment (FA) operation. For example, the edit distance between the reference text and the recognized text can be directly calculated, and it can be determined whether the tone values ​​in the reference text and the recognized text are the same. If they are the same, it means that the tone read by the user is correct. If they are not the same, it means that the tone read by the user is wrong and needs to be corrected. For example, the correct tone can be fed back to the user.

[0102] Figure 4 A schematic diagram of an exemplary phoneme boundary inconsistency provided for at least one embodiment of the present disclosure. Figure 4 As shown, when reading multiple words, if the user makes a mistake in reading, the phoneme boundary will be disturbed, and the accurate boundary of the phoneme in the evaluation text cannot be obtained. For example, by calculating the edit distance between the reference text and the recognition text, the matching result of the two can be obtained, and then step S500 is performed to correct the wrong intonation of the reading based on the result of the matching operation. For example, the reference text and the recognition text in the matching result are as follows:

[0103] T TONE1 EPS SH TONE3

[0104] D TONE1 TONE3 SH TONE2

[0105] The EPS in the matching result is a blank identifier. If a blank identifier appears in the reference text, it means that the user has read too much. If a blank identifier appears in the recognized text, it means that the user has read too little. For the tone identifiers that match each other in the reference text and the recognized text, it can be determined whether their tone values ​​are the same. If they are the same, it means that the tone read by the user is correct. If they are not the same, it means that the tone read by the user is wrong and needs to be corrected. For example, the tone score of the wrong tone read by the user can also be deducted.

[0106] The inventors of the present disclosure also noticed that the edit distance algorithm usually starts comparison from the last character of two strings (i.e., compares whether the last characters of the two strings are the same), or starts comparison from the first character of the two strings. When the user reads a lot of incorrect words, or when the user reads more or less words, the edit distance algorithm cannot start comparison from the position where the user reads correctly, which will cause the words read correctly by the user to be misjudged as incorrect readings.

[0107] In at least one example provided in an embodiment of the present disclosure, step S400, i.e., matching the reference text and the recognized text, may include: based on multiple syllables in the evaluation text, determining multiple first syllable units in the reference text that have a one-to-one correspondence with the multiple syllables; determining multiple second syllable units in the recognized text; and matching the multiple first syllable units with the multiple second syllable units.

[0108] For example, each character in the evaluation text is a syllable, such as a zero-initial syllable or a non-zero-initial syllable. For a zero-initial syllable, the corresponding reference text only has a tone identifier, and the tone identifier can be determined as a first syllable unit. For a non-zero-initial syllable, the corresponding reference text includes an initial consonant identifier and a tone identifier, and the initial consonant identifier and the tone identifier can be determined as a first syllable unit. For example, the connector "_" can be used to connect the initial consonant identifier and the tone identifier together to form a first syllable unit.

[0109] Figure 5 A flowchart of a tone correction method provided by at least one embodiment of the present disclosure. Figure 5 As shown in step S401, if the reference text Ref is "H TONE1 S TONE4 H TONE2 TONE2", it is determined that the reference text Ref includes four first syllable units, namely H_TONE1, S_TONE4, H_TONE2 and TONE2.

[0110] In at least one example provided by an embodiment of the present disclosure, multiple second syllable units in a recognized text are determined, and a specific example thereof may include: in response to two adjacent initial consonant identifiers in the recognized text, deleting the first initial consonant identifier of the two adjacent initial consonant identifiers and retaining the second initial consonant identifier; in response to an initial consonant identifier in the recognized text being immediately followed by a tone identifier, determining the adjacent initial consonant identifier and tone identifier as a second syllable unit; or, in response to two adjacent tone identifiers in the recognized text, determining the second tone identifier of the two adjacent tone identifiers as a second syllable unit.

[0111] For example, Figure 5 As shown in step S401, if the recognized text Rec is "T TONE1 TONE3 Y TONE4 KTONE3 H TONE1 S TONE3 TONE3", it is determined that the recognized text Rec includes 7 second syllable units, namely T_TONE1, TONE3, Y_TONE4, K_TONE3, H_TONE1, S_TONE3 and TONE3.

[0112] In at least one example provided by an embodiment of the present disclosure, a matching operation is performed on multiple first syllable units and multiple second syllable units, and a specific example may include: classifying the first syllable units that include the same initial consonant identifier in the reference text into the same first array, and classifying the first syllable units that do not include the initial consonant identifier in the reference text into the same second array; classifying the second syllable units that include the same initial consonant identifier in the recognized text into the same third array, and classifying the second syllable units that do not include the initial consonant identifier in the recognized text into the same fourth array; performing an array matching operation on multiple first arrays and multiple third arrays to find the first array and the third array with the same initial consonant identifier.

[0113] For example, Figure 5 As shown in step S402, for the four first syllable units H_TONE1, S_TONE4, H_TONE2 and TONE2 in the reference text Ref, since H_TONE1 and H_TONE2 have the same initial consonant identifier "H", H_TONE1 and H_TONE2 can be classified into the same first array, that is, the first array with the initial consonant identifier "H" can be represented as [H_TONE1, H_TONE2]. Similarly, S_TONE4 is classified into an array, represented as [S_TONE4]. The first syllable unit TONE2 in the reference text has no initial consonant identifier, so it is classified into a second array, represented as [TONE2].

[0114] For example, Figure 5 As shown in step S402, for the 7 second syllable units T_TONE1, TONE3, Y_TONE4, K_TONE3, H_TONE1, S_TONE3 and TONE3 in the recognized text Rec, since the initial consonant identifiers of T_TONE1, Y_TONE4, K_TONE3, H_TONE1, and S_TONE3 are all different, T_TONE1, Y_TONE4, K_TONE3, H_TONE1, and S_TONE3 are respectively classified into a third array, and these 5 third arrays can be represented as [T_TONE1], [Y_TONE4], [K_TONE3], [H_TONE1], and [S_TONE3]. The remaining two second syllable units do not include initial consonant identifiers, so they can be classified into a fourth array, represented as [TONE3, TONE3].

[0115] That is, through the above operation, a plurality of first syllable units including the initial consonant identifier in the reference text can be classified into a plurality of first arrays. Similarly, a plurality of second syllable units including the initial consonant identifier in the recognition text can be classified into a plurality of third arrays. Then, based on the initial consonant identifier, an array matching operation is performed on the plurality of first arrays and the plurality of third arrays to find mutually matching first arrays and third arrays (such as Figure 5 ), so that the sentences that are read more (or less or incorrectly) can be skipped and the starting position of the user's correct reading can be found (for example, the user starts reading the corresponding content in the evaluation text from H_TONE1 of the recognized text).

[0116] In at least one example provided by an embodiment of the present disclosure, based on the result of the matching operation, the incorrect intonation of the reading is corrected, and a specific example thereof may include: in response to the array matching operation not finding a third array matching the first array, determining that the syllable corresponding to the first array is missed; in response to the array matching operation not finding the first array matching the third array, determining that the syllable corresponding to the third array is read more, for example Figure 5 The syllables corresponding to [T_TONE1], [Y_TONE4] and [K_TONE3] are all the content that the user reads too much, or it may be the content that the user reads completely wrong.

[0117] Similarly, in response to the array matching operation not finding a fourth array that matches the second array, it is determined that the syllable corresponding to the second array is missed; in response to the array matching operation not finding a second array that matches the fourth array, it is determined that the syllable corresponding to the fourth array is read more.

[0118] After performing the array matching operation, the position where the user starts to read correctly can be located, and the first array and the third array that are successfully matched can be determined. Here, successful matching means that the first array and the third array contain the same initial consonant identifier. Then, a syllable matching operation can be performed on the first syllable unit and the second syllable unit in the first array and the third array that are successfully matched based on the tone value and the pronunciation features recognized by the acoustic model to determine whether the number of syllable units in the successfully matched arrays is the same, and to find syllable units with the same tone value.

[0119] For example, in the first array and the third array that are successfully matched, in response to the syllable matching operation not finding a second syllable unit that matches the first syllable unit, it is determined that the syllable corresponding to the first syllable unit is missed. Figure 5In the example shown, for the first array [H_TONE1, H_TONE2] and the third array [H_TONE1] that are successfully matched, the first syllable unit H_TONE1 in the first array and the second syllable unit H_TONE1 in the third array have the same tone value through the syllable matching operation, indicating that the tone of the syllable is read correctly. However, the second syllable unit corresponding to the first syllable unit H_TONE2 in the first array cannot be found from the third array, indicating that the user has missed the syllable corresponding to the first syllable unit H_TONE2.

[0120] It should be noted that when performing a syllable matching operation, the first syllable unit and the second syllable unit that are successfully matched can also be comprehensively determined based on the pronunciation identified by the acoustic model and the position of the syllable unit in the text. For example, in one example, the first array [L_TONE1, L_TONE2] and the third array [L_TONE1] are successfully matched. In actual situations, the first first phoneme unit L_TONE1 in the first array [L_TONE1, L_TONE2] is missed, and the second first phoneme unit L_TONE2 is misread as the first tone, and the two are far apart in the reference text and have no correlation. Then, when performing an audio matching operation, L_TONE1 in the first array and _TONE1 in the third array cannot be directly regarded as a successful syllable match, but L_TONE2 in the first array and L_TONE1 in the third array should be regarded as a successful syllable match.

[0121] For example, in the first array and the third array that are successfully matched, in response to the syllable matching operation not finding the first syllable unit that matches the second syllable unit, it is determined that the syllable corresponding to the second syllable unit is read multiple times.

[0122] Similarly, a syllable matching operation may be performed on the first syllable unit and the second syllable unit in the second array and the fourth array based on the tone value and the pronunciation features recognized by the acoustic model.

[0123] For example, in the second array and the fourth array, in response to the syllable matching operation not finding the second syllable unit matching the first syllable unit, it is determined that the syllable corresponding to the first syllable unit is missed. In the second array and the fourth array, in response to the syllable matching operation not finding the first syllable unit matching the second syllable unit, it is determined that the syllable corresponding to the second syllable unit is read more.

[0124] In at least one example provided in the embodiments of the present disclosure, based on the result of the matching operation, the incorrectly read tone is corrected, and a specific example may include: in the successfully matched first array and the third array, or in the second array and the fourth array, in response to the syllable matching operation, the successfully matched first syllable unit and the second syllable unit are found, then it is determined whether the tone values ​​in the successfully matched first syllable unit and the second syllable unit are the same, and if they are not the same, it is determined that the syllable corresponding to the first syllable unit is read incorrectly.

[0125] The inventors of the present disclosure have also noticed that users may correct their intonations when actually reading aloud. For example, when a user realizes that he or she has read a word incorrectly, he or she will immediately read it again with the correct intonation.

[0126] In this regard, in the tone correction method provided by at least one embodiment of the present disclosure, after determining that the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are not the same, the tone correction method further includes: determining whether the second syllable unit is located at the second to last position in the third array or the fourth array; if the second syllable unit is located at the second to last position in the third array or the fourth array, determining whether the tone value of the second syllable unit located at the last position in the third array or the fourth array is the same as the tone value of the first syllable unit in the previous determination. If they are the same, it is determined that the syllable corresponding to the first syllable unit has been corrected by the user himself; if they are not the same, it is determined that the syllable corresponding to the first syllable unit is read incorrectly, and the syllable corresponding to the second syllable unit at the last position is read more.

[0127] For example, in one example, the first array of the reference text is [TONE2], and the third array in the recognized text that successfully matches it is [TONE1, TONE2]. According to the above method, it can be recognized as follows: after the user realizes that he has misread TONE2 as TONE1, he immediately corrects the tone to TONE2.

[0128] For example, in another example, after determining that the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are not the same, it also includes: determining whether the tone values ​​in the next first syllable unit and the second syllable unit that are successfully matched are the same; if they are the same, and there is an intermediate second syllable unit between the second syllable unit in the previous judgment and the second syllable unit in the subsequent judgment, then determining whether the tone values ​​in the intermediate second syllable unit and the first syllable unit in the previous judgment are the same. For example, if they are the same, it is determined that the syllable corresponding to the first syllable unit has been corrected by the user himself; if they are not the same, it is determined that the syllable corresponding to the first syllable unit is read incorrectly, and the syllable corresponding to the intermediate second syllable unit is read more.

[0129] For example, in one example, the first array of the reference text is [TONE1, TONE2], and the third array in the recognized text that successfully matches it is [TONE3, TONE1, TONE2]. According to the above method, it can be identified as: after the user realizes that he has misread TONE1 as TONE3, he immediately corrects the tone to TONE1, and the user reads TONE2 correctly.

[0130] It should be noted that if only the tone results with a confidence level greater than a preset value are used as the final recognition results, since the tones with a confidence level less than the preset value represent tones that the tone recognition model has not been able to accurately recognize, in some embodiments, it is not necessary to judge the "missed reading" situation, and only judge whether there are "multiple readings" or wrong readings, thereby avoiding misjudging the tones that the tone recognition model has not been able to accurately recognize as "missed readings" by the user.

[0131] Fig. 6A The structure diagram of a tone correction device provided by at least one embodiment of the present disclosure is shown in FIG. Fig. 6A As shown, the tone correction device 500 includes an acquisition module 501 , a decoding module 502 , a processing module 503 , a matching module 504 and a correction module 505 .

[0132] For example, the acquisition module 501 is configured to acquire the audio to be evaluated and the evaluation text corresponding to the audio to be evaluated.

[0133] For example, the decoding module 502 is configured to decode the audio to be evaluated through the tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with the format rules of the dictionary used when training the tone recognition model.

[0134] For example, the processing module 503 is configured to process the evaluation text based on the dictionary to obtain a reference text that complies with the formatting rules.

[0135] For example, the matching module 504 is configured to perform a matching operation on the reference text and the recognition text.

[0136] For example, the correction module 505 is configured to correct the intonation of the incorrect reading based on the result of the matching operation.

[0137] For the description of each module and model in the tone correction device 500, please refer to the specific description in the above method embodiment, which will not be repeated here.

[0138] Figure 6B A schematic diagram of the structure of another tone correction device provided by at least one embodiment of the present disclosure. Fig. 6AAs shown, the tone correction device 600 includes an acquisition module 601, a decoding module 602, a processing module 603, a matching module 604, a correction module 605, a polyphone correction module 606 and a tone conversion module 607.

[0139] Acquisition module 601, decoding module 602, processing module 603, matching module 604, correction module 605 and Fig. 6A The acquisition module 501, decoding module 502, processing module 503, matching module 504 and correction module 505 have the same functions and are not described in detail here.

[0140] For example, the polyphone correction module 606 is configured to input the evaluation text into the polyphone correction model, automatically annotate the polyphones for the evaluation text through the polyphone correction model, and obtain the polyphone correction text output from the polyphone correction model.

[0141] For example, the tone conversion module 607 is configured to perform word segmentation processing on the polyphone correction text to obtain multiple phrases; perform tone adjustment operations on the target characters in the multiple phrases based on the tone conversion rules to obtain a standard tone text after the tone is adjusted.

[0142] For example, the processing module 603 is further configured to process the standard tone text based on the dictionary to obtain a reference text that complies with the formatting rules.

[0143] For the description of each module and model in the tone correction device 600, please refer to the specific description in the above method embodiment, which will not be repeated here.

[0144] At least one embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores computer executable instructions non-transiently, and the processor is configured to execute the computer executable instructions, wherein the computer executable instructions are executed by the processor to implement the tone correction method as in any of the above embodiments. The technical effect of the electronic device is the same as the technical effect of the above tone correction method, and will not be repeated here.

[0145] At least one embodiment of the present disclosure also provides a non-transitory computer-readable storage medium. Figure 7 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure. Figure 7 As shown, one or more computer executable instructions 701 may be non-transitory stored on the storage medium 700. For example, when the computer executable instructions 701 are executed by the processor, one or more steps in the tone correction method described above may be executed. The technical effect of the non-transitory storage medium is the same as the technical effect of the tone correction method described above, and will not be repeated here.

[0146] For example, the non-transient readable storage medium is implemented as a memory, such as a volatile memory and / or a non-volatile memory. In the above embodiment, the memory may be a volatile memory, such as a random access memory (RAM) and / or a cache, etc. Non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. Various applications (codes, instructions) and data, as well as various data used and / or generated by the application, etc. may also be stored in the memory.

[0147] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method of the present disclosure.

[0148] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0149] Some embodiments of the present disclosure further provide an electronic device, which includes the tone correction device of any of the above embodiments or can execute the tone correction method of any of the above embodiments.

[0150] Figure 8 A schematic block diagram of an electronic device provided for at least one embodiment of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0151] For example, Figure 8As shown, in some examples, the electronic device 800 includes a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which can include the tone correction device of any of the above embodiments, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage device 808 to the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system are also stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.

[0152] For example, the following components may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809 which may also include, for example, a network interface card such as a LAN card, a modem, etc. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data, and perform communication processing via a network such as the Internet. The drive 810 is also connected to the I / O interface 805 as needed. A removable storage medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom can be installed into the storage device 808 as needed. Although Figure 8 The electronic device 800 is shown to include various devices, but it should be understood that it is not required to implement or include all of the devices shown, and more or fewer devices may be implemented or included instead.

[0153] For example, the electronic device 800 may further include a peripheral interface (not shown in the figure), etc. The peripheral interface may be various types of interfaces, such as a USB interface, a lightning interface, etc. The communication device 809 may communicate with a network and other devices through wireless communication, such as the Internet, an intranet and / or a wireless network such as a cellular phone network, a wireless local area network (LAN) and / or a metropolitan area network (MAN). Wireless communication may use any of a variety of communication standards, protocols, and techniques, including, but not limited to, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or Short Message Service (SMS), or any other suitable communication protocol.

[0154] For example, the electronic device 800 may be any device such as a mobile phone, a tablet computer, a laptop computer, an e-book, a game console, a television, a digital photo frame, a navigator, etc., or may be any combination of data processing devices and hardware, which is not limited in the embodiments of the present disclosure.

[0155] Although the disclosure has been described in detail above with general descriptions and specific implementation methods, it is obvious to those skilled in the art that some modifications or improvements may be made to the embodiments of the disclosure. Therefore, these modifications or improvements made without departing from the spirit of the disclosure are within the scope of protection claimed by the disclosure.

[0156] In addition to the above exemplary contents, the following points need to be explained in this disclosure:

[0157] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure. Other structures may refer to the general design.

[0158] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present disclosure, the thickness of layers or regions is enlarged or reduced, that is, these drawings are not drawn according to the actual scale.

[0159] (3) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.

[0160] The above description is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.

Claims

1. A tone correction method, comprising: Obtaining an audio to be evaluated and an evaluation text corresponding to the audio to be evaluated; Decoding the audio to be evaluated through a tone recognition model to obtain a recognition text including tone identifiers output from the tone recognition model, wherein the recognition text conforms to the format rules of the dictionary used when training the tone recognition model; Processing the evaluation text based on the dictionary to obtain a reference text conforming to the format rules; Performing a matching operation on the reference text and the recognition text; and Correcting the tones with reading errors based on the result of the matching operation.

2. The tone correction method according to claim 1, further comprising: Inputting the evaluation text into a polyphonic character correction model, and automatically annotating polyphonic characters for the evaluation text through the polyphonic character correction model to obtain a polyphonic character correction text output from the polyphonic character correction model.

3. The tone correction method according to claim 2, further comprising: Performing word segmentation on the evaluation text or the polyphonic character correction text through a tone conversion module to obtain a plurality of word groups; Performing a tone adjustment operation on the target characters in the plurality of word groups based on tone transformation rules to obtain a standard tone text with adjusted tones.

4. The tone correction method according to claim 3, wherein: The tone transformation rules include at least one of the following: In response to the tones of two consecutive characters in the word group both being the third tone, changing the tone of the first character to the second tone; In response to the tones of three consecutive characters in the word group both being the third tone, changing the tones of the first two characters to the second tone; In response to the first character in the word group being "一", determining whether the tone of the character following "一" is the fourth tone. If it is the fourth tone, adjusting the tone of "一" to the second tone. If it is the first tone, the second tone, or the third tone, adjusting the tone of "一" to the fourth tone; In response to the first character in the word group being "不", determining whether the tone of the character following "不" is the fourth tone. If it is the fourth tone, adjusting the tone of "不" to the second tone.

5. The tone correction method according to claim 3, further comprising: Processing the polyphonic character correction text or the standard tone text based on the dictionary to obtain the reference text conforming to the format rules.

6. The tone correction method according to any one of claims 1 to 5, wherein: The tone identifier includes a preset identifier and a tone value, and the format rules of the dictionary include: For non-zero initial consonant syllables, retaining the initial consonant identifier and the tone value, and replacing the final identifier with the preset identifier; or, For zero initial consonant syllables, retaining the tone value and replacing the final identifier with the preset identifier.

7. The tone correction method according to claim 6, wherein: The performing a matching operation on the reference text and the recognition text includes: Based on a plurality of syllables in the evaluation text, determining a plurality of first syllable units in the reference text that have a one-to-one correspondence with the plurality of syllables; Determining a plurality of second syllable units in the recognition text; Performing a matching operation on the plurality of first syllable units and the plurality of second syllable units.

8. The tone correction method according to claim 7, wherein: The determining a plurality of second syllable units in the recognition text includes: In response to two initial consonant identifiers in the recognized text being adjacent, deleting a first initial consonant identifier of the two adjacent initial consonant identifiers and retaining a second initial consonant identifier; In response to a tone identifier being immediately adjacent to an initial consonant identifier in the recognition text, determining the immediately adjacent initial consonant identifier and tone identifier as a second syllable unit; or, In response to two tone identifiers in the recognized text being adjacent, a second tone identifier of the two adjacent tone identifiers is determined as a second syllable unit.

9. The tone correction method according to claim 7, wherein: The matching operation on the plurality of first syllable units and the plurality of second syllable units includes: Classify the first syllable units including the same initial consonant identifier in the reference text into the same first array, and classify the first syllable units not including the initial consonant identifier in the reference text into the same second array; Classifying the second syllable units including the same initial consonant identifier in the recognized text into the same third array, and classifying the second syllable units not including the initial consonant identifier in the recognized text into the same fourth array; An array matching operation is performed on a plurality of first arrays and a plurality of third arrays to search for the first array and the third array having the same initial consonant identifier.

10. The tone correction method according to claim 9, wherein: The correcting of the incorrect intonation of the reading based on the result of the matching operation includes: In response to the array matching operation failing to find the third array matching the first array, determining that a syllable corresponding to the first array is missed; In response to the array matching operation not finding the first array that matches the third array, it is determined that the syllable corresponding to the third array is read multiple times.

11. The tone correction method according to claim 9, further comprising: Performing a syllable matching operation on the first syllable unit and the second syllable unit in the first array and the third array that are successfully matched based on the tone value and the pronunciation features recognized by the acoustic model; A syllable matching operation is performed on the first syllable unit and the second syllable unit in the second array and the fourth array based on the tone value and the pronunciation feature recognized by the acoustic model.

12. The tone correction method according to claim 11, wherein: The correcting of the incorrect intonation of the reading based on the result of the matching operation includes: In the first array and the third array that are successfully matched, or in the second array and the fourth array, in response to the syllable matching operation not finding the second syllable unit that matches the first syllable unit, determining that the syllable corresponding to the first syllable unit is missed; In the first array and the third array that are successfully matched, or in the second array and the fourth array, in response to the syllable matching operation not finding the first syllable unit that matches the second syllable unit, determining that the syllable corresponding to the second syllable unit is read multiple times; In the successfully matched first array and the third array, or in the second array and the fourth array, in response to the syllable matching operation, the successfully matched first syllable unit and the second syllable unit are found, then it is determined whether the tone values ​​in the successfully matched first syllable unit and the second syllable unit are the same; if they are not the same, it is determined that the syllable corresponding to the first syllable unit is read incorrectly.

13. The tone correction method according to claim 12, wherein: After determining that the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are different, the tone correction method further includes: Determining whether the second syllable unit is located at the second to last position in the third array or the fourth array; If the second syllable unit is located at the second to last position in the third array or the fourth array, determine whether the tone value of the second syllable unit located at the first to last position in the third array or the fourth array is the same as the tone value of the first syllable unit in the previous determination, If they are the same, it is determined that the syllable corresponding to the first syllable unit has been corrected by the user. If they are not the same, it is determined that the syllable corresponding to the first syllable unit is mispronounced, and the syllable corresponding to the middle second syllable unit is read more than once.

14. The tone correction method according to claim 12, wherein: After determining that the tone values ​​in the first syllable unit and the second syllable unit that are successfully matched are different, the tone correction method further includes: Determine whether the tone values ​​of the first syllable unit and the second syllable unit that are successfully matched are the same; If they are the same, and there is an intermediate second syllable unit between the second syllable unit in the previous judgment and the second syllable unit in the subsequent judgment, then determine whether the tone value in the intermediate second syllable unit is the same as that in the first syllable unit in the previous judgment, If they are the same, it is determined that the syllable corresponding to the first syllable unit has been corrected by the user. If they are not the same, it is determined that the syllable corresponding to the first syllable unit is mispronounced, and the syllable corresponding to the middle second syllable unit is read more than once.

15. The tone correction method according to any one of claims 1 to 5, wherein: The tone recognition model is trained using a sparse attention mechanism in local window mode.

16. A tone correction device, comprising: An acquisition module, configured to acquire the audio to be evaluated and the evaluation text corresponding to the audio to be evaluated; a decoding module configured to decode the audio to be evaluated through a tone recognition model to obtain a recognition text including a tone identifier output from the tone recognition model, wherein the recognition text complies with a format rule of a dictionary used when training the tone recognition model; A processing module, configured to process the evaluation text based on the dictionary to obtain a reference text that complies with the format rule; a matching module configured to perform a matching operation on the reference text and the recognition text; and The correction module is configured to correct the incorrect intonation of the reading based on the result of the matching operation.

17. The tone correction device according to claim 16, further comprising: The polyphone correction module is configured to input the evaluation text into a polyphone correction model, automatically annotate the evaluation text with polyphones through the polyphone correction model, and obtain a polyphone correction text output from the polyphone correction model.

18. The tone correction device according to claim 17, further comprising: A tone conversion module configured to perform word segmentation processing on the evaluation text or the polyphone correction text to obtain a plurality of phrases; The target characters in the plurality of phrases are subjected to tone adjustment operations based on the tone conversion rules to obtain a standard tone text after the tone adjustment.

19. An electronic device comprising: at least one memory non-transitorily storing computer executable instructions; at least one processor configured to execute the computer executable instructions, Wherein, when the computer executable instructions are executed by the processor, the tone correction method according to any one of claims 1-15 is implemented.

20. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer-executable instructions, When the computer executable instructions are executed by at least one processor, the tone correction method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Pronunciation quality evaluation system for phonetic alphabet spelling

    CN106856095A

  • Systems and Methods for Comprehensive Chinese Speech Scoring and Diagnosis

    CN112397091A

  • Voice processing method and device, equipment and storage medium

    CN112634901A

  • Text phonetic notation method, electronic equipment and storage medium

    CN112818089A

  • Audio evaluation method and device

    CN113053409A

Cited By

  • Text feature extraction method and system

    CN121366567A