This funny little robot has eyes, eyebrows and a mouth and will verbally read your latest Twitter status to you. It uses an Arduino Decima to control the head actions and receives the latest Twitter status information over USB from a host computer.
You can also send the robot something to say directly from the command line with a few Ganzbot moods to choose from. More information after the videos.
Steve’s Reaction
Background
A couple months ago a few people at LinkedIn decided to create a Twitter account called “Ganzbot”, named after Steve Ganz, as a joke. Then when Steve left to compete in the PDGA World Championships we decided to build a “real” Ganz Robot to occupy his cube when he returns.
How it works
At a high level, there is a Java program on the host computer which retrieves the latest Twitter status, passes facial and word data to the head and then speaks the Twitter status through the computer speakers using FreeTTS, an open source Java text-to-speech synthesis library. I would have liked to put a speech synthesis chip in the head instead, but didn’t have the time.
LED Lips — how to make them talk
Getting the LED lips to be synchronized with the words was a bit tricky. Unfortunately FreeTTS doesn’t implement 100% of the JSAPI, so when it’s speaking there is no way to know when one word ends and another begins. Instead, the Java program on the computer splits up the text into individual words, sets the volume to zero and speaks each one to figure out how long it takes to say. Then the program passes the word times to the head and starts speaking the entire sentence with the volume at the normal level. The lip synchronization isn’t perfect, but it’s pretty good.
Another option might be to light up the LED lips from an audio spectrum analyzer.
Circuit
To keep it simple I took a standard perf board from Radio Shack and added header pins to turn it into an Arduino shield. This makes it really easy to connect it to the Arduino and ensures all the pins are in the correct sockets. The circuit below was created to show the pins and voltage source as they appear on the board. More details on the circuit after the diagram.
Transistors
Unfortunately there wasn’t enough juice coming from the Arduino chip to power the LEDs very bright, so I had to use standard NPN transistors to feed the LEDs power directly from the board.
Lips and Eyes
I only included half of the lips and eyes in the circuit diagram since the other halves are simply connected in parallel and I didn’t want to clutter it up. I’m sure you can figure it out. If you have trouble, leave a comment below.
Eyes
The eyes are simple multi-color LEDs I picked up from Radio shack. They can output red, green and blue, but the Ganzbot only uses red and blue. The longest pin is positive and the color depends on which pin you put to ground. I suggest testing it on a breadboard before soldering it into place.
Software
On the host computer a Java program retrieves the Twitter information (or command line message) and sends the word times to Arduino over the USB cable. All the robot needs to know is the mood it should be in (neutral, sad, angry) and how many milliseconds each word takes the speech synthesis program to say. If the program is started in “-twitter” mode, it’ll continue checking Twitter for updates every 2 minutes until you stop it.
Download
Go to the download section.
Requirements
OS: Any
Java: version 1.5 or greater
I compiled the program using Java 1.5, so as long as you have version or greater you should be able to use it out of the box. If not, you can simply compile the app to your version Java (see the Build section below).
Libraries
The GanzBot program relies on the following libraries, which are all included in the download:
Build
To build the Ganzbot source code you first need to install the Apache Ant build tool. Then go into the “src” directory and simply run “ant”. It should take care of compiling both Ganzbot and JSON and placing their Jar files in the correct locations.
FreeTTS comes precompiled from Java 1.4. If you are using an older version of Java you’ll need to download their source code and build it manually. Once completed put the jar files it created in it’s lib directory in the Ganzbot lib directory.
RXTX is the same as FreeTTS and comes precompiled. To compile it to another OS or version of Java, follow the instructions on their wiki.
Installer
In the download I’ve included an “install.sh” script that will install the RXTX library and Mac USB drivers that are needed to communicate with the Arduino. The installer is specific to Apple and wont work on other operating systems. The simplest way to make it work on other systems is to install the Arduino software. Otherwise you can always install RXTX and the FTDI USB/Serial driver manually.
Running the Program
- To run the progam start by plugging in the Ganzbot and then open up a command line terminal.
- In the command line, go to the place you downloaded and extracted the program.
- For a simple “Hello World” test type
java -jar ganzbot.jar "Hello World"
(be patient, It might take awhile to process)
If the program gave you an error, it’s likely because it doesn’t know which USB/Comm port that the Arduino is plugged into. It should list the available ports you can choose from in the error message. Then run the command again with the “-port” flag, like this:
java -jar ganzbot.jar -port '/dev/tty.usbserial-A6004oQf' "Hello World"
For windows you’ll probably use something like “COM1” instead of the “/dev/tty…” string.
You can also type java -jar ganzbot.jar -help
for more options.
Reading Twitter
To speak a Twitter status message enter a command like this (where jgillick is the twitter user) :
java -jar ganzbot.jar -twitter jgillick
Ganzbot wont read the same twitter message twice. The program saves the last tweet ID in a file called “.tweetid”, remove this file to have it say the last Twitter message again.
Moods
Ganzbot can be a bit moody sometimes. To define the mood he should speak in, add the mood text to the very beginning of the message. Here are a few examples:
- “[angry]I am very angry right now. Destroy, Destroy.”
- “[sad]When I’m sad I whine alot.”
- “I am not angry or sad, for I am a robot.”
Rails Application
For fun I also created a super simple rails application that let anyone queue up messages to be spoken instead of using Twitter. If the Ganzbot program is in Twitter mode it’ll automatically check that queue if there isn’t a new Twitter status message. The app is hardcoded to look at http://localhost:1024/ for the queue. You can change that in GanzBot.java if you need.
In order to run the web application you first need to make sure you have both Ruby and Ruby on Rails installed. Then download the package (see download section), extract it and run the following from the command line in the “GanzbotRails” directory.:
./script/server --port 1024
This will start the server and put your Ganzbot queue at http://localhost:1024.
Jeremy, you are one damn funny guy. Come work here!!! 🙂
Well-done, I had forgotten (assuming you did tell me at some point) that you are/were from an electronics background.
Best. Thing. Evar.
Definitely the best “welcome back” I’ve ever received!
Oh, and Melissa? Hands off! 😉
[…] ++ Arduino bot that speaks your Twitter messages back to you. […]
You should sell this somewhere. I’ve got 1,000 Twitter followers and I’ll bet 5% of these lunatics, including me, would buy it.
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments | Read more articles in Arduino | Digg […]
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments […]
Jeremy, you are insane. I’m so glad you work here.
Melissa, if only you worked here, you’d work with Jeremy, too.
Just sayin’. =]
HI
Cool project. I noticed though that the transistors driving the multicolored lED are backwards. Reverse the E and C and they will work. Also, the transistors driving the other LEDs should have the LEDs on the collector side, so that the LED voltage drop does not interfere with the base bias. It’s standard practice to use a single resistor for each LED also 🙂 Keep up the good work.
Good to see a Mac based micro controller project.
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
[…] odd fellow is an Arduino-based system for reading – and reacting to – incoming Twitter messages. While his […]
[…] capable de vous réciter les updates Twitter que vous récéptionnez. Sorte de Nabaztag du pauvre, Ganzbot parvient également à traduire quelques émotions en fronssant par exemple ses […]
[…] make, mozmonkey A+Featured Gadgets, Consumer, Cool, Design, DoItYourself!, Educational, Entertainment, Gadgets, […]
[…] see, and it can read text from your computer to boot. Builder Jeremy Gillick and his crew over at The Mozmonkey Blog created the Ganzbot when friend Ganz left to compete in the PDGA World Championships, and had it […]
[…] [Mozmonkey] […]
[…] Read | Permalink | Email this | Comments […]
[…] Read | Permalink | Email this | Comments […]
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture – go […]
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture – go […]
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture – go here Possibly related posts: (automatically […]
[…] alerts us to Ganzbot, a personable (robotable?) device that speaks and emotes. Ganzbot is designed to be hooked into […]
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments | Read more articles in Arduino | Digg […]
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture – go […]
[…] Ganzbot: An Arduino robot who reads Twitter This funny little robot has eyes, eyebrows and a mouth and will verbally read your latest Twitter status to you. It uses an Arduino Decima to control the head actions and receives the latest Twitter status information over USB from a host computer. […]
[…] Robot that Reads and Speaks RSS Feeds […]
I really like the Gazbot. I would like to build one. I have an arduino MegaBoard. But, I am new to the arduino. I am still waiting for my shield to come in. Is there a place I can get more information on the construction of this bot? Maybe , another more simple tutorial outlining everything I need to make one.
wow… that is really nice work guys…
i need to learn robotics…
[…] ข่าวสั้น ผ่าน twitter หรืออย่างเช่น Ganzbot เขาทำหุ่นยนต์อ่าน rss จาก twitter […]
what a funny guy… 🙂
hi all, i try to program a serial link with arduino mega and mac os X, but the rxtx library make a exception, portinuseexception, but i have no program that use the serial link of my arduino, i can’t send or receive line with my arduino on mac os X, but on windows its works. can you send me the java source you use to the serial link ?
[…] he turns angry until you place him back down. Here is a link to a similar bot project that uses twitter posts to set emotions. Download the source […]
Hey Jeremy, i found this, and i want you to know you don’t have to speak the word ahead to synchronize the text.
The information is all in the Freetts engine and is accessible by adding a UtteranceProcessor to the voice % a few bugs.
Check out this class in my repository:
http://code.google.com/p/bookjar-utils/source/browse/BookJar-utils/src/util/speech/FreeTTSVoice.java
It does more or less what you want (but i havent stress tested canceling yet.
You guys are quite creative.
[…] it might be seemed a little bit ridiculous for some of the Twitter’s users, but the Ganzbot is truly a superb arduino robot that read new Twitter messages […]
[…] 不多说了,查看发明人blog,了解更多信息吧!http://mozmonkey.com/2008/ganzbot-an-arduino-robot-who-reads-twitter/ 标签: Twitter 分享这篇文章! […]
[…] need to do in order to get this project running. We went through the website we got the idea from (http://mozmonkey.com/2008/ganzbot-an-arduino-robot-who-reads-twitter/)to see what they used when they did the project and came up with our own set of supplies. We will […]
[…] had been having all week. Our adruino code seemed perfect. However, The code we adapted from the Ganzbot site was written for an older version of the adruino board. Our LED’s for our mouth and eyes […]
Personally i think this is a good post. I’ll be sure to come back for more..
Also, i have bookmark your site!
vernette
[…] Link to the project : click here […]
Hello bro, nice project.
I was trying to take a look over your Java Program, and it seems to be corrupt, any chance you could post the Java program again, please. thanks bro ‘Ganzbot Java Program’
Jeremy,
I haven’t realized that you have a vast knowledge on electronics as well. Did you study electronics?
[…] Robot that Reads and Speaks RSS Feeds […]