cmusphinx / sphinx4

Pure Java speech recognition library
cmusphinx.sourceforge.net
Other
1.41k stars 586 forks source link

sphinx-data does not contain some resources #35

Closed nicolamontecchio closed 9 years ago

nicolamontecchio commented 9 years ago

I copied the demo code from TranscriberDemo into a separate project. After building sphinx from source, my code doesn't work anymore because it can't find some files: edu.cmu.sphinx.util.props.InternalConfigurationException: Can't locate resource:/edu/cmu/sphinx/models/en-us/en-us.lm.dmp

I unzipped sphinx-data-1.0-SNAPSHOT.jar in my .m2 folder, here are all the files in there:

META-INF/
META-INF/MANIFEST.MF
edu/
edu/cmu/
edu/cmu/sphinx/
edu/cmu/sphinx/models/
edu/cmu/sphinx/models/en-us/
edu/cmu/sphinx/models/en-us/en-us/
edu/cmu/sphinx/models/en-us/cmudict-en-us.dict
edu/cmu/sphinx/models/en-us/en-us/feat.params
edu/cmu/sphinx/models/en-us/en-us/mdef
edu/cmu/sphinx/models/en-us/en-us/means
edu/cmu/sphinx/models/en-us/en-us/mixture_weights
edu/cmu/sphinx/models/en-us/en-us/noisedict
edu/cmu/sphinx/models/en-us/en-us/README
edu/cmu/sphinx/models/en-us/en-us/sendump
edu/cmu/sphinx/models/en-us/en-us/transition_matrices
edu/cmu/sphinx/models/en-us/en-us/variances
edu/cmu/sphinx/models/en-us/en-us.lm.bin
META-INF/maven/
META-INF/maven/edu.cmu.sphinx/
META-INF/maven/edu.cmu.sphinx/sphinx4-data/
META-INF/maven/edu.cmu.sphinx/sphinx4-data/pom.xml
META-INF/maven/edu.cmu.sphinx/sphinx4-data/pom.properties

Since everything used to work before (when maven was downloading sphinx-data from the online repository), I assume that I'm building sphinx wrong (I did mvn install - which runs tests and they pass ok), though I can't find any reference in the documentation on how to do this.

nshmyrev commented 9 years ago

Latest transcriber demo does not use lm.dmp, it uses lm.bin. See the updated code here:

https://github.com/cmusphinx/sphinx4/blob/master/sphinx4-samples/src/main/java/edu/cmu/sphinx/demo/transcriber/TranscriberDemo.java

nicolamontecchio commented 9 years ago

thanks for the quick reply!