Method and device for generating pinyin-annotated text by combining RPA and AI
By combining RPA and AI, the words composed of three consecutive Chinese characters in Chinese text are automatically processed, and the existing problems of low efficiency and poor accuracy of pinyin annotation are solved, achieving efficient and accurate text pinyin annotation.
Patent Information
- Application Number
- CN202011133621.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-23
- Filing Date
- 2020-10-21
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-10-21
AI Technical Summary
The existing pinyin annotation text is mainly done manually, which takes a long time and has a high error rate, making it difficult to achieve efficient and accurate text pinyin annotation.
Combining robot process automation (RPA) and artificial intelligence (AI), by obtaining Chinese text, generating pinyin text, inputting pause model to obtain pause information, perform word segmentation, determine the words composed of three consecutive Chinese characters, and performing voice-changing processing to generate accurate Pinyin annotation text.
Automatic pinyin annotation is realized, improving the efficiency and accuracy of text annotation, and reducing the need for manual intervention.
Smart Images

Figure CN112241629B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech synthesis technology, specifically to the fields of artificial intelligence (AI) and robotic process automation (RPA), and in particular to a method and device for generating pinyin-annotated text by combining RPA and AI. Background Art
[0002] Robotic Process Automation (RPA) uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.
[0003] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial Intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, speech recognition, image recognition, natural language processing and expert systems. Among them, NLP is an important branch of artificial intelligence.
[0004] Speech synthesis is a technology that can generate speech based on text. The speech synthesis system is equipped with a front end, which is used to convert Chinese text into pinyin text. The speech synthesis system is used to generate corresponding speech based on the pinyin text. The construction of the front end requires a large amount of Chinese text and the corresponding pinyin annotated text. At present, the pinyin annotated text is mainly obtained by personnel to annotate Chinese text with pinyin, which is time-consuming and has a high error rate. Summary of the invention
[0005] The purpose of this application is to solve one of the above technical problems at least to a certain extent.
[0006] To this end, the first purpose of this application is to propose a method for generating pinyin-annotated text by combining RPA and AI, which can automatically perform voice change processing on words consisting of three consecutive Chinese characters in the text, more accurately annotate the text with pinyin, and improve the annotation efficiency and accuracy of the text.
[0007] The second purpose of this application is to propose a pinyin-annotated text generation device that combines RPA and AI.
[0008] The third purpose of this application is to propose another pinyin-annotated text generation device that combines RPA and AI.
[0009] A fourth object of the present application is to provide a non-transitory computer-readable storage medium.
[0010] To achieve the above-mentioned purpose, the first aspect of the present application proposes a method for generating pinyin-annotated text by combining RPA and AI, including: obtaining a Chinese text to be pinyin-annotated, and generating a pinyin text corresponding to the Chinese text; inputting the Chinese text into a preset pause model to obtain pause information in the Chinese text; performing word segmentation on the Chinese text according to the pause information to obtain a word segmentation result; based on the word segmentation result and the pinyin text, determining a word composed of three consecutive Chinese characters; performing voice change processing on the word composed of three consecutive Chinese characters, generating a pinyin-annotated text corresponding to the Chinese text and outputting it.
[0011] The method for generating pinyin-annotated text in combination with RPA and AI in the embodiment of the present application obtains the Chinese text to be pinyin-annotated, generates the pinyin text corresponding to the Chinese text; inputs the Chinese text into a preset pause model, obtains the pause information in the Chinese text; performs word segmentation on the Chinese text according to the pause information, and obtains the word segmentation result; based on the word segmentation result and the pinyin text, determines the words composed of three consecutive tones of Chinese characters; performs voice change processing on the words composed of three consecutive tones of Chinese characters, generates the pinyin-annotated text corresponding to the Chinese text and outputs it. This method can automatically perform voice change processing on the words composed of three consecutive tones of Chinese characters in the text, more accurately perform pinyin annotation on the text, and improve the annotation efficiency and accuracy of the text.
[0012] To achieve the above-mentioned purpose, the second aspect of the present application proposes a pinyin-annotated text generation device combining RPA and AI, and the device includes: an acquisition module, used to acquire Chinese text to be pinyin-annotated, and generate a pinyin text corresponding to the Chinese text; an input module, used to input the Chinese text into a preset pause model, and obtain pause information in the Chinese text; a word segmentation module, used to segment the Chinese text according to the pause information, and obtain a word segmentation result; a determination module, used to determine a word composed of three consecutive Chinese characters based on the word segmentation result and the pinyin text; a voice change processing module, used to perform voice change processing on the word composed of three consecutive Chinese characters, generate a pinyin-annotated text corresponding to the Chinese text, and output it.
[0013] The pinyin annotated text generation device combining RPA and AI in the embodiment of the present application generates the pinyin text corresponding to the Chinese text by acquiring the Chinese text to be pinyin annotated; inputting the Chinese text into a preset pause model to obtain the pause information in the Chinese text; segmenting the Chinese text according to the pause information to obtain the segmentation result; based on the segmentation result and the pinyin text, determining the words composed of three consecutive tones of Chinese characters; performing voice change processing on the words composed of three consecutive tones of Chinese characters, generating the pinyin annotated text corresponding to the Chinese text and outputting it. The device can realize automatic voice change processing on the words composed of three consecutive tones of Chinese characters in the text, more accurately perform pinyin annotation on the text, and improve the annotation efficiency and accuracy of the text.
[0014] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes another device for generating pinyin-annotated text combining RPA and AI, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, the method for generating pinyin-annotated text combining RPA and AI as described above is implemented.
[0015] In order to achieve the above-mentioned objectives, the fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the pinyin-annotated text generation method combining RPA and AI as described above.
[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0018] Figure 1 It is a flowchart of a method for generating pinyin-annotated text by combining RPA and AI according to an embodiment of the present application;
[0019] Figure 2 It is a flowchart of a method for generating pinyin-annotated text by combining RPA and AI according to another embodiment of the present application;
[0020] Figure 3 It is a structural diagram of a device for generating pinyin-annotated text by combining RPA and AI according to an embodiment of the present application;
[0021] Figure 4 It is a structural schematic diagram of a device for generating pinyin-annotated text in combination with RPA and AI according to another embodiment of the present application;
[0022] Figure 5 It is a structural diagram of another device for generating pinyin-annotated text by combining RPA and AI according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0024] The following describes the method and device for generating text with phonetic notation in combination with RPA and AI in accordance with an embodiment of the present application with reference to the accompanying drawings. The execution subject of the method for generating text with phonetic notation in combination with RPA and AI provided in the present application is a device for generating text with phonetic notation in combination with RPA and AI.
[0025] Figure 1 A flowchart of a method for generating pinyin-annotated text by combining RPA and AI is provided in an embodiment of the present application. Figure 1 As shown, the method for generating pinyin-annotated text combining RPA and AI includes the following steps:
[0026] Step 101, obtaining a Chinese text to be annotated with pinyin, and generating a pinyin text corresponding to the Chinese text.
[0027] In the embodiment of the present application, the Chinese text to be annotated with pinyin is the Chinese text that needs to be annotated with pinyin, such as the Chinese text corresponding to the relevant audio, part of the Chinese text in the document, the Chinese text on the Internet, etc. Correspondingly, the Chinese text to be annotated with pinyin can be obtained by, but is not limited to, converting the relevant audio, converting the audio into the corresponding Chinese text, intercepting the Chinese text in the document, and downloading it on the Internet.
[0028] Next, based on the obtained Chinese text to be annotated with pinyin, a pinyin text corresponding to the Chinese text is generated, which is composed of pinyin. As an example, the pinyin text corresponding to the Chinese text to be annotated with pinyin can be generated by querying a pinyin library. For example, the Chinese text to be annotated with pinyin is "speech synthesis", and the corresponding pinyin text is "yu3yin1he2cheng2", where the numbers represent pinyin tones.
[0029] Step 102: input the Chinese text into a preset pause model to obtain pause information in the Chinese text.
[0030] As an example, the Chinese text to be annotated is input into a pre-trained text pause recognition model, and the text pause recognition model can output pause information corresponding to the Chinese text. The pause information can be but is not limited to word segmentation information.
[0031] Step 103, segmenting the Chinese text according to the pause information to obtain a segmentation result.
[0032] In an embodiment of the present application, after obtaining the pause information, the pause information can be inserted into the Chinese text to obtain the various words after the pause segmentation, for example, "exhibition hall director". After inserting the pause information, the various words after the pause segmentation are: "exhibition hall", "director".
[0033] Alternatively, if Figure 2 As shown, each word after the pause segmentation is segmented to obtain the segmentation result, and the continuous single-character words in the segmentation result are combined. The specific implementation process is as follows:
[0034] Step 201 , segment each word after the pause segmentation according to the preset segmentation strategy based on natural language processing NLP to obtain the segmentation result.
[0035] As an example, for each word after the pause segmentation, the word is input into a preset segmentation model to obtain the segmentation result of the word, wherein the part of speech of each word in the pause segmentation can be determined based on the NLP technology, and each word after the pause segmentation is determined according to the part of speech, and then the word is input into the preset segmentation model, wherein the segmentation model can also be generated by training relevant sample data based on the deep learning technology in NLP; when there are words to be split whose number of characters is greater than or equal to the second preset number in the segmentation result of the word, the words to be split are split according to the number of characters of the words to be split according to the natural language processing NLP, so that the number of characters of the words to be split is less than or equal to the second preset number.
[0036] Due to the different types of word segmentation results, the splitting methods used are also different. The examples are as follows:
[0037] The first example: For words that can be further segmented in the word segmentation results, further segmentation is performed based on the word length of 2 characters. Taking the Chinese text "exhibition hall curator" as an example, the words after the pause segmentation are: "exhibition hall", "curator". Among them, "exhibition hall" is a three-character word equal to the second preset number of words (the second preset number is 3). When "exhibition hall" is input into the preset word segmentation model, "exhibition hall" can be further split into: "exhibition", "hall", and the final word segmentation results are: "exhibition", "hall", "curator".
[0038] For the second example, for an indivisible three-character word, just keep it without any processing. Taking "Somali pirates" as an example, it can be divided into: "Somali" and "pirates". Although "Somali" is a three-character word equal to the second preset quantity (the second preset quantity is 3), it is a whole and cannot be further segmented, so just keep it as it is.
[0039] For the third example, for an indivisible four-character word, divide it into words with 2 characters each. Taking "Somali li" as an example, it is divided into "Soma" and "lili".
[0040] For the fourth example, for an indivisible five-character word, divide it according to the 2-3 rule. Taking "Somali lili" as an example, it is divided into "Soma" and "lilii".
[0041] For the fifth example, for an indivisible N-character word (N>5), when N is even, divide it into words with 2 characters each; when N is odd, the last 3 characters form a word, and the remaining part is divided into words with 2 characters each. For example, "Somalian lili" can be divided into "Soma", "Haili", and "lili". Another example, "Somali Haili Maso" can be divided into "Soma", "Lihai", and "Ermaso".
[0042] Step 202, when there are consecutive single-character words with a number greater than the first preset quantity in the result of word segmentation, combine the consecutive single-character words.
[0043] For example, taking "I I I have a paper tiger" as an example, the result of word segmentation is: "I", "I", "I", "have", "paper", "tiger". Combine the consecutive single-character words, and the combined result is "I I I have paper" and "tiger".
[0044] Step 104, based on the word segmentation result and the pinyin text, determine the words composed of consecutive third-tone Chinese characters.
[0045] Step 105, perform tone-changing processing on the words composed of consecutive third-tone Chinese characters, generate the pinyin annotation text corresponding to the Chinese text, and output it.
[0046] Optionally, determine the pinyin of all the characters before the last character in the word composed of consecutive third-tone Chinese characters as the pinyin to be tone-changed; perform second-tone processing on the pinyin to be tone-changed in the pinyin corresponding to the word composed of consecutive third-tone Chinese characters.
[0047] In the embodiments of the present application, all the word segmentation results can be traversed to find the words containing consecutive third-tone characters. When the number of consecutive third-tone characters is N, determine the pinyin of the first N-1 characters as the pinyin to be tone-changed, and change the tone of the third-tone Chinese characters corresponding to the pinyin to be tone-changed to the second tone.
[0048] For example, "Somali pirates" (suo3 ma3 li3 hai3 fei3), the word segmentation results are "Somali", "pirates", and the pinyin after voice change processing is: "suo2 ma2 li3", "hai2 fei3"; another example: "Director of the exhibition hall", the word segmentation results are "exhibition", "hall", "director" ("zhan3 lan3", "guan3", "guan3 zhang3"), and the pinyin after voice change processing is: "zhan2 lan3", "guan3", "guan2 zhang3"; another example: "I I I have a paper tiger", the word segmentation results are "I I I have paper", "tiger", and the pinyin after voice change processing is: "wo2 wo2 wo2 you2 zhi3", "lao2 hu3".
[0049] In order to further ensure the accuracy of text annotation, in an embodiment of the present application, after the pinyin to be changed in the pinyin corresponding to the words composed of three consecutive Chinese characters in the word segmentation result is processed with the second tone, the consecutive three-tone pinyin in the pinyin text after the voice change processing can be obtained; all pinyins before the last pinyin in the consecutive three-tone pinyin are processed with the second tone.
[0050] For example, taking "exhibition hall director" as an example, after the voice changing process, the pinyin obtained is: "zhan2 lan3guan3guan2 zhang3", where "lan3 guan3" is 3 consecutive tones, and the first character is changed to the 2nd tone, the result is "lan2guan3", and the final result is: "zhan2 lan2 guan3 guan2 zhang3".
[0051] Furthermore, in order to construct the front end of the speech synthesis system, in the embodiment of the present application, after the words composed of three consecutive Chinese characters are voice-changed and the pinyin annotation text corresponding to the Chinese text is generated and output, the Chinese text and the corresponding pinyin annotation text can be determined as training data; the training data is used to train the front-end processing model of the speech synthesis system to obtain a trained front-end processing model. Thus, the annotation efficiency and accuracy of the text are improved.
[0052] The method for generating pinyin-annotated text in combination with RPA and AI in the embodiment of the present application generates a pinyin-annotated text corresponding to the Chinese text by acquiring a Chinese text to be pinyin-annotated; inputting the Chinese text into a preset pause model to obtain the pause information in the Chinese text; segmenting the Chinese text according to the pause information to obtain the segmentation result; based on the segmentation result and the pinyin text, determining a word composed of three consecutive Chinese characters; performing voice change processing on the word composed of three consecutive Chinese characters, generating and outputting the pinyin-annotated text corresponding to the Chinese text. The method can automatically perform voice change processing on words composed of three consecutive Chinese characters in the text, more accurately perform pinyin annotation on the text, and improve the annotation efficiency and accuracy of the text.
[0053] Corresponding to the Pinyin-annotated text generation method combining RPA and AI provided in the above-mentioned embodiments, an embodiment of the present application also provides a Pinyin-annotated text generation device combining RPA and AI. Since the Pinyin-annotated text generation device combining RPA and AI provided in the embodiment of the present application corresponds to the Pinyin-annotated text generation method combining RPA and AI provided in the above-mentioned embodiments, the implementation method of the Pinyin-annotated text generation method combining RPA and AI is also applicable to the Pinyin-annotated text generation device combining RPA and AI provided in this embodiment, and is not described in detail in this embodiment. Figure 3 FIG. 1 is a schematic diagram of a structure of a device for generating pinyin-annotated text in combination with RPA and AI according to an embodiment of the present application. Figure 3 As shown, the pinyin annotated text generation device combining RPA and AI includes: an acquisition module 310, an input module 320, a word segmentation module 330, a determination module 340, and a voice change processing module 350.
[0054] Among them, the acquisition module 310 is used to obtain the Chinese text to be annotated with pinyin and generate the pinyin text corresponding to the Chinese text; the input module 320 is used to input the Chinese text into a preset pause model to obtain the pause information in the Chinese text; the word segmentation module 330 is used to segment the Chinese text according to the pause information to obtain the word segmentation result; the determination module 340 is used to determine the words composed of three consecutive Chinese characters based on the word segmentation result and the pinyin text; the voice change processing module 350 is used to perform voice change processing on the words composed of three consecutive Chinese characters, generate the pinyin annotated text corresponding to the Chinese text and output it.
[0055] As a possible implementation method of an embodiment of the present application, the word segmentation module 330 is also used to segment each word after the pause segmentation according to a preset word segmentation strategy to obtain a result after word segmentation; when there are continuous single-character words greater than a first preset number in the result after word segmentation, the continuous single-character words are combined.
[0056] As a possible implementation method of an embodiment of the present application, the word segmentation module 330 is specifically used to input a preset word segmentation model into each word after pause segmentation to obtain a word segmentation result; when there are words to be split whose number of characters is greater than or equal to a second preset number in the word segmentation result, the words to be split are split according to the number of characters in the words to be split, so that the number of characters in the words to be split is less than or equal to the second preset number.
[0057] As a possible implementation method of the embodiment of the present application, the voice change processing module 350 is specifically used to determine the pinyin of all characters before the last character in a word composed of three consecutive Chinese characters as the pinyin to be changed; and perform second tone processing on the pinyin to be changed in the pinyin corresponding to the word composed of three consecutive Chinese characters.
[0058] As a possible implementation method of the embodiment of the present application, the voice change processing module 350 is specifically used to obtain three consecutive pinyin tones in the pinyin text after voice change processing; and perform second tone processing on all pinyins before the last pinyin in the three consecutive pinyin tones.
[0059] As a possible implementation method of the embodiment of the present application, Figure 4 As shown, in Figure 3 On the basis shown, the pinyin annotated text generation device combining RPA and AI also includes: a training module 360.
[0060] Among them, the determination module 340 is used to determine the Chinese text and the corresponding pinyin annotated text as training data; the training module 360 is used to use the training data to train the front-end processing model of the speech synthesis system to obtain a trained front-end processing model.
[0061] The pinyin annotated text generation device combining RPA and AI in the embodiment of the present application generates the pinyin text corresponding to the Chinese text by acquiring the Chinese text to be pinyin annotated; inputting the Chinese text into a preset pause model to obtain the pause information in the Chinese text; segmenting the Chinese text according to the pause information to obtain the segmentation result; based on the segmentation result and the pinyin text, determining the words composed of three consecutive tones of Chinese characters; performing voice change processing on the words composed of three consecutive tones of Chinese characters, generating and outputting the pinyin annotated text corresponding to the Chinese text. The device can realize automatic voice change processing on the words composed of three consecutive tones of Chinese characters in the text, more accurately perform pinyin annotation on the text, and improve the annotation efficiency and accuracy of the text.
[0062] In order to implement the above embodiment, the present application also proposes another device for generating pinyin-annotated text by combining RPA and AI. Figure 5 A schematic diagram of the structure of another device for generating text with phonetic notation combined with RPA and AI provided in an embodiment of the present application. The device for generating text with phonetic notation combined with RPA and AI includes:
[0063] A memory 1001 , a processor 1002 , and a computer program stored in the memory 1001 and executable on the processor 1002 .
[0064] When the processor 1002 executes the program, the pinyin-annotated text generation method combining RPA and AI provided in the above embodiment is implemented.
[0065] Furthermore, the pinyin annotated text generation device combining RPA and AI also includes:
[0066] The communication interface 1003 is used for communication between the memory 1001 and the processor 1002 .
[0067] The memory 1001 is used to store computer programs that can be executed on the processor 1002 .
[0068] The memory 1001 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0069] Processor 1002 is used to implement the pinyin annotated text generation method combining RPA and AI described in the above embodiment when executing the program.
[0070] If the memory 1001, the processor 1002 and the communication interface 1003 are implemented independently, the communication interface 1003, the memory 1001 and the processor 1002 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0071] Optionally, in a specific implementation, if the memory 1001, the processor 1002 and the communication interface 1003 are integrated on a chip, the memory 1001, the processor 1002 and the communication interface 1003 can communicate with each other through an internal interface.
[0072] The processor 1002 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0073] In order to implement the above-mentioned embodiments, the embodiments of the present application also propose a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating pinyin-annotated text combining RPA and AI as in the above-mentioned embodiments is implemented.
[0074] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0075] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0076] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0077] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0078] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0079] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0081] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for generating pinyin-annotated text by combining RPA and AI, characterized in that: include: Obtaining a Chinese text to be annotated with pinyin, and generating a pinyin text corresponding to the Chinese text; Inputting the Chinese text into a preset pause model to obtain pause information in the Chinese text; Segmenting the Chinese text according to the pause information to obtain a segmentation result; Based on the word segmentation result and the pinyin text, determine a word consisting of three consecutive Chinese characters; Performing voice change processing on the words composed of the three consecutive Chinese characters, generating and outputting the pinyin annotated text corresponding to the Chinese text; Before obtaining the word segmentation result, the method further includes: Determine the part of speech of each participle in the pause participle according to natural language processing (NLP), determine each word after the pause participle according to the part of speech, input the word into a preset participle model, and obtain the participle result of the word; When there is a word to be split whose number of characters is greater than or equal to a second preset number in the word segmentation result of the word, split the word to be split according to the number of characters of the word to be split according to natural language processing NLP, so that the number of characters of the word to be split is less than or equal to the second preset number; When there are continuous single-character words greater than a first preset number in the result after the word segmentation, the continuous single-character words are combined.
2. The method according to claim 1, characterized in that: The voice changing process of the word composed of three consecutive Chinese characters includes: Determine the pinyin of all characters before the last character in the word composed of the three consecutive Chinese characters as the pinyin to be changed; The pinyin to be changed in the pinyin corresponding to the word composed of the three consecutive Chinese characters is processed with the second tone.
3. The method according to claim 2, characterized in that After the second tone processing is performed on the pinyin to be changed in the pinyin corresponding to the word composed of the three consecutive Chinese characters, the method further includes: Obtain three consecutive pinyin tones in the pinyin text after voice change processing according to natural language processing NLP; All the pinyins before the last pinyin in the three consecutive pinyins are processed with the second tone.
4. The method according to claim 1, characterized in that After the voice changing process is performed on the words composed of the three consecutive Chinese characters, and the pinyin annotated text corresponding to the Chinese text is generated and outputted, the method further includes: Determine the Chinese text and the corresponding pinyin annotated text as training data; The training data is used to train the front-end processing model of the speech synthesis system to obtain a trained front-end processing model.
5. A device for generating pinyin-annotated text by combining RPA and AI, characterized in that: include: An acquisition module, used to acquire Chinese text to be annotated with pinyin, and generate a pinyin text corresponding to the Chinese text; An input module, used for inputting the Chinese text into a preset pause model to obtain pause information in the Chinese text; A word segmentation module, used for performing word segmentation on the Chinese text according to the pause information to obtain a word segmentation result; A determination module, used for determining a word composed of three consecutive Chinese characters based on the word segmentation result and the pinyin text; A voice change processing module, used for performing voice change processing on the words composed of the three consecutive Chinese characters, generating and outputting the pinyin annotated text corresponding to the Chinese text; Wherein, the word segmentation module is also used for: Determine the part of speech of each participle in the pause participle according to natural language processing (NLP), determine each word after the pause participle according to the part of speech, input the word into a preset participle model, and obtain the participle result of the word; When there is a word to be split whose number of characters is greater than or equal to a second preset number in the word segmentation result of the word, split the word to be split according to the number of characters of the word to be split according to natural language processing NLP, so that the number of characters of the word to be split is less than or equal to the second preset number; When there are continuous single-character words greater than a first preset number in the result after the word segmentation, the continuous single-character words are combined.
6. The device according to claim 5, characterized in that The voice changing processing module is specifically used for: Determine the pinyin of all characters before the last character in the word composed of the three consecutive Chinese characters as the pinyin to be changed; The pinyin to be changed in the pinyin corresponding to the word composed of the three consecutive Chinese characters is processed with the second tone.
7. The device according to claim 6, characterized in that The voice changing processing module is also specifically used for: Obtain three consecutive pinyin tones in the pinyin text after voice change processing according to natural language processing NLP; All the pinyins before the last pinyin in the three consecutive pinyins are processed with the second tone.
8. The device according to claim 5, characterized in that Also includes: Training modules; The determination module is used to determine the Chinese text and the corresponding pinyin annotated text as training data; The training module is used to train the front-end processing model of the speech synthesis system using the training data to obtain a trained front-end processing model.
9. A device for generating pinyin-annotated text by combining RPA and AI, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating pinyin-annotated text combining RPA and AI as described in any one of claims 1 to 4 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for generating pinyin-annotated text combining RPA and AI as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Speech synthetic text processing method based on rhythm structure
CN101000764A
Voice synthesis method and device, computing equipment and computer storage medium
CN109686361A
Chinese character pinyin conversion method and conversion system
CN110083711A
Systems and methods for translating chinese pinyin to chinese characters
US20050209844A1
