There are several libraries for this kind of conversion - I host two of those on GitHub: libsprec (this uses the Google speech recognition APIs, so it supports multiple languages) and VocalKit which uses the high-quality opensource PocketSphinx library (however, it currently supports English only).
OpenEars uses PocketSphinx as well.
There are some commercial solutions as well: the Dragon Dication SDK is a popular, however quite expensive framework.