3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Android-based Vintage Phone

Step 6Write Software

Write Software

Primary Components


CMU Sphinx
is an open source voice recognition project maintained by Carnegie Mellon. The system consists of two parts: recognizer code and files with voice model and language model. It was easy to compile library code for Android. There is a great example posted by CMU Sphinx's creators. One can teach CMU Sphinx their own pronunciation. All one has to do is to record 20 sentences and run generated files thought a supplied tool. This can significantly increase recognition quality. What is more, one can build a language model. This would basically tell recognizer what words and phrases to expect. In my case a primary phrase was "call name", where name is one of the names from my address book. Having such model also increases recognition quality.

One might ask: why not use Google Voice? Unfortunately, it is really bad at understanding my pronunciation. And it also not so good at recognizing names.

One might ask: why not use special micro controller? I have certainly considered this approach. One solution I found was Sensory. Unfortunately, it looked too expensive. Well, it seemed like I would have to do the same amount of work, as with CMU Sphinx and it will result in comparable quality, but I would have to pay for the chip.

"No speech generator" – I was very convinced in this after trying several different generators. All text-to-speech engines created a very un-natural voice. So, I had to ask a human to record all phrases that my phone can possibly tell. What is more, I had her read each phrase several time. During playback I pick a random version of the phrase; this creates a strong illusion of a real human on the other end.

PJSIP
– is an open-source implementation of the SIP stack. In other words, it is open VoIP library. I didn't have much trouble with it: downloaded, compiled and used it. CSipSimple is a big project open source that also uses it. This project very helpful, as it contained some great usage examples.

One might ask: why not use Skype? This was my original idea. I've subscribed to Skype Developer Program. Unfortunately reading license agreement revealed that Skype SDK can not be installed on any devices controlled by Android.

One might ask: why not SIP stack that is built into Android? Unfortunately, the stack has been added only in Android 2.3. Archos 28 is running 2.2.

Workflow


When telephone is off the hook:
  1. Wait one second
  2. Say "Number, please!"
  3. Start voice recognition
  4. If recognized "call name", go to next, otherwise say "Sorry, I didn't get that" and go to 3
  5. Say "Calling name..."
  6. Start voice recognition
  7. If recognized "no" or "stop" go to 2, otherwise go to next
  8. Place a VoIP call
  9. Say "Call placed"
  10. Wait until the call is terminated
  11. Say "Call terminated"
When incoming call is received ring the bell and wait until either telephone is picked up, or other end terminate a call or 20 seconds pass. Ring the bell with one second intervals.

Android App Format


Phone application is actually a background service. There is also a light-wait user application that displays current status. The services starts on app startup or on user app launch.

Where to Find Source


All code that I wrote could be found on google code. You would also need to download and compile PJSIP and CMU Sphinx.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
17
Followers
4
Author:basil.shikin