mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
add text parameters in config.json
This commit is contained in:
@@ -5,13 +5,16 @@ import torch as T
|
||||
|
||||
from TTS.server.synthesizer import Synthesizer
|
||||
from TTS.tests import get_tests_input_path, get_tests_output_path
|
||||
from TTS.utils.text.symbols import phonemes, symbols
|
||||
from TTS.utils.text.symbols import make_symbols, phonemes, symbols
|
||||
from TTS.utils.generic_utils import load_config, save_checkpoint, setup_model
|
||||
|
||||
|
||||
class DemoServerTest(unittest.TestCase):
|
||||
def _create_random_model(self):
|
||||
config = load_config(os.path.join(get_tests_output_path(), 'dummy_model_config.json'))
|
||||
if 'text' in config.keys():
|
||||
symbols, phonemes = make_symbols(**config.text)
|
||||
|
||||
num_chars = len(phonemes) if config.use_phonemes else len(symbols)
|
||||
model = setup_model(num_chars, 0, config)
|
||||
output_path = os.path.join(get_tests_output_path())
|
||||
|
||||
@@ -38,6 +38,7 @@ class TestTTSDataset(unittest.TestCase):
|
||||
c.text_cleaner,
|
||||
ap=self.ap,
|
||||
meta_data=items,
|
||||
tp=c.text if 'text' in c.keys() else None,
|
||||
batch_group_size=bgs,
|
||||
min_seq_len=c.min_seq_len,
|
||||
max_seq_len=float("inf"),
|
||||
|
||||
Reference in New Issue
Block a user