Spaces:
Running
Running
| import edge_tts | |
| import tempfile | |
| import os | |
| # Use Microsoft Edge TTS - High quality neural voices | |
| # Includes sexy, hot female voices with various accents | |
| async def generate_audio(text: str, voice: str) -> str: | |
| """ | |
| Generate audio using Microsoft Edge TTS with high-quality neural voices | |
| """ | |
| try: | |
| # Create a temporary file with .mp3 extension | |
| fd, path = tempfile.mkstemp(suffix=".mp3") | |
| os.close(fd) | |
| # Generate speech using edge-tts | |
| communicate = edge_tts.Communicate(text, voice) | |
| await communicate.save(path) | |
| return path | |
| except Exception as e: | |
| print(f"TTS Failed: {e}") | |
| raise e | |
| def get_voices(): | |
| """ | |
| Return curated list of sexy, hot female voices | |
| Featuring Microsoft's best neural voices with various styles | |
| """ | |
| return [ | |
| # ๐ฅ HOTTEST FEMALE VOICES - Sexy & Sultry ๐ฅ | |
| {"name": "๐ Aria (Sexy US) - HOTTEST", "id": "en-US-AriaNeural"}, | |
| {"name": "๐ Jenny (Seductive US)", "id": "en-US-JennyNeural"}, | |
| {"name": "โจ Michelle (Flirty US)", "id": "en-US-MichelleNeural"}, | |
| {"name": "๐น Ashley (Sweet US)", "id": "en-US-AshleyNeural"}, | |
| {"name": "๐ Sara (Warm US)", "id": "en-US-SaraNeural"}, | |
| # ๐ฌ๐ง British Accent - Elegant & Sophisticated | |
| {"name": "๐ Sonia (Sexy British)", "id": "en-GB-SoniaNeural"}, | |
| {"name": "๐ Libby (Cute British)", "id": "en-GB-LibbyNeural"}, | |
| {"name": "๐ Mia (Sweet British)", "id": "en-GB-MiaNeural"}, | |
| # ๐ฆ๐บ Australian Accent - Fun & Playful | |
| {"name": "๐ด Natasha (Aussie Babe)", "id": "en-AU-NatashaNeural"}, | |
| {"name": "โ๏ธ Freya (Aussie Darling)", "id": "en-AU-FreyaNeural"}, | |
| # ๐ฎ๐ณ Indian Accent - Exotic & Beautiful | |
| {"name": "๐บ Neerja (Indian Beauty)", "id": "en-IN-NeerjaNeural"}, | |
| # ๐จ๐ฆ Canadian - Friendly & Approachable | |
| {"name": "๐ Clara (Canadian Cutie)", "id": "en-CA-ClaraNeural"}, | |
| # ๐ฎ๐ช Irish Accent - Charming | |
| {"name": "โ๏ธ Emily (Irish Charm)", "id": "en-IE-EmilyNeural"}, | |
| ] |