void Read(XmlReader reader) { if (!reader.ReadToFollowing("Voice")) { throw new OperationCanceledException(); } while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { switch (reader.Name) { case "VoiceInfo": ReadVoiceInfo(reader.ReadSubtree()); break; case "BackendData": string backend = reader.GetAttribute("For"); _BackendVoice = QaryanEngine.CreateBackendVoice(backend); _BackendVoice.ReadBackendData(reader.ReadSubtree()); break; } } } reader.Close(); }
static QaryanEngine() { QaryanEngine.RegisterBackend("MBROLA", typeof(MbrolaBackend), typeof(MbrolaVoiceNew)); }