mirror of https://github.com/coqui-ai/TTS.git
remove moved function
This commit is contained in:
parent
10c988ac8c
commit
f9f3d04d14
|
@ -1,12 +1,10 @@
|
||||||
import datetime
|
import datetime
|
||||||
import glob
|
import glob
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
|
|
||||||
def get_git_branch():
|
def get_git_branch():
|
||||||
|
@ -165,20 +163,3 @@ def check_argument(
|
||||||
assert (
|
assert (
|
||||||
isinstance(c[name], val_type) or c[name] is None
|
isinstance(c[name], val_type) or c[name] is None
|
||||||
), f" [!] {name} has wrong type - {type(c[name])} vs {val_type}"
|
), 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, ...}
|
|
||||||
|
|
Loading…
Reference in New Issue