# Is there an AI system that automatically generates classes and methods by giving it voice commands?

I want to develop (in Java) a voice plugin for Eclipse on a Mac that helps me jot down high-level classes and stub methods. For example, I would like to command it to create a class that inherits from X and add a method that returns String.

Could somebody help me point out the right material to learn to achieve that?

I don't mind using an existing solution if it exists. As far as I understand, I would have to use some Siri interface and use nltk to convert the natural text into commands. Maybe there's some chatbot library that saves me some boilerpate NLP code to directly jump on to writing grammar or selecting sentence patterns.

While you can use NLTK for analyzing and parsing the text obtained from the speech to text interface (e.g. Siri), there are higher level APIs available for this. The class of problem you are trying to solve in NLP is "intent detection".

There are several open source and commerical APIs available for this including Amazon Alexa, Google Cloud Natural Language, Azure, as well as libraries like RASA NLU, etc.

The high level flow of your program will be:

• Convert audio speech to text
• Detect intent of the text command using an intent detection library
• Use the intent to feed a script/automation that generates the code in your IDE

you could implement a simple TTS system that can translate your voice line by line to code , but it would of no use . you cant express code in a line-by-line manner. Coding is a highly iterative process at first you come up with a rough sketch for which you add details later on , and from NLP point of view this is a highly ambitious project .

At the heart almost all of ai techniques (neural networks) are functions that map one domain to another , you cant map natural language sentences to instructions in code.

However you can implement a tts system for a small language like LOGO.

• TTS = text-to-speech; you presumably mean ASR (automatic speech recognition) or STT (speech-to-text). – Oliver Mason Jun 29 '18 at 13:06