2. The method according to claim 1 , wherein after sending a text for which the online speech synthesis system has not completed speech synthesis to an offline speech synthesis system for speech synthesis, the method further comprises: if the fault of the online speech synthesis system is removed or the network connection is recovered in a process in which the offline speech synthesis system performs speech synthesis, continuing to send a text for which the offline speech synthesis system has not completed speech synthesis to the online speech synthesis system for speech synthesis.
1. A speech synthesis method, comprising: processing a text, on an electronic device comprising one or more processors and memory, to obtain a to-be-synthesized text, wherein processing the text comprises 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.