Set speaker name to the directory name containing speaker's data

This commit is contained in:
Jindrich Matousek 2022-07-10 15:24:17 +02:00
parent 3270dda162
commit 8e758ca8fe
1 changed files with 2 additions and 1 deletions

View File

@ -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