Mac OS X Speech Synthesis Markup

I put a Sound Blaster 16 in my first computer. It came with a CD-ROM full of goodies like Dr. Sbaitso, the talking psychologist. One app was called TextAssist and it had a special syntax that let you string together phonemes, specifying pitch, duration, even vibrato. I spent hours composing weird robot jingles.

Itsy Bitsy Spider by TextAssist

The built-in text-to-speech on Mac OS also has the ability to sing your melodies through phonemic modifiers and TUNE syntax. (The full specification is available at the link.) TUNE embedded speech commands alter intonation by controlling pitch, word emphasis, pause length, etc. This stuff is baked in, so if you're on a Mac, try highlighting the following code block, control-click, and go Speech > Start Speaking:

[[inpt TUNE]]
_
1OW {D 1066; P 109.0:0 119.8:12 153.0:30 164.6:39 154.0:50 131.7:62 120.7:69 111.2:73 97.1:89 103.1:93}
_
h {D 194; P 123.0:0 130.0:12}
1EY {D 652; P 147.0:0 159.0:14 161.0:32 147.3:63 112.0:91}
_
w {D 161; P 109.0:0}
1AW {D 1171; P 116.0:0 153.3:17 148.2:33 151.0:51 133.0:55 112.4:71 99.5:74 79.0:89 65.7:98 119.0:100}
% {D 293}
_
D {D 132; P 127.0:0}
IH {D 318; P 160.0:0 136.5:43 114.6:63 112.0:88}
s {D 145; P 112.0:0 119.0:95}
_
IH {D 189; P 119.0:0 119.0:13 119.0:27 120.0:87 119.0:93}
z {D 180; P 117.0:0 117.0:64 117.0:86 117.0:93}
_
k {D 80; P 117.0:0 113.0:81 164.0:95}
1UW {D 820; P 164.0:0 168.0:9 172.0:18 169.5:46 139.0:74 116.8:86}
l {D 260; P 104.0:0 92.0:64 104.0:100}
. {D 212}
[[inpt TEXT]]

There's also a simpler mode for phonemic modifiers. The first line here is spoken with default interpretation, and the second line uses the modifiers.  Try it:


You talkin' to me
[[inpt PHON]] [[slnc 500]] [[rate -30]]
+yUW _1tAOl=kIHn ~AX [[pbas +3]]+mIY?

XCode also ships with a hidden gem called Repeat After Me that helps you build this funky syntax from your own spoken phrase. It extracts pitch contour and fits phonetic onsets of a typed phrase to your spoken phrase. 

Leave a Reply