downsample.py 文件源码

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

项目:recipe_zs2017_track2 作者: kamperh 项目源码 文件源码
def check_argv():
    """Check the command line arguments."""
    parser = argparse.ArgumentParser(description=__doc__.strip().split("\n")[0], add_help=False)
    parser.add_argument("input_npz_fn", type=str, help="input speech file")
    parser.add_argument("output_npz_fn", type=str, help="output embeddings file")
    parser.add_argument("n", type=int, help="number of samples")
    parser.add_argument("--technique", choices=["interpolate", "resample", "rasanen"], default="resample")
    parser.add_argument(
        "--frame_dims", type=int, default=None,
        help="only keep these number of dimensions"
        )
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)
    return parser.parse_args()


#-----------------------------------------------------------------------------#
#                                MAIN FUNCTION                                #
#-----------------------------------------------------------------------------#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号