mirror of https://github.com/coqui-ai/TTS.git
Add vocab_dict to model config
This commit is contained in:
parent
ff23dce081
commit
8b3ba02c95
|
@ -1,5 +1,5 @@
|
||||||
from dataclasses import asdict, dataclass, field
|
from dataclasses import asdict, dataclass, field
|
||||||
from typing import List
|
from typing import Dict, List
|
||||||
|
|
||||||
from coqpit import Coqpit, check_argument
|
from coqpit import Coqpit, check_argument
|
||||||
|
|
||||||
|
@ -50,13 +50,16 @@ class GSTConfig(Coqpit):
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class CharactersConfig(Coqpit):
|
class CharactersConfig(Coqpit):
|
||||||
"""Defines arguments for the `BaseCharacters` and its subclasses.
|
"""Defines arguments for the `BaseCharacters` or `BaseVocabulary` and their subclasses.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
characters_class (str):
|
characters_class (str):
|
||||||
Defines the class of the characters used. If None, we pick ```Phonemes``` or ```Graphemes``` based on
|
Defines the class of the characters used. If None, we pick ```Phonemes``` or ```Graphemes``` based on
|
||||||
the configuration. Defaults to None.
|
the configuration. Defaults to None.
|
||||||
|
|
||||||
|
vocab_dict (dict):
|
||||||
|
Defines the vocabulary dictionary used to encode the characters. Defaults to None.
|
||||||
|
|
||||||
pad (str):
|
pad (str):
|
||||||
characters in place of empty padding. Defaults to None.
|
characters in place of empty padding. Defaults to None.
|
||||||
|
|
||||||
|
@ -89,6 +92,11 @@ class CharactersConfig(Coqpit):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
characters_class: str = None
|
characters_class: str = None
|
||||||
|
|
||||||
|
# using BaseVocabulary
|
||||||
|
vocab_dict: Dict = None
|
||||||
|
|
||||||
|
# using on BaseCharacters
|
||||||
pad: str = None
|
pad: str = None
|
||||||
eos: str = None
|
eos: str = None
|
||||||
bos: str = None
|
bos: str = None
|
||||||
|
|
Loading…
Reference in New Issue