Skip to content

Commit

Permalink
refactor: remove duplicate to_camel
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Nov 24, 2024
1 parent c931545 commit dfbf88f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions TTS/vc/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
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.
Expand Down
7 changes: 2 additions & 5 deletions TTS/vocoder/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

from coqpit import Coqpit

logger = logging.getLogger(__name__)

from TTS.utils.generic_utils import to_camel

def to_camel(text):
text = text.capitalize()
return re.sub(r"(?!^)_([a-zA-Z])", lambda m: m.group(1).upper(), text)
logger = logging.getLogger(__name__)


def setup_model(config: Coqpit):
Expand Down

0 comments on commit dfbf88f

Please sign in to comment.