I need to vary the speed, pause, reverse and in general control aspects of the playback of Speak[] is this possible?
Answer
" Update 2 !
Some examples of text-to-speech xml
tags that you can inject into the string input for Speak
from XML TTS Tutorial.
For example the following url is spelled out
https://msdn.microsoft.com/en-us/library/ms717077(v=vs \
.85).aspx.
and the following text is read backwards at
lower speed
by a female
esrever ni nekops eb dluohs txet sihT
and higher speed
esrever ni nekops eb dluohs txet sihT
" // Speak
See: XML TTS Tutorial (SAPI 5.3)
"
This text should be spoken at rate five.
This text should be spoken at rate negative five.
" // Speak
"
This text should be spoken at volume level fifty.
This text should be spoken at volume level one hundred.
" // Speak
"
Next text should be spoken in reverse.
esrever ni nekops eb dluohs txet sihT
" // Speak
Update: You can insert XML tags into to string input to Speak to control voice gender, speed, volume, pitch etc.
Using few examples from sapisynth
" the list \
1 comma msec=\"100\"/> 2 3 \
comma 4 \"10\"/> 5 6 7 8 9 10 11 12 " //Speak
Original post:
To play with the speed, you can process the string expression output of SpokenString to change the length of silence elements.
SpokenString[Range[10], Options[Speak], "PostProcess" -> False]
For example:
StringReplace[SpokenString[Range[10], Options[Speak], "PostProcess" -> False],
{"100" -> "0", "comma" -> ""}] // Speak

Comments
Post a Comment