Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

SSMLHelper.cs 865 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  1. namespace RollerSkillBot
  2. {
  3. using System.Xml.Linq;
  4. public static class SSMLHelper
  5. {
  6. public static string Speak(string text)
  7. {
  8. var ssml = new XDocument(new XElement(
  9. "speak",
  10. new XAttribute("version", "1.0"),
  11. new XAttribute(XNamespace.Xml + "lang", "en-US"),
  12. text));
  13. return ssml.ToString();
  14. }
  15. public static string Emphasis(string text)
  16. {
  17. var ssml = new XElement("emphasis", text);
  18. return ssml.ToString();
  19. }
  20. public static string SayAs(string interpretAs, string text)
  21. {
  22. var ssml = new XElement(
  23. "say-as",
  24. new XAttribute("interpret-as", interpretAs),
  25. text);
  26. return ssml.ToString();
  27. }
  28. }
  29. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...