import asyncio import os import sys # Add parent directory to path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from app.services.voice_service import voice_service async def main(): text = "This is MicroFunnel Command Center. Systems initialized. Deployment authorized." print(f"Generating audio for: '{text}'") try: audio_bytes = await voice_service.generate_audio(text, voice="onyx") output_file = "test_voice.mp3" with open(output_file, "wb") as f: f.write(audio_bytes) print(f"✅ Success! Audio saved to {output_file}") print(f"📊 Size: {len(audio_bytes)} bytes") except Exception as e: print(f"❌ Error: {e}") if __name__ == "__main__": asyncio.run(main())