The instructions in a blog post for Ubuntu 14.04 (linked below) worked for me on Ubuntu 18, with one extra step after you complete the following:
I tried to run it after these steps and got this error:
cannot open shared object file: No such file or directory on pocketsphinx
So I ran the following two lines of bash:
echo 'export LD_LIBRARY_PATH=/usr/local/lib' >> ~/.bashrc
This resolved the issue, and I was able to run it as described in the article. from Baker Street Systems.