The zeroth thing you need is the Pocketsphinx binaries.

The first thing you need to do is build a language model or a grammar.

The grammar can be something simple in a format called JSGF, and this is the easier way to get a speech recognizer up and running. Alternatively, you can use a language model. The language model can be built using the instructions on the Sphinx site. You can create it starting from a file with sentences like this:

<s> I WANT A NEXTCUBE ZERO FOUR ZERO </s>
<s> I WANT THE NEXTCUBE ZERO FOUR ZERO </s>
<s> I NEED A NEXTCUBE ZERO FOUR ZERO </s>
<s> I NEED THE NEXTCUBE ZERO FOUR ZERO </s>
<s> I AM LOOKING FOR A NEXTCUBE ZERO FOUR ZERO </s>
<s> I AM LOOKING FOR THE NEXTCUBE ZERO FOUR ZERO </s>
<s> I AM SEEKING A NEXTCUBE ZERO FOUR ZERO </s>
<s> I AM SEEKING THE NEXTCUBE ZERO FOUR ZERO </s>

A sample JSGF file would be (modified from the sample on the Sphinx website) … note that I’ve made all the words capitals because the CMU phonetic dictionary has all the words listed in caps (make sure that any language model is all caps as well, except for the sentence boundaries):

The Vaklipi language lets you program using a natural language, for example, English or Hindi.

You no longer have to learn the complex syntax of a formal programming language in order to make a computer or a robot do what you want.

If you wanted a human to say “Rumpelstiltskin”, the words you would use would probably be: ‘Say “Rumpelstiltskin”’ …

If you typed that into Vaklipi, Vaklipi would just print the word “Rumpelstiltskin” on the screen.

If you typed ‘What is 2*3?’ it would print 6.0.

Use Cases

We believe that computer users should not have to learn a formal programming language in order to get the computer to do anything for them.

Imagine the following scenario:

You have a record of your expenditure for the month in a file on your computer, and now you want to add up the numbers.

If you were a programmer, you would write a script to add the numbers up.

But if you were not, what would you do?

If you were using Vaklipi, you could just type something like …

‘Add up all the numbers in the second column of the file “expenses.txt” in the directory C:\finances’

… and it would be done!

Domain Adaptation

Since Vaklipi could find use in a variety of situations, we provide means for vendors and technology partners to extend Vaklipi.

The extension interface uses the concept of selectors, which are identifiers of objects in the real world.

Examples are file pathnames and urls.

Vaklipi handles the natural language intricacies surrounding selectors and lets the technology partner develop the domain specific capabilities for doing things with them without having to take any human languages into account.

Multilingual

What’s more, instructions can be given in any of a large number of human languages.

Another cool thing about Vaklipi is that a program that you write using a particular language, say English, on Vaklipi, can be read by another user in another human language, say Chinese.