def test_in_out(self):
     self._create_random_model()
     config = load_config(
         os.path.join(get_tests_input_path(), 'server_config.json'))
     config['tts_path'] = get_tests_output_path()
     synthesizer = Synthesizer(config)
     synthesizer.tts("Better this test works!!")
Esempio n. 2
0
class Config:
    tts_checkpoint = MODEL_PATH
    tts_config = CONFIG_PATH
    use_cuda = False
    tts_speakers = None
    vocoder_checkpoint = VOCODER_MODEL_PATH
    vocoder_config = VOCODER_CONFIG_PATH
    wavernn_lib_path = None


synthesizer = Synthesizer(Config())

texts = """
Hello world, i can speak, yahoo!
"""
data = synthesizer.tts(texts)

with open("./audio_output/hello.wav", "wb") as f:
    f.write(data.read())

from pysndfx import AudioEffectsChain

fx = (
    AudioEffectsChain().highshelf().speed(0.8).pitch(-31).reverb(30)
    # .chorus(0.4, 0.6, [[55, 0.4, 0.55, .5, 't']])
    .lowshelf())

infile = './audio_output/hello.wav'
outfile = './audio_output/hello2.wav'

# Apply phaser and reverb directly to an audio file.