mirror of https://github.com/coqui-ai/TTS.git
Not using mix folder for mailabs data
parent
0470dd49f2
commit
c613f8e664
|
@ -72,7 +72,7 @@ def mozilla(root_path, meta_file):
|
|||
|
||||
def mailabs(root_path, meta_files=None):
|
||||
"""Normalizes M-AI-Labs meta data files to TTS format"""
|
||||
speaker_regex = re.compile("by_book/(male|female|mix)/(?P<speaker_name>[^/]+)/")
|
||||
speaker_regex = re.compile("by_book/(male|female)/(?P<speaker_name>[^/]+)/")
|
||||
if meta_files is None:
|
||||
csv_files = glob(root_path+"/**/metadata.csv", recursive=True)
|
||||
folders = [os.path.dirname(f) for f in csv_files]
|
||||
|
@ -83,7 +83,10 @@ def mailabs(root_path, meta_files=None):
|
|||
items = []
|
||||
for idx, csv_file in enumerate(csv_files):
|
||||
# determine speaker based on folder structure...
|
||||
speaker_name = speaker_regex.search(csv_file).group("speaker_name")
|
||||
speaker_name_match = speaker_regex.search(csv_file)
|
||||
if speaker_name_match is None:
|
||||
continue
|
||||
speaker_name = speaker_name_match.group("speaker_name")
|
||||
print(" | > {}".format(csv_file))
|
||||
folder = folders[idx]
|
||||
txt_file = os.path.join(root_path, csv_file)
|
||||
|
|
Loading…
Reference in New Issue