How to use CMU Sphinx 4 for speech to text with english voxforge models

二次信任 提交于 2019-12-02 17:45:30
Nikolay Shmyrev

It's very simple to plug in Voxforge acoustic model. The main document covering the API is cmusphinx tutorial:

http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4

It's recommended to read it before you start. Please also note that it is recommended to use En_US English Generic acoustic model, it is more accurate than Voxforge.

Step by step you need to do the following:

  • Download voxforge model from sourceforge and unpack it to a folder
  • Checkout sphinx4 from github and build it with gradle
  • Run TranscriberDemo
  • Go to sphinx4-samples/src/main/java/edu/cmu/sphinx/demo/transcriber folder, open Transcriber demo and edit the acoustic model path as below.
  • Edit the location of the audio file in sources if you need another audio file
  • Run demo again and enjoy

That would be it

   // Load model from the folder in your project
   configuration.setAcousticModelPath("file:voxforge-en-0.4/model_parameters/voxforge_en_sphinx.cd_cont_5000");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!