Inside X: Text-To-Speech in MOSX 10.1.x


Question: What was the first thing the original Macintosh computer did after Steve Jobs removed its veil for public view? Calculate the square root of pi?

Answer: No, it talked.
Question: When Stephen Hawkings speaks, who do people think is talking? A real person? A Macintosh?

Answer: No, a Windows PC. (Get him a Mac already!)
Question: When I use Mac OS to record messages to my phone machine, who do my friends think made the message? A computer? A robot?

Answer: No, a real person. I have actually had people confuse my voice with Bruce! Not one person has ever guessed it was my Macintosh. Amazing.
Since Mac OS X 10.0 was officially released to the public, I have been playing on an old saw, over and over: The MOSX PlainTalk voices suck. I thought about being more diplomatic about that statement, but decided no, they really do suck. Steve Jobs agrees! He promised in May, 2001, to improve them. It's nearly a year later, and we are still waiting. OK, so Apple has had many bugs to fix in Mac OS X, and they figured MacinTalk was a low priority. And after all, what is built into MOSX kind of sort of works, and it is certainly no worse than any PC voice synthesis system.

There is no doubt; I have a fetish about computer voices. I think they are incredibly kewl, and if I had my way I would be traveling around the world making new voices for us all to share and enjoy. Imagine a Greta Garbo voice, a Raymond Massey voice, a Kathleen Turner voice, a Chris Rock voice. Imagine having Majel Barrett Roddenberry speak to you out of your Mac, just like Star Trek! Guess what kids: It can be done, right here and now! (Admittedly it takes a bit of time, money and patience). Just last summer Apple was offering an internship where some lucky person would record new voices for MacinTalk, codify them and integrate them into Mac OS X. I wish I had applied! I do so hope that the internship was fruitful, and maybe one day soon we will enjoy new quality voices on Mac OS X.


Meanwhile, what we have is a lobotomized version of what was so wonderful on good old Mac OS. There are multiple problems:

1) Mac OS X commonly chops MacinTalk speech into pieces, as if you were listening to bad radio reception: "The _ick _own _ox _ump_ ov_ the La_ Dog." If you are astute, you might just figure out what the voice is trying to say. Typically you won't. This is of course very annoying and dysfunctional. I know of no way to stop it. I tried ramping up the priority of my speaking application, using ProcessWizard. It made no difference. I can't prioritize any other process running in the system that helps. What appears to be happening is system preemptive multitasking at the expense of speech. It is possible to force the bug to happen by clicking and typing away in some other application. But generally, it happens when the system feels like it, which is on average every one sentence out of ten. And it lasts only the length of a single sentence. Apparently, this has to do with there being a pause in the text-to-speech processing at each period symbol.

2) There is no control over modulation of voices available in Mac OS X interface itself. Instead, what you get is a defaulted value of '50' out of 100 for modulation, and you're stuck with it. The result is voices sounding as if they are high on some tranquilizer, unable to articulate one sentence differently from the next. As a listener you end up going into a hypnotic trance listening to the same vocal pattern over and over and over for every sentence until you nod off and hit your head on the table.... Awful.

3) Even when you find a program that is modulation savvy, as I will discuss ahead, the voices sound wrong. The vocal quality has been compromised. This has been an every increasing problem even in regular old Mac OS. I can point to the arrival of Mac OS 8 as the beginning of the decline of PlainTalk voices. Bruce had developed this odd honking sound emitted in mid-sentence. Agnes now sounds as if she were talking through a megaphone. Victoria remained the best of the bunch, but her default speaking speed was ramped way down to the point of monotony. "Help - - - me - - - I - - - am - - - trapped - - - in - - - Jello."

4) Apple has been playing around with the speech setting values, causing user confusion. I kept having to increase the speech rate number for voices to get a decent speaking speed.


I now no longer use Bruce on Mac OS X. The honking he emits sounds as if he has flatulence. Agnes's nasal quality is terribly annoying. Victoria still rules the roost, but when I go back and listen to her in Classic Mac OS I realize that her old sex appeal is gone. In MOSX she sounds more like the robot from Lost In Space. This is not my idea of progress. I have this sneaking feeling that whoever did the original programming for the PlainTalk voices has long since left Apple and taken the secret code with him or her.


So, while we wait for Steve Jobs and Apple to fulfill their promise of better voices, here is what you can do to survive MacinTalk on Mac OS X:

Strategy A: Use the PlainTalk voices in Classic. They sound just as nice as they did running Mac OS 9, which is a vast improvement over the quality in MOSX, sad to say. But, there are some problems with this approach. First, you can get the same old chopping up of vocal sounds you get in Mac OS X. After all, you really are still in Mac OS X, so that same preemptive multitasking bug in the sound manager is there for your enjoyment. Second, you can't use the MOS 9 voices for speech recognition because nothing in Classic can access hardware. Oh well. But, if you just want your Mac to read you a story from text, this is the best and most enjoyable way to go.

Strategy B: Use a MacinTalk-savvy application in Mac OS X to do your text-to-speech for you. This means you do NOT use Text-Edit. All it does is use the lame MacinTalk settings in the Speech System Preferences, resulting in poor vocal modulation. What I use is good old reliable Tex-Edit Plus. (It is called "Tex"-Edit because its brilliant creator, Tom Bender, lives and loves in Texas). The most current version of Tex-Edit Plus for Mac OS X is 4.1.3b3. Get it and use it. Despite still being 'beta' software, I can't find a single bug in it. Tex-Edit Plus for Mac OS X costs $15 and can be obtained at:
<http://www.nearside.com/trans-tex/>

I have been trying to get in touch with Tom Bender so as to do a feature article on the future of Tex-Edit Plus. Currently it is a carbon app, but I have been prodding him to write a Cocoa version so it can take advantage of MOSX built-in spell checking.


One of the many things that are so remarkable about Tex-Edit Plus is its voice modulation control. The default value is 50. Forget that! Set modulation up to the max, which is 100. Oh, and look! You also get voice pitch control! This is actually a rather useless feature, but it can be fun to make Bruce sound fem, and Victoria sound butch.

What I typically do is copy text out of something I am reading, such as a web page or a PDF document, and paste it into Tex-Edit Plus. I then hit Command-R to have the entire window of text read to me. I find that hearing words, not simply reading them, reinforces information inside my brain. I remember it better! It is also very nice to let the computer do the work for you when your eyes are strained. Tex-Edit has some other nice speech key commands as well. If I suddenly get a call from Queen Elizabeth, I can hit command-comma to pause the reading. After she is done giving me her Bakewell Tart recipe I can hit command-comma again to continue where I had left off. And if I need to stop reading entirely I just hit command-period. I can also tell Tex-Edit Plus to start reading at the point of my cursor in the text, or I can highlight a section and have just that text read to me.


These days I use only Victoria for speech, set as seen in the screen shot above: Leave the voice pitch at the default of 56. If you want her to sound slightly more feminine you can increase the setting a few notches. I like a fairly high speech rate, so I use 225. Going much faster can get frenetic. Going more slowly may be good for relaxed recitations. It used to be in Mac OS 9 that you could set the modulation so high that the voice started flipping sky-high and ground low in vocalizations, not unlike listening to Joni Mitchell sing! In Mac OS X I can't imagine anyone wanting anything but the maximum, 100. Go lower if you like, but be prepared for Victoria to start sounding monotonal, if not outright catatonic.

Once Apple completes their revision of MacinTalk, Mac OS X will be more exciting. This is thanks to one useful feature that all Cocoa applications can share: Services. These are functions available from the system to every Cocoa application. (Sorry Carbon! Back of the bus for you!). One of those services is Speech. You can take a look at it right now, such as it is, inside the Text-Edit application Apple provide. First, open a text document, or create your own and toss in some text. Then go under the Edit menu, choose Speech, and in the popup menu choose Start Speaking. Once the Speech in MOSX gets upgraded you will be able to have the system pleasantly read to you inside any Cocoa application written to access Speech, which I think should be all applications that deal with text.

Imagine this scenario: You are ready to konk out for the night. You have your Mac next to the bed, and have Speech Recognition on. You say: "Computer, read me a story." This activates an AppleScript. Victoria, or better yet Majel, replies "Yes, my divine lord and master." The script then randomly chooses a story from a folder you have provided. Majel starts speaking "Once upon a time...." Your eyes close, and you blissfully nod off. After Majel finishes she says "Pleasant dreams Your Majesty!" Then your Mac puts itself to sleep. Ah, the luxury of it all.

By the way: I had in mind featuring text-to-speech shareware currently available for MOSX, but there isn't any I can find; well, apart from a $10 text editor called Speech Text, currently at version 2.0b. Sadly, its control of speech is even more meager than that provided by the Speech System Preferences, so don't bother with it. Someone wrote some great marketing hype for this program: "Speech Text is an outstanding text editor with many features that you simply can't find anywhere else." Uh huh, right. Sorry, but it is merely a Tex-Edit Plus wannabe. You'll find Tex-Edit has an order of magnitude more features, including being completely cross-platform text formatting savvy.

Hope for the future: If we wash behind our ears, say our prayers, and wish very very hard, we might just get Ross Brown, the creator of SpeakIt! for Classic Mac OS, to update his software for Mac OS X. On the Classic side it is simply the best text-to-speech software available.
_____________
Outside X

Aquila Chat
You will be pleased to hear that Alan Cook, creator of AquilaCalendar, did not water bomb me for my article about MOSX Menu Bar Shareware. Instead, we started an interesting conversation, which I am going summarize for you below.


Aquila is Latin for eagle, which explains application's icon. I forgot to ask Alan, but I believe the symbol in back of the eagle is a Mayan calendar stone.

Alan has a contact manager in development called FirstContact. You can read its features and see some initial screenshots at <http://www.avcore-systems.com>. Check out the FirstContact icon below. Alan is also planning some excellent new features for AquilaCalendar. But, his development strategy has been delayed while he waits for Apple to sort out it's Objective-C strategy for connecting COCOA built application to SQL databases. He is hoping to hear something from Apple before the summer.


One of the things I most admire about Alan's products is his system for assigning and verifying user registration. Previously, I thought Ambrosia Software had the best serial number system going. It uses code to match a program owner's name with their serial number. The two are inseparable. But of course that does not stop pirates from sharing names with serial numbers. Alan's system, however, is far more difficult to crack. I don't want to give away details, but essentially each registered program is tracked over the Internet by both user name and by the identity of the Macintosh they are using. In other words, there is no such thing as pirating serial numbers. There is also no way to move a registered application from one machine to another and have it work. As far as the application is concerned it has just been reinstalled from scratch, with no registration. And no, copying preference files along with the application does not help. I tried it! Alan is considering offering this registration system as a product for other developers to use. Unlike many ugly, intrusive, disk swapping, lumbering, dongle dependent software security monstrosities of the past, this one is very simple to the point of invisibility. I am very impressed.

Apparently, the number of Cocoa developers remains small, as well as the Cocoa application market. One former NeXT dealer told me that even at the height of their success, NeXT only had around 200,000 users. Another part of the problem is that despite Cocoa being far easier to program than Carbon, there is still pressure on developers to write applications that run on Mac OS 9 as well as X. With time Cocoa development will become the predominant method for writing Mac OS X applications. For dedicated Cocoa developers like AvCore Systems and OmniGroup, that time can't come soon enough.


So, as a dedicated Mac OS X user, it is your duty to seek and purchase Cocoa applications. Not only will you be supporting the future of Mac OS X application development, but you will be buying far more powerful applications than their Carbon counterparts. Here at Inside X, I will be regularly featuring Cocoa apps, as well as new Cocoa technology and resources. In the ideal computer community of the future, any Joe Blow can build and deploy an application to meet their specific needs. So far, the Cocoa development environment is the closest thing we've got (with of course, a respectful nod to RealBasic). I agree with Alan that Cocoa is the future of Macintosh development, but I also believe it is going to push the envelope of software development on all platforms.

Where To Find Stories For Your Mac

In the last couple years 'eBooks' have been all the rage. However, the Internet has been the single best place to find free stories long before the arrival of the World Wide Web. The most prominent source remains Project Gutenburg. Classic texts, whose copyright has expired, are OCRed (Optical Character Recognition) from scanned pages into ASCII text for sharing with others. Frequently it is the ONLY place to find a particular text that has been long out of print. For example, I am a Jules Verne fanatic. I particularly like his social commentaries. Currently it is impossible to find many of his books, except through Project Gutenburg! Here is how to get there:

<http://promo.net/pg/>

The Internet is gradually becoming a freeform place to publish. There are books galore you can read for free, including many by new and struggling quality authors (like me!). Search around in Google for free books, free fiction, free stories. Here is one good site to check out:

<http://www.free-fiction.com/>


Besides writing Macintosh technology articles I also enjoy writing fiction, including horror. If you are a horror fiend then you have to appreciate the 20th Century master, HP Lovecraft. Many of his stories are free on the net. One place to find them is:

<http://www.ech-pi-el.com/lovecraft/works/>
Who knows, but you might actually find an author in the net you like and be willing to pay them for their other work. That's how they make a living! If the Internet fulfills all its promise, authors will be making a more reasonable profit that they receive from professional publishing firms, and they won't have to sell the rights to their work. Readers get less expensive books to enjoy, and authors get to keep their works as their own. Everyone wins, art thrives again.
A Final Thought: The Death Of Windows?
The week of March 18, 2002, Microsoft threatened to pull Windows off the market if the Federal court slapped them with due justice. Many computer journalists have responded with a frenzied panic, as if the computer world were coming to an end. Repent, Repent, all lay down and pray to Microsoft for forgiveness. Nauseating.


I say, so what? Good riddance Windows!


Do you know what would happen if Windows suddenly disappeared? It would be IMMEDIATELY replaced with emulators and superior OS alternatives, including Mac OS X. All it takes to run Mac OS X on PC hardware is a recompilation of the System software. The vast majority of Mac OS X applications would run on the resulting operating system without changing a single line of code. Of course, one big question is whether we want Apple to become the next OS monopolist. In any case, the computing community would NOT come to a screeching halt if Microsoft fell into the ocean. I believe the computing community would instead prosper, as it never has before. Computer security alone would improve ten fold or better! So long to Tens of Thousands of Microsoft specific viruses, and that endless parade of Microsoft security holes. Choice and diversity would reign, which is the goal of any robust system. So threaten away Mr. Balmer! I yawn in your general direction. With luck, or better yet wisdom, the Federal court will be equally unconcerned with your meaningless whining and blethering.


Share and Enjoy!


:-Derek