import asyncio from utils.text_to_speech import TextToSpeech # Update with your actual module path import soundfile as sf async def main(): tts = TextToSpeech() text = "This is a test voice output" # Get audio data sample_rate, audio_data = await tts.synthesize(text) # Save to file (WAV format) sf.write("test_output.wav", audio_data, sample_rate) print("Saved test_output.wav") if __name__ == "__main__": asyncio.run(main())