Fork us on GitHub

Dr. Sbaitso Revisited

A modern demo updated with a twist
Post Image

Dr. Sbaitso Revisited

Dr. Sbaitso is one of our newer demos. We wrote it for a workshop at JavaZone a couple of years ago and it proved to be an excellent tutorial on many complex abilities of Codename One. It captures images from the camera, rounds them, does dynamic search with a chat like bubble interface…​

Check the live version running on the right hand side thanks to the power of the Codename One JavaScript port!

But the coolest part is the speech synthesis…​

It uses native interfaces to access the text-to-speech capabilities of the device and "says" what the "doctor" is saying. This both demonstrates native access and the rather cool TTS functionality.

What’s to Improve?

The demo is already so good and relatively terse, there isn’t much to improve about it.

We naturally updated it to Java 8 and the newer terse syntax which cleaned up a bit of the UI. We also replaced the next command with an arrow material design icon which is more attractive…​

But the coolest change is that we added native interface support for JavaScript so Dr. Sbaitso now speaks in the Chrome browser!

This works really well and runs very smoothly on my desktop, it’s not ideal because speech synthesis isn’t widely supported by browsers and I wasn’t able to get it to work on firefox or any other browser. But it’s still remarkably cool.

This pretty much shows off the benefit of having a native framework vs. the pain of web fragmentation…​
Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.