118 references to SsmlElement
System.Speech (118)
Internal\Synthesis\SSmlParser.cs (81)
205SsmlElement possibleChild = SsmlElement.Lexicon | SsmlElement.Meta | SsmlElement.MetaData | SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 217private static void ProcessElement(XmlReader reader, ISsmlParser engine, string? sElement, SsmlElement possibleElements, SsmlAttributes ssmAttributesParent, bool fIgnore, List<SsmlXmlAttribute>? extraAttributes) 264if ((possibleElements & SsmlElement.Text) != 0) 293private static void ParseAudio(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 296string sElement = ValidateElement(element, SsmlElement.Audio, reader.Name); 347SsmlElement possibleChild = SsmlElement.Desc | SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 354private static void ParseBreak(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 357string sElement = ValidateElement(element, SsmlElement.Break, reader.Name); 429private static void ParseDesc(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 432string sElement = ValidateElement(element, SsmlElement.Desc, reader.Name); 479ProcessElement(reader, engine, sElement, SsmlElement.Text, ssmlAttributes, true, extraAttributes); 485private static void ParseEmphasis(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 488string sElement = ValidateElement(element, SsmlElement.Emphasis, reader.Name); 538SsmlElement possibleChild = SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 545private static void ParseMark(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 548string sElement = ValidateElement(element, SsmlElement.Mark, reader.Name); 598private static void ParseMetaData(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 601ValidateElement(element, SsmlElement.MetaData, reader.Name); 629private static void ParseParagraph(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 632string sElement = ValidateElement(element, SsmlElement.Paragraph, reader.Name); 637private static void ParseSentence(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 640string sElement = ValidateElement(element, SsmlElement.Sentence, reader.Name); 697SsmlElement possibleChild = SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 700possibleChild |= SsmlElement.Sentence; 710private static void ParsePhoneme(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 713string sElement = ValidateElement(element, SsmlElement.Phoneme, reader.Name); 826ProcessElement(reader, engine, sElement, SsmlElement.Text, ssmlAttributes, fIgnore, extraAttributes); 832private static void ParseProsody(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 835string sElement = ValidateElement(element, SsmlElement.Prosody, reader.Name); 908SsmlElement possibleChild = SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 915private static void ParseSayAs(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 918string sElement = ValidateElement(element, SsmlElement.SayAs, reader.Name); 978ProcessElement(reader, engine, sElement, SsmlElement.Text, ssmlAttributes, fIgnore, extraAttributes); 984private static void ParseSub(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 987string sElement = ValidateElement(element, SsmlElement.Sub, reader.Name); 1035ProcessElement(reader, engine, sElement, SsmlElement.Text, ssmlAttributes, true, extraAttributes); 1040private static void ParseVoice(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1043string sElement = ValidateElement(element, SsmlElement.Voice, reader.Name); 1199SsmlElement possibleChild = SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes); 1215private static void ParseLexicon(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1218string sElement = ValidateElement(element, SsmlElement.Lexicon, reader.Name); 1284private static void ParsePromptEngine0(XmlReader reader, ISsmlParser engine, SsmlElement elementAllowed, SsmlElement element, ProcessPromptEngine0 process, SsmlAttributes ssmAttributesParent, bool fIgnore) 1315ProcessElement(reader, engine, sElement, SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes), ssmlAttributes, fIgnore, null); 1318private static string? ParsePromptEngine1(XmlReader reader, ISsmlParser engine, SsmlElement elementAllowed, SsmlElement element, string attribute, ProcessPromptEngine1 process, SsmlAttributes ssmAttributesParent, bool fIgnore) 1350ProcessElement(reader, engine, sElement, SsmlElement.AudioMarkTextWithStyle | ElementPromptEngine(ssmlAttributes), ssmlAttributes, fIgnore, null); 1354private static void ParsePromptOutput(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1359ParsePromptEngine0(reader, engine, element, SsmlElement.PromptEngineOutput, new ProcessPromptEngine0(engine.BeginPromptEngineOutput), ssmAttributesParent, fIgnore); 1369private static void ParseDiv(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1371ParsePromptEngine0(reader, engine, element, SsmlElement.PromptEngineDiv, new ProcessPromptEngine0(engine.ProcessPromptEngineDiv), ssmAttributesParent, fIgnore); 1377private static void ParseDatabase(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1380string sElement = ValidateElement(element, SsmlElement.PromptEngineDatabase, reader.Name); 1436private static void ParseId(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1438ParsePromptEngine1(reader, engine, element, SsmlElement.PromptEngineId, "id", new ProcessPromptEngine1(engine.ProcessPromptEngineId), ssmAttributesParent, fIgnore); 1444private static void ParseTts(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1446ParsePromptEngine0(reader, engine, element, SsmlElement.PromptEngineTTS, new ProcessPromptEngine0(engine.BeginPromptEngineTts), ssmAttributesParent, fIgnore); 1453private static void ParseWithTag(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1455string? tag = ParsePromptEngine1(reader, engine, element, SsmlElement.PromptEngineWithTag, "tag", new ProcessPromptEngine1(engine.BeginPromptEngineWithTag), ssmAttributesParent, fIgnore); 1462private static void ParseRule(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmAttributesParent, bool fIgnore) 1464string? name = ParsePromptEngine1(reader, engine, element, SsmlElement.PromptEngineRule, "name", new ProcessPromptEngine1(engine.BeginPromptEngineRule), ssmAttributesParent, fIgnore); 1770private static string ValidateElement(SsmlElement possibleElements, SsmlElement currentElement, string sElement) 1800private static void NoOp(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmlAttributes, bool fIgnore) 1806private static SsmlElement ElementPromptEngine(SsmlAttributes ssmlAttributes) 1808return ssmlAttributes._cPromptOutput > 0 ? SsmlElement.PromptEngineChildren : 0; 1879private delegate void ParseElementDelegates(XmlReader reader, ISsmlParser engine, SsmlElement element, SsmlAttributes ssmlAttributes, bool fIgnore);
Synthesis\PromptBuilder.cs (37)
49_elementStack.Push(new StackElement(SsmlElement.Lexicon | SsmlElement.Meta | SsmlElement.MetaData | SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle, SsmlState.Header, _culture)); 60ValidateElement(_elementStack.Peek(), SsmlElement.Text); 74ValidateElement(_elementStack.Peek(), SsmlElement.Text); 112ValidateElement(_elementStack.Peek(), SsmlElement.Text); 152ValidateElement(_elementStack.Peek(), SsmlElement.Text); 169ValidateElement(stackElement, SsmlElement.Prosody); 173SsmlElement possibleChildren = stackElement._possibleChildren; 186possibleChildren = SsmlElement.AudioMarkTextWithStyle; 244possibleChildren = SsmlElement.ParagraphOrSentence | SsmlElement.AudioMarkTextWithStyle; 284ValidateElement(stackElement, SsmlElement.Voice); 317_elementStack.Push(new StackElement(SsmlElement.Sentence | SsmlElement.AudioMarkTextWithStyle, SsmlState.Voice, culture)); 360ValidateElement(stackElement, SsmlElement.Paragraph); 378_elementStack.Push(new StackElement(SsmlElement.AudioMarkTextWithStyle | SsmlElement.Sentence, SsmlState.Paragraph, culture)); 396ValidateElement(stackElement, SsmlElement.Sentence); 415_elementStack.Push(new StackElement(SsmlElement.AudioMarkTextWithStyle, SsmlState.Sentence, culture)); 435ValidateElement(_elementStack.Peek(), SsmlElement.Text); 550ValidateElement(_elementStack.Peek(), SsmlElement.Text); 564ValidateElement(_elementStack.Peek(), SsmlElement.Text); 581ValidateElement(_elementStack.Peek(), SsmlElement.Text); 592ValidateElement(_elementStack.Peek(), SsmlElement.Break); 599ValidateElement(_elementStack.Peek(), SsmlElement.Break); 642ValidateElement(_elementStack.Peek(), SsmlElement.Break); 672ValidateElement(_elementStack.Peek(), SsmlElement.Audio); 681ValidateElement(_elementStack.Peek(), SsmlElement.Audio); 695ValidateElement(_elementStack.Peek(), SsmlElement.Audio); 710ValidateElement(_elementStack.Peek(), SsmlElement.Mark); 954private static void ValidateElement(StackElement stackElement, SsmlElement currentElement) 965ValidateElement(_elementStack.Peek(), SsmlElement.Voice); 1003internal SsmlElement _possibleChildren; 1007internal StackElement(SsmlElement possibleChildren, SsmlState state, CultureInfo culture)