如何为声学模型适配配置bw参数?参数解析错误求助
Fixing the
bw Command Error for Continuous Acoustic Model Training Let's work through your issue step by step to get your Baum-Welch (bw) command running correctly for your continuous speech acoustic model.
First, Diagnose the Root Cause
The error you're seeing:
ERROR: "cmd_ln.c", line 607: Unknown argument name 'feature_transform'
stems from two critical mistakes in your command:
- Misused
-accumdirparameter: This flag requires a valid directory path to store training statistics, but you wrote-accumdir -lda feature_transform— this tellsbwto treat-ldaas the directory name, makingfeature_transforman unrecognized extra argument. - Unsupported
-ldaflag: Thebwtool doesn't handle LDA feature transformation. This step belongs to feature extraction (via thefeatcommand) or later model adaptation workflows, not during the Baum-Welch training iteration.
Corrected bw Command for Your Setup
Based on your feat.params content and the continuous model you're using, here's the adjusted command that should work:
./bw \ -hmmdir en-us \ -moddeffn en-us/mdef.txt \ -ts2cbfn .cont. \ -feat 1s_c_d_dd \ -svspec 0-12/13-25/26-38 \ -cmn current \ -agc none \ -dictfn cmudict-en-us.dict \ -ctlfn robot_train.fileids \ -lsnfn robot_train.transcription \ -accumdir ./accum_stats
Key Details About This Command:
-accumdir ./accum_stats: First runmkdir accum_statsin your terminal to create this directory — it’s wherebwwill save accumulated training statistics. Using a valid, dedicated path fixes the parameter parsing error.- Aligned feature parameters: We kept
-featand-svspecmatching yourfeat.paramsfile to ensure feature dimensions align with your model’s requirements. - Removed unsupported flags: The
-lda feature_transformpart is omitted becausebwdoesn’t handle LDA transformations. If you need to apply LDA, configure it in your feature extraction pipeline (updatefeat.paramsor usefeatwith LDA flags) before runningbw.
Additional Tips
- Double-check that your input files (
robot_train.fileids,robot_train.transcription) are correctly formatted and stored in the right directory — mismatched paths or invalid content can cause silent failures or unexpected errors. - If you’re unsure about any
bwparameters, run./bw -helpto view the full list of supported arguments and their descriptions.
内容的提问来源于stack exchange,提问作者lovecode
相关产品推荐
相关产品推荐

