)
return float(output)
file_paths.sort(key=func)
with io.FileIO(manifest_path, "w") as file:
for wav_path in file_paths:
transcript_path = wav_path.replace("/wav/", "/txt/").replace(".wav", ".txt")
sample = os.path.abspath(wav_path) + "," + os.path.abspath(transcript_path) + "\n"
After Change
file_paths = []
wav_files = [os.path.join(dirpath, f)
for dirpath, dirnames, files in os.walk(data_path)
for f in fnmatch.filter(files, "*.wav")]
size = len(wav_files)
counter = 0
for file_path in wav_files:
file_paths.append(file_path.strip())
counter += 1