Commit ·
bc83051
1
Parent(s): 41b1b57
fix
Browse files147 unmodified lines148149150151152153154155156157158159160161147 unmodified linesdef _generate_examples(self, filepath):key = 0with open(filepath) as f:data_df = pd.read_csv(f,sep=',')transcripts = []for index,row in data_df.iterrows():samplerate, audio_data = wavfile.read(row["path"])yield key, {"sentence": row["sentence"],"path": row["path"],"audio":{"path": row["path"], "bytes": audio_data}}key+=1147 unmodified lines148149150151152153154155156157158159160161162147 unmodified linesdef _generate_examples(self, filepath):key = 0cwd = os.getcwd()+'/'with open(filepath) as f:data_df = pd.read_csv(f,sep=',')transcripts = []for index,row in data_df.iterrows():samplerate, audio_data = wavfile.read(cwd+row["path"])yield key, {"sentence": row["sentence"],"path": row["path"],"audio":{"path": cwd+row["path"], "bytes": audio_data}}key+=1
sample.py+3-2