标签:
variancePool = loadDensityFile(dataLocation + "variances", varianceFloor); mixtureWeightsPool = loadMixtureWeights(dataLocation + "mixture_weights", mixtureWeightFloor); transitionsPool = loadTransitionMatrices(dataLocation + "transition_matrices"); transformMatrix = loadTransformMatrix(dataLocation + "feature_transform"); senonePool = createSenonePool(distFloor, varianceFloor);
================ wsg-0.xml模型格式: ------------------------------- senone:4147 numGausePerSenone:8 means:33176=4147*8 variances:33176 streams:1 ================= male_result(my)模型格式: ----------------------------------- senone:186 GaussianPerSenone:256 means:1024 varians:1024 streams:4
分析原因,是否针对sphinx4加载的模型,有些参数是固定的,比如streams的个数,以及Gauss个数
【解决】
修改sphinx-config训练参数文件中,将semi改为cont,应该注意到其后的备注,使用pocketsphinx时候,是用semi格式,用sphinx3时候有cont格式,则对应的stream是1,gause数目是8.以此,得到cont模型,加载到sphinx4环境中,编译,ok!运行顺利,使用自己的模型,然后用自己的声音测试,结果如下:
Start speaking. Press Ctrl-C to quit. resultList.size=1 bestFinalToken=0050 -6.8291255E06 0.0000000E00 -1.0008177E04 lt-WordNode </s>(*SIL ) p 0.0 -10008.177{[长城][</s>]} 50 </s> -10008.177 0.0 50 长城 68886.47 0.0 4 <sil> 0.0 0.0 0 <s> 0.0 0.0 0result=<s> <sil> 长城 </s> resultList.size=1 bestFinalToken=0050 -6.8291255E06 0.0000000E00 -1.0008177E04 lt-WordNode </s>(*SIL ) p 0.0 -10008.177{[长城][</s>]} 50 </s> -10008.177 0.0 50 长城 68886.47 0.0 4 <sil> 0.0 0.0 0 <s> 0.0 0.0 resultList.size=2 bestFinalToken=0077 -7.2286605E06 0.0000000E00 -1.0008177E04 lt-WordNode </s>(*SIL ) p 0.0 -10008.177{[长城][</s>]} 77 </s> -10008.177 0.0 59 长城 68886.47 0.0 4 <sil> 0.0 0.0 0 <s> 0.0 0.0 1result=<s> <sil> 长城 </s> resultList.size=2 bestFinalToken=0077 -7.2286605E06 0.0000000E00 -1.0008177E04 lt-WordNode </s>(*SIL ) p 0.0 -10008.177{[长城][</s>]} best token=0077 -7.2286605E06 0.0000000E00 -1.0008177E04 lt-WordNode </s>(*SIL ) p 0.0 -10008.177{[长城][</s>]} 77 </s> -10008.177 0.0 59 长城 68886.47 0.0 4 <sil> 0.0 0.0 0 <s> 0.0 0.0 You said: [长城] Start speaking. Press Ctrl-C to quit.
标签:
原文地址:http://www.cnblogs.com/lijieqiong/p/5066813.html