Pre-requisites: Eclipse (Callisto, Europa or Ganymede). JRE 1.4+
Follow these steps to setup your development environement for Eclipse IDE:
- Extract Sphinx4 source and binaries in folder. I have
/Speech/Sphinx/sphinx4-1.0beta2. - Create a Empty Java Project titled 'sphinx' or any name you wish to.
- In the Package Explorer, right click on Project and select 'Build Path -> Link Source'
- A Dialog Box will appear asking you to enter the source folder from your filesystem. navigate your path to
/Speech/Sphinx/sphinx4-1.0beta2/src/sphinx4. - Eclipse parses entire folder structure recursively and also names your source folder.
- Click Next and Finish. A new source folder is now linked with your project.
- It will contain lot of errors as libraries are not been added yet.
- Add
/lib/js.jar, lib/tags.jar and lib/jsapi.jar to your project classpath by right-clicking project and selecting 'Build Path -> Configure Build Path -> Libraries'. - Eclipse then refreshes the workspace and all errors are nullified.
Sphinx4 also provides you with a handful of sample programs. I found every sample program very useful and it covered most of the details needed to learn Sphinx4.
To Setup the environment for using the samples and viewing the source code, you can follow these steps.
- Create another new project and title it as 'sphinx-demos'
- Right click and Link this Source folder:
/Speech/Sphinx/sphinx4-1.0beta2/src/apps - Add the missing Libraries:
/lib/js.jar, lib/tags.jar and lib/jsapi.jar and lib/sphinx4.jar to your project classpath - Every demo is a simple Java file. To test any demo, just right-click select Run -> Run as Java Application File.
There you go. You are now ready to learn Sphinx4 with proper development environment setup.
Sphinx Project gives you access to entire source code of Sphinx.
Sphinx-demo Project gives you access to all the demo apps for Sphinx.
Do you know if sphinx 4 supports making applications that convert text to speech?
ReplyDeleteNo. Sphinx is only ASR. Go for freeTTS or any other tool.
ReplyDeletehey followed your steps but in project manager it shows a cross mark.. it think project is unable to build properly..
ReplyDelete@psvsn
ReplyDeleteWhat errors ?
Hi, i tried setting up Eclipse 3.6.2 with sphinx4 and I'm having troubles n number 7 to the end. It seems eclipse still doesn't recognize the libraries I added and still has a lot of warnings.
ReplyDeleteSame with doing it with a demo, when I run the sample programs from sphinx4 it only ends up having errors about declarations. Please help :(
@poleleng: I had to change Java Compiler to level 1.5 or higher and the errors disappeared... maybe same to you?
ReplyDeletehey is there any way to convert the simple words to the cmudict like phonetic word?
ReplyDeletelike this?
ABANDONS AH B AE N D AH N Z
What this conversion is called??
its used in sphinx4 speech recognition to recognize word
Deleteits called grapheme to phoneme conversion, and CMU hosts a tool that will do it for you online, at http://www.speech.cs.cmu.edu/tools/lmtool-new.html
This comment has been removed by the author.
ReplyDeleteHi, good work!
ReplyDeleteThis page : http://cmusphinx.sourceforge.net/sphinx4/index.html#download_and_install
says that the .bin package is a subset of the .src package. So, why do I need to download both?
Established transportation infrasctructure for a plethora of lifestlye, dining and entertainment.
ReplyDeletethe interlace
i am getting Error on
ReplyDeletedemos -->jsapi.tags --->live connect ---->
on intiating library
import javax.speech.recognition.RuleGrammar;
And actualluy i have imported all library (jsapi,tags,sphinx4..)