Remove / prefix from the relative path (#2065)

This commit is contained in:
Eren Gölge
2022-10-10 13:32:27 +02:00
committed by GitHub
parent 843fa6f3fa
commit dae79b0acd
5 changed files with 27 additions and 29 deletions
+3 -1
View File
@@ -33,7 +33,9 @@ def get_tests_data_path():
def get_tests_output_path():
"""Returns the path to the directory for test outputs."""
return os.path.join(get_tests_path(), "outputs")
path = os.path.join(get_tests_path(), "outputs")
os.makedirs(path, exist_ok=True)
return path
def run_cli(command):
+10 -10
View File
@@ -1,5 +1,5 @@
{
"#/wavs/LJ001-0001": {
"#wavs/LJ001-0001": {
"name": "ljspeech-0",
"embedding": [
0.05539746582508087,
@@ -260,7 +260,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0002": {
"#wavs/LJ001-0002": {
"name": "ljspeech-1",
"embedding": [
0.05539746582508087,
@@ -521,7 +521,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0003": {
"#wavs/LJ001-0003": {
"name": "ljspeech-2",
"embedding": [
0.05539746582508087,
@@ -782,7 +782,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0004": {
"#wavs/LJ001-0004": {
"name": "ljspeech-3",
"embedding": [
0.05539746582508087,
@@ -1043,7 +1043,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0005": {
"#wavs/LJ001-0005": {
"name": "ljspeech-4",
"embedding": [
0.05539746582508087,
@@ -1304,7 +1304,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0006": {
"#wavs/LJ001-0006": {
"name": "ljspeech-5",
"embedding": [
0.05539746582508087,
@@ -1565,7 +1565,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0007": {
"#wavs/LJ001-0007": {
"name": "ljspeech-6",
"embedding": [
0.05539746582508087,
@@ -1826,7 +1826,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0008": {
"#wavs/LJ001-0008": {
"name": "ljspeech-7",
"embedding": [
0.05539746582508087,
@@ -2087,7 +2087,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0009": {
"#wavs/LJ001-0009": {
"name": "ljspeech-8",
"embedding": [
0.05539746582508087,
@@ -2348,7 +2348,7 @@
-0.09469571709632874
]
},
"#/wavs/LJ001-0010": {
"#wavs/LJ001-0010": {
"name": "ljspeech-9",
"embedding": [
0.05539746582508087,
+4 -4
View File
@@ -1,7 +1,7 @@
import os
import unittest
from tests import get_tests_output_path
from tests import get_tests_input_path
from TTS.config import load_config
from TTS.tts.models import setup_model
from TTS.utils.io import save_checkpoint
@@ -12,14 +12,14 @@ class SynthesizerTest(unittest.TestCase):
# pylint: disable=R0201
def _create_random_model(self):
# pylint: disable=global-statement
config = load_config(os.path.join(get_tests_output_path(), "dummy_model_config.json"))
config = load_config(os.path.join(get_tests_input_path(), "dummy_model_config.json"))
model = setup_model(config)
output_path = os.path.join(get_tests_output_path())
output_path = os.path.join(get_tests_input_path())
save_checkpoint(config, model, None, None, 10, 1, output_path)
def test_in_out(self):
self._create_random_model()
tts_root_path = get_tests_output_path()
tts_root_path = get_tests_input_path()
tts_checkpoint = os.path.join(tts_root_path, "checkpoint_10.pth")
tts_config = os.path.join(tts_root_path, "dummy_model_config.json")
synthesizer = Synthesizer(tts_checkpoint, tts_config, None, None)