mirror of
https://github.com/wassname/TTS.git
synced 2026-09-11 12:00:24 +08:00
root path speaker matching
added data root path in speaker matching for mailabs, this way you don't need to start at the very bottom of the folder hierarchy if you want to explicitly define metafiles.
This commit is contained in:
@@ -82,14 +82,14 @@ def mailabs(root_path, meta_files=None):
|
||||
# meta_files = [f.strip() for f in meta_files.split(",")]
|
||||
items = []
|
||||
for idx, csv_file in enumerate(csv_files):
|
||||
txt_file = os.path.join(root_path, csv_file)
|
||||
# determine speaker based on folder structure...
|
||||
speaker_name_match = speaker_regex.search(csv_file)
|
||||
speaker_name_match = speaker_regex.search(txt_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)
|
||||
with open(txt_file, 'r') as ttf:
|
||||
for line in ttf:
|
||||
cols = line.split('|')
|
||||
|
||||
Reference in New Issue
Block a user