From f9f3d04d1439b66cafea67d7582d7063e331fcfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Thu, 22 Apr 2021 12:37:12 +0200 Subject: [PATCH] remove moved function --- TTS/utils/generic_utils.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/TTS/utils/generic_utils.py b/TTS/utils/generic_utils.py index 4de25300..57e22707 100644 --- a/TTS/utils/generic_utils.py +++ b/TTS/utils/generic_utils.py @@ -1,12 +1,10 @@ import datetime import glob -import json import os import shutil import subprocess import sys from pathlib import Path -from typing import Union def get_git_branch(): @@ -165,20 +163,3 @@ def check_argument( assert ( isinstance(c[name], val_type) or c[name] is None ), f" [!] {name} has wrong type - {type(c[name])} vs {val_type}" - - -def style_wav_uri_to_dict(style_wav: str) -> Union[str, dict]: - """Transform an uri style_wav, in either a string (path to wav file to be use for style transfer) - or a dict (gst tokens/values to be use for styling) - - Args: - style_wav (str): uri - - Returns: - Union[str, dict]: path to file (str) or gst style (dict) - """ - if os.path.isfile(style_wav) and style_wav.endswith(".wav"): - return style_wav # style_wav is a .wav file located on the server - - style_wav = json.loads(style_wav) - return style_wav # style_wav is a gst dictionary with {token1_id : token1_weigth, ...}