One of the problems I had at the maker faire was that people wanted to try different games, but enabling them all at once caused problems. I’m working on a software solution to mitigate some of those problems, but my wife suggested that next year I can have more than one phone available to use.
So I’ve gotten several more old phones to turn into GruePhones, and they can each run a different game. Two will be based on old Deco-tel “chest”phones, sometimes called spy-phones…
… because they’re hidden in a box. Open one and it looks like this:
This one is push-button, but I also have a rotary one (in slightly better shape even).
So that’s two, but I also have on (maybe two with all the parts got I got) of these babies:
I’m thinking that the push buttons on this one can be used to save different games…. and I think I can make them even more interesting.
The Maker Faire was excellent, even if there was a significant hardware failure that took the phone off-line for part of Saturday and all of Sunday.
It was too noisy to even attempt to play Zork, so I had prepared the framework so it could run a much simpler game called Moonglow, written by Dave Bernazzani in 2004. It was designed to fit in a very small program, and as a result has a vocabulary of only ~70 words, rather than more than 650 for Zork. That worked well enough in testing and at the preview on Friday afternoon, but Saturday was significantly more crowded, and therefore noisy. The game was mostly unplayable. So Friday afternoon I hacked up a new game that only requires yes or no answers. It was suggested by my old friend Kevin Savetz, and inspired by the classic BASIC game animal. It asks a series of yes or no questions in an attempt to guess what animal you’re thinking of. If it fails, it asks you to contribute a new question that would have helped distinguish the new animal from the old. Adding new questionss was too challenging for the STT engine in such a noisy environment, so I didn’t allow updates. But with a pre-built database of 70ish animals and nearly as many questions, it did okay… for a few hours until the computer died late Saturday.
It had been having increasing problems with packet loss (30%) on the little WiFi network I had set up, so I attempted to restart the wlan interface, but that wedged. Attempting to reboot the whole computer yielded a unbootable computer. I had a spare computer with me, but the software backups were A) several days old and B) source only. So I reconstructed as much of the software as I could but recompiling on the chip computer itself took FOREVER. I probably should have worked out a cross compile environment, but I didn’t expect a single FST library file to take ~20 hours to compile. It spent most of that time swapping hard because the compiler was taking 650MB of virtual memory, and the poor little chip only has 512MB of RAM.
Despite the computer eating itself, I ended up getting an award.
This is the first demo of the phone more-of-less complete. You can see a video over at my facebook page. Apologies for those who don’t use facebook, but the raw video is too big for wordpress to handle.
After the demo, I decided that it was time to tear the phone apart and try interfacing with the phone hardware. Below you see roughly how the parts fit together inside the phone.
The guts of the phone
There isn’t a lot of room in there to maneuver, but I managed to get the switches for the hook (the bar in the back) and the PTT button (the leaf switch in the center) hooked up for XIO-P6 and XIO-P7 respectively. It looks like:
The wires for the hook switch and the PTT button.
It ain’t pretty, and the wires don’t stay in very well, but once it’s all wedged into the phone, it works reasonably well.
My first pass at having the code react to these switches is pretty crude, but I have an idea of how to improve it.
So, after a several month hiatus, I’m back at it. I managed to get all the parts into the phone, though to make room I had to remove the bells from the ringer mechanism, which makes me sad.
You’ll notice the USB cord hanging out the back: that’s for charging the on-board 1,100 mAh LiPoly battery (and gives me a serial console if I plug it into my laptop or desktop), but the phone can run for hours without charging.
The software remains problematic. The speech recognition is still hit-or-miss. I need to give it more context about what words are likely, and to do that I think I’m going to have to implement a z-code interpreter in python, but that’s a non-trivial undertaking.
So it turns out that the transformer wasn’t necessary. I broke out a pocket oscilloscope, and it boosted the voltage from 1.5V pp, to 7.5V pp, and the resulting volume in the earpiece was VERY LOUD, so I tried without the transformer, and it worked perfectly, and at a much more reasonable volume with the alsamixer controls on the computer set to mid-range.
Since that worked so well, I decided to try hooking the phone’s mouthpiece/mic straight up to the mic jack, and that worked like a charm as well. I was able to play the game with only a few problems with the STT engine due to slightly noisy input. I think I can tune that away using alsamixer again.
Lesson learned. A standard, cheap sound card/dongle is capable of interfacing with an old phone directly.
Here is a mostly complete list of offline text-to-speech engines I have at my disposal. I have cleaned up the text somewhat from the last time, so they should be easier to understand. Let me know what your favorite is in the comments.
Espeak is a very robotic, but relatively lightweight engine:
Festival is a quirky, but also lightweight engine. It was developed at the University of Edinburg, so it has a distinctly Scottish accent, which is cool:
Pico was developed by a company called SVOX, and was chosen by Google to be the voice of Android 1.6 “Donut”:
There is also Festival Light developed at CMU, it has a variety of voices available to it: