赞
踩
为了更为方便观察Kaldi整个训练过程,需要将Kaldi写的Python3库附加到Python3的系统库中,方便定为和调试。
该目录下的python文件均是kaldi训练chain和nnet3训练模型的主程序,通过这些python程序,带上合适参数,去调用shell的命令行(说是python,其实里面还是调用shell命令行去训练的)
重点分析一下common.py里面的最常用的几个函数:
【execute_command】前台运行一个shell命令行,若返回不是0,则报错
def execute_command(command):
""" Runs a kaldi job in the foreground and waits for it to complete; raises an
exception if its return status is nonzero. The command is executed in
'shell' mode so 'command' can involve things like pipes. Often,
'command' will start with 'run.pl' or 'queue.pl'. The st
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。