How to configure SSML in Dialogue Studio
Speech Synthesis Markup Language (SSML) is an XML-based markup language for speech synthesis applications.
Based on you speech engine a different format needs to be used:
-
Microsoft Text to Speech: https://learn.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/hh378377(v=office.14)
-
Microsoft Cognitive Services: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup?tabs=csharp
-
Google Cloud Text to Speech: https://developers.google.com/assistant/actions/reference/ssml#markupSSML
For information see Speech Engines for AnywhereNow
Preview
Configure
We are going to start with a “Incoming conversation” node. This node only listens to audio/video and is connected to our server using SignalR.
Steps:
-
Drag and drop Incoming Call Node
-
Open Node
-
Select / Configure server
-
Filter on Audio/Video
-
Next creating the SSML text we want to use. This can be done by using a function node.
Steps:
-
Drag and drop Function Node
-
Open Node
-
Enter text you want to play.
Example Microsoft Text to Speech:
Functionmsg.text = '<p>\ <s xml:lang="en-EN">\ Here are <say-as interpret-as="characters">SSML</say-as> samples.\ I can pause <break time="1s"/>. \ I can speak in cardinals. \ Your number is <say-as interpret-as="cardinal">10</say-as>. \ Or I can speak in ordinals.\ You are <say-as interpret-as="ordinal"> 10 </say-as> in line.\ Or I can even speak in digits.\ The digits for ten are <say-as interpret-as="characters"> 10 </say-as>.\ I can also substitute phrases, like the <sub alias="World Wide Web Consortium"> W3C </sub>.\ Finally, I can speak a paragraph with in multiple languages.\ </s>\ </p>\ <p>\ <s xml:lang="en-EN">I can speak english</s>\ <s xml:lang="nl-NL">Ik kan nederlands spreken.</s>\ <s xml:lang="de-DE">Ich kann Deutsch sprechen</s>\ </p>\ <p>\ Today is <say-as type="date:mdy"> 11/20/2019 </say-as> \ I <emphasis level="strong">really</emphasis> like pepperoni on my pizza.\ </p>' return msg;
-
-
Connect end of Incoming Call node with Function Node
Next we are adding an “Say”, to play the SSML text.
Steps:
-
Drag and drop Say Node
-
Open Node
-
Set message to: msg.text
-
Set method to: SSML
-
-
Connect end of Function Node with begin of Say node
