Spaces:
Running
Running
axeronis
feat: Unified AI Brain 2.0 (Merged Knowledge Base & Persona, Removed /knowledge routes)
20ee727 Download backend/scripts/test_voice.py from axeronis/microfunnel-api: direct link, hf CLI and curl.
- Browser
- Download file 819 Bytes
-
https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/backend/scripts/test_voice.py
- Command line
-
hf download hf://spaces/axeronis/microfunnel-api/backend/scripts/test_voice.py
-
curl -L -o test_voice.py https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/backend/scripts/test_voice.py
819 Bytes
| 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()) | |