FreeTTS does not support speech recognition (as far as I know) - it is only implemented to support text-to-speech.
So you will need to use some other tool for speech recognition.
You can have a look at Sphinx which is a speech recognition tool written in Java which I had used for my university project.
Check this link to learn more about Sphinx
You will require some tweaking with Sphinx to suit you requirements - which is easier than creating your own speech recognition engine.
You can refer this video for a short tutorial on Sphinx.