Closed huyvl closed 4 years ago
Hi, the script does not work in Windows.
So how to modify the code to make it run in windows?
So how to modify the code to make it run in windows?
I have modified the code to make it work in windows. The code show as below: `import os path=r'F:\voxceleb_trainer-master\data\voxceleb2'
filter=[".m4a"] #Set the filtered file type. Of course, you can set multiple types
def all_path(dirname):
result = []#All files
for maindir, subdir, file_name_list in os.walk(dirname):
for filename in file_name_list:
apath = os.path.join(maindir, filename)#Merge into one full path
ext = os.path.splitext(apath)[1] # Get the file suffix [0] Get the content other than the file name
if ext in filter:
result.append(apath)
return result
filenames=all_path(path)
for filename in filenames: filename=str(filename) temp=filename.split('.')
#Command to convert .m4a format to wav format
# cmd_command = "ffmpeg -i {0} -acodec pcm_s16le -ac 1 -ar 16000 -y {1}.wav && del {0}".format(filename,temp[0])
cmd_command = "ffmpeg -i {0} -vn -acodec pcm_s16le -ac 1 -ar 16000 -y {1}.wav && del {0}".format(filename, temp[0])
#print(cmd_command)
os.system(cmd_command)`
Hello, I'm having problems when using dataprep.py to convert aac files, I using this script
D:\VGGvox\VGGvoxtrainer\voxceleb_trainer>python ./dataprep.py --save_path ./voxceleb --convert
and this error show upI have been trying to figure this for days Thanks you very much