This source code is based on this article
http://vpt-deeplearner.tech/2017/01/21/ionic-2-an-example-of-speech-recognition-on-mobile-phones/
Use following commands
ionic platform add android
cordova plugin add https://github.com/vijtad/SpeechRecognizer