7. An electronic device, comprising: one or more processors; a memory; and one or more programs, stored in the memory, and when executed by the one or more processors, cause the one or more processors to perform following operations: processing a text, to obtain a to-be-synthesized text; performing punctuation and sentence segmentation, part-of-speech tagging, numeric character processing, pinyin annotation, and rhythm and pause prediction processing for the text; if a network connection exists, sending the to-be-synthesized text to an online speech synthesis system for speech synthesis; and if a fault occurs in the online speech synthesis system in a process in which the online speech synthesis system performs speech synthesis or the network connection is disrupted in an actual use process, sending a text for which the online speech synthesis system has not completed speech synthesis to an offline speech synthesis system for speech synthesis.
7. An electronic device, comprising: one or more processors; a memory; and one or more programs, stored in the memory, and when executed by the one or more processors, cause the one or more processors to perform following operations: processing a text, to obtain a to-be-synthesized text; performing punctuation and sentence segmentation, part-of-speech tagging, numeric character processing, pinyin annotation, and rhythm and pause prediction processing for the text; if a network connection exists, sending the to-be-synthesized text to an online speech synthesis system for speech synthesis; and if a fault occurs in the online speech synthesis system in a process in which the online speech synthesis system performs speech synthesis or the network connection is disrupted in an actual use process, sending a text for which the online speech synthesis system has not completed speech synthesis to an offline speech synthesis system for speech synthesis. 12. The electronic device according to claim 7 , wherein after sending the to-be-synthesized text to an online speech synthesis system for speech synthesis, the one or more processors are further configured to: receive and store speech data sent by the online speech synthesis system and corresponding to a sentence for which speech synthesis has been completed, wherein the speech data corresponding to the sentence for which speech synthesis has been completed is obtained by the online speech synthesis system by performing punctuation for the to-be-synthesized text and performing speech synthesis for each sentence obtained after the punctuation.