anjalyjayakrishnan
commited on
Commit
•
bc83051
1
Parent(s):
41b1b57
fix
Browse files
sample.py
CHANGED
@@ -148,14 +148,15 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
148 |
|
149 |
def _generate_examples(self, filepath):
|
150 |
key = 0
|
|
|
151 |
with open(filepath) as f:
|
152 |
data_df = pd.read_csv(f,sep=',')
|
153 |
transcripts = []
|
154 |
for index,row in data_df.iterrows():
|
155 |
-
samplerate, audio_data = wavfile.read(row["path"])
|
156 |
yield key, {
|
157 |
"sentence": row["sentence"],
|
158 |
"path": row["path"],
|
159 |
-
"audio":{"path": row["path"], "bytes": audio_data}
|
160 |
}
|
161 |
key+=1
|
|
|
148 |
|
149 |
def _generate_examples(self, filepath):
|
150 |
key = 0
|
151 |
+
cwd = os.getcwd()+'/'
|
152 |
with open(filepath) as f:
|
153 |
data_df = pd.read_csv(f,sep=',')
|
154 |
transcripts = []
|
155 |
for index,row in data_df.iterrows():
|
156 |
+
samplerate, audio_data = wavfile.read(cwd+row["path"])
|
157 |
yield key, {
|
158 |
"sentence": row["sentence"],
|
159 |
"path": row["path"],
|
160 |
+
"audio":{"path": cwd+row["path"], "bytes": audio_data}
|
161 |
}
|
162 |
key+=1
|