Refactor folder structure

This commit is contained in:
babysor00
2021-09-12 17:33:39 +08:00
parent 78fcfc4651
commit 32b9755cbe
15 changed files with 17 additions and 27 deletions

View File

@@ -1,8 +1,8 @@
from toolbox.ui import UI
from encoder import inference as encoder
from synthesizer.inference import Synthesizer
from vocoder import inference as rnn_vocoder
from hifigan import inference as gan_vocoder
from vocoder.wavernn import inference as rnn_vocoder
from vocoder.hifigan import inference as gan_vocoder
from pathlib import Path
from time import perf_counter as timer
from toolbox.utterance import Utterance
@@ -50,13 +50,6 @@ MAX_WAVES = 15
class Toolbox:
def __init__(self, datasets_root, enc_models_dir, syn_models_dir, voc_models_dir, seed, no_mp3_support):
if not no_mp3_support:
try:
librosa.load("samples/6829_00000.mp3")
except NoBackendError:
print("Librosa will be unable to open mp3 files if additional software is not installed.\n"
"Please install ffmpeg or add the '--no_mp3_support' option to proceed without support for mp3 files.")
exit(-1)
self.no_mp3_support = no_mp3_support
sys.excepthook = self.excepthook
self.datasets_root = datasets_root