Hey guys, I was actually playing around with this just the other night. If you have the expansion pack as Dark Coder mentioned, it\'s actually pretty easy (or has been for me). Also, if you want to have a couple of extra voices to listen to, download the MS Speech API and it will install two new voices for you, Microsoft Mike and Microsoft Mary. They\'re not really an improvement over Microsoft Sam, but at least they lend a bit of variety.
Here\'s the link for the Speech API:
http://www.microsoft.com/downloads/details.aspx?FamilyId=5E86EC97-40A7-453F-B0EE-6583171B4530&displaylang=en
I\'ve also included the code that I was playing with the other day to give you an idea of how it works.
`*********************************************************************************************************************
` Author: Frank Taylor
` E-mail: [email protected]
`
` There is nothing in this that is revolutionary, so feel free to plagiarize, cannibalize or whatever.
`
` You may recognize this as the \"Pet Shop\" skit from Monty Python -- some of the words are intentionally mispelled
` because the text-to-speech (TTS) engine doesn\'t always know how to pronounce things. For example, my sister\'s name
` is Shaina and I have to spell it Shayna or it comes out sounding like \"Shiner\".
`
` Note that this makes some big assumptions. The first is that you have 3 voices available and that the 2nd and 3rd
` voices are Mike and Sam. If you want to hear the skit but only have one voice installed, just replace \"speak(2\"
` and \"speak(3\" with \"speak(1\" and it should work. Technically I should check to see how many voices are available,
` but I only wrote this because I was REALLY bored. :) If you have questions feel free to e-mail me.
`
` For a full list of the available XML commands see the Microsoft website.
`*********************************************************************************************************************
speak(2, 0, 0, \"ello, I wish to register a complaint\")
speak(2, 0, 0, \"<silence msec=\'1000\'/>\")
speak(2, 5, 0, \"ello, <emph>miss</emph>\")
speak(3, 5, 2, \"what do you mean, <emph>miss</emph>\")
speak(2, 0, 0, \"I\'m sorry I have a cold\")
speak(2, 5, 0, \"I wish to register a complaint\")
speak(2, 0, 0, \"<silence msec=\'500\'/>\")
speak(3, 0, 0, \"we\'re closin for lunch\")
speak(2, 3, 1, \"never mind that my lad. I wish to complain about this parrot that I purchased not half an hour ago from this very boutique\")
speak(3, 0, 0, \"oh yes, the <rate absspeed=\'-5\'>um</rate> the norwegian blue what\'s the <rate absspeed=\'-5\'>um</rate> <emph>what\'s wrong with it?</emph>\")
speak(2, 0, 0, \"I\'ll tell you what\'s wrong with it my lad. E\'s dead, that\'s what\'s wrong with it\")
speak(3, 0, 0, \"No, no, e\'s um, e\'s resting\")
speak(2, 0, 0, \"Look matey, I know a dead parrot when I see one, and I\'m looking at one right now\")
speak(3, 0, 0, \"No no he\'s not dead, he\'s, he\'s restin. Remarkable bird the Norwegian blue idn\'it a? Beautiful plumage\")
speak(2, 0, 0, \"<volume level=\'150\'>The plumage don\'t enter into it. It\'s stone dead</volume>\")
speak(3, 0, 2, \"No no no no, no, no. E\'s restin!\")
speak(2, 0, 0, \"All right then, if he\'s restin, I\'ll wake him up\")
speak(2, 10, -2, \"Ello, Mister Polly Parrot. I\'ve got a lovely fresh cuttle fish for you if you show\")
speak(3, 5, 0, \"There he moved\")
speak(2, 5, 0, \"No he didn\'t That was you hitting the cage\")
speak(3, 5, 0, \"I <emph>never</emph>\")
speak(2, 0, 0, \"<emph>You did</emph>\")
speak(3, 0, 0, \"I never, never did anything\")
speak(2, 10, 0, \"Ello Polly. Testing. Testing. Testing. Testing. This is your nine o\'clock alarm call!\")
speak(2, 0, 0, \"Now that\'s what I call a dead parrot\")
speak(3, 0, 0, \"No, no, no e\'s stunned\")
speak(2, 10, 0, \"Stunned\")
speak(3, 0, 0, \"Yeah, you stunned him, just as he was wakin up. Norwegian blues stun easily, major.\")
speak(2, 0, 0, \"um. now look. now look mate. I\'ve definitely ad enough of this. That parrot is definitely deceased.\")
speak(2, 0, 0, \"and when I purchased it not half an hour ago you assured me that its total lack of movement was due to it\")
speak(2, 0, 0, \"bein tired and shagged out following a prolonged squawk\")
speak(3, 0, 0, \"Well, he\'s. he\'s ah. probably pinin for the fyords\")
speak(2, 10, 0, \"pinin for the fjords\")
speak(2, 5, 0, \"What kind of talk is that? look, why did he fall flat on his back the moment I got \'im home\")
speak(3, 0, 0, \"The Norwegian Blue prefers keepin on it\'s back. Remarkable bird, idn\'it squire? Lovely plumage\")
speak(2, 0, 0, \"Look, I took the liberty of examining that parrot when I got home and I discovered the only reason\")
speak(2, 0, 0, \"that it had been sitting on its perch in the first place was that it had been <emph>nailed</emph> there\")
speak(2, 0, 0, \"<silence msec=\'1500\'/>\")
text$ = \"Well, uh course it was nailed there. If I hadn\'t nailed that bird down, it would have nuhz zuld up to those\"
text$ = text$ + \"bars, bent em apart with its beak and <pitch middle=\'15\'/><rate absspeed=\'-2\'><emph>VOOM</emph> fee wee wee wee</rate>\"
speak(3, 0, 0, text$)
speak(2, 0, 0, \"<emph>voom</emph>. Mate this parrot wouldn\'t voom if you put four million volts through it\")
speak(2, 0, 0, \"e\'s bleedin demised\")
speak(3, 0, 0, \"No, no, e\'s pinin\")
speak(2, 15, 0, \"E\'s not <emph>pinin</emph> E\'s past on This parrot is no more He has ceased to be E\'s expired\")
speak(2, 15, 0, \"and gone to meet is maker e\'s a stiff bereft of life e rests in peace\")
speak(2, 15, 0, \"If you hadn\'t nailed \'im to the perch e\'d be pushin up the daisies\")
speak(2, 15, 0, \"Is metabolic processes are now istory e\'s off the twig e\'s kicked the bucket\")
speak(2, 15, 0, \"E\'s shuffled off is mortal coil run down the curtain and joined the bleedin choir invisible\")
speak(2, 15, 0, \"E\'s freakin snuffed it!\")
speak(2, 20, -2, \"<volume level=\'100\'><emph>This is an ex parrot</emph></volume>\")
speak(2, 0, 0, \"<silence msec=\'1500/>\")
speak(3, 0, 0, \"well, I\'d better replace it then\")
speak(2, 0, 0, \"<silence msec=\'1500\'/>\")
speak(3, 0, 0, \"sorry squire. I\'ve had a look round the back of the shop and uh... we\'re right out of parrots.\")
speak(2, 0, 0, \"I see, I see. I get the picture\")
speak(2, 0, 0, \"<silence msec=\'1500\'/>\")
speak(3, 0, 0, \"I got a slug\")
speak(2, 0, 0, \"<silence msec=\'1500\'/>\")
speak(2, 0, 0, \"Pray... does it <emph>talk?</emph>\")
speak(3, 0, 0, \"Nnnnnot really\")
speak(2, 20, 2, \"<emph>well it\'s hardly a bloody replacement, is it?</emph>\")
speak(3, 0, 0, \"Well, I never wanted to do this in the first place. I wanted to be...\")
speak(3, 5, 2, \"<emph>a lumber <pitch middle=\'-5\'/>jack</emph>\")
do
loop
end
function speak(iVoice, iPitch, iRate, msg$)
` sets the voice to use to iVoice
set voice iVoice
` adjust the pitch
text$ = \"<pitch middle=\'\" + str$(iPitch) + \"\'/>\"
` adjust the speed that the voice narrates at for this sample
text$ = text$ + \"<rate absspeed=\'\" + str$(iRate) + \"\'>\"
` finish the xml encoded text by adding the message to read and our closing <rate> tag
text$ = text$ + msg$ + \"</rate>\"
` send the xml encoded message to the TTS engine
send voice message xml text$
endfunction