| 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() | |