Speech Synthesis Markup Language (SSML)

Description

This tutorial demonstrates how to modify speech synthesis in real-time within your text.

How To Do It

First, I need to give credit where credit is due. I didn't actually created this tutorial - instead, it was inspired and the video was created by Sebediah. I'm merely moving his information into this tutorial for others to find.

If you're looking for the thread that started this conversation, find it here: http://www.ez-robot.com/Community/Forum/Thread?threadId=10743

Sebediah figured out that you can include SSML code in your text to speak. He also created a fantastic tutorial video, which you can see below.

Here's an example of code he provided to give you a head start before the video:


#The  tag is only needed if you're going to make other changes mid-sentence, otherwise you can just use the first tag and don't need the second one after the string.

$VoiceStart = "<prosody pitch ='+230%'>"
$VoiceEnd = "</prosody>"

SayWait($VoiceStart + "When I'm tired my voice gets very deep and I speak slowly" + $VoiceEnd)


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

PRO
Belgium
#25  

User-inserted image

there are no 4 lines in the above chapter,i only 3 i see in the video. but indeed it doesn work .

PRO
USA
#26  

lol, no matter how many lines it does not work

thanks anyway

PRO
USA
#27   — Edited

This works in EZB scripts, all you need

ControlCommand("Speech Settings", "SetVoiceRate", "slow") saywait("I am speaking slow")

ControlCommand("Speech Settings", "SetVoiceRate", "Fast") saywait("Now i am speaking fast")

#Too fast to hear #ControlCommand("Speech Settings", "SetVoiceRate", "ExtraFast") #saywait("Now i am speaking extrafast")

ControlCommand("Speech Settings", "SetVoiceRate", "ExtraSlow") saywait("Now i am speaking super slow")

#29   — Edited

Hello,

All the examples here are wrong. You have a syntax errors:

$VoiceStart = "(prosody pitch = '+100%')"

You have spaces before and after the equal (=) sign and the angle brackets are replaced with parenthesis.

If you remove the spaces IT WORKS!!! (and don't forget that this page is removing the angle brackets. You have to put them back in. Parenthesis don't work in the variable declaration!)

try the code below in the picture and watch out for the added spaces and parenthesis.

User-inserted image

PRO
Belgium
#30   — Edited

thomasfromla

many thanks for the solution.mine looks like this.

$VoiceStart2 = "<prosody pitch='-70%'><prosody rate='.200'>" $VoiceStart3 = "<prosody pitch='-70%'><prosody rate='.100'>"

say($voicestart2 + " high voice ") say($voicestart3 + " low voice ")

PRO
USA
#31  

This works in EZB scripts, all you need

ControlCommand("Speech Settings", "SetVoiceRate", "slow") saywait("I am speaking slow")

ControlCommand("Speech Settings", "SetVoiceRate", "Fast") saywait("Now i am speaking fast")

#Too fast to hear #ControlCommand("Speech Settings", "SetVoiceRate", "ExtraFast") #saywait("Now i am speaking extrafast")

ControlCommand("Speech Settings", "SetVoiceRate", "ExtraSlow") saywait("Now i am speaking super slow")

EzAng

PRO
Belgium
#32  

hi ezang

thats another i see.am gonna try this in 2 houres .

thanks