Sunday, May 3, 2009

Virtual Hypnotist 105

And here it is at last: my real final entry on tips and tricks involving Virtual Hypnotist. In Virtual Hypnotist 104, I explained how to use some of the most useful bits of code - and included a screenshot from one of the Silver Robot inductions, which no doubt raised a lot of questions in people's minds. For instance, what was up with all those extra commas and hyphens, not to mention the strange spelling of unfocused (You did notice that, didn't you? ;-))? Well, like the note at the top of the screenshot says, it's all about getting the most out of the speech synthesizer.

I've been keeping notes as I've experimented with VH, and these are the most important things I've learned about the speech synthesizer, in no particular order:
  • IMO, "Mary in Stadium" is the best-sounding voice by far; and the best voice speed is on or around 92. I haven't found any decent male voices among the preloaded voices or the additional ones Follow the Watch links to in the character expansion pack found here...which, of course, isn't an issue for me, but which probably is an issue for some of my readers. So if anyone knows where to find a good male voice, drop me a comment or an e-mail, and I'll pass the message along.
  • When you're writing or modifying a script, test it a little bit at a time, as I described in Virtual Hypnotist 104. Testing is just as important in getting the most out of the speech synthesizer as it is in proofing your code.
  • You might have noticed the test box under the VH "speech synthesis" tab, which you can use to get an idea of how a particular voice sounds. You can replace the default "This is a test" with anything you like. However, you should be aware that the way a particular word or phrase sounds in the test box isn't always the way it will sound in a session. You still have to rely on testing to find that out.
  • The synthesized voice usually goes up before a \pau\ but down before a comma or period.
  • Using the \emp\ tag even once, anywhere within a "speak" line, causes that whole line to sound increasingly robotic with every word spoken. I have not found any way to stop this from happening, so I suggest that you just don't use \emp\ at all, except when invoking triggers (It's not much of an issue there, since triggers are so short). There are other ways to put more emphasis on particular words. For instance....
  • Very short words like a and to and are often don't get enough emphasis with the speech synthesizer. However, you can increase the emphasis by attaching them to the word before and/or after them with a hyphen (example: you-are-already). Try a few different tests to see what works best in any given instance, because context does matter.
  • You can also use hyphens to get rid of unwanted pauses between words. For instance, there's a line in the long induction I adapted for Silver Robot that goes, "just as if you were trying to convince somebody that you were absolutely sound asleep." The speech synthesizer kept reading it as, "Just as [pause] if you were trying...." So I connected as and if with a hyphen ("just as-if"), and the speech synthesizer read it properly.
  • By the same token, you can force a pause where the speech synthesizer doesn't put one by inserting either a comma (if you want a downward inflection on the last word before the comma) or a \pau\ (if you want an upward inflection). A pause of 250 milliseconds, give or take 50, is usually the best length.
  • Again, context matters. For instance, the speech synthesizer will sometimes read the word perfect as PERfect, and sometimes as perFECT. I have yet to find a way around this issue, so I normally just change my wording from perfect to something less ambiguous.
  • Words that begin with un, like unconscious and unfocused, are usually pronounced with too little emphasis on the first syllable. I've found that the best way to correct this is to write un as "uhn-," which is how you see unfocused written in the screenshot.
  • With unusual words that the speech synthesizer doesn't recognize, you generally have to test a few different phonetic spellings (often with hyphens between the syllables) to make them sound the way they're supposed to sound. For instance, I have discovered that the speech synthesizer pronounces Lady Ru'etha more or less correctly when I write her name as "Lady Roo-eh-thuh."
  • If you study the preinstalled scripts on VH, you'll see that many of them have phrases and sentences separated by long series of periods. I'm not sure how the people who wrote these scripts got this to work, because when I tried to do the same thing, the speech synthesizer said "point" when it hit the second period. It doesn't do that with the preinstalled scripts, but it also doesn't consistently recognize long pauses created this way. So stick to the \pau\ command and don't mess with the extra periods.
And those are all the tips I have with regards to the speech synthesizer. As I said above, the best way to get the most out of it is to test your script a few lines at a time. Play with the commas, the pauses, the hyphens. Play with whether to break sentences apart with "speak" commands or whether to line up several of them behind a single "speak." It takes some work, but if you don't have the luxury of recording mp3's for every session, it's definitely worth the effort.

P.S.: Today is Silver Robot day! Get ready!

No comments: