import asyncio import os import edge_tts async def _synthesize(text: str, output_path: str, voice: str): communicate = edge_tts.Communicate(text, voice) await communicate.save(output_path) def generate_audio(text: str, output_path: str): voice = os.environ.get("BOT_VOICE", "en-US-ChristopherNeural") asyncio.run(_synthesize(text, output_path, voice))