The Geek Biker

Rambles of a geek that rides a bike

Monthly Archives: June 2013

Project Jeeves : Jeeves the Observant

“Jeeves”, I say.

“Can you take a still so I can remember this moment of me holding a gin and tonic?”

Jeeves doesn’t respond. Only an awkward silence to make the drink feel like a pint of stale water.

“What ho Jeeves?”

Still no response.

“Jeeves, have you turned the old blind ear to a straight forward query.”

There are three issues that I thought needed my attention. As mentioned in earlier posts, Jeeves ability to respond heavily relies on a connection to the internet and Google’s Test to Speech services being up and running. What was a man to do if the internet failed or Google decided to decommission their Text to Speech Services? Lastly, what can I do to get Jeeves to take a picture?

The first of the the issues was easy to remedy. On start up, I did a quick check to see if the application can reach a static internet address. If it could, voila, internet is up and running. I’d have to agree that this is not the best solution as the internet could go down while operational and then I’d not be able to do a check. But a quick test non the less.

The second issue was a bit of a testing one indeed. How to get Jeeves to respond if there were no Google Text to Speech services? A long came Mary, that is MaryTTS. Without having to repeat what is clearly stated on their website, here is a description : “MARY is an open-source, multilingual Text-to-Speech Synthesis platform written in Java. It was originally developed as a collaborative project of DFKI‘s Language Technology lab and the Institute of Phonetics at Saarland University and is now being maintained by DFKI.”

Setting up MaryTTS was a bit of trial and error but I soon had it running. The only problem was that the synthesized voice was rather dreadful. So I had to install another one. Now that was an issue. Nevertheless I now have an offline response service running. You can check out an online demo of MaryTTS here :

The last issue to cover was to make Jeeves “see”. For that I thought I’d use the laptop’s web camera. So the opensource library search started all over again, but this time it was for the visual and not the auditory. After a few hours of mucking around with different libraries, I crossed path with one that was worth using and it is simply named “Webcam Capture in Java – Generic Webcam Java Utility”. It can be found here. Jeeves can now switch on a web camera, switch to a different web camera if  there are more than one installed, and lastly take a picture. I do have a bone to pick with ol’ Jeeves as it looks like it doesn’t quite shutdown the camera when you close the connection to it. The little light next to the camera is still on and I fear the built in mic will also still be operational.

So with time to spare I thought to myself, “Myself, what else can I bundle up and throw into the mixing bowl?”

Well if you recall, a while ago I built a 3D printed skeleton head made movable by servos. Well if your memory falls short, here is one of the two video clips to jog the old pit.

So I got my hands on a Pololu – Micro Maestro 6 channel servo controller and hooked the old boy up.

Here is a picture of the controller. 

After an hour or two of code, I got the skeleton head to move on voice responses. I was pretty pleased with myself, but not sure I will keep this setup as the servos are quite noisy.

O well, though I might not keep the moving head as part of Jeeves, I do now have a Servo controller service able to interact with the Maestro controllers.



Project Jeeves, a musical email update.

Another week and a few more updates to Project Jeeves. I’m still in the initial phase of getting a proper framework in place, but that should not stop me from adding a feature or two.

Scene 1.

Old grumpy me walks into room, enter left.

TvZ: “I say ol’ Jeeves, how about a tune to lighten up this morbid room?”

Jeeves : “Yes sir, I have four playlists to entertain you with. Number 1 …. “

TvZ: “Ah, jolly good. Number one, please my good man.”.

Jeeves : “Very well, sir”.

*Music start.

End scene

Adding the capability to play music should have been trivial I thought. Then I started reading on all the different music frameworks and how other people did it. It made me a bit depressed as it look like  there would have been a lot more development involved than I initially though. Until I came across a little mp3 java library called JACo MP3 Player. Problems solved. I just needed to add some playlist functionality and I’m done.

Scene 2.

Old grumpy TvZ walks into room and bumps his little toe against a chair.

TvZ : “OH BOLLOCKS! If you were alive you would meet me with pistols at dawn! Jeeves! Send an email to old lady code purple!”

Jeeves : “Yes sir. An email has been successfully sent, sir”.

End scene.

You might think that this shouldn’t be an update since Jeeves already had email capabilities last week. Well…ok…but last week Jeeves was only able to retrieve unread emails and act upon them. So I’ve decided to add set email scripts to be actioned.

Blow is an example of a test email script:

<actionToPerform><actionName>email</actionName><params><param>emailsend</param><param></param><param>Test subject</param><param>test body</param></params></actionToPerform>

A short explanation of the script.

The voice recognition will pickup an action that will return a command “emailtest”. It will then in order perform the “actionToPerform”. So there can be multiple actions per voice command. This one will call the “email” service and action the emailSend sub-action (is that a word?). Then add more parameters, the recipient, the subject and the body of the email.

Boom, done.

Not sure what to add next, still don’t have any hardware to connect up to start working  on external interfaces.

Project Jeeves – The Digital Butler

I have started a new project and this one has kept me quite busy the past week after hours. A digital butler.

When I started this project I thought about the different names for the butler as it will define it. It will do what I ask and respond accordingly. There are a few historical butlers that I thought I might build from.

There is Alfred, the butler of Master Bruce. The problem with Alfred is that he is the moral backbone of Batman. Mine will have little morals as I doubt that I’ll be able to code that convincingly.

Then there is also Jarvis…yeah…I’m no Tony Stark.

So I need a butler who is silent, do as his told and edges his master in the right direction without him knowing. That leaves good old Jeeves. The silent and smart butler of Bertie Wooster. Which I think is also good because I probably more closely resemble Bertie in my doings that Tony Stark…though I don’t have the money of either.

So what can Jeeves do up to this point:

1. Receive commands from console input,

2. Receive commands from tcp input,

3. Receive commands from VOICE RECOGNITION input!!! hell yeah!

4. Read the news, either top story, or news just in,

5. Read today and tomorrow’s weather

6. Can read any RSS feed.

7. Connect to GMAIL and check unread mail, tell me who it is from, the subject and mark it as read or delete

8. Conncet to my Google Calendar and tell me my appointments for the day as well as the next appointment

9. Tell jokes

10. Tell me to stop swearing,

11. Greetings and some other general chatter.

12. Most actions are scripted coded but there is also a scripting component that allows me to add actions and speech components without code changes.

Not bad for a week’s work.


So, what is planned next

I’m not too sure  but there are still a few things I would like it to do

1. Launch applications on my PC

2. Interface with X10 home automation components

3. Interface with Arduino micro controllers

4. More.


Probably the biggest problem I face at the moment is my own accent. We have a bit of a head clash every now and then, which causes me to swear and Jeeves to tell me to add a dollar in the naughty word jar. Surprised how good it picks up swear words.