Spaces:
Running
Running
File size: 819 Bytes
20ee727 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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())
|