使用ffmpeg对wav文件进行降采样
Feb. 26, 2020, 5:14 p.m.
read: 1889
依赖pysoundfile,ffmpeg把采样率大于16k的wav文件降采样为16k速度比使用librosa快很多,适合批量处理的情况不适合在Windows环境下运行更快读取sr的优化可以参考这个文章/articles/100.html import os, soundfile as sf, shutil root_dir = '/home/zhangpeng/mydisk' data_names = ['ffsvc2020/dev', 'ffsvc2020/train', 'nihaomiya_all/train', 'nihaomiya_all/dev'] def get_paths(w…