File size: 484 Bytes
f71bc95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from wfloat_tts import load_generator, write_wave


def main() -> None:
    generator = load_generator(
        checkpoint_path="model.safetensors",
        config_path="config.json",
    )
    audio = generator.generate(
        text="Hey there, how are you today?",
        sid=11,
        emotion="neutral",
        intensity=0.5,
    )
    out_path = "out.wav"
    write_wave(out_path, audio.samples, audio.sample_rate)
    print(out_path)


if __name__ == "__main__":
    main()