From 8b3ba02c953cf66b4263330b2f96f89b9d7fa299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Sun, 20 Feb 2022 11:56:02 +0100 Subject: [PATCH] Add vocab_dict to model config --- TTS/tts/configs/shared_configs.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/TTS/tts/configs/shared_configs.py b/TTS/tts/configs/shared_configs.py index 96cf0427..f43c6464 100644 --- a/TTS/tts/configs/shared_configs.py +++ b/TTS/tts/configs/shared_configs.py @@ -1,5 +1,5 @@ from dataclasses import asdict, dataclass, field -from typing import List +from typing import Dict, List from coqpit import Coqpit, check_argument @@ -50,13 +50,16 @@ class GSTConfig(Coqpit): @dataclass class CharactersConfig(Coqpit): - """Defines arguments for the `BaseCharacters` and its subclasses. + """Defines arguments for the `BaseCharacters` or `BaseVocabulary` and their subclasses. Args: characters_class (str): Defines the class of the characters used. If None, we pick ```Phonemes``` or ```Graphemes``` based on the configuration. Defaults to None. + vocab_dict (dict): + Defines the vocabulary dictionary used to encode the characters. Defaults to None. + pad (str): characters in place of empty padding. Defaults to None. @@ -89,6 +92,11 @@ class CharactersConfig(Coqpit): """ characters_class: str = None + + # using BaseVocabulary + vocab_dict: Dict = None + + # using on BaseCharacters pad: str = None eos: str = None bos: str = None