Java – how to use CMU Sphinx 4 for voice and text of English voxforge model
I tried to find out how to use sphinx4 or pocketphinx with the English voxforge model, but I couldn't make it work I've tried to read the doc page (like this one) http://cmusphinx.sourceforge.net/sphinx4/doc/UsingSphinxTrainModels.html )But it didn't help me
What I want is an executable file. I can specify the model to be used and which audio file to use as the source code, and print the executable file. It's best to guess what the sound in the recording is
I have some luck: pocket phinx_ continuous -infile recording. Wav 2 > / dev / null
However, it will abort before the complete audio file is transcribed, and the default model already has a few words to create readable text from the audio
I have compiled and tested the demonstration in sphinx4 source package, but all the examples seem to need a few words and a model. Voxforge is useful to me
How do I set it?
Solution
Inserting the voxforge acoustic model is very simple The main documentation covering the API is the cmusphinx tutorial:
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
It is recommended that you read it before you begin Also note that en is recommended_ Us English general acoustic model, which is more accurate than voxforge
Step by step, you need to do the following:
>Download voxforge model from SourceForge and unzip 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 presentation and edit acoustic model path as follows. > If you need another audio file, please edit the location of the audio file in the source and run the presentation again to enjoy
this is it
// Load model from the folder in your project configuration.setAcousticModelPath("file:voxforge-en-0.4/model_parameters/voxforge_en_sphinx.cd_cont_5000");