📄 dec_write_0.tcl.in
字号:
#! @TCL@ -f# file: dec_write_0.tcl## procedures to write the parameters into file## procedure to open and read file#proc write_proc {filename} { # declare globals # global function_mode global monophones_file global transitions_file global states_file global models_file global phones_file global lexicon_file global lm_file global transcription_file global tmp_outfile global tmp_outnbestfile global tmp_infile global tmp_latfile global lm_scale global align_mode global word_penalty global context_mode global st_beam global ph_beam global wd_beam global mapmi global history_paths global num_n_best global gram_size global mfcc_format set fileptr [open $filename w] # define function mode # puts $fileptr "function = $function_mode" puts $fileptr "monophones_file = $monophones_file" puts $fileptr "transitions_file = $transitions_file" puts $fileptr "states_file = $states_file" puts $fileptr "models_file = $models_file" puts $fileptr "phones_file = $phones_file" # define input format # puts "input_format = $mfcc_format" puts $fileptr "input_format = $mfcc_format" # define lexicon file" # puts $fileptr "lexicon_file = $lexicon_file" # define alignment mode # puts $fileptr "align_mode = $align_mode" puts $fileptr "lm_scale = $lm_scale" puts $fileptr "word_penalty = $word_penalty" # define context mode # puts $fileptr "context_mode = $context_mode" puts $fileptr "history_paths = $history_paths" puts $fileptr "nbest_paths = $num_n_best" # define pruning thresholds # puts $fileptr "beam_pruning = $st_beam $ph_beam $wd_beam" puts $fileptr "mapmi_limit = $mapmi" puts $fileptr "num_allowed_words = 50" # define input lattice list # if {$function_mode == "ngram_decoding"} { puts $fileptr "ngram_order = $gram_size" puts $fileptr "lm_file = $lm_file" puts stdout "ngram mode" } elseif {$function_mode == "forced_alignment"} { puts $fileptr "transcription_file = $transcription_file" } elseif {$function_mode == "lattice_verification"} { puts $fileptr "ngram_order = $gram_size" puts $fileptr "lm_file = $lm_file" puts stdout "ngram mode" puts $fileptr "input_lattice_list = $tmp_latfile" } else { puts $fileptr "input_lattice_list = $tmp_latfile" } # define input and output lists # puts $fileptr "mfcc_list = $tmp_infile" puts $fileptr "output_list = $tmp_outfile" puts $fileptr "output_nbest_list = $tmp_outnbestfile" flush $fileptr # close the file # close $fileptr}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -