prepare_data.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:tfkaldi 作者: vrenkens 项目源码 文件源码
def shuffle_examples(featdir):
    '''
    shuffle the utterances and put them in feats_shuffled.scp

    Args:
        featdir: the directory containing the features in feats.scp
    '''

    #read feats.scp
    featsfile = open(featdir + '/feats.scp', 'r')
    feats = featsfile.readlines()

    #shuffle feats randomly
    shuffle(feats)

    #wite them to feats_shuffled.scp
    feats_shuffledfile = open(featdir + '/feats_shuffled.scp', 'w')
    feats_shuffledfile.writelines(feats)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号