Upload ParsiGoo.py with huggingface_hub
Browse files- ParsiGoo.py +4 -3
ParsiGoo.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import os
|
2 |
import datasets
|
3 |
logger = datasets.logging.get_logger(__name__)
|
4 |
-
|
5 |
|
6 |
_speaker_names = [
|
7 |
'ariana_Male2',
|
@@ -40,8 +40,8 @@ class ParsiGoo(datasets.GeneratorBasedBuilder):
|
|
40 |
speaker_names = _speaker_names
|
41 |
root_path = ""
|
42 |
for speaker_name in speaker_names:
|
43 |
-
if not os.path.isdir(os.path.join(data_dir, speaker_name)):
|
44 |
-
continue
|
45 |
root_path = os.path.join(data_dir, speaker_name)
|
46 |
meta_files.append(os.path.join(root_path, "metadata.csv"))
|
47 |
|
@@ -55,6 +55,7 @@ class ParsiGoo(datasets.GeneratorBasedBuilder):
|
|
55 |
)]
|
56 |
|
57 |
def _generate_examples(self, txt_files, speaker_names, root_path):
|
|
|
58 |
id=-1
|
59 |
for ind,txt_file in enumerate(txt_files):
|
60 |
with open(txt_file, "r", encoding="utf-8") as ttf:
|
|
|
1 |
import os
|
2 |
import datasets
|
3 |
logger = datasets.logging.get_logger(__name__)
|
4 |
+
datasets.logging.set_verbosity(20)
|
5 |
|
6 |
_speaker_names = [
|
7 |
'ariana_Male2',
|
|
|
40 |
speaker_names = _speaker_names
|
41 |
root_path = ""
|
42 |
for speaker_name in speaker_names:
|
43 |
+
# if not os.path.isdir(os.path.join(data_dir, speaker_name)):
|
44 |
+
# continue
|
45 |
root_path = os.path.join(data_dir, speaker_name)
|
46 |
meta_files.append(os.path.join(root_path, "metadata.csv"))
|
47 |
|
|
|
55 |
)]
|
56 |
|
57 |
def _generate_examples(self, txt_files, speaker_names, root_path):
|
58 |
+
print(txt_files)
|
59 |
id=-1
|
60 |
for ind,txt_file in enumerate(txt_files):
|
61 |
with open(txt_file, "r", encoding="utf-8") as ttf:
|