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.