Hello,
I recently download the code of sphinx from GitHub (yesterday), if I run the TranscriberDemo with the english acoustic model it works ok.
But when I test with the spanish model I got this exception:
Executing: gradle :sphinx4-samples:run Arguments: [-PmainClass=edu.cmu.sphinx.demo.transcriber.TranscriberDemo, -c, G:\Prog\Java\sphinx4-master\settings.gradle] :sphinx4-data:compileJava UP-TO-DATE :sphinx4-data:processResources UP-TO-DATE :sphinx4-data:classes UP-TO-DATE :sphinx4-data:jar UP-TO-DATE :sphinx4-core:compileJava UP-TO-DATE :sphinx4-core:processResources UP-TO-DATE :sphinx4-core:classes UP-TO-DATE :sphinx4-core:jar UP-TO-DATE warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning :sphinx4-samples:compileJava :sphinx4-samples:processResources UP-TO-DATE :sphinx4-samples:classes :sphinx4-samples:run Loading models... Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 9984, Size: 9984 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at edu.cmu.sphinx.linguist.acoustic.tiedstate.Pool.get(Pool.java:55) at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.createSenonePool(Sphinx3Loader.java:428) at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFiles(Sphinx3Loader.java:313) at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.load(Sphinx3Loader.java:252) at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(AutoCepstrum.java:118) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:163) at edu.cmu.sphinx.util.props.PropertySheet.getComponentList(PropertySheet.java:432) at edu.cmu.sphinx.frontend.FrontEnd.newProperties(FrontEnd.java:160) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296) at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.newProperties(SimpleAcousticScorer.java:47) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296) at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.newProperties(WordPruningBreadthFirstSearchManager.java:213) at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchManager.newProperties(WordPruningBreadthFirstLookaheadSearchManager.java:156) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296) at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:81) at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:36) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296) at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:86) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518) at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:163) at edu.cmu.sphinx.api.Context.<init>(Context.java:73) at edu.cmu.sphinx.api.Context.<init>(Context.java:45) at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechRecognizer.java:44) at edu.cmu.sphinx.api.StreamSpeechRecognizer.<init>(StreamSpeechRecognizer.java:35) at edu.cmu.sphinx.demo.transcriber.TranscriberDemo.main(TranscriberDemo.java:46) :sphinx4-samples:run FAILED
I just download the acoustic files from this link: https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Spanish/
Basically I have this files:
"sphinx4-data\src\main\resources\edu\cmu\sphinx\models\es\" es.dict es.lm.bin
"sphinx4-data\src\main\resources\edu\cmu\sphinx\models\es\es\" feat.params feature_transform mdef means mixture_weights noisedict sendump transition_matrices variances
And I change the code from TranscriberDemo like this:
System.out.println("Loading models..."); Configuration configuration = new Configuration(); // Load model from the jar configuration .setAcousticModelPath("resource:/edu/cmu/sphinx/models/es/es"); // You can also load model from folder //configuration.setAcousticModelPath("file:es"); configuration .setDictionaryPath("resource:/edu/cmu/sphinx/models/es/es.dict"); configuration .setLanguageModelPath("resource:/edu/cmu/sphinx/models/es/es.lm.bin"); StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer( configuration);
Any idea to fix this?
Thanks in advance, Javenosa
I have updated the Spanish model just now, download it again from sourceforge and try. md5sum should be
efea3e4b09c228497827c9541a828f87 cmusphinx-es-5.2.tar.gz
First of all, thanks for your time. Now works with the first recognition (Simple recognition with generic model).
But when I run the "Live adaptation to speaker with speaker profiles" I got this exception:
Executing: gradle :sphinx4-samples:run Arguments: [-PmainClass=edu.cmu.sphinx.demo.transcriber.TranscriberDemo, -c, G:\Prog\Java\sphinx4-master\settings.gradle] :sphinx4-data:compileJava UP-TO-DATE :sphinx4-data:processResources UP-TO-DATE :sphinx4-data:classes UP-TO-DATE :sphinx4-data:jar UP-TO-DATE :sphinx4-core:compileJava UP-TO-DATE :sphinx4-core:processResources UP-TO-DATE :sphinx4-core:classes UP-TO-DATE :sphinx4-core:jar UP-TO-DATE warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning :sphinx4-samples:compileJava :sphinx4-samples:processResources UP-TO-DATE :sphinx4-samples:classes :sphinx4-samples:run Loading models... 21:11:23.477 INFO unitManager CI Unit: a 21:11:23.478 INFO unitManager CI Unit: b 21:11:23.479 INFO unitManager CI Unit: ch 21:11:23.479 INFO unitManager CI Unit: d 21:11:23.479 INFO unitManager CI Unit: e 21:11:23.479 INFO unitManager CI Unit: f 21:11:23.479 INFO unitManager CI Unit: g 21:11:23.479 INFO unitManager CI Unit: gn 21:11:23.480 INFO unitManager CI Unit: i 21:11:23.480 INFO unitManager CI Unit: j 21:11:23.480 INFO unitManager CI Unit: k 21:11:23.480 INFO unitManager CI Unit: l 21:11:23.480 INFO unitManager CI Unit: ll 21:11:23.480 INFO unitManager CI Unit: m 21:11:23.480 INFO unitManager CI Unit: n 21:11:23.481 INFO unitManager CI Unit: o 21:11:23.481 INFO unitManager CI Unit: p 21:11:23.481 INFO unitManager CI Unit: r 21:11:23.481 INFO unitManager CI Unit: rr 21:11:23.481 INFO unitManager CI Unit: s 21:11:23.481 INFO unitManager CI Unit: t 21:11:23.482 INFO unitManager CI Unit: u 21:11:23.482 INFO unitManager CI Unit: x 21:11:23.482 INFO unitManager CI Unit: y 21:11:23.482 INFO unitManager CI Unit: z 21:11:23.641 INFO autoCepstrum Cepstrum component auto-configured as follows: autoCepstrum {MelFrequencyFilterBank, Denoise, DiscreteCosineTransform2, Lifter} 21:11:23.659 INFO dictionary Loading dictionary from: jar:file:/G:/Prog/Java/sphinx4-master/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar!/edu/cmu/sphinx/models/es/es.dict 21:11:23.688 INFO dictionary Loading filler dictionary from: jar:file:/G:/Prog/Java/sphinx4-master/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar!/edu/cmu/sphinx/models/es/es/noisedict 21:11:23.689 INFO acousticModelLoader Loading tied-state acoustic model from: jar:file:/G:/Prog/Java/sphinx4-master/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar!/edu/cmu/sphinx/models/es/es 21:11:23.690 INFO acousticModelLoader Pool means Entries: 9984 21:11:23.690 INFO acousticModelLoader Pool variances Entries: 9984 21:11:23.692 INFO acousticModelLoader Pool transition_matrices Entries: 26 21:11:23.692 INFO acousticModelLoader Pool senones Entries: 4078 21:11:23.693 INFO acousticModelLoader Gaussian weights: mixture_weights. Entries: 12234 21:11:23.693 INFO acousticModelLoader Pool senones Entries: 4078 21:11:23.693 INFO acousticModelLoader Context Independent Unit Entries: 26 21:11:23.694 INFO acousticModelLoader HMM Manager: 26506 hmms 21:11:23.695 INFO acousticModel CompositeSenoneSequences: 0 21:11:29.553 INFO lexTreeLinguist Max CI Units 27 21:11:29.553 INFO lexTreeLinguist Unit table size 19683 21:11:29.558 INFO speedTracker # ----------------------------- Timers---------------------------------------- 21:11:29.558 INFO speedTracker # Name Count CurTime MinTime MaxTime AvgTime TotTime 21:11:29.560 INFO speedTracker Compile 1 0,2380s 0,2380s 0,2380s 0,2380s 0,2380s 21:11:29.561 INFO speedTracker Load AM 1 0,6390s 0,6390s 0,6390s 0,6390s 0,6390s 21:11:29.561 INFO speedTracker Load Dictionary 1 0,0300s 0,0300s 0,0300s 0,0300s 0,0300s 21:11:35.995 INFO speedTracker This Time Audio: 1,85s Proc: 6,39s Speed: 3,45 X real time 21:11:35.995 INFO speedTracker Total Time Audio: 1,85s Proc: 6,39s 3,45 X real time 21:11:35.995 INFO memoryTracker Mem Total: 925,00 Mb Free: 479,43 Mb 21:11:35.996 INFO memoryTracker Used: This: 445,57 Mb Avg: 445,57 Mb Max: 445,57 Mb Hypothesis: eh List of recognized words and their times: {<sil>, 1.000, [820:1070]} {eh, 1.000, [1080:1210]} Best 3 hypothesis: <s> eh eh </s> <s> eh </s> 21:11:36.020 INFO liveCMN 40.90 6.82 8.28 -6.56 -2.09 -3.37 -4.91 1.43 -6.18 0.45 -3.98 -4.05 1.06 21:11:36.339 INFO liveCMN 40.63 6.73 8.21 -6.66 -2.18 -3.25 -4.83 1.40 -6.14 0.47 -3.98 -4.02 1.11 21:11:36.688 INFO speedTracker This Time Audio: 1,00s Proc: 0,67s Speed: 0,67 X real time 21:11:36.689 INFO speedTracker Total Time Audio: 2,85s Proc: 7,05s 2,47 X real time 21:11:36.689 INFO memoryTracker Mem Total: 923,00 Mb Free: 437,14 Mb 21:11:36.689 INFO memoryTracker Used: This: 485,86 Mb Avg: 465,72 Mb Max: 485,86 Mb Hypothesis: qu List of recognized words and their times: {<sil>, 0.998, [2830:4150]} {qu, 0.999, [4160:4670]} Best 3 hypothesis: <s> qu </s> <s> qu qu </s> <s> a qu </s> 21:11:37.027 INFO liveCMN 41.43 7.22 5.82 -5.14 -2.83 -2.71 -4.42 0.93 -6.28 2.10 -3.05 -3.25 0.49 21:11:37.558 INFO wordPruningLookahea Average Tokens/State: 3292 21:11:37.707 INFO liveCMN 41.70 5.03 4.72 -2.66 -2.95 -3.78 -2.93 -0.25 -4.89 1.32 -3.39 -1.65 0.20 21:11:38.089 INFO speedTracker This Time Audio: 1,75s Proc: 1,39s Speed: 0,80 X real time 21:11:38.090 INFO speedTracker Total Time Audio: 4,60s Proc: 8,44s 1,84 X real time 21:11:38.090 INFO memoryTracker Mem Total: 751,50 Mb Free: 227,67 Mb 21:11:38.090 INFO memoryTracker Used: This: 523,83 Mb Avg: 485,09 Mb Max: 523,83 Mb Hypothesis: la casa List of recognized words and their times: {<sil>, 1.000, [5030:5030]} {la, 1.000, [6240:6390]} {<sil>, 1.000, [6400:7300]} {casa, 1.000, [7310:8150]} Best 3 hypothesis: <s> la casa </s> 21:11:38.104 INFO speedTracker # ----------------------------- Timers---------------------------------------- 21:11:38.105 INFO speedTracker # Name Count CurTime MinTime MaxTime AvgTime TotTime 21:11:38.105 INFO speedTracker Score 1042 0,0000s 0,0000s 0,0430s 0,0009s 0,9480s 21:11:38.106 INFO speedTracker Prune 3639 0,0000s 0,0000s 0,0020s 0,0000s 0,0700s 21:11:38.106 INFO speedTracker Grow 3647 0,0000s 0,0000s 4,0000s 0,0020s 7,2860s 21:11:38.107 INFO speedTracker Frontend 526 0,0000s 0,0000s 0,0420s 0,0002s 0,0820s 21:11:38.107 INFO speedTracker Compile 1 0,2380s 0,2380s 0,2380s 0,2380s 0,2380s 21:11:38.107 INFO speedTracker Load AM 1 0,6390s 0,6390s 0,6390s 0,6390s 0,6390s 21:11:38.107 INFO speedTracker Load Dictionary 1 0,0300s 0,0300s 0,0300s 0,0300s 0,0300s 21:11:38.108 INFO speedTracker Total Time Audio: 4,60s Proc: 8,44s 1,84 X real time 21:11:38.108 INFO memoryTracker Mem Total: 751,50 Mb Free: 227,49 Mb 21:11:38.109 INFO memoryTracker Used: This: 524,01 Mb Avg: 494,82 Mb Max: 524,01 Mb 21:11:38.148 INFO dictionary Loading dictionary from: jar:file:/G:/Prog/Java/sphinx4-master/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar!/edu/cmu/sphinx/models/es/es.dict 21:11:38.161 INFO dictionary Loading filler dictionary from: jar:file:/G:/Prog/Java/sphinx4-master/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar!/edu/cmu/sphinx/models/es/es/noisedict 21:11:46.925 INFO lexTreeLinguist Max CI Units 27 21:11:46.925 INFO lexTreeLinguist Unit table size 19683 21:11:46.926 INFO speedTracker # ----------------------------- Timers---------------------------------------- 21:11:46.926 INFO speedTracker # Name Count CurTime MinTime MaxTime AvgTime TotTime 21:11:46.926 INFO speedTracker Score 1042 0,0000s 0,0000s 0,0430s 0,0009s 0,9480s 21:11:46.926 INFO speedTracker Prune 3639 0,0000s 0,0000s 0,0020s 0,0000s 0,0700s 21:11:46.927 INFO speedTracker Grow 3647 0,0000s 0,0000s 4,0000s 0,0020s 7,2860s 21:11:46.927 INFO speedTracker Frontend 526 0,0000s 0,0000s 0,0420s 0,0002s 0,0820s 21:11:46.927 INFO speedTracker Compile 2 0,1570s 0,1570s 0,2380s 0,1975s 0,3950s 21:11:46.927 INFO speedTracker Load AM 1 0,6390s 0,6390s 0,6390s 0,6390s 0,6390s 21:11:46.928 INFO speedTracker Load Dictionary 2 0,0140s 0,0140s 0,0300s 0,0220s 0,0440s 21:11:47.497 INFO liveCMN 40.41 2.38 5.08 0.00 -1.11 -2.18 -3.26 -0.29 -5.69 0.16 -3.80 -1.43 -1.13 21:11:48.200 INFO liveCMN 41.09 2.76 5.25 -1.10 0.56 -3.10 -4.03 0.23 -5.70 0.63 -4.01 -2.42 -0.09 21:11:48.602 INFO speedTracker This Time Audio: 1,85s Proc: 1,67s Speed: 0,90 X real time 21:11:48.602 INFO speedTracker Total Time Audio: 6,45s Proc: 10,12s 1,57 X real time 21:11:48.602 INFO memoryTracker Mem Total: 1160,50 Mb Free: 557,05 Mb 21:11:48.602 INFO memoryTracker Used: This: 603,45 Mb Avg: 516,54 Mb Max: 603,45 Mb Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 29 at edu.cmu.sphinx.decoder.adaptation.Stats.collect(Stats.java:173) at edu.cmu.sphinx.demo.transcriber.TranscriberDemo.main(TranscriberDemo.java:81) :sphinx4-samples:run FAILED
I just updated the new model, nothing more changed.
Nickolay V. Shmyrev, any idea on this issue?
There is no any change on the code, just the new model provided on sourceforge.
It works for me fine here. Maybe you somehow changed something trying to fix earlier problem. Please try from a clean checkout.
Log in to post a comment.
Hello,
I recently download the code of sphinx from GitHub (yesterday), if I run the TranscriberDemo with the english acoustic model it works ok.
But when I test with the spanish model I got this exception:
I just download the acoustic files from this link:
https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Spanish/
Basically I have this files:
"sphinx4-data\src\main\resources\edu\cmu\sphinx\models\es\"
es.dict
es.lm.bin
"sphinx4-data\src\main\resources\edu\cmu\sphinx\models\es\es\"
feat.params
feature_transform
mdef
means
mixture_weights
noisedict
sendump
transition_matrices
variances
And I change the code from TranscriberDemo like this:
Any idea to fix this?
Thanks in advance,
Javenosa
I have updated the Spanish model just now, download it again from sourceforge and try. md5sum should be
efea3e4b09c228497827c9541a828f87 cmusphinx-es-5.2.tar.gzFirst of all, thanks for your time.
Now works with the first recognition (Simple recognition with generic model).
But when I run the "Live adaptation to speaker with speaker profiles" I got this exception:
I just updated the new model, nothing more changed.
Nickolay V. Shmyrev, any idea on this issue?
There is no any change on the code, just the new model provided on sourceforge.
It works for me fine here. Maybe you somehow changed something trying to fix earlier problem. Please try from a clean checkout.