forked from microsoft/BotBuilder-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSSMLHelper.cs
34 lines (29 loc) · 865 Bytes
/
SSMLHelper.cs
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
namespace RollerSkillBot
{
using System.Xml.Linq;
public static class SSMLHelper
{
public static string Speak(string text)
{
var ssml = new XDocument(new XElement(
"speak",
new XAttribute("version", "1.0"),
new XAttribute(XNamespace.Xml + "lang", "en-US"),
text));
return ssml.ToString();
}
public static string Emphasis(string text)
{
var ssml = new XElement("emphasis", text);
return ssml.ToString();
}
public static string SayAs(string interpretAs, string text)
{
var ssml = new XElement(
"say-as",
new XAttribute("interpret-as", interpretAs),
text);
return ssml.ToString();
}
}
}