From 8e758ca8fec43404fb684d98771d14d18025ba9f Mon Sep 17 00:00:00 2001 From: Jindrich Matousek Date: Sun, 10 Jul 2022 15:24:17 +0200 Subject: [PATCH] Set speaker name to the directory name containing speaker's data --- TTS/tts/datasets/formatters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TTS/tts/datasets/formatters.py b/TTS/tts/datasets/formatters.py index a3c40522..4e120bc6 100644 --- a/TTS/tts/datasets/formatters.py +++ b/TTS/tts/datasets/formatters.py @@ -562,7 +562,8 @@ def artic(root_path, meta_file, **kwargs): # pylint: disable=unused-argument """Normalizes the ARTIC meta data file to TTS format""" txt_file = os.path.join(root_path, meta_file) items = [] - speaker_name = "artic" + # Speaker name is the name of the directory with the data (last part of `root_path`) + speaker_name = os.path.basename(os.path.normpath(root_path)) with open(txt_file, "r", encoding="utf-8") as ttf: for line in ttf: # Check the number of standard separators