mirror of https://github.com/coqui-ai/TTS.git
refactor: remove duplicate to_camel
This commit is contained in:
parent
7330ad8854
commit
170d3dae92
|
@ -6,11 +6,6 @@ from typing import Dict, List, Union
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def to_camel(text):
|
||||
text = text.capitalize()
|
||||
return re.sub(r"(?!^)_([a-zA-Z])", lambda m: m.group(1).upper(), text)
|
||||
|
||||
|
||||
def setup_model(config: "Coqpit", samples: Union[List[List], List[Dict]] = None) -> "BaseVC":
|
||||
logger.info("Using model: %s", config.model)
|
||||
# fetch the right model implementation.
|
||||
|
|
|
@ -4,14 +4,11 @@ import re
|
|||
|
||||
from coqpit import Coqpit
|
||||
|
||||
from TTS.utils.generic_utils import to_camel
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def to_camel(text):
|
||||
text = text.capitalize()
|
||||
return re.sub(r"(?!^)_([a-zA-Z])", lambda m: m.group(1).upper(), text)
|
||||
|
||||
|
||||
def setup_model(config: Coqpit):
|
||||
"""Load models directly from configuration."""
|
||||
if "discriminator_model" in config and "generator_model" in config:
|
||||
|
|
Loading…
Reference in New Issue