Spaces:
Sleeping
Sleeping
File size: 2,203 Bytes
4832b3b f1b9dc0 4832b3b f1b9dc0 21afc70 f1b9dc0 4832b3b f1b9dc0 4832b3b f1b9dc0 | 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | 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"},
] |