A text broadcast method, an electronic device and a storage medium
By standardizing the text to be broadcast and predicting the prosody and phonemes of the language text, the problem of inaccurate broadcast duration in existing technologies has been solved, achieving more accurate broadcast duration prediction and improved user experience.
Patent Information
- Application Number
- CN202311653641.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-11-30
AI Technical Summary
In existing technologies, predicting the broadcast duration based on the number of characters in the text to be broadcast is inaccurate, leading to a decline in user experience.
By standardizing the text to be broadcast, numbers and symbols represented in non-target language forms are converted into target language text, unnecessary punctuation is removed, and letter abbreviations are converted into full pinyin. The broadcast duration is predicted based on the prosody and phoneme prediction results of the language text.
It improved the accuracy of broadcast duration, adapted to the broadcast needs of different users, and enhanced the user experience.
Smart Images

Figure CN120111135B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a text broadcasting method, an electronic device and a storage medium. BACKGROUND
[0002] In the case of starting the random reading function of the mobile phone, if the user opens a news information application, the random reading function can read (i.e., broadcast) the content in the display interface of the mobile phone or the content corresponding to the selected area of the user in the display interface, and can also predict the broadcasting duration of the content in the display interface of the mobile phone or the content corresponding to the selected area of the user in the display interface.
[0003] In some solutions, the predicted broadcasting duration of the to-be-broadcast text is predicted according to the number of characters of the to-be-broadcast text. However, different broadcasting tones have different broadcasting durations for the content in the display interface of the mobile phone or the content corresponding to the selected area of the user in the display interface. Therefore, the prediction result shown to the user is inaccurate, which affects the user experience. SUMMARY
[0004] To solve the problem of inaccurate prediction of the broadcasting duration of the to-be-broadcast text, the embodiments of the present application provide a text broadcasting method, an electronic device and a storage medium, which comprise the following steps.
[0005] In a first aspect, the present application provides a text broadcasting method applied to an electronic device, which comprises the following steps: displaying a first broadcasting interface, the first broadcasting interface comprising a first predicted broadcasting duration of a first text, wherein the first text comprises N characters, and the N characters comprise M first type characters; and displaying a second broadcasting interface, the second broadcasting interface comprising a second predicted broadcasting duration of a second text, wherein the second text comprises N characters, and the N characters comprise P first type characters, wherein M and P are different, and the first predicted broadcasting duration and the second predicted broadcasting duration are different.
[0006] Based on the above solution, for texts with the same number of characters and different numbers of first type characters, the broadcasting durations of the texts can be predicted to be different. In this way, the problem of inaccurate prediction caused by predicting the broadcasting duration of the text only according to the number of characters of the text can be avoided, and the accuracy of predicting the broadcasting duration of the text can be improved.
[0007] It can be understood that the first text and the second text can both be to-be-broadcast texts. The to-be-broadcast text can comprise only one kind of character, such as a pure Chinese text, a pure English text, and the like. Alternatively, the to-be-broadcast text can comprise a combination of multiple kinds of characters, such as a Chinese text and an English text.
[0008] It can be understood that in some optional examples, the first predicted reading time and the second predicted reading time can be the same, for example, the number of characters obtained by normalizing M first type characters in the first text is equal to the number of characters obtained by normalizing P first type characters in the second text, when the number of characters in the two texts after normalization is used to predict the reading time, the first predicted reading time and the second predicted reading time can be equal, but when the prosody prediction result and / or the phoneme prediction result of the two texts after normalization are used to predict the reading time, the first predicted reading time and the second predicted reading time can not be equal.
[0009] In some optional examples of the first aspect of the application, the reading language of the first text includes at least one of the first type language, and the first type character includes a number represented in a form other than the corresponding reading language, a symbol that needs to be read, a letter abbreviation, and a punctuation that does not need to be read.
[0010] It can be understood that the reading language of the second text can also include at least one of the first type language.
[0011] In some optional examples of the first aspect of the application, the first type language includes Chinese and English, and the letter abbreviation includes an English letter abbreviation.
[0012] It can be understood that the first type language can also include Japanese, Latin, Malay, Catalan, Czech, Danish, German, Estonian, English, Spanish, Basque, Filipino, French, Galician, Croatian, Indonesian, Italian, Latvian, Lithuanian, Hungarian, Dutch, Norwegian, Polish, Portuguese, Romanian, Finnish, Swedish, Turkish, Greek, Vietnamese, and other languages in which one character has one pronunciation syllable.
[0013] It can be understood that the letter abbreviation includes at least one of Japanese, Latin, Malay, Catalan, Czech, Danish, German, Estonian, English, Spanish, Basque, Filipino, French, Galician, Croatian, Indonesian, Italian, Latvian, Lithuanian, Hungarian, Dutch, Norwegian, Polish, Portuguese, Romanian, Finnish, Swedish, Turkish, Greek, and Vietnamese abbreviations.
[0014] In some optional examples of the first aspect of the application, the first predicted reading time is determined by: converting the first type character in the first text to obtain a first language text; and determining the first predicted reading time based on the first language text.
[0015] It can be understood that, for the text to be broadcast containing multiple languages, the numbers represented in a form other than the language in the text part corresponding to each language can be converted into the language corresponding to the language, the symbols that need to be broadcast are converted into the language corresponding to the language, the punctuation that does not need to be broadcast is deleted, and the letter abbreviation is replaced by full spelling to obtain the language text. For example, the text to be broadcast includes Chinese and English, the Arabic numerals in the Chinese corresponding text part can be converted into Chinese lowercase numerals, and the Arabic numerals in the English corresponding text part can be converted into words or phrases.
[0016] In some optional examples, the broadcast duration of the text to be broadcast can be predicted based on the number of characters in the language text and the broadcast duration of each character.
[0017] In some optional examples, the broadcast duration of the text to be broadcast can be predicted based on the pause duration corresponding to the prosody level of the complete sentence, the short sentence, the phrase, and the word in the language text.
[0018] In some optional examples, the broadcast duration of the text to be broadcast can be predicted based on the phoneme corresponding to the broadcast duration of the character and / or the word in the language text.
[0019] In some optional examples, the broadcast duration of the text to be broadcast can be predicted based on the pause duration corresponding to the prosody level of the complete sentence, the short sentence, the phrase, and the word in the language text and the phoneme corresponding to the broadcast duration of the character and / or the word.
[0020] In some optional examples, the broadcast duration of the text to be broadcast can be predicted based on the number of characters in the language text, the broadcast duration of each character, and the pause duration corresponding to the prosody level of the complete sentence, the short sentence, the phrase, and the word.
[0021] In the embodiments of the present application, by predicting the broadcast duration of the text to be broadcast based on the language text, compared with predicting the broadcast duration of the text to be broadcast based on the number of characters in the text to be broadcast, the accuracy of predicting the broadcast duration of the text to be broadcast can be improved.
[0022] It can be understood that the way to determine the second predicted broadcast duration can also use the way to predict the first broadcast duration described above. In order to avoid repetition, the way to predict the broadcast duration of the text is introduced below by taking the prediction of the first broadcast duration as an example.
[0023] In some optional examples of the first aspect of the present application, converting the first type of character in the first text includes at least one of the following: converting the numbers represented in a form other than the first language in the text broadcast in the first language in the first text into the language corresponding to the first language; deleting the punctuation that does not need to be broadcast in the first text; converting the letter abbreviation in the first text into full spelling.
[0024] For example, for Chinese text, Arabic numerals and Roman numerals in the text to be broadcast can be converted into Chinese lowercase numerals. For example, the Arabic numeral "360" in "Qihoo 360 Company" is converted into the language character "three six zero", the Arabic numeral in "5.5" is converted into the language character "five point five", and so on. Symbols in the text to be broadcast that need to be broadcast can be converted into the corresponding Chinese language characters. For example, the symbol "~" in "3~4" that needs to be broadcast is converted into the language character "to", "<" is converted into the language character "less than or equal to", "&" is converted into the language character "and", and so on. For symbols "※", "¤" that do not need to be broadcast, no conversion is performed. Symbols in the text to be broadcast that do not need to be broadcast can be deleted. For example, the symbol "~" in "ah~" that does not need to be broadcast is deleted, the punctuation marks "<>" and "" in "《The Road to Wealth "Branch" 》" that do not need to be broadcast are deleted, and so on.
[0025] In the embodiments of the present application, by converting the first type of characters in the first text, a language text that is more in line with the broadcast form can be obtained, thereby improving the accuracy of predicting the broadcast duration of the text to be broadcast.
[0026] In some optional instances of the first aspect of the present application, determining the first predicted broadcast duration based on the first language text comprises: determining the first predicted broadcast duration based on the number of characters in the first language text and the broadcast duration of each character.
[0027] It can be understood that the character can refer to a word, a letter, and the like represented in the form of broadcast speech.
[0028] In the embodiments of the present application, by converting the first type of characters in the first text, a language text that is more in line with the broadcast form can be obtained, thereby improving the accuracy of predicting the broadcast duration of the text to be broadcast.
[0029] In some optional instances of the first aspect of the present application, determining the first predicted broadcast duration based on the first language text comprises: determining the first predicted broadcast duration based on at least one of the prosodic level corresponding to a complete sentence, a short sentence, a phrase, a word in the first language text, and the phoneme, the broadcast tone, and the speech speed parameters of the letters and / or words in the first language text.
[0030] It can be understood that, generally, the prosody can be divided into four levels, which are represented by #4 (SEN), #3 (IP), #2 (PP) and #1 (PW) respectively. The #4 can represent a complete sentence corresponding to the prosody level, and the pause time corresponding to the prosody level is generally obvious or very long. The #3 can represent a short sentence composed of phrases corresponding to the prosody level, and the pause time corresponding to the prosody level is generally long. The #2 can represent a short word composed of words corresponding to the prosody level, and the pause time corresponding to the prosody level is generally short. The #1 can represent a word corresponding to the prosody level, and the pause time corresponding to the prosody level is generally none or very short.
[0031] It can be understood that the phonemes of the characters can include initial, final, and tone pronunciation units, and the phonemes of the words can include vowels and consonants.
[0032] It can be understood that the broadcast tone can include a first broadcast tone (such as male voice), a second broadcast tone (such as female voice), a third broadcast tone (such as a custom broadcast tone), and the like, which are not limited in the embodiments of the present application.
[0033] It can be understood that the speech rate parameter can include 1.0, 0.5, 0.9, 2.0, and the like, which are not limited in the embodiments of the present application.
[0034] In the embodiments of the present application, by converting the first type of characters in the first text, a language text more in line with the broadcast form can be obtained, so that the broadcast time of the to-be-broadcast text is predicted based on the pause time corresponding to the prosody level of the complete sentence, the short sentence, the phrase, and the word in the language text, and the broadcast time corresponding to the phonemes of the characters and / or the words, and the accuracy of predicting the broadcast time of the first text can be further improved.
[0035] In some optional instances of the first aspect of the present application, the prosody levels corresponding to the complete sentence, the short sentence, the phrase, and the word in the first language text are determined based on a prosody prediction model, and the phonemes of the characters and / or the words in the first language text are determined based on a phoneme prediction model.
[0036] In some optional instances of the first aspect of the present application, determining the first predicted broadcast time based on the first language text comprises: determining the first predicted broadcast time based on the prosody levels corresponding to the complete sentence, the short sentence, the phrase, and the word in the first language text, the number of characters in the first language text, and the broadcast time corresponding to each character.
[0037] In the embodiments of the present application, the first type of characters in the first text are converted to obtain a language text that is more in line with the broadcast form, so that the prediction accuracy of the broadcast duration of the first text can be further improved based on the pause duration corresponding to the prosody level of complete sentences, short sentences, phrases and words in the language text and the number of characters.
[0038] In some optional instances of the first aspect of the present application, it is further included that: in response to an operation of switching the speech speed of broadcasting the first text from a first speech speed parameter to a second speech speed parameter by the user, and / or in response to an operation of switching the broadcast timbre of broadcasting the first text from a first broadcast timbre to a second broadcast timbre by the user, the third predicted broadcast duration of the first text is displayed.
[0039] For example, based on the prosody level of complete sentences, short sentences, phrases and words in the first language text, the initial, final and tone of the characters in the first language text, the first broadcast timbre, and the speech speed parameter 1.0, it can be predicted that the first predicted broadcast duration of the first text is 10s. If the first broadcast timbre is switched to the second broadcast timbre, it can be predicted that the first predicted broadcast duration of the first text is 20s. If the first broadcast timbre is switched to the second broadcast timbre and the speech speed parameter 1.0 is switched to the speech speed parameter 2.0, it can be predicted that the first predicted broadcast duration of the first text is still 10s.
[0040] In the embodiments of the present application, the speech speed switching function and the timbre switching function are provided to the user, which can adapt to different habits and different broadcast needs of different users, and can improve the user experience.
[0041] In the second aspect, the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor which is one of the one or more processors of the electronic device, and is configured to execute the text broadcast method mentioned in the present application.
[0042] In the third aspect, the present application provides a readable storage medium, and the readable medium stores instructions, and the instructions are executed on the electronic device to make the electronic device execute the text broadcast method mentioned in the present application.
[0043] In the fourth aspect, the embodiments of the present application provide a computer program product, comprising: a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium contains computer program code for executing the text broadcast method mentioned in the present application. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 According to some instances of the present application, a scene schematic diagram of text broadcast is shown.
[0045] Figure 2According to some examples of the present application, another scenario diagram of text broadcasting is shown.
[0046] Figure 3 According to some examples of the present application, a structural diagram of a text broadcasting system is shown.
[0047] Figure 4 According to some examples of the present application, a flow diagram of a text broadcasting method is shown.
[0048] Figure 5 According to some examples of the present application, a diagram of a first display interface of an electronic device is shown.
[0049] Figure 6 According to some examples of the present application, a diagram of a second display interface of an electronic device is shown.
[0050] Figure 7 According to some examples of the present application, a flow diagram of a method of regular processing of a text to be broadcast is shown.
[0051] Figure 8 According to some examples of the present application, a flow diagram of character regular is shown.
[0052] Figure 9 According to some examples of the present application, a flow diagram of single sentence regular is shown.
[0053] Figure 10 According to some examples of the present application, a diagram of regular processing of date type numbers is shown.
[0054] Figure 11 According to some examples of the present application, a structural diagram of a prosody prediction model is shown.
[0055] Figure 12 According to some examples of the present application, a structural diagram of a phoneme prediction model is shown.
[0056] Figure 13 According to some examples of the present application, a structural diagram of a duration prediction model is shown.
[0057] Figure 14 According to some examples of the present application, a hardware structural diagram of an electronic device is shown.
[0058] Figure 15 According to some examples of the present application, a software structural diagram of an electronic device is shown.
[0059] Figure 16 According to some examples of the present application, an interaction diagram of a text broadcasting method based on a software structure is shown. DETAILED DESCRIPTION
[0060] The illustrative embodiments of the present application include, but are not limited to, a text broadcast method, an electronic device, and a storage medium.
[0061] It can be understood that the text broadcast method mentioned in the embodiments of the present application can provide a text broadcast function for ordinary users in special scenarios, for example, in scenarios where it is inconvenient for users to view text on a display interface of an electronic device, such as when brushing teeth, driving, and the like. For example, when a user is brushing teeth, a news can be broadcast by using the text broadcast function of the electronic device. The text broadcast method mentioned in the embodiments of the present application can also provide a text broadcast function for special users with cognitive impairment, low education level, and non-standard pronunciation in ordinary scenarios. For example, a visually impaired person can receive a short message by using the text broadcast function of the electronic device.
[0062] It can be understood that the electronic device in the embodiments of the present application can also be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), and the like. The electronic device can be a mobile phone, a smart television, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, and the like. The specific type of the electronic device is not limited in the embodiments of the present application.
[0063] The text broadcast method mentioned in some embodiments will be described below by taking a mobile phone as an example.
[0064] Figure 1 A scenario schematic diagram of text broadcast is shown, as shown in FIG. 1, in the case of starting a random reading function of a mobile phone, for example, when a user clicks a random reading icon 101 on a display interface of the mobile phone, the mobile phone can start the random reading function, and a text broadcast function can be started. Figure 1 Figure 1 If the user opens the news application again after setting the "second broadcast tone" in the "random reading" application shown in a and exiting the save mode, the random reading function can broadcast (i.e., read) the content in the display interface of the mobile phone or the content corresponding to the selected area in the display interface of the mobile phone, and can also predict the broadcast duration of the content in the display interface of the mobile phone or the content corresponding to the selected area in the display interface of the mobile phone. For example, the content in the display interface of the mobile phone or the content corresponding to the selected area in the display interface of the mobile phone is "economic growth 5.5%", and the predicted broadcast duration is 0.6s. Figure 1 b shows the user broadcasting the content corresponding to the selected area in the display interface of the mobile phone "economic growth 5.5%" and predicting the broadcast duration to be 0.6s.
[0065] The text broadcasting method mentioned in some embodiments is described below.
[0066] In some specific implementations, the broadcast duration of the text to be broadcast (i.e., the content in the display interface of the mobile phone or the content corresponding to the selected area in the display interface of the mobile phone) can be predicted according to the number of characters in the text to be broadcast. Specifically, the broadcast duration of one character (including letters, words, symbols, punctuation, etc.) in the text to be broadcast can be set to 0.1s, and then the number of characters in the text to be broadcast is counted to obtain the predicted broadcast duration of the text to be broadcast.
[0067] For example, the text to be broadcast is "economic growth 5.5%", and the number of characters in the text to be broadcast is 8. Since the broadcast duration of one character is 0.1s, according to the current prediction scheme, the predicted broadcast duration of the text to be broadcast can be predicted according to the number of characters in the text to be broadcast, which is 0.8s. However, during the broadcast, the broadcast duration of numbers and symbols is different from that of letters, and numbers and symbols do not necessarily correspond to one character. For example, the number "5.5" corresponds to three characters "five and a half", and the symbol "%" corresponds to three characters "percent". Therefore, the actual broadcast duration of the text to be broadcast is 1s. That is, the method of predicting the broadcast duration based on the number of characters in the text to be broadcast does not consider the difference between the broadcast duration of special characters (such as numbers and symbols) and the broadcast duration of letters, which may result in a mismatch between the predicted broadcast duration and the actual broadcast duration, leading to poor accuracy of the predicted duration.
[0068] For another example, the text to be broadcast is "《致富“支”路》——Dr Li", and the number of characters in the text to be broadcast is 12. In the current prediction scheme, based on the number of characters in the text to be broadcast, the predicted broadcast duration of the text to be broadcast can be predicted to be 1.2 s. However, during the broadcast, the punctuation marks 《》, ——, “” do not need to be broadcast, and the abbreviation "Dr" is broadcast as "doctor" during the broadcast, and the broadcast duration of "doctor" is 0.3 s. Therefore, the actual broadcast duration of the text to be broadcast is 0.9 s. That is, the method of predicting the broadcast duration based on the number of characters in the text to be broadcast treats punctuation marks and abbreviations as one character, without considering that punctuation marks do not need to be broadcast and the broadcast duration of abbreviations is different from that of the full spelling, resulting in a situation where the predicted broadcast duration does not match the actual broadcast duration, and the accuracy of the predicted duration is poor.
[0069] To solve the above problems, an embodiment of the present application provides another text broadcast method. In this method, the text to be broadcast can be standardized. For example, for a Chinese text, the numbers represented in a form other than Chinese and the symbols that need to be broadcast in the text to be broadcast can be converted into the corresponding Chinese language characters, and the punctuation marks that do not need to be broadcast can be deleted to obtain a language text. Then, based on the language text, the broadcast duration of the text to be broadcast is predicted. In this way, the accuracy of predicting the broadcast duration of the text to be broadcast can be improved.
[0070] For example, for a Chinese text, the Arabic numerals and Roman numerals in the text to be broadcast can be converted into Chinese lowercase numerals. For example, the Arabic numeral "360" in "奇虎360公司" is converted into "三六零", and the Arabic numeral in "5.5" is converted into "五点五", and so on.
[0071] The symbols that need to be broadcast in the text to be broadcast can be converted into the corresponding Chinese language characters. For example, the symbol "~" that needs to be broadcast in "3~4" is converted into the language character "至", the symbol "≤" is converted into the language character "小于等于", the symbol "&" is converted into the language character "和", and so on. For the symbols "※" that do not need to be broadcast, , "¤" are not converted.
[0072] The punctuation marks that do not need to be broadcast in the text to be broadcast can be deleted. For example, the symbol "~" that does not need to be broadcast in "啊~" is deleted, the symbols "※", , "¤" are deleted, and the punctuation marks "《》" that do not need to be broadcast in "《致富“支”路》" are deleted, and so on.
[0073] For English, German, French and other texts, the numbers in the text to be broadcasted that are represented in a form other than English, German or French, symbols that need to be broadcasted, punctuation marks that do not need to be broadcasted, and letter abbreviations can be converted into the corresponding language text in English, German or French. Then, the language text is used to predict the broadcast duration of the text to be broadcasted. In this way, the accuracy of predicting the broadcast duration of the text to be broadcasted can be improved.
[0074] It can be understood that for a text to be broadcasted containing multiple languages, the numbers in the text part corresponding to each language that are represented in a form other than the language, symbols that need to be broadcasted, punctuation marks that do not need to be broadcasted, and letter abbreviations can be converted into the corresponding language text in the language. For example, the text to be broadcasted includes Chinese and English, the Arabic numerals in the Chinese corresponding text part can be converted into Chinese lowercase numerals, and the Arabic numerals in the English corresponding text part can be converted into words or phrases.
[0075] It can be understood that the broadcast language of the text to be broadcasted can be any language with one pronunciation syllable for each character, such as Chinese, Japanese, Latin, Malay, Catalan, Czech, Danish, German, Estonian, English, Spanish, Basque, Filipino, French, Galician, Croatian, Indonesian, Italian, Latvian, Lithuanian, Hungarian, Dutch, Norwegian, Polish, Portuguese, Romanian, Finnish, Swedish, Turkish, Greek, Vietnamese, etc. The text to be broadcasted can be any text with a basic pronunciation unit (phoneme).
[0076] For example, the text to be broadcasted is "economic growth 5.5%", which is standardized to obtain the language text "economic growth five point five percent", and the number of characters in the language text is 10. According to the number of language characters corresponding to the target language in the language text corresponding to the text to be broadcasted, it can be determined that the broadcast duration of the text to be broadcasted is 1s. In this way, the broadcast duration of the text to be broadcasted can be predicted more accurately. Figure 2 As shown in the figure, the user broadcasts the content corresponding to the selected area of the display interface and predicts the broadcast duration to be 1s.
[0077] In some optional examples, after obtaining the language text, prosody prediction can be performed on the language text, for example, full sentence, short sentence, phrase, word division is performed on the language text, and the prosody level corresponding to the full sentence, short sentence, phrase, word obtained by division is determined to obtain the prosody prediction result of the language text. And phoneme prediction can be performed on the language text, for example, the initial, medial and tone of the character in the language text (phoneme) and / or the vowel and consonant of the word in the language text (phoneme) are determined, so as to obtain the phoneme prediction result of the language text. Then, the broadcasting duration of the to-be-broadcast text can be predicted based on the prosody prediction result and the phoneme prediction result of the language text, which can improve the accuracy of predicting the broadcasting duration of the to-be-broadcast text.
[0078] For example, prosody prediction can be performed on the language text "economic growth 5.5 percent", and the prosody prediction result "economic growth #2 2 #2 5.5" is obtained, wherein "#2" represents the second prosody level. And phoneme prediction can be performed on the language text "economic growth 5.5 percent", and the phoneme prediction result "j ing1 j i4 z eng1 zhang3 b ai3 f en1 zh i1 w u5 d ian3 w u3" of the multiple pronunciation units (phonemes) of the language text can be obtained. Wherein, the pause duration corresponding to the second prosody level can be 0.2s, and the broadcasting duration corresponding to each pronunciation unit (phoneme) can be shown in Table 1, therefore, based on the prosody prediction result and the phoneme prediction result of the language text, the broadcasting duration of the to-be-broadcast text can be predicted, and the broadcasting duration of the to-be-broadcast text can be predicted to be 4.5s.
[0079] Table 1
[0080]
[0081]
[0082] In other optional examples, after obtaining the prosody prediction result and the phoneme prediction result of the language text, the broadcasting duration of the to-be-broadcast text can be predicted based on the prosody prediction result and the phoneme prediction result of the language text, and the broadcasting timbre (such as male voice, female voice, custom timbre, etc.) and the speech speed parameter (such as 1.0, 0.5, 0.9, 2.0, etc.) selected by the user. In this way, the accuracy of predicting the broadcasting duration of the to-be-broadcast text can be further improved.
[0083] In some optional examples, the prosody prediction can be performed on the language text only, and a prosody prediction result of the language text can be obtained. Then, the speech duration of the to-be-broadcast text can be predicted according to the number of characters in the language text and the pause duration corresponding to each prosody level in the prosody prediction result. Compared with directly predicting the speech duration of the to-be-broadcast text according to the number of language characters corresponding to the target language in the language text, the accuracy of predicting the speech duration of the to-be-broadcast text can be improved.
[0084] For example, prosody prediction can be performed on the language text "economic growth by 5.5 percent", and a prosody prediction result "economic growth #2 by #2 5.5" can be obtained, where "#2" indicates that the prosody level is the second prosody level, and the pause duration corresponding to the second prosody level is 0.2 s. Further, according to the number of language characters corresponding to the target language in the language text of the to-be-broadcast text and the pause duration corresponding to the prosody level, it can be determined that the speech duration of the to-be-broadcast text is 1.4 s.
[0085] In some optional examples, the prosody prediction can be performed on the language text only, and a prosody prediction result of the language text can be obtained. Then, the speech duration of the to-be-broadcast text can be predicted according to the number of characters in the language text and the pause duration corresponding to each prosody level in the prosody prediction result. Compared with directly predicting the speech duration of the to-be-broadcast text according to the number of language characters corresponding to the target language in the language text, the accuracy of predicting the speech duration of the to-be-broadcast text can be improved.
[0086] For example, prosody prediction can be performed on the language text "economic growth by 5.5 percent", and a prosody prediction result "economic growth #2 by #2 5.5" can be obtained, where "#2" indicates that the prosody level is the second prosody level, and the pause duration corresponding to the second prosody level is 0.2 s. Further, according to the number of language characters corresponding to the target language in the language text of the to-be-broadcast text and the pause duration corresponding to the prosody level, it can be determined that the speech duration of the to-be-broadcast text is 1.4 s.
[0087] Before the text broadcasting method according to the embodiments of the present application is introduced, the text broadcasting system to which the text broadcasting method is applied is introduced.
[0088] Figure 3 A structural schematic diagram of a text broadcasting system 300 is shown, as shown in Figure 3 The text broadcasting system 300 can include a text standardization module 310, a prosody prediction module 320, a pronunciation unit prediction module 330, and a duration prediction module 340.
[0089] The text standardization module 310 can be configured to standardize the text to be broadcast to obtain language text corresponding to the text to be broadcast. For example, numbers in the text to be broadcast that are expressed in a form other than the corresponding broadcast language, symbols that need to be broadcast, are converted into language characters corresponding to the target language, and punctuation that does not need to be broadcast is deleted, and letter abbreviations are converted into full spelling, to obtain language text corresponding to the text to be broadcast.
[0090] In some optional examples, the text standardization module 310 can include a character normalization module and a single sentence normalization module. The character normalization module can perform character normalization on the input text to be broadcast, that is, delete obvious punctuation that does not need to be broadcast, and replace obvious letter abbreviations to obtain preprocessed text to be broadcast. The single sentence normalization module can perform number normalization, symbol normalization, and word normalization on the input single sentence, that is, convert numbers in the input text to be broadcast that are expressed in a form other than the corresponding broadcast language, symbols that need to be broadcast, into language characters corresponding to the target language, delete punctuation that does not need to be broadcast, and replace letter abbreviations with full spelling.
[0091] It can be understood that the target language can refer to the language in which the text to be broadcast is broadcast.
[0092] The prosody prediction module 320 can be configured to predict the prosody of the language text corresponding to the text to be broadcast to obtain a prosody prediction result of the language text. For example, the language text is divided into complete sentences, short sentences, phrases, and words, and the prosody levels corresponding to the complete sentences, short sentences, phrases, and words obtained by the division are determined to obtain the prosody prediction result of the language text.
[0093] In some optional examples, the prosody prediction module 320 can include a prosody prediction model, which can be a model for predicting the prosody levels of complete sentences, short sentences, phrases, and words in the input language text.
[0094] The pronunciation unit prediction module 330 can be configured to predict the phonemes of the language text corresponding to the text to be broadcast to obtain a phoneme prediction result. For example, the initial, medial, and tone of the characters in the language text, and / or the vowels and consonants of the words in the language text, are determined as pronunciation units (phonemes), thereby obtaining the phoneme prediction result of the language text.
[0095] In some optional examples, the pronunciation unit prediction module 330 can include a phoneme prediction model, which can be a model for predicting the initial, medial, and tone of the input characters, and / or predicting the vowels and consonants of the input words.
[0096] The duration prediction module 340 can be used to predict the broadcast duration of the text to be broadcast based on the prosody prediction results and phoneme prediction results of the language text, and obtain the predicted broadcast duration of the text to be broadcast.
[0097] In some optional instances, the duration prediction module 340 may include a duration prediction model that can be used to predict the broadcast duration of each articulation unit (phoneme) in the input language text.
[0098] In some optional instances, the duration prediction module 340 can respond to the user's selection action by obtaining the user-selected playback tone (e.g., Figure 1 The first, second, and third broadcast timbres of the text to be broadcast are combined with speech rate parameters (e.g., 1.0, 0.5, 2.0, etc.) and the broadcast timbres, speech rate parameters, prosody prediction results, and phoneme prediction results to predict the broadcast duration of the text to be broadcast.
[0099] For example, based on the prosodic levels of complete sentences, short sentences, phrases, and words in the text to be broadcast, the initials, finals, and tones of the characters in the text, and with the first broadcast timbre and speech rate parameter of 1.0, the predicted broadcast duration of the text to be broadcast can be predicted to be 10 seconds. If the first broadcast timbre is switched to the second broadcast timbre, the first predicted broadcast duration can be predicted to be 20 seconds. If the first broadcast timbre is switched to the second broadcast timbre, and the speech rate parameter is switched from 1.0 to 2.0, the first predicted broadcast duration of the text to be broadcast can still be predicted to be 10 seconds.
[0100] The following is based on Figure 3 The text broadcasting system 300 shown introduces a text broadcasting method, which can be executed by an electronic device, such as... Figure 4 As shown, text broadcasting methods may include:
[0101] 401: Get the text to be broadcast.
[0102] In some optional instances, the text to be read can be obtained based on the content displayed on the electronic device's screen. For example, Figure 5 A schematic diagram of a first display interface of an electronic device is shown. The first display interface includes a first control 501, a second control 502, and a third control 503. The first control 501 displays first display content, the second control 502 displays second display content, and the third control 503 displays a portion of third display content. Since the first display interface includes portions of the first, second, and third controls, the first and second display content can be used as the text to be read, or the first, second, and a portion of the third display content can be used as the text to be read.
[0103] In some optional examples, the to-be-broadcast text can be obtained based on content corresponding to a selected region of the display interface by the user, for example, Figure 6 A schematic diagram of a second display interface of an electronic device is shown, which includes first display content 601 and second display content 602, so that the first display content corresponding to the long-press drag operation (e.g., content corresponding to the shaded region) can be obtained in response to a long-press drag operation by the user, and the first display content can be taken as the to-be-broadcast text. It can be understood that the user can not only select the to-be-broadcast text from the second display interface by a long-press drag operation, but also select the to-be-broadcast text from the second display interface by voice, point touch, etc., for example, taking the first display content as the to-be-broadcast text by voice "read the title", or taking the first display content and the second display content in the second display interface as the to-be-broadcast text by a double-click operation on the second display interface, and the present application embodiments are not limited in this regard.
[0104] 402: input the to-be-broadcast text into the text standardization module 310 to obtain language text corresponding to the to-be-broadcast text.
[0105] It can be understood that the text standardization module 310 can be used to standardize the to-be-broadcast text to obtain language text corresponding to the to-be-broadcast text. For example, numbers in the to-be-broadcast text expressed in a form other than the corresponding broadcast language, symbols that need to be broadcast, are converted into language characters corresponding to the target language, and punctuation that does not need to be broadcast is deleted, and letter abbreviations are converted into full spelling to obtain language text corresponding to the to-be-broadcast text.
[0106] It can be understood that the target language can refer to the language in which the to-be-broadcast text is broadcast.
[0107] In some optional examples, the to-be-broadcast text can also be subjected to text regular processing to obtain language text corresponding to the to-be-broadcast text. The processing process of the text regular processing can be to convert a non-standardized word into a broadcast form word to eliminate the ambiguity of the non-standardized word. By using the text regular processing to process the to-be-broadcast text into language text, the small computing power of the text regular processing can be utilized to save the computing power resources of the electronic device and save the storage space of the electronic device. The specific process of subjecting the to-be-broadcast text to text regular processing will be described in detail in Figure 7- Figure 10 Figure 8 For example, the to-be-broadcast text is subjected to character regular processing based on the manner shown in FIG. 6, i.e., deleting obviously unnecessary punctuation and replacing obviously letter abbreviations to obtain preprocessed to-be-broadcast text, thereby realizing preprocessing of the to-be-broadcast file. Based on Figure 9 The shown manner performs digital normalization, symbol normalization and word normalization on a single sentence, that is, converts numbers in the processed-to-be-announced text in a form other than the corresponding announcement language into the corresponding language of the target language, deletes punctuation that does not need to be announced, and replaces letter abbreviations with full spelling. Figure 10 The shown manner normalizes numbers in the form of the target language other than the target language.
[0108] 403: input the language text into the prosody prediction module 320 to obtain the prosody prediction result of the to-be-announced text.
[0109] It can be understood that the prosody prediction module 320 can be used to perform prosody prediction on the language text corresponding to the to-be-announced text to obtain the prosody prediction result of the language text. For example, the language text is divided into complete sentences, short sentences, phrases, and words, and the prosody level corresponding to the divided complete sentences, short sentences, phrases, and words is determined to obtain the prosody prediction result of the language text.
[0110] It can be understood that, generally, prosody can be divided into four levels, represented by #4 (SEN), #3 (IP), #2 (PP), and #1 (PW), respectively. Among them, #4 can represent the prosody level corresponding to a complete sentence, the pause time of which is generally obvious or very long, #3 can represent the prosody level corresponding to a short sentence composed of phrases, the pause time of which is generally long, #2 can represent the prosody level corresponding to a short word composed of words, the pause time of which is generally short, and #1 can represent the prosody level corresponding to a word, the pause time of which is generally none or very short. The specific process of prosody prediction on the language text will be described in detail in Figure 11 .
[0111] 404: input the language text into the pronunciation unit prediction module 330 to obtain the phoneme prediction result of the to-be-announced text.
[0112] It can be understood that the pronunciation unit prediction module 330 can be used to perform phoneme prediction on the language text corresponding to the to-be-announced text to obtain the phoneme prediction result. For example, the initial, medial and tone of the characters in the language text, and / or the vowel and consonant of the words in the language text, etc. pronunciation unit (phoneme) are determined, so as to obtain the phoneme prediction result of the language text.
[0113] 405: input the prosody prediction result and the phoneme prediction result into the duration prediction module 340, and output the announcement duration of the to-be-announced text based on the duration prediction model.
[0114] In some optional examples, the duration prediction module 340 can include a duration prediction model, which can be a model for predicting the duration of pronouncing each pronunciation unit (phoneme) in the predicted language text.
[0115] In some optional examples, the prosody level corresponding to a word can be set as a first prosody level, the pause duration corresponding to the first prosody level can be 0.1s, the prosody level corresponding to a phrase can be set as a second prosody level, the pause duration corresponding to the second prosody level can be 0.2s, the prosody level corresponding to a short sentence can be set as a third prosody level, the pause duration corresponding to the third prosody level can be 0.3s, the prosody level corresponding to a complete sentence can be set as a fourth prosody level, and the pause duration corresponding to the fourth prosody level can be 0.4s. It can be understood that other prosody levels and the pause duration corresponding to each prosody level can also be set, and the embodiments of the present application are not limited in this regard.
[0116] It can be understood that after obtaining the prosody prediction result and the phoneme prediction result of the language text, the duration of the text to be pronounced can be predicted based on the pause duration corresponding to each prosody level in the prosody prediction result and the duration of pronouncing each pronunciation unit (phoneme) in the phoneme prediction result, to obtain the duration of pronouncing the text to be pronounced.
[0117] It can be understood that in Chinese text, there are multi-sound characters and non-multi-sound characters. For non-multi-sound characters, the pronunciation units (phonemes) of the characters can be determined by querying a pinyin mapping table, for example, the initial, medial, and tone of the characters, etc. For multi-sound characters, the phonemes of the characters can be determined by a phoneme prediction model. The specific implementation of determining the pronunciation units (phonemes) of the characters by the phoneme prediction model will be described in detail in Figure 12 .
[0118] It can be understood that in English text, the pronunciation units (phonemes) of the words can be determined by querying a word pronunciation mapping table, for example, the vowels and consonants of the words, etc. However, due to the limited storage space of electronic devices, the word pronunciation mapping table cannot be infinitely expanded, and the word pronunciation mapping table cannot cover the pronunciation units (phonemes) of new words that appear, so the phonemes of the words can also be predicted by means of a phoneme prediction model.
[0119] In some optional examples, the pronunciation duration of each initial, final and tone can be obtained by testing the pronunciation duration of each initial, final and tone for multiple times, and the pronunciation duration of each initial, final and tone can be stored in a table form to obtain the Chinese phoneme pronunciation duration reference table. Similarly, the pronunciation duration of each vowel and consonant can be obtained by testing the pronunciation duration of each vowel and consonant for multiple times, and the pronunciation duration of each vowel and consonant can be stored in a table form to obtain the English phoneme pronunciation duration reference table. It can be understood that for other languages, the way of obtaining the Chinese phoneme pronunciation duration reference table and the English pronunciation duration reference table can also be used to obtain the pronunciation duration reference table of the smallest pronunciation unit of the language.
[0120] In some optional examples, the pronunciation duration of each target language corresponding language character in the language text can be determined based on the Chinese phoneme pronunciation duration reference table, the English phoneme pronunciation duration reference table or the pronunciation duration reference table of the smallest pronunciation unit of other languages, for example, the pronunciation duration of the initial, final and tone of the character, and / or the pronunciation duration of the vowel and consonant of the word.
[0121] In some optional examples, the pronunciation duration of each target language corresponding language character can be determined by using a duration prediction model, and the specific implementation of determining the pronunciation duration of each target language corresponding language character based on the duration prediction model will be described in detail in Figure 13 .
[0122] The specific process of the text regular processing of the text to be read out will be described below, Figure 7 a flowchart of a method of regular processing of a text to be read out is shown, which can be performed by an electronic device, as Figure 7 shown, the method of regular processing of the text to be read out can include:
[0123] 701: obtaining a text to be read out.
[0124] It can be understood that the text to be read out can be obtained by using the method described in step 401 in Figure 4 , which will not be described here.
[0125] 702: performing character regular on the text to be read out.
[0126] It can be understood that the text to be read out can be regular processed by using a regular processing system, and the regular processing system can include a character regular module and a single sentence regular module. In the character regular module, the text to be read out can be character regular, that is, the obvious punctuation that does not need to be read out can be deleted, and the obvious letter abbreviation can be replaced to obtain the preprocessed text to be read out, and the preprocessing of the text to be read out is realized. The specific way of preprocessing the text to be read out will be described in detail in Figure 8 .
[0127] 703: perform sentence processing on the text to be announced.
[0128] It can be understood that the text to be announced can be processed based on the punctuation in the text to be announced that indicates a complete sentence that does not need to be announced, to obtain multiple single sentences. For example, the text to be announced is processed based on the punctuation that does not need to be announced, such as “.”, “?”, “!”, “……”, and the like.
[0129] In some optional examples, step 703 and step 702 can be processed in parallel to obtain the text to be announced after sentence processing.
[0130] 704: obtain a single sentence from the text to be announced after sentence processing.
[0131] It can be understood that a single sentence can be randomly obtained from the text to be announced after sentence processing, or a single sentence can be sequentially obtained from the text to be announced based on the order of multiple sentences in the text to be announced.
[0132] 705: perform single sentence regularization on each single sentence to obtain a language text corresponding to the text to be announced.
[0133] It can be understood that for each single sentence in the text to be announced after sentence processing, the single sentence regularization module can perform number regularization, symbol regularization, and word regularization on the single sentence, i.e., convert the numbers in the text to be announced after sentence processing that are represented in a form other than the corresponding announced language into language characters corresponding to the target language, delete punctuation that does not need to be announced, and replace letter abbreviations with full spelling. The specific manner of performing single sentence regularization on the single sentence will be described in detail in Figure 9 .
[0134] Figure 8 A flowchart of a character regularization method is shown, which can be performed by an electronic device, specifically, by a character regularization module in the electronic device. As shown in Figure 8 , the character regularization method can include:
[0135] 801: perform punctuation deletion processing on the text to be announced.
[0136] It can be understood that punctuation that is obviously not needed to be announced in the text to be announced can be deleted, for example, punctuation “:)” that is not needed to be announced in the text to be announced is deleted.
[0137] 802: perform letter abbreviation replacement processing on the text to be announced.
[0138] It can be understood that an obvious letter abbreviation in the text to be announced can be replaced with full spelling, for example, the letter abbreviation “Dr” in the text to be announced is replaced with full spelling “doctor”.
[0139] 803: Perform punctuation regular processing on the to-be-announced text.
[0140] It can be understood that the punctuation such as “,” “.” “;” “…” and the like in the to-be-announced file indicating a sentence can be deleted.
[0141] It can be understood that the above steps 801-803 can be executed in the order as shown in Figure 8 , can be executed in other orders, for example, in the order of 802, 801, 803, in the order of 803, 802, 801, can also be executed in parallel, and the specific execution order of the above steps is not limited by the embodiments of the present application.
[0142] 804: Obtain the to-be-announced text after character regular processing.
[0143] It can be understood that the to-be-announced text after the deletion processing of punctuation not needed to be announced, the letter abbreviation replacement processing, and the punctuation regular processing is the to-be-announced text after character regular processing, that is, the preprocessed to-be-announced text is obtained, and the preprocessing of the to-be-announced file is realized.
[0144] Figure 9 A flowchart of a single sentence regular is shown, which can be executed by an electronic device, specifically, can be executed by a single sentence regular module in the electronic device. As shown in Figure 9 , the method of single sentence regular can include:
[0145] 901: Input a single sentence into the single sentence regular module.
[0146] In some optional instances, a single sentence can be randomly obtained from the to-be-announced text after sentence processing and input into the single sentence regular module, or a single sentence can be sequentially obtained from the to-be-announced text based on the order of multiple sentences in the to-be-announced text and input into the single sentence regular module.
[0147] 902: Determine whether the single sentence contains a number represented in a form other than the target language.
[0148] It can be understood that for each single sentence obtained from the to-be-announced text after sentence processing, the single sentence regular module can determine whether the single sentence contains a number represented in a form other than the target language, and when the single sentence contains a number represented in a form other than the target language, it can proceed to step 904, otherwise it can proceed to step 906.
[0149] 903: Determine whether the single sentence contains a word.
[0150] It can be understood that for each single sentence obtained from the sentence-processed text to be announced, the single sentence regular module can determine whether the single sentence contains a word, and when the single sentence contains a word, it can proceed to step 905, otherwise it can proceed to step 906.
[0151] 904: Perform number regularization on the number in the single sentence in a form other than the target language.
[0152] It can be understood that when the single sentence contains a number in a form other than the target language, in a Chinese text, i.e., a number in a form other than Chinese can be pronounced according to the numerical value or according to the character pronunciation. In an English text, i.e., a number in a form other than English can be pronounced according to the numerical value, according to the character pronunciation, or according to the ordinal word pronunciation. Therefore, when the single sentence contains a number in a form other than the target language, the number in the single sentence in a form other than the target language can be regularized based on the context of the number in the single sentence in a form other than the target language. Table 2 shows a before-and-after comparison of regularizing numbers in different single sentences in a form other than the target language.
[0153] Table 2
[0154]
[0155]
[0156] In some optional examples, the number in a form other than the target language can be classified based on its meaning in the single sentence, for example, the number in a form other than the target language is classified into time, date, phone, amount, unit, symbol, and regularized based on the classification of the number in a form other than the target language.
[0157] The following will take the regularization of the date class number as an example. Figure 10 A schematic diagram of regularizing the date class number is shown, as shown in Figure 10 The date class (DateProcessor) number includes xx year xx month xx [day], xx month xx [day], xx year, xx month, and xx day.
[0158] Among them, xx year xx month xx [day] can be divided into xx year xx month and xx [day].
[0159] xx year xx month can be divided into integer year integer month, fractional year fractional month, integer year fractional month, and fractional year integer month.
[0160] Integer year integer month can be divided into year and month.
[0161] Year can be divided into 0-starting year and non-0-starting year.
[0162] 0-starting year can include 2-digit year and others. Among them, in 2-digit year, followed by 01-09 month, 1-12 month, year reads by bit, for example, 1 is one. In others, year reads by value, for example, 1 is one.
[0163] Non-0-starting year can include 1-digit year, 2-digit year, 3-digit year, 4-digit year and others. In 1-digit year, year reads by value, for example, two years, 1 is one. In 2-digit year, followed by 01-12 month, 1-12 month, year reads by bit, for example, 1 is one, followed by other months, year reads by value, thousand and above two pronunciations. In 3-digit year, year reads by value, thousand and above two pronunciations. In 4-digit year, 2000 reads by value, thousand and above two pronunciations, non-2000 followed by 01-12 month or 1-12 month, between 1000 and 2000, year reads by bit, for example, 1 is one, others, year reads by value, thousand and above two pronunciations. Non-2000 followed by other months, between 1500 and 2000, 200-2099, year reads by value, for example, 1 is one, others, year reads by value, thousand and above two pronunciations. Others can include first non-0, the rest is all 0 year, among them, 17 bits (including 17 bits) or less year, year reads by value, thousand and above two pronunciations, 17 bits or more year, year reads by bit, for example, 1 is one. The rest of the year reads by bit, for example, 1 is one.
[0164] Month can be divided into 01-12 month, 1-12 month, other non-0-starting month and other 0-starting month.
[0165] Among them, 01-12 month, 1-12 month, month reads by value, for example, February, other non-0-starting month reads by value, thousand and above two pronunciations, other 0-starting month, month reads by bit, for example, 1 is one.
[0166] Fractional year fractional month, integer year fractional month, fractional year integer month can be divided into "xx year", "xx month".
[0167] xx [number of days] can be divided into 01-09, 01-09, other non-0-starting [number of days] and other 0-starting [number of days]. Among them, 01-09, number reads by bit, for example, two. 01-09, day reads by value, for example, two days. Other non-0-starting [number of days], number of days reads by value, thousand and above two pronunciations. Other 0-starting [number of days], number of days reads by bit, for example, 1 is one.
[0168] xx year can be divided into integer year and fractional year.
[0169] Among them, integer year can be divided into positive integer and negative integer.
[0170] A positive integer year can include a combination of a number starting with 0 and a year, wherein the year is read by place value, e.g., one, two. A positive integer year can also include a combination of a number starting with non-0 and a year, wherein the year between 1500 to 2000 is read by place value, e.g., one, and other years are read by value, e.g., two, thousands and above are read by two. A negative integer year can include a combination of a number starting with 0 and a year, wherein the year is read by place value, and the negative sign is not translated, e.g., one, two. A positive integer year can also include a combination of a number starting with non-0 and a year, wherein the year is read by value, and the negative sign is translated as “minus”, e.g., two, thousands and above are read by two.
[0171] A decimal year can be divided into a positive decimal and a negative decimal, in the positive decimal, the year is read by value, and in the negative decimal, the year is read by value, and the sign is translated as “minus”.
[0172] 905: word regularization is performed on the words in the single sentence.
[0173] It can be understood that when the single sentence contains an abbreviation, the abbreviation in the single sentence can be further converted based on the context of the abbreviation in the single sentence, and the abbreviation in the single sentence is converted into full spelling, so that the subsequent inaccurate prediction of the broadcast time of the text to be broadcast due to the failure to recognize the abbreviation or the conversion error during character regularization can be avoided. Table 3 shows a comparison before and after word regularization of words in different single sentences.
[0174] Table 3
[0175] Word before regularisation Word after regularisation MR meets Bodu Bala Sena Mister meets Bodu Bala Sena Raina, A.K.; Agarwal, dr S.K Raina, a.k.; Agarwal, doctor s.k
[0176] 906: symbol regularization is performed on the symbols to be broadcast in the single sentence.
[0177] It can be understood that when the single sentence contains a symbol to be broadcast, the symbol to be broadcast in the single sentence can be converted into the corresponding language characters of the target language, i.e., the symbol to be broadcast is converted into a broadcast form. Table 4 shows a comparison before and after symbol regularization of symbols to be broadcast in a single sentence.
[0178] Table 4
[0179] Symbol before regularisation Symbol after regularisation ≤ Less than or equal to × Multiply by & And
[0180] 907: punctuation regularization is performed on the punctuation not to be broadcast in the single sentence.
[0181] It can be understood that when the single sentence contains punctuation not to be broadcast, the repeated and unnecessary punctuation not to be broadcast in the single sentence can be deleted. Table 5 shows a comparison before and after punctuation regularization of punctuation not to be broadcast in a single sentence.
[0182] Table 5
[0183] Punctuation before regularisation Punctuation after regularisation Our goal is - success Our goal is success Strange Tales of a Lonely Studio is a collection of supernatural stories Strange Tales of a Lonely Studio is a collection of supernatural stories Raina, a.k.; Agarwal, doctor s.k Raina a k Agarwal doctor s k
[0184] 908: Obtain the language text corresponding to the to-be-broadcast text.
[0185] It can be understood that the to-be-broadcast text after the number regular, word regular, symbol regular and punctuation regular of each single sentence in the to-be-broadcast text processed by the sub-sentence is taken as the to-be-broadcast text after the single sentence regular, that is, the language text corresponding to the to-be-broadcast text is obtained.
[0186] The specific process of prosody prediction of the language text will be introduced in combination with the structure of the prosody prediction model in the prosody prediction module 320.
[0187] Figure 11 A structure diagram of a prosody prediction model is shown, which can be used for a model for predicting the prosody level corresponding to a complete sentence, a short sentence, a phrase and a word in the input language text.
[0188] As shown in Figure 11 The prosody prediction model includes a word division module 1101, a character encoder (Char ebedding) 1102, a first feedforward neural network (FNN) 1103, a part-of-speech encoder (Pos ebedding) 1104, a fusion network (Add) 1105, a multi convolutional neural network (Multi CNN) 1106, a bidirectional long short term memory network (BiLSTM) 1107, a second feedforward neural network (FNN) 1108 and a regression network 1109.
[0189] It can be understood that the structure of the prosody prediction model described above is only an example of the model in some embodiments, and can include more or less network layers, and can also split, replace or combine part of the network layers, and other structures of the network can also be used.
[0190] The text word output by the word division module 1101 can be input into the character encoder 1102, the text word vector output by the character encoder 1102 can be input into the first feedforward neural network 1103, the part of speech of each text word output by the word division module 1101 can be input into the part of speech encoder 1104, the physical feature of each text word vector output by the first feedforward neural network 1103 and the part of speech feature output by the part of speech encoder 1104 can be input into the fusion network 1105, the fusion feature output by the fusion network 1105 can be input into the multi-layer convolutional neural network 1106 and the bidirectional long short-term memory network 1107, the global feature of each text word vector output by the multi-layer convolutional neural network 1106 and the local feature of each text word vector output by the bidirectional long short-term memory network 1107 can be input into the second feedforward neural network 1108, and the semantic feature of the word vector output by the second feedforward neural network 1108 can be input into the regression network 1109.
[0191] In some specific implementations, the word division module 1101 can be configured to divide the input language text to obtain text words and determine the part of speech of each text word. It can be understood that the language text can be divided into words to obtain a plurality of text words. The part of speech of the text word can include noun, verb, pronoun, adjective, etc., and can also include subject, predicate, object, attribute, adverb, etc.
[0192] The character encoder 1102 can be configured to encode each text word to obtain a plurality of text word vectors.
[0193] The first feedforward neural network 1103 is configured to extract features from each text word vector to obtain the physical feature of each text word vector. It can be understood that the physical feature can be a feature representing the order, left-right relationship between the text words.
[0194] The part of speech encoder 1104 can be configured to encode the part of speech of each text word to obtain a plurality of part of speech features.
[0195] The fusion network 1105 can be configured to fuse the physical feature of each text word vector and the part of speech feature to obtain a fusion feature.
[0196] The multi-layer convolutional neural network 1106 can be configured to extract features from the fusion feature to obtain the global feature of each text word vector. It can be understood that the global feature can be a feature representing the prosodic level corresponding to the text word vector with respect to the fusion feature.
[0197] The bidirectional long short-term memory network 1107 can be used for feature extraction processing on the fused features to obtain local features of each text word vector. The local features can be features representing a previous text word vector of the text word vector and a prosody level corresponding to the text word vector.
[0198] The second feedforward neural network 1108 can be used to determine semantic features of the text word vector based on the global features and the local features.
[0199] The regression network 1109 can be used to determine probability values of different prosody levels corresponding to the text word vector based on the semantic features of the text word vector, and determine a prosody level corresponding to a maximum probability value as the prosody level corresponding to the text word vector, that is, obtain a prosody prediction result of the language text.
[0200] The specific process of phoneme prediction of the language text will be introduced below in combination with the structure of the phoneme prediction model in the pronunciation unit prediction module 330.
[0201] Figure 12 A structure diagram of a phoneme prediction model is shown, which can be used to predict a model of initial, final and tone pronunciation units (phonemes) of input characters.
[0202] As shown in Figure 12 , the phoneme prediction model can include an encoder (ebedding) 1201, a long short-term memory (LSTM) network 1202, and a fully connected (FC) network 1203.
[0203] The encoded text output by the encoder (ebedding) 1201 can be used as input of the long short-term memory network 1202, and the word vector in the encoded text output by the long short-term memory network 1202 corresponding to the multi-dimensional Gaussian distribution of the phoneme can be used as input of the fully connected network 1203.
[0204] It can be understood that the structure of the above phoneme prediction model is only an example of the model in some embodiments, and can include more or fewer network layers, and can also split, replace or combine part of the network layers, and other structures of the network can also be used.
[0205] In some specific implementations, the encoder 1201 can be used to encode the characters in the language text to obtain the encoded text. It can be understood that the encoder 1201 can encode the language text to encode the characters in the language text into computer recognizable word vectors to obtain the encoded text.
[0206] The long short-term memory network 1202 can be used to perform prediction processing on the encoded text to obtain a multi-dimensional Gaussian distribution of the phonemes corresponding to the word vectors in the encoded text. It can be understood that the long short-term memory network 1202 can calculate the multi-dimensional Gaussian distribution of the phonemes corresponding to the word vectors in the encoded text based on the context encoding values of the word vectors in the encoded text.
[0207] The full connection network 1203 can be used to obtain the phoneme prediction result of the language text based on the multi-dimensional Gaussian distribution of the phonemes corresponding to the word vectors in the encoded text. It can be understood that the full connection network 1203 can obtain the initial consonant, vowel and tone of the corresponding character in the language text, i.e., the phoneme prediction result of the language text, by taking the phoneme corresponding to the maximum probability in the multi-dimensional Gaussian distribution as the phoneme corresponding to the word vector based on the multi-dimensional Gaussian distribution of the phonemes corresponding to the word vectors in the encoded text.
[0208] It can be understood that the method of determining the phonemes of a word based on the phoneme prediction model is the same as the method of determining the phonemes of a character based on the phoneme prediction model, and details are not repeated here to avoid repetition.
[0209] Table 6 shows the phoneme prediction result obtained by predicting the phonemes of different language texts based on the phoneme prediction model, i.e., the multiple pronunciation units (phonemes) of the characters and / or words in the language text.
[0210] Table 6
[0211] Input to the phoneme prediction model Output of the phoneme prediction model Line length one person out of the line h ang2 zh ang3 y i4 x ing2 r en2 ch u1 x ing2 Yoyo You1 you1 Psilocybin S AY2 L AH0 S AY1 B AH0 N
[0212] The specific process of determining the playback duration of each pronunciation unit (phoneme) is described below in combination with the structure of the duration prediction model in the duration prediction module 340.
[0213] Figure 13 A structure diagram of a duration prediction model is shown, which can be a model used to predict the playback duration of each pronunciation unit (phoneme) in the input language text.
[0214] As shown in Figure 13 The duration prediction model can include an encoder (ebedding) 1301, a multi-layer convolutional neural network (Multi CNN) 1302, a bidirectional long short-term memory (Bi-direction ong short termmemory, BiLSTM) network 1303, a feedforward neural network (FNN) 1304 and a regression (softmax) network 1305.
[0215] The encoded text output by the encoder 1301 can be input into a multi-layer convolutional neural network 1302, the global feature of the phoneme vector in the encoded text output by the multi-layer convolutional neural network 1302 and the local feature of the phoneme vector in the encoded text output by a bidirectional long short-term memory network 1303 can be input into a feedforward neural network 1304, and the semantic feature of the phoneme vector output by the feedforward neural network 1304 can be input into a regression network.
[0216] It can be understood that the structure of the duration prediction model described above is only an example of the model in some embodiments, and more or fewer network layers can be included, and part of the network layers can be split, replaced or combined, and other structures of the network can also be used.
[0217] In some specific implementations, the encoder 1301 can be configured to perform encoding processing on the pronunciation unit (phoneme) to obtain the encoded text. It can be understood that the encoder 1301 can perform encoding processing on the pronunciation unit (phoneme) to encode the pronunciation unit (phoneme) into a computer recognizable character, for example, encode the pronunciation unit (phoneme) into a phoneme vector to obtain the encoded text.
[0218] The multi-layer convolutional neural network 1302 can be configured to perform feature extraction processing on the encoded text to obtain the global feature of the phoneme vector in the encoded text. It can be understood that the global feature can be a feature representing the pronunciation duration of the phoneme vector in the encoded text.
[0219] The bidirectional long short-term memory network 1303 can be configured to perform feature extraction processing on the encoded text to obtain the local feature of the phoneme vector in the encoded text. It can be understood that the local feature can be a feature representing the pronunciation duration of the phoneme vector relative to the previous phoneme vector.
[0220] The feedforward neural network 1304 can be configured to determine the semantic feature of the phoneme vector based on the global feature and the local feature of the phoneme vector.
[0221] The regression network 1305 can be configured to determine the probability value of the phoneme vector corresponding to different pronunciation durations based on the semantic feature of the phoneme vector, and take the pronunciation duration corresponding to the maximum probability value as the pronunciation duration corresponding to the phoneme vector, that is, obtain the phoneme prediction result of the language text. For example, Table 1 in the foregoing shows the pronunciation duration of each pronunciation unit (phoneme) in the language text determined based on the duration prediction model.
[0222] The hardware structure of the electronic device will be introduced below. As shown in FIG. 13, the electronic device can include a processor 1301, a memory 1302, a communication interface 1303, and a bus 1304. Figure 14As shown, the electronic device 1400 can include a processor 1410, an external memory interface 1420, an internal memory 1421, a universal serial bus (USB) interface 1430, a charging management module 1440, a power management module 1441, a battery 1442, an audio module 1450, a speaker 1450A, a receiver 1450B, a microphone 1450C, a headset interface 1450D, a sensor module 1460, a display screen 1470, and the like.
[0223] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In some other embodiments of the present application, the electronic device 1400 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0224] The processor 1410 can include one or more processing units, for example: the processor 1410 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors. In some optional examples, the processor 1410 can execute the text broadcast method mentioned in the embodiments of the present application.
[0225] The memory in the processor 1410 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 1410 is a cache memory. The memory can hold instructions or data that the processor 1410 has just used or recycled. If the processor 1410 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access, reducing the waiting time of the processor 1410, thus improving the efficiency of the system. In some optional examples, the memory can store instructions or data of the text broadcast method mentioned in the embodiments of the present application.
[0226] The USB interface 1430 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 1430 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0227] The charging management module 1440 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 1440 can receive charging input from a wired charger through the USB interface 1430. In some wireless charging embodiments, the charging management module 1440 can receive wireless charging input through a wireless charging coil of the electronic device. The charging management module 1440 can charge the battery 1442 while also providing power to the electronic device through the power management module 1441.
[0228] The power management module 1441 is configured to connect the battery 1442, the charging management module 1440, and the processor 1410. The power management module 1441 receives input from the battery 1442 and / or the charging management module 1440 to provide power to the processor 1410, the internal memory 1421, the display 1470, etc. The power management module 1441 can also be used to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In other embodiments, the power management module 1441 can also be disposed in the processor 1410. In some other embodiments, the power management module 1441 and the charging management module 1440 can also be disposed in the same device.
[0229] The electronic device 1400 can implement display functions through the GPU, the display 1470, and the application processor, etc.
[0230] The display screen 1470 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a Micro Led, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 1400 can include 1 or N display screens 1470, where N is a positive integer greater than 1. In some embodiments, the display screen 1470 can be a touch screen.
[0231] The external memory interface 1420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1400. The external memory card communicates with the processor 1410 through the external memory interface 1420 to implement a data storage function. For example, files such as music and videos are saved in the external memory card.
[0232] The internal memory 1421 can be used to store computer executable program codes, which include instructions. The internal memory 1421 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data created during the use of the electronic device 1400 (such as audio data, a phone book, etc.), and the like. In addition, the internal memory 1421 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 1410 executes various function applications and data processing of the electronic device 1400 by running instructions stored in the internal memory 1421 and / or instructions stored in a memory disposed in the processor.
[0233] The electronic device 1400 can implement an audio function through an audio module 1450, a speaker 1450A, a receiver 1450B, a microphone 1450C, a headset interface 1450D, and an application processor, etc. For example, music playing, recording, on-demand reading, etc. The audio module 1450 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 1450 can also be used to encode and decode audio signals. In some embodiments, the audio module 1450 can be disposed in the processor 1410, or part of the functions of the audio module 1450 can be disposed in the processor 1410.
[0234] The speaker 1450A, also known as a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or listen to a hands-free call through the speaker 1450A.
[0235] The receiver 1450B, also known as a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device answers a call or a voice message, the receiver 1450B can be held close to the ear to listen to the voice.
[0236] The microphone 1450C, also known as a "microphone", "sound transducer", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 1450C close to the mouth to input the sound signal into the microphone 1450C. The electronic device can be provided with at least one microphone 1450C. In other embodiments, the electronic device can be provided with two microphones 1450C, in addition to collecting sound signals, it can also achieve noise reduction function. In other embodiments, the electronic device can also be provided with three, four or more microphones 1450C, in addition to collecting sound signals, noise reduction, it can also identify the source of the sound, and achieve directional recording function, etc.
[0237] The headset interface 1450D is used to connect a wired headset. The headset interface 1450D can be a USB interface 1430, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0238] Among them, the sensor module 1460 can include a pressure sensor 1460A, a touch sensor 1460B, etc.
[0239] The pressure sensor 1460A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 1460A can be disposed on the display screen 1470. The pressure sensor 1460A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 1460A, the capacitance between the electrodes changes. The electronic device 1400 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 1470, the electronic device 1400 detects the intensity of the touch operation based on the pressure sensor 1460A. The electronic device 1400 can also calculate the position of the touch based on the detection signal of the pressure sensor 1460A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
[0240] The touch sensor 1460B is also referred to as a "touch device". The touch sensor 1460B can be disposed on the display screen 1470, and the touch sensor 1460B and the display screen 1470 together form a touch screen, also referred to as a "touch panel". The touch sensor 1460B is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 1460B can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 1470. In other embodiments, the touch sensor 1460B can also be disposed on the surface of the electronic device 1400, at a position different from that of the display screen 1470.
[0241] It can be understood that the structures shown in the embodiments of the present application do not constitute a specific limitation on the electronic device 1400. In other embodiments of the present application, the electronic device 1400 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware, and the embodiments of the present application do not limit this.
[0242] The software structure of the electronic device will be described below. For example, the software operating system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, or a cloud architecture, etc. In the embodiments of the present application, the software architecture of the electronic device will be described by taking the layered architecture as an example. The system as an example, the software architecture of the electronic device will be described. Please refer to Figure 15FIG. 1 shows a software architecture of an electronic device according to an embodiment of the present disclosure. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system of the electronic device is divided into four layers, from top to bottom, an application layer, an application framework layer, an Android runtime and system layer, and a kernel layer.
[0243] The application layer can include a series of application packages. For example, as shown in FIG. 1, the application packages can include a camera, a gallery, a calendar, a call, a news, a short message, a WLAN, a text-to-speech (TTS) service, a user experience (UX) display module, and the like. Figure 15
[0244] Optionally, the TTS service can be a service (or function) that is built-in in the software operating system of the electronic device, i.e., the TTS service can be developed by the developer of the software operating system and configured in the software operating system.
[0245] The TTS service is used to provide voice feedback to the user. For example, the TTS service can read out the content in the display interface of the electronic device or the content corresponding to the selected region in the display interface to the user, so that the user can know the content in the display interface of the electronic device without reading.
[0246] The application framework layer provides the application layer with application programming interfaces (APIs) and programming frameworks. The application framework layer includes some pre-defined functions.
[0247] As shown in FIG. 1, the application framework layer can include a window manager, a content provider, a notification manager, a view system, a TTS service, and the like. Figure 15
[0248] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and capture the screen, and the like.
[0249] The content provider is used to store and obtain data, and make the data accessible to the application. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, and the like.
[0250] The notification manager enables an application to display notification information in a status bar, which can be used to convey a message of the informing type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of a download, a message reminder, etc. The notification manager can also be a notification that appears in the form of a chart or a scroll bar text in the top status bar of the system, such as a notification of an application running in the background, and can also be a notification that appears in the form of a dialog window on the screen. For example, the display interface prompts text information, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.
[0251] The view system includes visual controls, such as a control that displays text, a control that displays a picture, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.
[0252] It can be understood that in some embodiments, the TTS service can also be referred to as a text-to-speech service.
[0253] Optionally, the TTS service can be a service that is self-provided by the software operating system of the electronic device, i.e., the TTS service can be a service that is developed by the developer of the software operating system and configured in the software operating system. In this case, the TTS service can be located in the application framework layer of the software operating system of the electronic device.
[0254] Optionally, the TTS service can be a service that is developed by a third-party software developer and installed in the electronic device by the user. In this case, the TTS service can be located in the application layer of the software operating system of the electronic device.
[0255] It can be understood that for ease of description, subsequent embodiments of the present application are exemplarily described with the TTS service located in the application framework layer of the software operating system of the electronic device as an example.
[0256] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0257] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0258] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.
[0259] The system libraries can include a plurality of functional modules. For example, a surface manager, media libraries, a three-dimensional graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), etc.
[0260] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for a plurality of applications.
[0261] The media libraries support a plurality of commonly used audio, video format playback and recording, and static image files, etc. The media libraries can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0262] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, layer processing, etc.
[0263] The 2D graphics engine is a drawing engine for 2D drawing.
[0264] The kernel layer is a layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, etc.
[0265] The text broadcast method provided by the embodiments of the present application can be applied to a scenario in which a user needs to obtain content in a display interface in a listening manner or the user selects content corresponding to a region in the display interface, i.e., when the user needs to obtain content in a display interface of an electronic device in a listening manner and obtain a broadcast duration of the content, the text broadcast method provided by the embodiments of the present application can improve the accuracy of predicting the broadcast duration of the content.
[0266] In a specific embodiment of the present application, the text broadcast method can be implemented by a plurality of services (i.e., software modules) in a software operating system of the electronic device. For example, the text broadcast method can be implemented by a random reading service, a text-to-speech (TTS) service, and a UX display module in the software operating system of the electronic device. In combination with Figure 15 , the random reading service and the UX display module can be located in an application layer of the software operating system of the electronic device, and the TTS service can be located in the application layer or an application framework layer of the software operating system of the electronic device. The embodiments of the present application take the TTS service located in the application framework layer as an example for illustrative description.
[0267] Based on this, as Figure 16 shown, the text broadcast method can include:
[0268] S1601: The on-demand reading service listens to the click operation on the announcement tone control of the on-demand reading function, and sends the on-demand reading function in the on-demand reading function to the UX display module in the on-demand reading function.
[0269] It can be understood that the announcement tone control of the on-demand reading function can be a control corresponding to the "first announcement tone", "second announcement tone" and "customized announcement tone" as shown in FIG. a. Figure 1
[0270] 1602: In the on-demand reading function in the on-demand reading function, the UX display module acquires the to-be-announced text, and sends the to-be-announced text to the on-demand reading service.
[0271] It can be understood that the to-be-announced text can be the content displayed on the display interface, or can be the content corresponding to the selected area of the display interface when the long press drag operation of the user is received.
[0272] In some optional examples, the manner of acquiring the to-be-announced text can refer to step 401 in Figure 4 , which will not be described here.
[0273] 1603: The on-demand reading service predicts the announcement duration of the to-be-announced text, and sends the language text corresponding to the to-be-announced text to the speech synthesis service
[0274] It can be understood that the manner of predicting the announcement duration of the to-be-announced text by the on-demand reading service can refer to the step in Figure 4- Figure 13 , which will not be described here.
[0275] 1604: The speech synthesis service converts the language text into corresponding audio information, and announces the audio information.
[0276] 1605: The on-demand reading service sends the announcement duration of the to-be-announced text to the UX display module.
[0277] 1606: The UX display module displays the announcement duration.
[0278] In the embodiment of the application, the announcement duration of the to-be-announced text is predicted based on the language text, which can improve the accuracy of predicting the announcement duration of the to-be-announced text.
[0279] Embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. Embodiments of the present application can be implemented as computer programs or program codes executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device and at least one output device.
[0280] The program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system that has a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit, or a microprocessor.
[0281] The program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with a processing system. When necessary, the program code can also be implemented in assembly language or machine language. In fact, the mechanisms described in this application are not limited to any specific programming language. In any case, the language can be a compiled language or an interpreted language.
[0282] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) media, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or by other computer readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation, a floppy disk, an optical disc, an optical compact disc, a read-only memory (CD-ROM), a magnetic disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic or optical card, a flash memory, or a tangible machine-readable storage medium. Accordingly, a machine-readable medium includes any type of mechanical or tangible implementation that is suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
[0283] It should be noted that each unit / module mentioned in the device embodiments of the present application is a logical unit / module, and in the physical world, one logical unit / module can be a physical unit / module, or a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of the logical unit / module itself is not the most important, and the combination of the functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.
[0284] It has to be noted that, in the description of the application, the terms "first", "second", etc. are used only for distinguishing between similar elements, and do not connote any order, sequence or priority. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a", "comprises", or "comprising", does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0285] While the application has been illustrated and described in detail in the drawings and foregoing description, the same is to be considered as illustrative and not restrictive in character, it being understood that only the preferred embodiment has been shown and described and that all changes and modifications that come within the spirit of the application are desired to be protected.
Claims
1. A text-to-speech method applied to an electronic device, comprising: The method comprises: displaying a first announcement interface, the first announcement interface comprising a first predicted announcement duration of a first text, wherein the first text comprises N characters, and the N characters comprise M first type characters, the first type characters comprising numbers represented in a form other than a corresponding announcement language, symbols requiring announcement, letter abbreviations, and punctuation not requiring announcement; displaying a second announcement interface, the second announcement interface comprising a second predicted announcement duration of a second text, wherein the second text comprises N characters, and the N characters comprise P first type characters, wherein M and P are different, and the first predicted announcement duration and the second predicted announcement duration are different.
2. The method of claim 1, wherein, The announcement language of the first text comprises at least one of a first type language, The first type language comprises any one of the following: Chinese, English, Japanese, Latin, Malay, Catalan, Czech, Danish, German, Estonian, Spanish, Basque, Filipino, French, Galician, Croatian, Indonesian, Italian, Latvian, Lithuanian, Hungarian, Dutch, Norwegian, Polish, Portuguese, Romanian, Finnish, Swedish, Turkish, Greek, and Vietnamese.
3. The method of claim 2, wherein The letter abbreviation comprises an English letter abbreviation.
4. The method of claim 2, wherein, The first predicted announcement duration is determined by: converting the first type characters in the first text to obtain a first language text; determining the first predicted announcement duration based on the first language text.
5. The method of claim 4, wherein, The conversion of the first type characters in the first text comprises at least one of the following: converting the numbers represented in a form other than the first type language, and the symbols requiring announcement, in the first text announced in the first type language, into corresponding language characters of the first language; deleting the punctuation not requiring announcement in the first text; converting the letter abbreviations in the first text into full spelling.
6. The method of claim 4, wherein, The determination of the first predicted announcement duration based on the first language text comprises: determining the first predicted announcement duration based on the number of characters in the first language text, and the announcement duration corresponding to each character.
7. The method of claim 4, wherein, The determination of the first predicted announcement duration based on the first language text comprises: determining the first predicted announcement duration based on at least one of the following: the prosody level corresponding to a complete sentence, a short sentence, a phrase, and a word in the first language text, the phonemes of the characters and / or words in the first language text, the tone parameters, and the speech speed parameters.
8. The method of claim 7, wherein, The prosody level corresponding to a complete sentence, a short sentence, a phrase, and a word in the first language text is determined based on a prosody prediction model, The phonemes of the characters and / or words in the first language text are determined based on a phoneme prediction model.
9. The method of claim 4, wherein, The determination of the first predicted announcement duration based on the first language text comprises: determining the first predicted announcement duration based on the prosody level corresponding to a complete sentence, a short sentence, a phrase, and a word in the first language text, the number of characters in the first language text, and the announcement duration corresponding to each character.
10. The method according to any one of claims 1 to 9, characterized in that, The method comprises: In response to an operation of a user switching a speech speed at which the first text is to be broadcast from a first speech speed parameter to a second speech speed parameter, and / or in response to an operation of the user switching a broadcast tone at which the first text is to be broadcast from a first broadcast tone to a second broadcast tone, a third predicted broadcast duration of the first text is displayed.
11. An electronic device, comprising: Comprising: a memory for storing instructions for execution by one or more processors of the electronic device, and a processor, one of the one or more processors of the electronic device, for executing the text broadcast method of any one of claims 1-10.
12. A readable storage medium, characterized by, The readable storage medium has instructions stored thereon, which, when executed on an electronic device, cause the electronic device to perform the text broadcast method of any one of claims 1-10.
Citation Information
Patent Citations
Information processing method and electronic equipment
CN109995939A
Voice synthesis broadcasting method and device
CN112802447A