import os
path = "wavs"
f = open("text","w")
for dir in sorted(os.listdir(path)):
for file in sorted(os.listdir(path+"/"+dir)):
if file[-1] == "t":
ff = open(path+"/"+dir+"/"+file,"r")
for line in ff.readlines():
line = line.replace("\n","")
f.write(file[:10]+" "+ line+"\n")