mirror of https://github.com/coqui-ai/TTS.git
Fix back/forward slash in file path in mailabs formatter (#1938)
* mailabs formatter: back/forward slash in file path fix * formatters.mailabs() path rework for Windows os * new formatter added "mailabs_win" * lint test fix commit * mailabs_win: removed, mailabs: "/" replaced with os.sep for windows compatibility * Black small style fix
This commit is contained in:
parent
5307a2229b
commit
fcbfca869f
|
@ -106,9 +106,9 @@ def mailabs(root_path, meta_files=None, ignored_speakers=None):
|
|||
meta_files (str): list of meta files to be used in the training. If None, finds all the csv files
|
||||
recursively. Defaults to None
|
||||
"""
|
||||
speaker_regex = re.compile("by_book/(male|female)/(?P<speaker_name>[^/]+)/")
|
||||
speaker_regex = re.compile(f"by_book{os.sep}(male|female){os.sep}(?P<speaker_name>[^{os.sep}]+){os.sep}")
|
||||
if not meta_files:
|
||||
csv_files = glob(root_path + "/**/metadata.csv", recursive=True)
|
||||
csv_files = glob(root_path + f"{os.sep}**{os.sep}metadata.csv", recursive=True)
|
||||
else:
|
||||
csv_files = meta_files
|
||||
|
||||
|
|
Loading…
Reference in New Issue