Miner Thoughts – My Mac Magazine #52, August ’99

I told you last month I was going to tinker with my iMac’s Speech Recognition and try getting more out of it than Apple intended for me to have. So tinker with it I did. And although I got mixed results from my initial tinkering, I am convinced this Speech Recognition software can do a lot more than Apple would have us believe.

Using ResEdit 2.1.3, I plunged deep into the bowels of the Speech Recognition and Speakable Items resources to get a general overview of how Apple programmed this software to react to spoken commands. It was a tad more complicated than I had expected, but with a little perseverance I was able to track down the specific string of code that prevents Apple’s Speech Recognition and Speakable Items from operating outside the Macintosh environment. I found the code string I was looking for inside the Speech Recognition extension. The computer reads the code string and interprets it as:

 

Text 1Even a novice computer geek like me could see that this code interpretation is what prevents the Speakable Items commands from working anywhere other than inside the host computer. Once I figured that out, it was a simple matter of tweaking the code string in order to get the software to do my bidding, not Apple’s.

After long tedious hours of recoding I came up with the following interpretation:

 

Text 2A close observer should be able to read the changes I made in the code. Hint: The ‘X’ characters have been replaced with my new instructions.

Being the careful re-programmer that I am, I made my changes on a copy of the extension, not the original. I set the original aside in case my new extension didn’t work. I saved my changes, put the new extension in the Extensions folder, and restarted the iMac.

I have my Speech Recognition preferences set to launch at startup using the Victoria, high quality voice and to only respond to my voice commands when I preface them with Hey, Guinevere. (Don’t ask!)

I had a normal restart. Nothing froze or crashed. I decided to begin slowly, giving my new souped up gofer a few simple commands.

“Hey, Guinevere, open SimpleText.”

Zap! SimpleText opened.

“Hey, Guinevere, quit this application.”

Bingo, SimpleText quit.

I did the same with a few other applications and the Speech Recognition software dutifully carried out my commands. Then I moved on to more substantial commands.

“Hey, Guinevere, find King Arthur.”

I expected nothing to happen when I gave this command, as it was not in the Speakable Items list. Boy, was I surprised when my Remote Access panel opened up and my modem began dialing my ISP. A minute later I had a list of 122 websites containing the name King Arthur. Guinevere knew exactly where to find her husband! Although impressive, I was looking for more than a turbocharged Sherlock.

While contemplating my next unorthodox command, I noticed the trash can at the bottom right corner of my screen was full and without thinking I said, “Hey, Guinevere, empty the trash.”

Nothing happened. At least nothing happened on my screen. But I did hear a loud noise coming from downstairs–in the kitchen I guessed–and then I heard my wife screaming. I ran down the stairs, through the hall, around the corner and practically knocked my wife over as she was racing out of the kitchen. “What’s wrong?” I gasped.

“In there! In the kitchen,” she yelled, pointing behind her.

I ran into the kitchen expecting to find some crazed psychopathic killer wielding a butcher knife or something. What I found was a kitchen floor strewn with garbage and the trash bin turned upside down and standing on its lid right in the middle of all the trash. No crazed psychopathic killer wielding a butcher knife in sight. That was somewhat of a relief!

I began picking up the garbage and called my wife back into the kitchen to explain to me what happened. She told me she was putting away the last of the dinner dishes when the trash bin just floated into the air, turned upside down and spilled all its contents on the floor. “Honest to God honey, that’s what happened! I know it sounds impossible but that’s exactly what happened! You’ve got to believe me!”

“Oh I believe you all right, hon. In fact, you’ll probably want to kill me when I tell you I’m responsible for this happening. Actually it was Guinevere who did it, but I told her, too.”

“WHAT THE HELL ARE YOU TALKING ABOUT?” My wife screamed at me.

I explained to her the little project I was working on and pointed out there were still a few bugs I needed to iron out. “Not a big deal, hon, I just have to be a little more careful about what I tell Guinevere to do.”

I went back upstairs not fully convinced my wife believed me. She decided to go visit one of our daughters for a couple of hours. “Don’t burn the house down while I’m gone,” she told me as she was walking out the door. Home alone, I continued working with Guinevere.

“Hey, Guinevere, empty YOUR trash, please.” The trash can on the desktop emptied and the kitchen downstairs remained quiet. So, she wants me to be specific. I can do that.

“Hey, Guinevere, turn off all the lights in the house.”

Bam! The house went dark. She even put the iMac’s computer screen to sleep. This is so cool! I thought.

“Hey, Guinevere, turn on all the lights in the house.”

Zing! Instant daylight.

“We’re cooking now,” I said to no one. I got up, went into the bedroom and pulled the covers and sheets off our bed and tossed them on the floor. I returned to the iMac and said, “Hey, Guinevere, make my bed.” I waited a few seconds and then peeked into the bedroom. Nothing was happening in there, but I did hear pots and pans rattling downstairs in the kitchen. Another glitch in Guinevere’s recognition capabilities? Maybe I spoke too quickly. I tried again. “Hey, Guinevere, MAKE MY BED.” Another glance into the bedroom… Nothing. The noise downstairs continued though, and I was afraid to go look, but figured I’d better.

When I entered the kitchen, the counter top was strewn with mixing bowls, cooking utensils and a heavy dusting of flour. I opened the oven door and saw three loaf pans of bread dough inside. Guinevere must have mistook my, “MAKE MY BED” command and recognized it as “BAKE SOME BREAD.” Oh boy!

As you can see I’m experiencing a little glitchiness in this tampered with, souped up Apple Speech Recognition software of mine, but I’m not yet discouraged. I still think I can get Lady Guinevere to do my bidding and have her performing all sorts of mundane household chores.

Once I accomplish this I plan to install the new software into a PowerBook and take it on the road with me. I can’t wait for the day when I drive my truck into the Fremont, California Toyota plant on a day when the temperature hovers around 100° and all my trucker buddies are sweating like pigs as they load their trucks. I can just whip out my PowerBook and simply say. “Hey, Guinevere, load my truck.” And as I sit inside my air conditioned cab playing Solitaire on the PowerBook, I’ll be the envy of the trucking industry while Guinevere loads and secures nine Toyota pickup trucks on my car hauler.

Hey! It could happen!


Pete Miner
pete@mymac.com

Leave a Reply